diff --git a/eng/automation/api-specs.yaml b/eng/automation/api-specs.yaml index a9c6e29202ac..300d11833833 100644 --- a/eng/automation/api-specs.yaml +++ b/eng/automation/api-specs.yaml @@ -63,9 +63,6 @@ fist: service: iotfirmwaredefense graphservicesprod: service: graphservices -hdinsight/Microsoft.HDInsight/HDInsightOnAks: - service: hdinsight - suffix: containers help: service: selfhelp hybridaks: diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 897bb63c7162..f2a51ab8e763 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -449,7 +449,6 @@ com.azure.resourcemanager:azure-resourcemanager-quantum;1.0.0-beta.3;1.0.0-beta. com.azure.resourcemanager:azure-resourcemanager-chaos;1.3.0;1.4.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-sphere;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-defendereasm;1.0.0-beta.2;1.0.0-beta.3 -com.azure.resourcemanager:azure-resourcemanager-hdinsight-containers;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-apicenter;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-hybridconnectivity;1.1.0;1.2.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-playwrighttesting;1.0.0;1.1.0-beta.3 diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md deleted file mode 100644 index 074412b3c3a8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md +++ /dev/null @@ -1,1147 +0,0 @@ -# Release History - -## 1.0.0-beta.4 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.3 (2024-08-22) - -- 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 - -#### `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 - -* `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) - -- 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). - -### Breaking Changes - -#### `models.TrinoWorker` was modified - -* `withEnable(java.lang.Boolean)` was removed -* `withPort(java.lang.Integer)` was removed -* `port()` was removed -* `suspend()` was removed -* `withSuspend(java.lang.Boolean)` was removed -* `enable()` was removed - -#### `models.ClusterResizeData` was modified - -* `withTargetWorkerNodeCount(java.lang.Integer)` was removed -* `targetWorkerNodeCount()` was removed - -#### `models.ClusterPool` was modified - -* `logAnalyticsProfile()` was removed -* `computeProfile()` was removed -* `aksManagedResourceGroupName()` was removed -* `deploymentId()` was removed -* `networkProfile()` was removed -* `aksClusterProfile()` was removed -* `managedResourceGroupName()` was removed -* `status()` was removed -* `provisioningState()` was removed -* `clusterPoolProfile()` was removed - -#### `models.TrinoCoordinator` was modified - -* `suspend()` was removed -* `withPort(java.lang.Integer)` was removed -* `port()` was removed -* `enable()` was removed -* `withEnable(java.lang.Boolean)` was removed -* `withSuspend(java.lang.Boolean)` was removed - -#### `models.ClusterPool$Definition` was modified - -* `withComputeProfile(models.ClusterPoolResourcePropertiesComputeProfile)` was removed -* `withLogAnalyticsProfile(models.ClusterPoolResourcePropertiesLogAnalyticsProfile)` was removed -* `withClusterPoolProfile(models.ClusterPoolResourcePropertiesClusterPoolProfile)` was removed -* `withManagedResourceGroupName(java.lang.String)` was removed -* `withNetworkProfile(models.ClusterPoolResourcePropertiesNetworkProfile)` was removed - -#### `models.ServiceConfigResult` was modified - -* `path()` was removed -* `componentName()` was removed -* `serviceName()` was removed -* `type()` was removed -* `content()` was removed -* `customKeys()` was removed -* `defaultKeys()` was removed -* `fileName()` was removed - -#### `models.Cluster` was modified - -* `clusterProfile()` was removed -* `deploymentId()` was removed -* `status()` was removed -* `clusterType()` was removed -* `provisioningState()` was removed -* `computeProfile()` was removed - -#### `models.ClusterJobs` was modified - -* `list(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed - -#### `models.ClusterProfile` was modified - -* `withKafkaProfile(java.util.Map)` was removed -* `java.util.Map kafkaProfile()` -> `models.KafkaProfile kafkaProfile()` - -#### `models.ClusterInstanceViewResult` was modified - -* `status()` was removed -* `serviceStatuses()` was removed - -#### `models.ClusterPatch` was modified - -* `clusterProfile()` was removed -* `withTags(java.util.Map)` was removed -* `withLocation(java.lang.String)` was removed -* `withClusterProfile(models.UpdatableClusterProfile)` was removed -* `systemData()` was removed - -#### `models.Cluster$Definition` was modified - -* `withClusterType(java.lang.String)` was removed -* `withComputeProfile(models.ComputeProfile)` was removed -* `withClusterProfile(models.ClusterProfile)` was removed - -#### `models.ClusterPoolVersion` was modified - -* `aksVersion()` was removed -* `isPreview()` was removed -* `clusterPoolVersion()` was removed - -#### `models.ClusterVersion` was modified - -* `components()` was removed -* `clusterVersion()` was removed -* `clusterType()` was removed -* `isPreview()` was removed -* `ossVersion()` was removed -* `clusterPoolVersion()` was removed - -#### `models.Cluster$Update` was modified - -* `withClusterProfile(models.UpdatableClusterProfile)` was removed - -### Features Added - -* `models.ClusterPoolAvailableUpgrades` was added - -* `models.ClusterAvailableUpgradeType` was added - -* `models.ClusterAvailableUpgrade` was added - -* `models.ClusterPoolAvailableUpgradeList` was added - -* `models.ClusterUpgradeProperties` was added - -* `models.RangerAdminSpecDatabase` was added - -* `models.ClusterAvailableUpgrades` was added - -* `models.DataDiskType` was added - -* `models.DbConnectionAuthenticationMode` was added - -* `models.ClusterPoolVersionProperties` was added - -* `models.ClusterPoolUpgradeType` was added - -* `models.KafkaProfile` was added - -* `models.ServiceConfigResultProperties` was added - -* `models.ClusterUpgradeType` was added - -* `models.DiskStorageProfile` was added - -* `models.MetastoreDbConnectionAuthenticationMode` was added - -* `models.RangerUsersyncSpec` was added - -* `models.KafkaConnectivityEndpoints` was added - -* `models.ClusterPatchProperties` was added - -* `models.RangerAuditSpec` was added - -* `models.ClusterPoolNodeOsImageUpdateProperties` was added - -* `models.ClusterVersionProperties` was added - -* `models.CurrentClusterAksVersionStatus` was added - -* `models.ClusterAccessProfile` was added - -* `models.ClusterPoolUpgrade` was added - -* `models.ClusterPoolAvailableUpgradeNodeOsUpgradeProperties` was added - -* `models.ClusterPoolAvailableUpgradeType` was added - -* `models.ClusterPoolAksPatchVersionUpgradeProperties` was added - -* `models.DeploymentMode` was added - -* `models.FlinkJobProfile` was added - -* `models.ClusterAvailableUpgradeAksPatchUpgradeProperties` was added - -* `models.CurrentClusterPoolAksVersionStatus` was added - -* `models.RangerProfile` was added - -* `models.ClusterAvailableUpgradeList` was added - -* `models.RangerAdminSpec` was added - -* `models.ClusterInstanceViewResultProperties` was added - -* `models.ClusterUpgrade` was added - -* `models.ClusterResizeProperties` was added - -* `models.ClusterRangerPluginProfile` was added - -* `models.RangerUsersyncMode` was added - -* `models.OutboundType` was added - -* `models.ClusterHotfixUpgradeProperties` was added - -* `models.ClusterPoolAvailableUpgrade` was added - -* `models.ClusterResourceProperties` was added - -* `models.ClusterAvailableUpgradeProperties` was added - -* `models.UpgradeMode` was added - -* `models.Severity` was added - -* `models.ClusterPoolAvailableUpgradeProperties` was added - -* `models.ClusterPoolResourceProperties` was added - -* `models.ClusterAvailableUpgradeHotfixUpgradeProperties` was added - -* `models.TrinoDebugConfig` was added - -* `models.ClusterPoolAvailableUpgradeAksPatchUpgradeProperties` was added - -* `models.ClusterPoolUpgradeProperties` was added - -* `models.ClusterAksPatchVersionUpgradeProperties` was added - -#### `models.TrinoWorker` was modified - -* `withDebug(models.TrinoDebugConfig)` was added -* `debug()` was added - -#### `models.SshConnectivityEndpoint` was modified - -* `withPrivateSshEndpoint(java.lang.String)` was added -* `privateSshEndpoint()` was added - -#### `models.ClusterResizeData` was modified - -* `withProperties(models.ClusterResizeProperties)` was added -* `properties()` was added - -#### `models.ClusterPools` was modified - -* `upgrade(java.lang.String,java.lang.String,models.ClusterPoolUpgrade)` was added -* `upgrade(java.lang.String,java.lang.String,models.ClusterPoolUpgrade,com.azure.core.util.Context)` was added - -#### `models.ClusterPool` was modified - -* `upgrade(models.ClusterPoolUpgrade)` was added -* `upgrade(models.ClusterPoolUpgrade,com.azure.core.util.Context)` was added -* `properties()` was added - -#### `models.TrinoCoordinator` was modified - -* `debug()` was added -* `withDebug(models.TrinoDebugConfig)` was added - -#### `models.ClusterPool$Definition` was modified - -* `withProperties(models.ClusterPoolResourceProperties)` was added - -#### `models.ServiceConfigResult` was modified - -* `properties()` was added - -#### `models.Cluster` was modified - -* `upgrade(models.ClusterUpgrade,com.azure.core.util.Context)` was added -* `properties()` was added -* `upgrade(models.ClusterUpgrade)` was added - -#### `models.FlinkProfile` was modified - -* `deploymentMode()` was added -* `withDeploymentMode(models.DeploymentMode)` was added -* `withJobSpec(models.FlinkJobProfile)` was added -* `jobSpec()` was added - -#### `models.ClusterJobs` was modified - -* `list(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added - -#### `models.FlinkJobProperties` was modified - -* `runId()` was added -* `withRunId(java.lang.String)` was added - -#### `models.ClusterProfile` was modified - -* `withClusterAccessProfile(models.ClusterAccessProfile)` was added -* `withRangerPluginProfile(models.ClusterRangerPluginProfile)` was added -* `withRangerProfile(models.RangerProfile)` was added -* `withKafkaProfile(models.KafkaProfile)` was added -* `rangerProfile()` was added -* `clusterAccessProfile()` was added -* `rangerPluginProfile()` was added - -#### `models.ClusterInstanceViewResult` was modified - -* `properties()` was added - -#### `models.ClusterPoolNetworkProfile` was modified - -* `apiServerAuthorizedIpRanges()` was added -* `enablePrivateApiServer()` was added -* `withApiServerAuthorizedIpRanges(java.util.List)` was added -* `withEnablePrivateApiServer(java.lang.Boolean)` was added -* `withOutboundType(models.OutboundType)` was added -* `outboundType()` was added - -#### `models.ClusterPatch` was modified - -* `withProperties(models.ClusterPatchProperties)` was added -* `properties()` was added -* `tags()` was added - -#### `models.ConnectivityProfileWeb` was modified - -* `withPrivateFqdn(java.lang.String)` was added - -#### `models.SparkMetastoreSpec` was modified - -* `withDbConnectionAuthenticationMode(models.DbConnectionAuthenticationMode)` was added -* `dbConnectionAuthenticationMode()` was added - -#### `models.Clusters` was modified - -* `upgrade(java.lang.String,java.lang.String,java.lang.String,models.ClusterUpgrade,com.azure.core.util.Context)` was added -* `upgrade(java.lang.String,java.lang.String,java.lang.String,models.ClusterUpgrade)` was added - -#### `models.UpdatableClusterProfile` was modified - -* `withRangerProfile(models.RangerProfile)` was added -* `rangerPluginProfile()` was added -* `withRangerPluginProfile(models.ClusterRangerPluginProfile)` was added -* `rangerProfile()` was added - -#### `models.Cluster$Definition` was modified - -* `withProperties(models.ClusterResourceProperties)` was added - -#### `models.ClusterPoolVersion` was modified - -* `properties()` was added -* `systemData()` was added - -#### `HDInsightContainersManager` was modified - -* `clusterAvailableUpgrades()` was added -* `clusterPoolAvailableUpgrades()` was added - -#### `models.ClusterPoolResourcePropertiesNetworkProfile` was modified - -* `withOutboundType(models.OutboundType)` was added -* `withApiServerAuthorizedIpRanges(java.util.List)` was added -* `withEnablePrivateApiServer(java.lang.Boolean)` was added - -#### `models.FlinkHiveCatalogOption` was modified - -* `withMetastoreDbConnectionAuthenticationMode(models.MetastoreDbConnectionAuthenticationMode)` was added -* `metastoreDbConnectionAuthenticationMode()` was added - -#### `models.HiveCatalogOption` was modified - -* `metastoreDbConnectionAuthenticationMode()` was added -* `withMetastoreDbConnectionAuthenticationMode(models.MetastoreDbConnectionAuthenticationMode)` was added - -#### `models.ClusterVersion` was modified - -* `systemData()` was added -* `properties()` was added - -#### `models.WebConnectivityEndpoint` was modified - -* `privateFqdn()` was added -* `withPrivateFqdn(java.lang.String)` was added - -#### `models.Cluster$Update` was modified - -* `withProperties(models.ClusterPatchProperties)` was added - -## 1.0.0-beta.1 (2023-08-24) - -- Azure Resource Manager HDInsightContainers client library for Java. This package contains Microsoft Azure SDK for HDInsightContainers Management SDK. HDInsight Containers Management Client. Package tag package-2023-06-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md deleted file mode 100644 index e6781b7f47ae..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# Azure Resource Manager HDInsightContainers client library for Java - -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). - -## We'd love to hear your feedback - -We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. - -If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. - -Thank you in advance for your collaboration. We really appreciate your time! - -## Documentation - -Various documentation is available to help you get started - -- [API reference documentation][docs] - -## Getting started - -### Prerequisites - -- [Java Development Kit (JDK)][jdk] with version 8 or above -- [Azure Subscription][azure_subscription] - -### Adding the package to your product - -[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-hdinsight-containers;current}) -```xml - - com.azure.resourcemanager - azure-resourcemanager-hdinsight-containers - 1.0.0-beta.4 - -``` -[//]: # ({x-version-update-end}) - -### Include the recommended packages - -Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. - -[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. - -### Authentication - -Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package. - -Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. - -Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: - -```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); -TokenCredential credential = new DefaultAzureCredentialBuilder() - .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) - .build(); -HDInsightContainersManager manager = HDInsightContainersManager - .authenticate(credential, profile); -``` - -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. - -See [Authentication][authenticate] for more options. - -## Key concepts - -See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. - -## Examples - -[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md) - - -## Troubleshooting - -## Next steps - -## Contributing - -For details on contributing to this repository, see the [contributing guide][cg]. - -This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . - -When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. - -This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. - - -[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS -[docs]: https://azure.github.io/azure-sdk-for-java/ -[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 -[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md -[coc]: https://opensource.microsoft.com/codeofconduct/ -[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md deleted file mode 100644 index fb4e97399eb4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md +++ /dev/null @@ -1,1437 +0,0 @@ -# Code snippets and samples - - -## AvailableClusterPoolVersions - -- [ListByLocation](#availableclusterpoolversions_listbylocation) - -## AvailableClusterVersions - -- [ListByLocation](#availableclusterversions_listbylocation) - -## ClusterAvailableUpgrades - -- [List](#clusteravailableupgrades_list) - -## ClusterJobs - -- [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) -- [Delete](#clusterpools_delete) -- [GetByResourceGroup](#clusterpools_getbyresourcegroup) -- [List](#clusterpools_list) -- [ListByResourceGroup](#clusterpools_listbyresourcegroup) -- [UpdateTags](#clusterpools_updatetags) -- [Upgrade](#clusterpools_upgrade) - -## ClusterUpgradeHistories - -- [List](#clusterupgradehistories_list) - -## Clusters - -- [Create](#clusters_create) -- [Delete](#clusters_delete) -- [Get](#clusters_get) -- [GetInstanceView](#clusters_getinstanceview) -- [ListByClusterPoolName](#clusters_listbyclusterpoolname) -- [ListInstanceViews](#clusters_listinstanceviews) -- [ListServiceConfigs](#clusters_listserviceconfigs) -- [Resize](#clusters_resize) -- [Update](#clusters_update) -- [Upgrade](#clusters_upgrade) -- [UpgradeManualRollback](#clusters_upgrademanualrollback) - -## Locations - -- [CheckNameAvailability](#locations_checknameavailability) - -## Operations - -- [List](#operations_list) -### AvailableClusterPoolVersions_ListByLocation - -```java -/** - * Samples for AvailableClusterPoolVersions ListByLocation. - */ -public final class AvailableClusterPoolVersionsListByLocationSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListAvailableClusterPoolVersions.json - */ - /** - * Sample code: ClusterPoolVersionListResult. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clusterPoolVersionListResult( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.availableClusterPoolVersions().listByLocation("westus2", com.azure.core.util.Context.NONE); - } -} -``` - -### AvailableClusterVersions_ListByLocation - -```java -/** - * Samples for AvailableClusterVersions ListByLocation. - */ -public final class AvailableClusterVersionsListByLocationSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListAvailableClusterVersions.json - */ - /** - * Sample code: ClusterVersionListResult. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterVersionListResult(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.availableClusterVersions().listByLocation("westus2", com.azure.core.util.Context.NONE); - } -} -``` - -### ClusterAvailableUpgrades_List - -```java -/** - * Samples for ClusterAvailableUpgrades List. - */ -public final class ClusterAvailableUpgradesListSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterAvailableUpgrades.json - */ - /** - * Sample code: GetClusterAvailableUpgrade. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - getClusterAvailableUpgrade(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterAvailableUpgrades() - .list("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); - } -} -``` - -### ClusterJobs_List - -```java -/** - * Samples for ClusterJobs List. - */ -public final class ClusterJobsListSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterJobs.json - */ - /** - * Sample code: ListClusterJobs. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - listClusterJobs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterJobs() - .list("hiloResourcegroup", "clusterPool1", "cluster1", null, com.azure.core.util.Context.NONE); - } -} -``` - -### ClusterJobs_RunJob - -```java -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.Action; -import com.azure.resourcemanager.hdinsight.containers.models.FlinkJobProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ClusterJobs RunJob. - */ -public final class ClusterJobsRunJobSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * RunClusterJob.json - */ - /** - * Sample code: RunClusterJob. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - runClusterJob(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterJobs() - .runJob("hiloResourcegroup", "clusterpool1", "cluster1", - new ClusterJobInner() - .withProperties(new FlinkJobProperties().withJobName("flink-job-name") - .withJobJarDirectory("abfs://flinkjob@hilosa.dfs.core.windows.net/jars") - .withJarName("flink-sleep-job-0.0.1-SNAPSHOT.jar") - .withEntryClass("com.microsoft.hilo.flink.job.streaming.SleepJob") - .withAction(Action.START) - .withFlinkConfiguration(mapOf("parallelism", "1", "savepoint.directory", - "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint"))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### ClusterLibraries_List - -```java -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 -/** - * Samples for ClusterPoolAvailableUpgrades List. - */ -public final class ClusterPoolAvailableUpgradesListSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterPoolAvailableUpgrades.json - */ - /** - * Sample code: GetClusterPoolAvailableUpgrade. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void getClusterPoolAvailableUpgrade( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPoolAvailableUpgrades() - .list("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); - } -} -``` - -### 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); - } -} -``` - -### ClusterPools_CreateOrUpdate - -```java -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; - -/** - * Samples for ClusterPools CreateOrUpdate. - */ -public final class ClusterPoolsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateClusterPoolWithPrivateAks.json - */ - /** - * Sample code: ClusterPoolPutWithPrivateAks. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clusterPoolPutWithPrivateAks( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .define("clusterpool1") - .withRegion("West US 2") - .withExistingResourceGroup("hiloResourcegroup") - .withProperties(new ClusterPoolResourceProperties() - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2") - .withAvailabilityZones(Arrays.asList("1", "2", "3"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId( - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withEnablePrivateApiServer(true))) - .create(); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateClusterPoolWithUDRAks.json - */ - /** - * Sample code: ClusterPoolPutWithUDRAks. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolPutWithUDRAks(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .define("clusterpool1") - .withRegion("West US 2") - .withExistingResourceGroup("hiloResourcegroup") - .withProperties(new ClusterPoolResourceProperties() - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2") - .withAvailabilityZones(Arrays.asList("1", "2", "3"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId( - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withOutboundType(OutboundType.USER_DEFINED_ROUTING))) - .create(); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateClusterPool.json - */ - /** - * Sample code: ClusterPoolPut. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .define("clusterpool1") - .withRegion("West US 2") - .withExistingResourceGroup("hiloResourcegroup") - .withProperties(new ClusterPoolResourceProperties() - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2") - .withAvailabilityZones(Arrays.asList("1", "2", "3")))) - .create(); - } -} -``` - -### ClusterPools_Delete - -```java -/** - * Samples for ClusterPools Delete. - */ -public final class ClusterPoolsDeleteSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * DeleteClusterPool.json - */ - /** - * Sample code: ClusterPoolDelete. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolDelete(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools().delete("rg1", "clusterpool1", com.azure.core.util.Context.NONE); - } -} -``` - -### ClusterPools_GetByResourceGroup - -```java -/** - * Samples for ClusterPools GetByResourceGroup. - */ -public final class ClusterPoolsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * GetClusterPool.json - */ - /** - * Sample code: ClusterPoolGet. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolGet(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); - } -} -``` - -### ClusterPools_List - -```java -/** - * Samples for ClusterPools List. - */ -public final class ClusterPoolsListSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterPoolsSubscription.json - */ - /** - * Sample code: ClusterPoolsListBySubscription. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clusterPoolsListBySubscription( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools().list(com.azure.core.util.Context.NONE); - } -} -``` - -### ClusterPools_ListByResourceGroup - -```java -/** - * Samples for ClusterPools ListByResourceGroup. - */ -public final class ClusterPoolsListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterPools.json - */ - /** - * Sample code: ClusterPoolsListByResourceGroup. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clusterPoolsListByResourceGroup( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools().listByResourceGroup("hiloResourcegroup", com.azure.core.util.Context.NONE); - } -} -``` - -### ClusterPools_UpdateTags - -```java -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ClusterPools UpdateTags. - */ -public final class ClusterPoolsUpdateTagsSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * PatchClusterPool.json - */ - /** - * Sample code: ClusterPoolsPatchTags. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolsPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - ClusterPool resource = manager.clusterPools() - .getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### ClusterPools_Upgrade - -```java -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAksPatchVersionUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNodeOsImageUpdateProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; - -/** - * Samples for ClusterPools Upgrade. - */ -public final class ClusterPoolsUpgradeSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UpgradeNodeOsForClusterPool.json - */ - /** - * Sample code: ClusterPoolsUpgradeNodeOs. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolsUpgradeNodeOs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .upgrade("hiloResourcegroup", "clusterpool1", - new ClusterPoolUpgrade().withProperties(new ClusterPoolNodeOsImageUpdateProperties()), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UpgradeAKSPatchVersionForClusterPool.json - */ - /** - * Sample code: ClusterPoolsUpgradeAKSPatchVersion. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clusterPoolsUpgradeAKSPatchVersion( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .upgrade("hiloResourcegroup", "clusterpool1", - new ClusterPoolUpgrade() - .withProperties(new ClusterPoolAksPatchVersionUpgradeProperties().withUpgradeClusterPool(true) - .withUpgradeAllClusterNodes(false)), - com.azure.core.util.Context.NONE); - } -} -``` - -### ClusterUpgradeHistories_List - -```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); - } -} -``` - -### Clusters_Create - -```java -import com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleType; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAccessProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfigsProfile; -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.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; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec; -import com.azure.resourcemanager.hdinsight.containers.models.RangerProfile; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec; -import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; -import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import com.azure.resourcemanager.hdinsight.containers.models.SparkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.SshProfile; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoProfile; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Clusters Create. - */ -public final class ClustersCreateSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateSparkCluster.json - */ - /** - * Sample code: HDInsightSparkClusterPut. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightSparkClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .define("cluster1") - .withRegion("West US 2") - .withExistingClusterpool("hiloResourcegroup", "clusterpool1") - .withProperties(new ClusterResourceProperties().withClusterType("spark") - .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") - .withFiles(Arrays.asList(new ClusterConfigFile().withFileName("spark-defaults.conf") - .withValues(mapOf("spark.eventLog.enabled", "true")))))), - new ClusterServiceConfigsProfile().withServiceName("yarn-service") - .withConfigs(Arrays.asList(new ClusterServiceConfig().withComponent("yarn-config") - .withFiles(Arrays.asList( - new ClusterConfigFile().withFileName("core-site.xml") - .withValues(mapOf("fs.defaultFS", - "wasb://testcontainer@teststorage.dfs.core.windows.net/", - "storage.container", "testcontainer", "storage.key", "fakeTokenPlaceholder", - "storage.name", "teststorage", "storage.protocol", "wasb")), - new ClusterConfigFile().withFileName("yarn-site.xml") - .withValues(mapOf("yarn.webapp.ui2.enable", "false")))))))) - .withSshProfile(new SshProfile().withCount(2).withVmSize("Standard_D3_v2")) - .withSparkProfile(new SparkProfile()))) - .create(); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateSparkClusterWithInternalIngress.json - */ - /** - * Sample code: HDInsightSparkClusterPutWithInternalIngress. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightSparkClusterPutWithInternalIngress( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .define("cluster1") - .withRegion("West US 2") - .withExistingClusterpool("hiloResourcegroup", "clusterpool1") - .withProperties(new ClusterResourceProperties().withClusterType("spark") - .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") - .withFiles(Arrays.asList(new ClusterConfigFile().withFileName("spark-defaults.conf") - .withValues(mapOf("spark.eventLog.enabled", "true")))))), - new ClusterServiceConfigsProfile().withServiceName("yarn-service") - .withConfigs(Arrays.asList(new ClusterServiceConfig().withComponent("yarn-config") - .withFiles(Arrays.asList( - new ClusterConfigFile().withFileName("core-site.xml") - .withValues(mapOf("fs.defaultFS", - "wasb://testcontainer@teststorage.dfs.core.windows.net/", - "storage.container", "testcontainer", "storage.key", "fakeTokenPlaceholder", - "storage.name", "teststorage", "storage.protocol", "wasb")), - new ClusterConfigFile().withFileName("yarn-site.xml") - .withValues(mapOf("yarn.webapp.ui2.enable", "false")))))))) - .withClusterAccessProfile(new ClusterAccessProfile().withEnableInternalIngress(true)) - .withSshProfile(new SshProfile().withCount(2).withVmSize("Standard_D3_v2")) - .withSparkProfile(new SparkProfile()))) - .create(); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateAutoscaleCluster.json - */ - /** - * Sample code: HDInsightClusterPut. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .define("cluster1") - .withRegion("West US 2") - .withExistingClusterpool("hiloResourcegroup", "clusterpool1") - .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))) - .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).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/2024-05-01-preview/examples/ - * CreateRangerCluster.json - */ - /** - * Sample code: HDInsightRangerClusterPut. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightRangerClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .define("cluster1") - .withRegion("West US 2") - .withExistingClusterpool("hiloResourcegroup", "clusterpool1") - .withProperties(new ClusterResourceProperties().withClusterType("ranger") - .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"))) - .withRangerAudit(new RangerAuditSpec() - .withStorageAccount("https://teststorage.blob.core.windows.net/testblob")) - .withRangerUsersync(new RangerUsersyncSpec().withEnabled(true) - .withGroups(Arrays.asList("0a53828f-36c9-44c3-be3d-99a7fce977ad", - "13be6971-79db-4f33-9d41-b25589ca25ac")) - .withMode(RangerUsersyncMode.AUTOMATIC) - .withUsers(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")))))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### Clusters_Delete - -```java -/** - * Samples for Clusters Delete. - */ -public final class ClustersDeleteSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * DeleteCluster.json - */ - /** - * Sample code: HDInsightClustersDelete. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClustersDelete(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters().delete("rg1", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); - } -} -``` - -### Clusters_Get - -```java -/** - * Samples for Clusters Get. - */ -public final class ClustersGetSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * GetCluster.json - */ - /** - * Sample code: HDInsightClusterGet. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClusterGet(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); - } -} -``` - -### Clusters_GetInstanceView - -```java -/** - * Samples for Clusters GetInstanceView. - */ -public final class ClustersGetInstanceViewSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * GetClusterInstanceView.json - */ - /** - * Sample code: HDInsightClusterGetInstanceView. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClusterGetInstanceView( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .getInstanceViewWithResponse("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); - } -} -``` - -### Clusters_ListByClusterPoolName - -```java -/** - * Samples for Clusters ListByClusterPoolName. - */ -public final class ClustersListByClusterPoolNameSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClustersByClusterPoolName.json - */ - /** - * Sample code: HDInsightClustersListByClusterPoolName. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClustersListByClusterPoolName( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters().listByClusterPoolName("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); - } -} -``` - -### Clusters_ListInstanceViews - -```java -/** - * Samples for Clusters ListInstanceViews. - */ -public final class ClustersListInstanceViewsSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterInstanceViews.json - */ - /** - * Sample code: HDInsightClusterGetInstanceViews. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClusterGetInstanceViews( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters().listInstanceViews("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); - } -} -``` - -### Clusters_ListServiceConfigs - -```java -/** - * Samples for Clusters ListServiceConfigs. - */ -public final class ClustersListServiceConfigsSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterServiceConfigs.json - */ - /** - * Sample code: HDInsightClusterGetServiceConfigs. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClusterGetServiceConfigs( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters().listServiceConfigs("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); - } -} -``` - -### Clusters_Resize - -```java -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeProperties; - -/** - * Samples for Clusters Resize. - */ -public final class ClustersResizeSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ResizeCluster.json - */ - /** - * Sample code: HDInsightClusterResize. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClusterResize(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .resize("hiloResourcegroup", "clusterpool1", "cluster1", - new ClusterResizeData().withLocation("West US 2") - .withProperties(new ClusterResizeProperties().withTargetWorkerNodeCount(5)), - com.azure.core.util.Context.NONE); - } -} -``` - -### Clusters_Update - -```java -import com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleType; -import com.azure.resourcemanager.hdinsight.containers.models.Cluster; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsApplicationLogs; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatchProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfigsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpec; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpecDatabase; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec; -import com.azure.resourcemanager.hdinsight.containers.models.RangerProfile; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import com.azure.resourcemanager.hdinsight.containers.models.SshProfile; -import com.azure.resourcemanager.hdinsight.containers.models.UpdatableClusterProfile; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Clusters Update. - */ -public final class ClustersUpdateSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * PatchRangerCluster.json - */ - /** - * Sample code: HDInsightRangerClusterPatchTags. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightRangerClusterPatchTags( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - Cluster resource = manager.clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new ClusterPatchProperties() - .withClusterProfile(new UpdatableClusterProfile().withRangerProfile(new RangerProfile() - .withRangerAdmin(new RangerAdminSpec() - .withAdmins(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")) - .withDatabase(new RangerAdminSpecDatabase().withHost("testsqlserver.database.windows.net") - .withName("testdb") - .withPasswordSecretRef("fakeTokenPlaceholder") - .withUsername("admin"))) - .withRangerAudit( - new RangerAuditSpec().withStorageAccount("https://teststorage.blob.core.windows.net/testblob")) - .withRangerUsersync(new RangerUsersyncSpec().withEnabled(true) - .withGroups(Arrays.asList("0a53828f-36c9-44c3-be3d-99a7fce977ad", - "13be6971-79db-4f33-9d41-b25589ca25ac")) - .withMode(RangerUsersyncMode.AUTOMATIC) - .withUsers(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")))))) - .apply(); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * PatchCluster.json - */ - /** - * Sample code: HDInsightClustersPatchTags. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClustersPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - Cluster resource = manager.clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties( - new ClusterPatchProperties() - .withClusterProfile( - new UpdatableClusterProfile() - .withServiceConfigsProfiles( - Arrays - .asList( - new ClusterServiceConfigsProfile().withServiceName("TestService1") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig().withComponent("TestComp1") - .withFiles( - Arrays.asList( - new ClusterConfigFile().withFileName("TestFile1") - .withValues(mapOf("Test.config.1", "1", - "Test.config.2", "2")), - new ClusterConfigFile().withFileName("TestFile2") - .withValues(mapOf("Test.config.3", "3", - "Test.config.4", "4")))), - new ClusterServiceConfig().withComponent("TestComp2") - .withFiles(Arrays - .asList( - new ClusterConfigFile().withFileName("TestFile3") - .withContent("TestContent") - .withPath("TestPath"), - new ClusterConfigFile() - .withFileName("TestFile4") - .withValues(mapOf("Test.config.7", "7", - "Test.config.8", "8")))))), - new ClusterServiceConfigsProfile().withServiceName("TestService2") - .withConfigs( - Arrays - .asList(new ClusterServiceConfig().withComponent("TestComp3") - .withFiles(Arrays - .asList(new ClusterConfigFile().withFileName("TestFile5") - .withValues(mapOf("Test.config.9", "9")))))))) - .withSshProfile(new SshProfile().withCount(2)) - .withAutoscaleProfile( - new AutoscaleProfile().withEnabled(true) - .withGracefulDecommissionTimeout(-1) - .withAutoscaleType(AutoscaleType.SCHEDULE_BASED) - .withScheduleBasedConfig(new ScheduleBasedConfig() - .withTimeZone("Cen. Australia Standard Time") - .withDefaultCount(3) - .withSchedules(Arrays.asList( - new Schedule().withStartTime("00:00") - .withEndTime("12:00") - .withCount(3) - .withDays(Arrays - .asList(ScheduleDay.fromString("Monday, Tuesday, Wednesday"))), - new Schedule().withStartTime("00:00") - .withEndTime("12:00") - .withCount(3) - .withDays(Arrays.asList(ScheduleDay.SUNDAY)))))) - .withAuthorizationProfile( - new AuthorizationProfile().withUserIds(Arrays.asList("Testuser1", "Testuser2"))) - .withLogAnalyticsProfile(new ClusterLogAnalyticsProfile().withEnabled(true) - .withApplicationLogs(new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(true) - .withStdErrorEnabled(true)) - .withMetricsEnabled(true)))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### Clusters_Upgrade - -```java -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAksPatchVersionUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; - -/** - * Samples for Clusters Upgrade. - */ -public final class ClustersUpgradeSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UpgradeAKSPatchVersionForCluster.json - */ - /** - * Sample code: ClustersUpgradeAKSPatchVersion. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clustersUpgradeAKSPatchVersion( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .upgrade("hiloResourcegroup", "clusterpool1", "cluster1", - new ClusterUpgrade().withProperties(new ClusterAksPatchVersionUpgradeProperties()), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UpgradeHotfixForCluster.json - */ - /** - * Sample code: ClustersUpgradeHotfix. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clustersUpgradeHotfix(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .upgrade("hiloResourcegroup", "clusterpool1", "cluster1", - new ClusterUpgrade().withProperties(new ClusterHotfixUpgradeProperties().withTargetOssVersion("1.16.0") - .withTargetClusterVersion("1.0.6") - .withTargetBuildNumber("3") - .withComponentName("historyserver")), - com.azure.core.util.Context.NONE); - } -} -``` - -### 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); - } -} -``` - -### Locations_CheckNameAvailability - -```java -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; - -/** - * Samples for Locations CheckNameAvailability. - */ -public final class LocationsCheckNameAvailabilitySamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * LocationsNameAvailability.json - */ - /** - * Sample code: LocationsNameAvailability. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - locationsNameAvailability(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.locations() - .checkNameAvailabilityWithResponse("southeastasia", - new NameAvailabilityParameters().withName("contosemember1") - .withType("Microsoft.HDInsight/clusterPools/clusters"), - com.azure.core.util.Context.NONE); - } -} -``` - -### Operations_List - -```java -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * GetOperations.json - */ - /** - * Sample code: ListOperations. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - listOperations(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} -``` - diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml deleted file mode 100644 index 0b7a2bd10baf..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - - - com.azure.resourcemanager - azure-resourcemanager-hdinsight-containers - 1.0.0-beta.4 - 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-2024-05. - https://github.com/Azure/azure-sdk-for-java - - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - 0 - 0 - true - - - - com.azure - azure-json - 1.5.0 - - - com.azure - azure-core - 1.57.0 - - - com.azure - azure-core-management - 1.19.2 - - - com.azure - azure-core-test - 1.27.0-beta.13 - test - - - com.azure - azure-identity - 1.18.1 - 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 deleted file mode 100644 index 838aa644c5cd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java +++ /dev/null @@ -1,457 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.hdinsight.containers.fluent.HDInsightContainersManagementClient; -import com.azure.resourcemanager.hdinsight.containers.implementation.AvailableClusterPoolVersionsImpl; -import com.azure.resourcemanager.hdinsight.containers.implementation.AvailableClusterVersionsImpl; -import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterAvailableUpgradesImpl; -import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterJobsImpl; -import com.azure.resourcemanager.hdinsight.containers.implementation.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; -import com.azure.resourcemanager.hdinsight.containers.models.AvailableClusterPoolVersions; -import com.azure.resourcemanager.hdinsight.containers.models.AvailableClusterVersions; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgrades; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobs; -import com.azure.resourcemanager.hdinsight.containers.models.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; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * Entry point to HDInsightContainersManager. - * HDInsight Containers Management Client. - */ -public final class HDInsightContainersManager { - private ClusterPools clusterPools; - - private ClusterPoolAvailableUpgrades clusterPoolAvailableUpgrades; - - private ClusterPoolUpgradeHistories clusterPoolUpgradeHistories; - - private Clusters clusters; - - private ClusterAvailableUpgrades clusterAvailableUpgrades; - - private ClusterUpgradeHistories clusterUpgradeHistories; - - private ClusterJobs clusterJobs; - - private Locations locations; - - private Operations operations; - - private AvailableClusterPoolVersions availableClusterPoolVersions; - - 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(); - } - - /** - * Creates an instance of HDInsightContainers service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the HDInsightContainers service API instance. - */ - public static HDInsightContainersManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of HDInsightContainers service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the HDInsightContainers service API instance. - */ - public static HDInsightContainersManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new HDInsightContainersManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create HDInsightContainersManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new HDInsightContainersManager.Configurable(); - } - - /** - * The Configurable allowing configurations to be set. - */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - *

- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of HDInsightContainers service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the HDInsightContainers service API instance. - */ - public HDInsightContainersManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - 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.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)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - 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())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new HDInsightContainersManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of ClusterPools. It manages ClusterPool. - * - * @return Resource collection API of ClusterPools. - */ - public ClusterPools clusterPools() { - if (this.clusterPools == null) { - this.clusterPools = new ClusterPoolsImpl(clientObject.getClusterPools(), this); - } - return clusterPools; - } - - /** - * Gets the resource collection API of ClusterPoolAvailableUpgrades. - * - * @return Resource collection API of ClusterPoolAvailableUpgrades. - */ - public ClusterPoolAvailableUpgrades clusterPoolAvailableUpgrades() { - if (this.clusterPoolAvailableUpgrades == null) { - this.clusterPoolAvailableUpgrades - = new ClusterPoolAvailableUpgradesImpl(clientObject.getClusterPoolAvailableUpgrades(), this); - } - return clusterPoolAvailableUpgrades; - } - - /** - * Gets the resource collection API of 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. - * - * @return Resource collection API of Clusters. - */ - public Clusters clusters() { - if (this.clusters == null) { - this.clusters = new ClustersImpl(clientObject.getClusters(), this); - } - return clusters; - } - - /** - * Gets the resource collection API of ClusterAvailableUpgrades. - * - * @return Resource collection API of ClusterAvailableUpgrades. - */ - public ClusterAvailableUpgrades clusterAvailableUpgrades() { - if (this.clusterAvailableUpgrades == null) { - this.clusterAvailableUpgrades - = new ClusterAvailableUpgradesImpl(clientObject.getClusterAvailableUpgrades(), this); - } - return clusterAvailableUpgrades; - } - - /** - * Gets the resource collection API of 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. - * - * @return Resource collection API of ClusterJobs. - */ - public ClusterJobs clusterJobs() { - if (this.clusterJobs == null) { - this.clusterJobs = new ClusterJobsImpl(clientObject.getClusterJobs(), this); - } - return clusterJobs; - } - - /** - * Gets the resource collection API of Locations. - * - * @return Resource collection API of Locations. - */ - public Locations locations() { - if (this.locations == null) { - this.locations = new LocationsImpl(clientObject.getLocations(), this); - } - return locations; - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of AvailableClusterPoolVersions. - * - * @return Resource collection API of AvailableClusterPoolVersions. - */ - public AvailableClusterPoolVersions availableClusterPoolVersions() { - if (this.availableClusterPoolVersions == null) { - this.availableClusterPoolVersions - = new AvailableClusterPoolVersionsImpl(clientObject.getAvailableClusterPoolVersions(), this); - } - return availableClusterPoolVersions; - } - - /** - * Gets the resource collection API of AvailableClusterVersions. - * - * @return Resource collection API of AvailableClusterVersions. - */ - public AvailableClusterVersions availableClusterVersions() { - if (this.availableClusterVersions == null) { - this.availableClusterVersions - = new AvailableClusterVersionsImpl(clientObject.getAvailableClusterVersions(), this); - } - 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. - * - * @return Wrapped service client HDInsightContainersManagementClient. - */ - public HDInsightContainersManagementClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterPoolVersionsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterPoolVersionsClient.java deleted file mode 100644 index c88550abec11..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterPoolVersionsClient.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.ClusterPoolVersionInner; - -/** - * An instance of this class provides access to all the operations defined in AvailableClusterPoolVersionsClient. - */ -public interface AvailableClusterPoolVersionsClient { - /** - * Returns a list of available cluster pool versions. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster pool versions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location); - - /** - * Returns a list of available cluster pool versions. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 versions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterVersionsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterVersionsClient.java deleted file mode 100644 index ade4b45436b0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterVersionsClient.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.ClusterVersionInner; - -/** - * An instance of this class provides access to all the operations defined in AvailableClusterVersionsClient. - */ -public interface AvailableClusterVersionsClient { - /** - * Returns a list of available cluster versions. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster versions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location); - - /** - * Returns a list of available cluster versions. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 versions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterAvailableUpgradesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterAvailableUpgradesClient.java deleted file mode 100644 index c4e794b8385a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterAvailableUpgradesClient.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; - -/** - * An instance of this class provides access to all the operations defined in ClusterAvailableUpgradesClient. - */ -public interface ClusterAvailableUpgradesClient { - /** - * List a cluster available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster available upgrade as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterPoolName, - String clusterName); - - /** - * List a cluster available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster available upgrade as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterPoolName, - String clusterName, Context context); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterJobsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterJobsClient.java deleted file mode 100644 index 931dd88ea332..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterJobsClient.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.ClusterJobInner; - -/** - * An instance of this class provides access to all the operations defined in ClusterJobsClient. - */ -public interface ClusterJobsClient { - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterJobInner> beginRunJob(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterJobInner clusterJob); - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterJobInner> beginRunJob(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterJobInner clusterJob, Context context); - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterJobInner runJob(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterJobInner clusterJob); - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterJobInner runJob(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterJobInner clusterJob, Context context); - - /** - * Get jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName); - - /** - * Get jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq - * {jobName}' or 'jarName eq {jarName}'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName, - String filter, Context context); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterLibrariesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterLibrariesClient.java deleted file mode 100644 index 2f8bb95b769d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterLibrariesClient.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 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/ClusterPoolAvailableUpgradesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolAvailableUpgradesClient.java deleted file mode 100644 index b6190cf52402..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolAvailableUpgradesClient.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; - -/** - * An instance of this class provides access to all the operations defined in ClusterPoolAvailableUpgradesClient. - */ -public interface ClusterPoolAvailableUpgradesClient { - /** - * List a cluster pool available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster pool available upgrade as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterPoolName); - - /** - * List a cluster pool available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster pool available upgrade as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String clusterPoolName, - Context context); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolUpgradeHistoriesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolUpgradeHistoriesClient.java deleted file mode 100644 index daf1ada193c6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolUpgradeHistoriesClient.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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/ClusterPoolsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolsClient.java deleted file mode 100644 index 782e4a9fc8f6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolsClient.java +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright (c) 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.http.rest.Response; -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.ClusterPoolInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.TagsObject; - -/** - * An instance of this class provides access to all the operations defined in ClusterPoolsClient. - */ -public interface ClusterPoolsClient { - /** - * Gets a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String clusterPoolName, - Context context); - - /** - * Gets a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterPoolInner getByResourceGroup(String resourceGroupName, String clusterPoolName); - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterPoolInner> beginCreateOrUpdate(String resourceGroupName, - String clusterPoolName, ClusterPoolInner clusterPool); - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterPoolInner> beginCreateOrUpdate(String resourceGroupName, - String clusterPoolName, ClusterPoolInner clusterPool, Context context); - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterPoolInner createOrUpdate(String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool); - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterPoolInner createOrUpdate(String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool, - Context context); - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterPoolInner> beginUpdateTags(String resourceGroupName, - String clusterPoolName, TagsObject clusterPoolTags); - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterPoolInner> beginUpdateTags(String resourceGroupName, - String clusterPoolName, TagsObject clusterPoolTags, Context context); - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterPoolInner updateTags(String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags); - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterPoolInner updateTags(String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags, - Context context); - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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> beginDelete(String resourceGroupName, String clusterPoolName); - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @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> beginDelete(String resourceGroupName, String clusterPoolName, Context context); - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 delete(String resourceGroupName, String clusterPoolName); - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @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 delete(String resourceGroupName, String clusterPoolName, Context context); - - /** - * Gets the list of Cluster Pools within a Subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cluster Pools within a Subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Gets the list of Cluster Pools within a Subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cluster Pools within a Subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster pools operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster pools operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterPoolInner> beginUpgrade(String resourceGroupName, - String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest); - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterPoolInner> beginUpgrade(String resourceGroupName, - String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context); - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterPoolInner upgrade(String resourceGroupName, String clusterPoolName, - ClusterPoolUpgrade clusterPoolUpgradeRequest); - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterPoolInner upgrade(String resourceGroupName, String clusterPoolName, - ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterUpgradeHistoriesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterUpgradeHistoriesClient.java deleted file mode 100644 index 261780804619..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterUpgradeHistoriesClient.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 deleted file mode 100644 index 0cdcc92c6cdb..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClustersClient.java +++ /dev/null @@ -1,565 +0,0 @@ -// Copyright (c) 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.http.rest.Response; -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.ClusterInner; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ServiceConfigResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatch; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollback; - -/** - * An instance of this class provides access to all the operations defined in ClustersClient. - */ -public interface ClustersClient { - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName); - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName, - Context context); - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginUpgrade(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterUpgrade clusterUpgradeRequest); - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginUpgrade(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterUpgrade clusterUpgradeRequest, Context context); - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner upgrade(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterUpgrade clusterUpgradeRequest); - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner upgrade(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterUpgrade clusterUpgradeRequest, Context context); - - /** - * 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. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> beginResize(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterResizeData clusterResizeRequest); - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize 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> beginResize(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterResizeData clusterResizeRequest, Context context); - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner resize(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterResizeData clusterResizeRequest); - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize 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 resize(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterResizeData clusterResizeRequest, Context context); - - /** - * Gets a HDInsight cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a HDInsight cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String clusterPoolName, String clusterName, - Context context); - - /** - * Gets a HDInsight cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a HDInsight cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner get(String resourceGroupName, String clusterPoolName, String clusterName); - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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> beginCreate(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterInner hDInsightCluster); - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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> beginCreate(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterInner hDInsightCluster, Context context); - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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 create(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterInner hDInsightCluster); - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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 create(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterInner hDInsightCluster, Context context); - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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> beginUpdate(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterPatch clusterPatchRequest); - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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> beginUpdate(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterPatch clusterPatchRequest, Context context); - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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 update(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterPatch clusterPatchRequest); - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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 update(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterPatch clusterPatchRequest, Context context); - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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> beginDelete(String resourceGroupName, String clusterPoolName, - String clusterName); - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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> beginDelete(String resourceGroupName, String clusterPoolName, String clusterName, - Context context); - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 delete(String resourceGroupName, String clusterPoolName, String clusterName); - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 delete(String resourceGroupName, String clusterPoolName, String clusterName, Context context); - - /** - * Lists the config dump of all services running in cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster instance service configs api response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, - String clusterName); - - /** - * Lists the config dump of all services running in cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster instance service configs api response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, - String clusterName, Context context); - - /** - * Lists the lists of instance views. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 instance view of a HDInsight Cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listInstanceViews(String resourceGroupName, String clusterPoolName, - String clusterName); - - /** - * Lists the lists of instance views. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 instance view of a HDInsight Cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listInstanceViews(String resourceGroupName, String clusterPoolName, - String clusterName, Context context); - - /** - * Gets the status of a cluster instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 status of a cluster instance along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getInstanceViewWithResponse(String resourceGroupName, - String clusterPoolName, String clusterName, Context context); - - /** - * Gets the status of a cluster instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 status of a cluster instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInstanceViewResultInner getInstanceView(String resourceGroupName, String clusterPoolName, - String clusterName); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/HDInsightContainersManagementClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/HDInsightContainersManagementClient.java deleted file mode 100644 index 751a70d276d8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/HDInsightContainersManagementClient.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 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.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for HDInsightContainersManagementClient class. - */ -public interface HDInsightContainersManagementClient { - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the ClusterPoolsClient object to access its operations. - * - * @return the ClusterPoolsClient object. - */ - ClusterPoolsClient getClusterPools(); - - /** - * Gets the ClusterPoolAvailableUpgradesClient object to access its operations. - * - * @return the ClusterPoolAvailableUpgradesClient object. - */ - ClusterPoolAvailableUpgradesClient getClusterPoolAvailableUpgrades(); - - /** - * Gets the ClusterPoolUpgradeHistoriesClient object to access its operations. - * - * @return the ClusterPoolUpgradeHistoriesClient object. - */ - ClusterPoolUpgradeHistoriesClient getClusterPoolUpgradeHistories(); - - /** - * Gets the ClustersClient object to access its operations. - * - * @return the ClustersClient object. - */ - ClustersClient getClusters(); - - /** - * Gets the ClusterAvailableUpgradesClient object to access its operations. - * - * @return the ClusterAvailableUpgradesClient object. - */ - ClusterAvailableUpgradesClient getClusterAvailableUpgrades(); - - /** - * Gets the ClusterUpgradeHistoriesClient object to access its operations. - * - * @return the ClusterUpgradeHistoriesClient object. - */ - ClusterUpgradeHistoriesClient getClusterUpgradeHistories(); - - /** - * Gets the ClusterJobsClient object to access its operations. - * - * @return the ClusterJobsClient object. - */ - ClusterJobsClient getClusterJobs(); - - /** - * Gets the LocationsClient object to access its operations. - * - * @return the LocationsClient object. - */ - LocationsClient getLocations(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the AvailableClusterPoolVersionsClient object to access its operations. - * - * @return the AvailableClusterPoolVersionsClient object. - */ - AvailableClusterPoolVersionsClient getAvailableClusterPoolVersions(); - - /** - * Gets the AvailableClusterVersionsClient object to access its operations. - * - * @return the AvailableClusterVersionsClient object. - */ - AvailableClusterVersionsClient getAvailableClusterVersions(); - - /** - * 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/LocationsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/LocationsClient.java deleted file mode 100644 index 8e02e5edf0fa..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/LocationsClient.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; - -/** - * An instance of this class provides access to all the operations defined in LocationsClient. - */ -public interface LocationsClient { - /** - * Check the availability of the resource name. - * - * @param location The name of the Azure region. - * @param nameAvailabilityParameters The name and type of the resource. - * @param context The context to associate with this operation. - * @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 result of check name availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse(String location, - NameAvailabilityParameters nameAvailabilityParameters, Context context); - - /** - * Check the availability of the resource name. - * - * @param location The name of the Azure region. - * @param nameAvailabilityParameters The name and type of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 result of check name availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NameAvailabilityResultInner checkNameAvailability(String location, - NameAvailabilityParameters nameAvailabilityParameters); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/OperationsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/OperationsClient.java deleted file mode 100644 index 64495db5f7a3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/OperationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.OperationInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * Returns list of operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Returns list of operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java deleted file mode 100644 index 1ffc775adb1e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) 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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeProperties; -import java.io.IOException; - -/** - * Cluster available upgrade. - */ -@Fluent -public final class ClusterAvailableUpgradeInner extends ProxyResource { - /* - * Gets or sets the properties. Define cluster upgrade specific properties. - */ - private ClusterAvailableUpgradeProperties 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 ClusterAvailableUpgradeInner class. - */ - public ClusterAvailableUpgradeInner() { - } - - /** - * Get the properties property: Gets or sets the properties. Define cluster upgrade specific properties. - * - * @return the properties value. - */ - public ClusterAvailableUpgradeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Gets or sets the properties. Define cluster upgrade specific properties. - * - * @param properties the properties value to set. - * @return the ClusterAvailableUpgradeInner object itself. - */ - public ClusterAvailableUpgradeInner withProperties(ClusterAvailableUpgradeProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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) { - 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 deleted file mode 100644 index 7292d9e2eb2d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInner.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) 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.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 java.io.IOException; -import java.util.Map; - -/** - * The cluster. - */ -@Fluent -public final class ClusterInner extends Resource { - /* - * Gets or sets the properties. Define cluster specific properties. - */ - private ClusterResourceProperties 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 ClusterInner class. - */ - public ClusterInner() { - } - - /** - * Get the properties property: Gets or sets the properties. Define cluster specific properties. - * - * @return the properties value. - */ - public ClusterResourceProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Gets or sets the properties. Define cluster specific properties. - * - * @param properties the properties value to set. - * @return the ClusterInner object itself. - */ - public ClusterInner withProperties(ClusterResourceProperties 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; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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 deleted file mode 100644 index fd87f7ddcd50..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInstanceViewResultInner.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 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.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 java.io.IOException; - -/** - * Cluster Instance View. - */ -@Fluent -public final class ClusterInstanceViewResultInner implements JsonSerializable { - /* - * Name of the instance view. - */ - private String name; - - /* - * Properties of the instance view. - */ - private ClusterInstanceViewResultProperties properties; - - /** - * Creates an instance of ClusterInstanceViewResultInner class. - */ - public ClusterInstanceViewResultInner() { - } - - /** - * Get the name property: Name of the instance view. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the instance view. - * - * @param name the name value to set. - * @return the ClusterInstanceViewResultInner object itself. - */ - public ClusterInstanceViewResultInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the properties property: Properties of the instance view. - * - * @return the properties value. - */ - public ClusterInstanceViewResultProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of the instance view. - * - * @param properties the properties value to set. - * @return the ClusterInstanceViewResultInner object itself. - */ - public ClusterInstanceViewResultInner withProperties(ClusterInstanceViewResultProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property name in model ClusterInstanceViewResultInner")); - } - if (properties() == null) { - 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 deleted file mode 100644 index 241650c87ebb..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterJobInner.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) 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.ClusterJobProperties; -import java.io.IOException; - -/** - * Cluster job. - */ -@Fluent -public final class ClusterJobInner extends ProxyResource { - /* - * Properties of cluster job. - */ - private ClusterJobProperties 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 ClusterJobInner class. - */ - public ClusterJobInner() { - } - - /** - * Get the properties property: Properties of cluster job. - * - * @return the properties value. - */ - public ClusterJobProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of cluster job. - * - * @param properties the properties value to set. - * @return the ClusterJobInner object itself. - */ - public ClusterJobInner withProperties(ClusterJobProperties 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 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 deleted file mode 100644 index 5e974cf7dc7a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterLibraryInner.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index 799614adf89f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolAvailableUpgradeInner.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeProperties; -import java.io.IOException; - -/** - * Cluster pool available upgrade. - */ -@Fluent -public final class ClusterPoolAvailableUpgradeInner extends ProxyResource { - /* - * Gets or sets the properties. Define cluster pool upgrade specific properties. - */ - private ClusterPoolAvailableUpgradeProperties 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 ClusterPoolAvailableUpgradeInner class. - */ - public ClusterPoolAvailableUpgradeInner() { - } - - /** - * Get the properties property: Gets or sets the properties. Define cluster pool upgrade specific properties. - * - * @return the properties value. - */ - public ClusterPoolAvailableUpgradeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Gets or sets the properties. Define cluster pool upgrade specific properties. - * - * @param properties the properties value to set. - * @return the ClusterPoolAvailableUpgradeInner object itself. - */ - public ClusterPoolAvailableUpgradeInner withProperties(ClusterPoolAvailableUpgradeProperties 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) { - 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 deleted file mode 100644 index ee1080e15394..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolInner.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) 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.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 java.io.IOException; -import java.util.Map; - -/** - * Cluster pool. - */ -@Fluent -public final class ClusterPoolInner extends Resource { - /* - * Gets or sets the properties. Define cluster pool specific properties. - */ - private ClusterPoolResourceProperties 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 ClusterPoolInner class. - */ - public ClusterPoolInner() { - } - - /** - * Get the properties property: Gets or sets the properties. Define cluster pool specific properties. - * - * @return the properties value. - */ - public ClusterPoolResourceProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Gets or sets the properties. Define cluster pool specific properties. - * - * @param properties the properties value to set. - * @return the ClusterPoolInner object itself. - */ - public ClusterPoolInner withProperties(ClusterPoolResourceProperties 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; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterPoolInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterPoolInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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 deleted file mode 100644 index 72761269ac31..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolUpgradeHistoryInner.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index f907a9bf9727..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionInner.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionProperties; -import java.io.IOException; - -/** - * Available cluster pool version. - */ -@Fluent -public final class ClusterPoolVersionInner extends ProxyResource { - /* - * Cluster pool version properties. - */ - private ClusterPoolVersionProperties 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 ClusterPoolVersionInner class. - */ - public ClusterPoolVersionInner() { - } - - /** - * Get the properties property: Cluster pool version properties. - * - * @return the properties value. - */ - public ClusterPoolVersionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Cluster pool version properties. - * - * @param properties the properties value to set. - * @return the ClusterPoolVersionInner object itself. - */ - public ClusterPoolVersionInner withProperties(ClusterPoolVersionProperties 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) { - 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 deleted file mode 100644 index 41ebd3a02274..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterUpgradeHistoryInner.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index 4b015d370c51..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionInner.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionProperties; -import java.io.IOException; - -/** - * Available cluster version. - */ -@Fluent -public final class ClusterVersionInner extends ProxyResource { - /* - * Cluster version properties. - */ - private ClusterVersionProperties 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 ClusterVersionInner class. - */ - public ClusterVersionInner() { - } - - /** - * Get the properties property: Cluster version properties. - * - * @return the properties value. - */ - public ClusterVersionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Cluster version properties. - * - * @param properties the properties value to set. - * @return the ClusterVersionInner object itself. - */ - public ClusterVersionInner withProperties(ClusterVersionProperties 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) { - 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 deleted file mode 100644 index 3ea3123bf188..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/NameAvailabilityResultInner.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) 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.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 implements JsonSerializable { - /* - * Indicator of availability of the Microsoft.HDInsight resource name. - */ - private Boolean nameAvailable; - - /* - * The reason of unavailability. - */ - private String reason; - - /* - * The error message of unavailability. - */ - private String message; - - /** - * Creates an instance of NameAvailabilityResultInner class. - */ - public NameAvailabilityResultInner() { - } - - /** - * Get the nameAvailable property: Indicator of availability of the Microsoft.HDInsight resource name. - * - * @return the nameAvailable value. - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Set the nameAvailable property: Indicator of availability of the Microsoft.HDInsight resource name. - * - * @param nameAvailable the nameAvailable value to set. - * @return the NameAvailabilityResultInner object itself. - */ - public NameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) { - this.nameAvailable = nameAvailable; - return this; - } - - /** - * Get the reason property: The reason of unavailability. - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * Set the reason property: The reason of unavailability. - * - * @param reason the reason value to set. - * @return the NameAvailabilityResultInner object itself. - */ - public NameAvailabilityResultInner withReason(String reason) { - this.reason = reason; - return this; - } - - /** - * Get the message property: The error message of unavailability. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: The error message of unavailability. - * - * @param message the message value to set. - * @return the NameAvailabilityResultInner object itself. - */ - public NameAvailabilityResultInner 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.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 deleted file mode 100644 index d4b8c188dc5b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/OperationInner.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) 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.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 java.io.IOException; - -/** - * REST API Operation - * - * Details of a REST API operation, returned from the Resource Provider Operations API. - */ -@Fluent -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" - */ - private String name; - - /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. - */ - private Boolean isDataAction; - - /* - * Localized display information for this particular operation. - */ - 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" - */ - private Origin origin; - - /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ - private ActionType actionType; - - /** - * Creates an instance of OperationInner class. - */ - public OperationInner() { - } - - /** - * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Get the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: Localized display information for this particular operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - public Origin origin() { - return this.origin; - } - - /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. - * - * @return the actionType value. - */ - public ActionType actionType() { - return this.actionType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - 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 deleted file mode 100644 index e92e2e4a9d85..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ServiceConfigResultInner.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 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.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 java.io.IOException; - -/** - * Cluster instance service config. - */ -@Fluent -public final class ServiceConfigResultInner implements JsonSerializable { - /* - * Cluster instance service config properties. - */ - private ServiceConfigResultProperties properties; - - /** - * Creates an instance of ServiceConfigResultInner class. - */ - public ServiceConfigResultInner() { - } - - /** - * Get the properties property: Cluster instance service config properties. - * - * @return the properties value. - */ - public ServiceConfigResultProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Cluster instance service config properties. - * - * @param properties the properties value to set. - * @return the ServiceConfigResultInner object itself. - */ - public ServiceConfigResultInner withProperties(ServiceConfigResultProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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/fluent/models/package-info.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/package-info.java deleted file mode 100644 index 4b4833aa2631..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the inner data models for HDInsightContainersManagementClient. - * HDInsight Containers Management Client. - */ -package com.azure.resourcemanager.hdinsight.containers.fluent.models; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/package-info.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/package-info.java deleted file mode 100644 index 1bb57f49c2f7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the service clients for HDInsightContainersManagementClient. - * HDInsight Containers Management Client. - */ -package com.azure.resourcemanager.hdinsight.containers.fluent; 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 deleted file mode 100644 index 235301d12ad2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterPoolVersionsClientImpl.java +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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.AvailableClusterPoolVersionsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionsListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in AvailableClusterPoolVersionsClient. - */ -public final class AvailableClusterPoolVersionsClientImpl implements AvailableClusterPoolVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final AvailableClusterPoolVersionsService service; - - /** - * The service client containing this operation class. - */ - private final HDInsightContainersManagementClientImpl client; - - /** - * Initializes an instance of AvailableClusterPoolVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AvailableClusterPoolVersionsClientImpl(HDInsightContainersManagementClientImpl client) { - this.service = RestProxy.create(AvailableClusterPoolVersionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HDInsightContainersManagementClientAvailableClusterPoolVersions to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HDInsightContainersM") - public interface AvailableClusterPoolVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterPoolVersions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Returns a list of available cluster pool versions. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster pool versions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getSubscriptionId(), - location, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns a list of available cluster pool versions. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster pool versions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getSubscriptionId(), location, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns a list of available cluster pool versions. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster pool versions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); - } - - /** - * Returns a list of available cluster pool versions. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster pool versions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns a list of available cluster pool versions. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster pool versions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); - } - - /** - * Returns a list of available cluster pool versions. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster pool versions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, 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 versions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(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.listByLocationNext(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 versions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterPoolVersionsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterPoolVersionsImpl.java deleted file mode 100644 index 6519e0653796..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterPoolVersionsImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.AvailableClusterPoolVersionsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.AvailableClusterPoolVersions; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersion; - -public final class AvailableClusterPoolVersionsImpl implements AvailableClusterPoolVersions { - private static final ClientLogger LOGGER = new ClientLogger(AvailableClusterPoolVersionsImpl.class); - - private final AvailableClusterPoolVersionsClient innerClient; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - public AvailableClusterPoolVersionsImpl(AvailableClusterPoolVersionsClient innerClient, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByLocation(String location) { - PagedIterable inner = this.serviceClient().listByLocation(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPoolVersionImpl(inner1, this.manager())); - } - - public PagedIterable listByLocation(String location, Context context) { - PagedIterable inner = this.serviceClient().listByLocation(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPoolVersionImpl(inner1, this.manager())); - } - - private AvailableClusterPoolVersionsClient 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/AvailableClusterVersionsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsClientImpl.java deleted file mode 100644 index ddf9d02791e8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsClientImpl.java +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) 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.AvailableClusterVersionsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionsListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in AvailableClusterVersionsClient. - */ -public final class AvailableClusterVersionsClientImpl implements AvailableClusterVersionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final AvailableClusterVersionsService service; - - /** - * The service client containing this operation class. - */ - private final HDInsightContainersManagementClientImpl client; - - /** - * Initializes an instance of AvailableClusterVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AvailableClusterVersionsClientImpl(HDInsightContainersManagementClientImpl client) { - this.service = RestProxy.create(AvailableClusterVersionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HDInsightContainersManagementClientAvailableClusterVersions to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HDInsightContainersM") - public interface AvailableClusterVersionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterVersions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Returns a list of available cluster versions. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster versions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getSubscriptionId(), - location, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns a list of available cluster versions. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster versions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getSubscriptionId(), location, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns a list of available cluster versions. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster versions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); - } - - /** - * Returns a list of available cluster versions. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster versions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns a list of available cluster versions. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster versions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); - } - - /** - * Returns a list of available cluster versions. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster versions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, 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 versions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(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.listByLocationNext(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 versions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsImpl.java deleted file mode 100644 index db08ea18ee98..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.AvailableClusterVersionsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.AvailableClusterVersions; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersion; - -public final class AvailableClusterVersionsImpl implements AvailableClusterVersions { - private static final ClientLogger LOGGER = new ClientLogger(AvailableClusterVersionsImpl.class); - - private final AvailableClusterVersionsClient innerClient; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - public AvailableClusterVersionsImpl(AvailableClusterVersionsClient innerClient, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByLocation(String location) { - PagedIterable inner = this.serviceClient().listByLocation(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterVersionImpl(inner1, this.manager())); - } - - public PagedIterable listByLocation(String location, Context context) { - PagedIterable inner = this.serviceClient().listByLocation(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterVersionImpl(inner1, this.manager())); - } - - private AvailableClusterVersionsClient 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/ClusterAvailableUpgradeImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradeImpl.java deleted file mode 100644 index ab837db0beb7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradeImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeProperties; - -public final class ClusterAvailableUpgradeImpl implements ClusterAvailableUpgrade { - private ClusterAvailableUpgradeInner innerObject; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - ClusterAvailableUpgradeImpl(ClusterAvailableUpgradeInner innerObject, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ClusterAvailableUpgradeProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ClusterAvailableUpgradeInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesClientImpl.java deleted file mode 100644 index 3bd8ed35be90..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesClientImpl.java +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterAvailableUpgradesClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeList; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ClusterAvailableUpgradesClient. - */ -public final class ClusterAvailableUpgradesClientImpl implements ClusterAvailableUpgradesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ClusterAvailableUpgradesService service; - - /** - * The service client containing this operation class. - */ - private final HDInsightContainersManagementClientImpl client; - - /** - * Initializes an instance of ClusterAvailableUpgradesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ClusterAvailableUpgradesClientImpl(HDInsightContainersManagementClientImpl client) { - this.service = RestProxy.create(ClusterAvailableUpgradesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HDInsightContainersManagementClientClusterAvailableUpgrades to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HDInsightContainersM") - public interface ClusterAvailableUpgradesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/availableUpgrades") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List a cluster available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster available upgrade along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String clusterPoolName, String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterPoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List a cluster available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster available upgrade along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String clusterPoolName, String clusterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterPoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, clusterName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List a cluster available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster available upgrade as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterPoolName, - String clusterName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List a cluster available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster available upgrade as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterPoolName, - String clusterName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List a cluster available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster available upgrade as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterPoolName, - String clusterName) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, clusterName)); - } - - /** - * List a cluster available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster available upgrade as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterPoolName, - String clusterName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, clusterName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster available upgrade along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster available upgrade along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesImpl.java deleted file mode 100644 index d5ab2fa7a6d9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterAvailableUpgradesClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgrades; - -public final class ClusterAvailableUpgradesImpl implements ClusterAvailableUpgrades { - private static final ClientLogger LOGGER = new ClientLogger(ClusterAvailableUpgradesImpl.class); - - private final ClusterAvailableUpgradesClient innerClient; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - public ClusterAvailableUpgradesImpl(ClusterAvailableUpgradesClient innerClient, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String clusterPoolName, - String clusterName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, clusterPoolName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterAvailableUpgradeImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String clusterPoolName, - String clusterName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, clusterPoolName, clusterName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterAvailableUpgradeImpl(inner1, this.manager())); - } - - private ClusterAvailableUpgradesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterImpl.java deleted file mode 100644 index 2b5c228c5610..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterImpl.java +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) 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.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInner; -import com.azure.resourcemanager.hdinsight.containers.models.Cluster; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatch; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatchProperties; -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; - -public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update { - private ClusterInner innerObject; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ClusterResourceProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ClusterInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String clusterPoolName; - - private String clusterName; - - private ClusterPatch updateClusterPatchRequest; - - public ClusterImpl withExistingClusterpool(String resourceGroupName, String clusterPoolName) { - this.resourceGroupName = resourceGroupName; - this.clusterPoolName = clusterPoolName; - return this; - } - - public Cluster create() { - 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); - return this; - } - - ClusterImpl(String name, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerObject = new ClusterInner(); - this.serviceManager = serviceManager; - this.clusterName = name; - } - - public ClusterImpl update() { - this.updateClusterPatchRequest = new ClusterPatch(); - return this; - } - - public Cluster apply() { - 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); - return this; - } - - ClusterImpl(ClusterInner innerObject, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterPoolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusterpools"); - this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); - } - - public Cluster refresh() { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .getWithResponse(resourceGroupName, clusterPoolName, clusterName, Context.NONE) - .getValue(); - return this; - } - - public Cluster refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getClusters() - .getWithResponse(resourceGroupName, clusterPoolName, clusterName, context) - .getValue(); - return this; - } - - public Cluster upgrade(ClusterUpgrade clusterUpgradeRequest) { - return serviceManager.clusters() - .upgrade(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest); - } - - public Cluster upgrade(ClusterUpgrade clusterUpgradeRequest, Context context) { - return serviceManager.clusters() - .upgrade(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, context); - } - - public Cluster 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) { - return serviceManager.clusters().resize(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest); - } - - public Cluster resize(ClusterResizeData clusterResizeRequest, Context context) { - return serviceManager.clusters() - .resize(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context); - } - - public ClusterImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ClusterImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ClusterImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateClusterPatchRequest.withTags(tags); - return this; - } - } - - public ClusterImpl withProperties(ClusterResourceProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public ClusterImpl withProperties(ClusterPatchProperties properties) { - this.updateClusterPatchRequest.withProperties(properties); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterInstanceViewResultImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterInstanceViewResultImpl.java deleted file mode 100644 index 9ef1674c26f3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterInstanceViewResultImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResult; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResultProperties; - -public final class ClusterInstanceViewResultImpl implements ClusterInstanceViewResult { - private ClusterInstanceViewResultInner innerObject; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - ClusterInstanceViewResultImpl(ClusterInstanceViewResultInner innerObject, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public ClusterInstanceViewResultProperties properties() { - return this.innerModel().properties(); - } - - public ClusterInstanceViewResultInner 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/ClusterJobImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobImpl.java deleted file mode 100644 index 36a6516eae8a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJob; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; - -public final class ClusterJobImpl implements ClusterJob { - private ClusterJobInner innerObject; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - ClusterJobImpl(ClusterJobInner 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 ClusterJobProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ClusterJobInner 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/ClusterJobsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsClientImpl.java deleted file mode 100644 index be524105d1e8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsClientImpl.java +++ /dev/null @@ -1,590 +0,0 @@ -// Copyright (c) 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.ClusterJobsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobList; -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 ClusterJobsClient. - */ -public final class ClusterJobsClientImpl implements ClusterJobsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ClusterJobsService service; - - /** - * The service client containing this operation class. - */ - private final HDInsightContainersManagementClientImpl client; - - /** - * Initializes an instance of ClusterJobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ClusterJobsClientImpl(HDInsightContainersManagementClientImpl client) { - this.service - = RestProxy.create(ClusterJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HDInsightContainersManagementClientClusterJobs to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HDInsightContainersM") - public interface ClusterJobsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/runJob") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> runJob(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterJobInner clusterJob, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/jobs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, - @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @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); - } - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> runJobWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterJobInner clusterJob) { - 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 (clusterJob == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterJob is required and cannot be null.")); - } else { - clusterJob.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.runJob(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, clusterName, clusterJob, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> runJobWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterJobInner clusterJob, Context context) { - 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 (clusterJob == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterJob is required and cannot be null.")); - } else { - clusterJob.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.runJob(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, clusterName, clusterJob, accept, context); - } - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterJobInner> beginRunJobAsync(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterJobInner clusterJob) { - Mono>> mono - = runJobWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterJobInner.class, ClusterJobInner.class, this.client.getContext()); - } - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterJobInner> beginRunJobAsync(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterJobInner clusterJob, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = runJobWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterJobInner.class, ClusterJobInner.class, context); - } - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterJobInner> beginRunJob(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterJobInner clusterJob) { - return this.beginRunJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob).getSyncPoller(); - } - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterJobInner> beginRunJob(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterJobInner clusterJob, Context context) { - return this.beginRunJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob, context) - .getSyncPoller(); - } - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runJobAsync(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterJobInner clusterJob) { - return beginRunJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runJobAsync(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterJobInner clusterJob, Context context) { - return beginRunJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterJobInner runJob(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterJobInner clusterJob) { - return runJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob).block(); - } - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterJobInner runJob(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterJobInner clusterJob, Context context) { - return runJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob, context).block(); - } - - /** - * Get jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq - * {jobName}' or 'jarName eq {jarName}'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String clusterPoolName, - String clusterName, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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, filter, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq - * {jobName}' or 'jarName eq {jarName}'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String clusterPoolName, - String clusterName, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq - * {jobName}' or 'jarName eq {jarName}'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterPoolName, String clusterName, - String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterPoolName, String clusterName) { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq - * {jobName}' or 'jarName eq {jarName}'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterPoolName, String clusterName, - String filter, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName) { - final String filter = null; - return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, clusterName, filter)); - } - - /** - * Get jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq - * {jobName}' or 'jarName eq {jarName}'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName, - String filter, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, clusterName, filter, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster job 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 cluster job 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/ClusterJobsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsImpl.java deleted file mode 100644 index f803420f9100..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.ClusterJobsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJob; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobs; - -public final class ClusterJobsImpl implements ClusterJobs { - private static final ClientLogger LOGGER = new ClientLogger(ClusterJobsImpl.class); - - private final ClusterJobsClient innerClient; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - public ClusterJobsImpl(ClusterJobsClient innerClient, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ClusterJob runJob(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterJobInner clusterJob) { - ClusterJobInner inner - = this.serviceClient().runJob(resourceGroupName, clusterPoolName, clusterName, clusterJob); - if (inner != null) { - return new ClusterJobImpl(inner, this.manager()); - } else { - return null; - } - } - - public ClusterJob runJob(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterJobInner clusterJob, Context context) { - ClusterJobInner inner - = this.serviceClient().runJob(resourceGroupName, clusterPoolName, clusterName, clusterJob, context); - if (inner != null) { - return new ClusterJobImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, clusterPoolName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterJobImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName, - String filter, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, clusterPoolName, clusterName, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterJobImpl(inner1, this.manager())); - } - - private ClusterJobsClient serviceClient() { - 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/ClusterLibrariesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterLibrariesClientImpl.java deleted file mode 100644 index d5a3dd18a938..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterLibrariesClientImpl.java +++ /dev/null @@ -1,584 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index 222a4af2ff69..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterLibrariesImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 deleted file mode 100644 index 3dd0e1b92b49..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterLibraryImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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/ClusterPoolAvailableUpgradeImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradeImpl.java deleted file mode 100644 index 0d6852ee2b30..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradeImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeProperties; - -public final class ClusterPoolAvailableUpgradeImpl implements ClusterPoolAvailableUpgrade { - private ClusterPoolAvailableUpgradeInner innerObject; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - ClusterPoolAvailableUpgradeImpl(ClusterPoolAvailableUpgradeInner innerObject, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ClusterPoolAvailableUpgradeProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ClusterPoolAvailableUpgradeInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesClientImpl.java deleted file mode 100644 index 913f9216790f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesClientImpl.java +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolAvailableUpgradesClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeList; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ClusterPoolAvailableUpgradesClient. - */ -public final class ClusterPoolAvailableUpgradesClientImpl implements ClusterPoolAvailableUpgradesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ClusterPoolAvailableUpgradesService service; - - /** - * The service client containing this operation class. - */ - private final HDInsightContainersManagementClientImpl client; - - /** - * Initializes an instance of ClusterPoolAvailableUpgradesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ClusterPoolAvailableUpgradesClientImpl(HDInsightContainersManagementClientImpl client) { - this.service = RestProxy.create(ClusterPoolAvailableUpgradesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HDInsightContainersManagementClientClusterPoolAvailableUpgrades to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HDInsightContainersM") - public interface ClusterPoolAvailableUpgradesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/availableUpgrades") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List a cluster pool available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster pool available upgrade along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String clusterPoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterPoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), clusterPoolName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List a cluster pool available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster pool available upgrade along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String clusterPoolName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (clusterPoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List a cluster pool available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster pool available upgrade as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterPoolName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List a cluster pool available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster pool available upgrade as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String clusterPoolName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List a cluster pool available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster pool available upgrade as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterPoolName) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName)); - } - - /** - * List a cluster pool available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster pool available upgrade as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String clusterPoolName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster pool available upgrade along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster pool available upgrade along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesImpl.java deleted file mode 100644 index 5e746ced82ea..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolAvailableUpgradesClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrades; - -public final class ClusterPoolAvailableUpgradesImpl implements ClusterPoolAvailableUpgrades { - private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolAvailableUpgradesImpl.class); - - private final ClusterPoolAvailableUpgradesClient innerClient; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - public ClusterPoolAvailableUpgradesImpl(ClusterPoolAvailableUpgradesClient innerClient, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String clusterPoolName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, clusterPoolName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ClusterPoolAvailableUpgradeImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String clusterPoolName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, clusterPoolName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ClusterPoolAvailableUpgradeImpl(inner1, this.manager())); - } - - private ClusterPoolAvailableUpgradesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolImpl.java deleted file mode 100644 index cd69adf8c319..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolImpl.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) 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.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.TagsObject; -import java.util.Collections; -import java.util.Map; - -public final class ClusterPoolImpl implements ClusterPool, ClusterPool.Definition, ClusterPool.Update { - private ClusterPoolInner innerObject; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ClusterPoolResourceProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ClusterPoolInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String clusterPoolName; - - private TagsObject updateClusterPoolTags; - - public ClusterPoolImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public ClusterPool create() { - 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); - return this; - } - - ClusterPoolImpl(String name, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerObject = new ClusterPoolInner(); - this.serviceManager = serviceManager; - this.clusterPoolName = name; - } - - public ClusterPoolImpl update() { - this.updateClusterPoolTags = new TagsObject(); - return this; - } - - public ClusterPool apply() { - 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); - return this; - } - - ClusterPoolImpl(ClusterPoolInner innerObject, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterPoolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusterpools"); - } - - public ClusterPool refresh() { - this.innerObject = serviceManager.serviceClient() - .getClusterPools() - .getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, Context.NONE) - .getValue(); - return this; - } - - public ClusterPool refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getClusterPools() - .getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, context) - .getValue(); - return this; - } - - public ClusterPool upgrade(ClusterPoolUpgrade clusterPoolUpgradeRequest) { - return serviceManager.clusterPools().upgrade(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest); - } - - public ClusterPool upgrade(ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { - return serviceManager.clusterPools() - .upgrade(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, context); - } - - public ClusterPoolImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ClusterPoolImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ClusterPoolImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateClusterPoolTags.withTags(tags); - return this; - } - } - - public ClusterPoolImpl withProperties(ClusterPoolResourceProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} 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 deleted file mode 100644 index d09bc5b3c91d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolUpgradeHistoriesClientImpl.java +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index 340da3bbdfe3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolUpgradeHistoriesImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 deleted file mode 100644 index f180c9f09d60..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolUpgradeHistoryImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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/ClusterPoolVersionImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolVersionImpl.java deleted file mode 100644 index 26db050ef559..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolVersionImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersion; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionProperties; - -public final class ClusterPoolVersionImpl implements ClusterPoolVersion { - private ClusterPoolVersionInner innerObject; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - ClusterPoolVersionImpl(ClusterPoolVersionInner 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 ClusterPoolVersionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ClusterPoolVersionInner 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 deleted file mode 100644 index 0c7a34d67ce0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsClientImpl.java +++ /dev/null @@ -1,1539 +0,0 @@ -// Copyright (c) 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.Delete; -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.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -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.ClusterPoolsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolListResult; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.TagsObject; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ClusterPoolsClient. - */ -public final class ClusterPoolsClientImpl implements ClusterPoolsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ClusterPoolsService service; - - /** - * The service client containing this operation class. - */ - private final HDInsightContainersManagementClientImpl client; - - /** - * Initializes an instance of ClusterPoolsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ClusterPoolsClientImpl(HDInsightContainersManagementClientImpl client) { - this.service - = RestProxy.create(ClusterPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HDInsightContainersManagementClientClusterPools to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HDInsightContainersM") - public interface ClusterPoolsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, - @BodyParam("application/json") ClusterPoolInner clusterPool, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateTags(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterPoolName") String clusterPoolName, - @BodyParam("application/json") TagsObject clusterPoolTags, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusterpools") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/upgrade") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> upgrade(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterPoolName") String clusterPoolName, - @BodyParam("application/json") ClusterPoolUpgrade clusterPoolUpgradeRequest, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 cluster pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String clusterPoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), clusterPoolName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @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 cluster pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String clusterPoolName, Context context) { - 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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, accept, context); - } - - /** - * Gets a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 cluster pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String clusterPoolName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, clusterPoolName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @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 cluster pool along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterPoolName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, clusterPoolName, context).block(); - } - - /** - * Gets a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterPoolInner getByResourceGroup(String resourceGroupName, String clusterPoolName) { - return getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, Context.NONE).getValue(); - } - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterPoolName, ClusterPoolInner clusterPool) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (clusterPool == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterPool is required and cannot be null.")); - } else { - clusterPool.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterPool, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String clusterPoolName, ClusterPoolInner clusterPool, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (clusterPool == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterPool is required and cannot be null.")); - } else { - clusterPool.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, clusterPool, accept, context); - } - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterPoolInner> - beginCreateOrUpdateAsync(String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterPoolName, clusterPool); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterPoolInner.class, ClusterPoolInner.class, this.client.getContext()); - } - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterPoolInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, clusterPoolName, clusterPool, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterPoolInner.class, ClusterPoolInner.class, context); - } - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterPoolInner> beginCreateOrUpdate(String resourceGroupName, - String clusterPoolName, ClusterPoolInner clusterPool) { - return this.beginCreateOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool).getSyncPoller(); - } - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterPoolInner> beginCreateOrUpdate(String resourceGroupName, - String clusterPoolName, ClusterPoolInner clusterPool, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool, context).getSyncPoller(); - } - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterPoolName, - ClusterPoolInner clusterPool) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String clusterPoolName, - ClusterPoolInner clusterPool, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterPoolInner createOrUpdate(String resourceGroupName, String clusterPoolName, - ClusterPoolInner clusterPool) { - return createOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool).block(); - } - - /** - * Creates or updates a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPool The Cluster Pool to create. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterPoolInner createOrUpdate(String resourceGroupName, String clusterPoolName, - ClusterPoolInner clusterPool, Context context) { - return createOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool, context).block(); - } - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync(String resourceGroupName, - String clusterPoolName, TagsObject clusterPoolTags) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (clusterPoolTags == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterPoolTags is required and cannot be null.")); - } else { - clusterPoolTags.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), - this.client.getSubscriptionId(), clusterPoolName, clusterPoolTags, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync(String resourceGroupName, - String clusterPoolName, TagsObject clusterPoolTags, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (clusterPoolTags == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterPoolTags is required and cannot be null.")); - } else { - clusterPoolTags.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), - this.client.getSubscriptionId(), clusterPoolName, clusterPoolTags, accept, context); - } - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterPoolInner> beginUpdateTagsAsync(String resourceGroupName, - String clusterPoolName, TagsObject clusterPoolTags) { - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, clusterPoolName, clusterPoolTags); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterPoolInner.class, ClusterPoolInner.class, this.client.getContext()); - } - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterPoolInner> beginUpdateTagsAsync(String resourceGroupName, - String clusterPoolName, TagsObject clusterPoolTags, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateTagsWithResponseAsync(resourceGroupName, clusterPoolName, clusterPoolTags, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterPoolInner.class, ClusterPoolInner.class, context); - } - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterPoolInner> beginUpdateTags(String resourceGroupName, - String clusterPoolName, TagsObject clusterPoolTags) { - return this.beginUpdateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags).getSyncPoller(); - } - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterPoolInner> beginUpdateTags(String resourceGroupName, - String clusterPoolName, TagsObject clusterPoolTags, Context context) { - return this.beginUpdateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags, context).getSyncPoller(); - } - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String clusterPoolName, - TagsObject clusterPoolTags) { - return beginUpdateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String clusterPoolName, - TagsObject clusterPoolTags, Context context) { - return beginUpdateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterPoolInner updateTags(String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags) { - return updateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags).block(); - } - - /** - * Updates an existing Cluster Pool Tags. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolTags Parameters supplied to update tags. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterPoolInner updateTags(String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags, - Context context) { - return updateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags, context).block(); - } - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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>> deleteWithResponseAsync(String resourceGroupName, String clusterPoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), clusterPoolName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @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>> deleteWithResponseAsync(String resourceGroupName, String clusterPoolName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, accept, context); - } - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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> beginDeleteAsync(String resourceGroupName, String clusterPoolName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterPoolName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @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> beginDeleteAsync(String resourceGroupName, String clusterPoolName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterPoolName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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> beginDelete(String resourceGroupName, String clusterPoolName) { - return this.beginDeleteAsync(resourceGroupName, clusterPoolName).getSyncPoller(); - } - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @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> beginDelete(String resourceGroupName, String clusterPoolName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterPoolName, context).getSyncPoller(); - } - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 deleteAsync(String resourceGroupName, String clusterPoolName) { - return beginDeleteAsync(resourceGroupName, clusterPoolName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @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 deleteAsync(String resourceGroupName, String clusterPoolName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterPoolName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 delete(String resourceGroupName, String clusterPoolName) { - deleteAsync(resourceGroupName, clusterPoolName).block(); - } - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @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 delete(String resourceGroupName, String clusterPoolName, Context context) { - deleteAsync(resourceGroupName, clusterPoolName, context).block(); - } - - /** - * Gets the list of Cluster Pools within a Subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cluster Pools within a Subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the list of Cluster Pools within a Subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cluster Pools within a Subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the list of Cluster Pools within a Subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cluster Pools within a Subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Gets the list of Cluster Pools within a Subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cluster Pools within a Subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the list of Cluster Pools within a Subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cluster Pools within a Subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Gets the list of Cluster Pools within a Subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cluster Pools within a Subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster pools operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster pools operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster pools operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster pools operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster pools operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster pools operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeWithResponseAsync(String resourceGroupName, String clusterPoolName, - ClusterPoolUpgrade clusterPoolUpgradeRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (clusterPoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); - } - if (clusterPoolUpgradeRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter clusterPoolUpgradeRequest is required and cannot be null.")); - } else { - clusterPoolUpgradeRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.upgrade(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), - this.client.getSubscriptionId(), clusterPoolName, clusterPoolUpgradeRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeWithResponseAsync(String resourceGroupName, String clusterPoolName, - ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (clusterPoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); - } - if (clusterPoolUpgradeRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter clusterPoolUpgradeRequest is required and cannot be null.")); - } else { - clusterPoolUpgradeRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.upgrade(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), - this.client.getSubscriptionId(), clusterPoolName, clusterPoolUpgradeRequest, accept, context); - } - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterPoolInner> beginUpgradeAsync(String resourceGroupName, - String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest) { - Mono>> mono - = upgradeWithResponseAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterPoolInner.class, ClusterPoolInner.class, this.client.getContext()); - } - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterPoolInner> beginUpgradeAsync(String resourceGroupName, - String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = upgradeWithResponseAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterPoolInner.class, ClusterPoolInner.class, context); - } - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterPoolInner> beginUpgrade(String resourceGroupName, - String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest) { - return this.beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest).getSyncPoller(); - } - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cluster pool. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterPoolInner> beginUpgrade(String resourceGroupName, - String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { - return this.beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, context) - .getSyncPoller(); - } - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeAsync(String resourceGroupName, String clusterPoolName, - ClusterPoolUpgrade clusterPoolUpgradeRequest) { - return beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeAsync(String resourceGroupName, String clusterPoolName, - ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { - return beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterPoolInner upgrade(String resourceGroupName, String clusterPoolName, - ClusterPoolUpgrade clusterPoolUpgradeRequest) { - return upgradeAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest).block(); - } - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterPoolInner upgrade(String resourceGroupName, String clusterPoolName, - ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { - return upgradeAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster pools operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(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 the list cluster pools operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * 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 the list cluster pools operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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 the list cluster pools operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} 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 deleted file mode 100644 index 6612ffcf9e1d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsImpl.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) 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.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPools; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; - -public final class ClusterPoolsImpl implements ClusterPools { - private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolsImpl.class); - - private final ClusterPoolsClient innerClient; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - public ClusterPoolsImpl(ClusterPoolsClient innerClient, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterPoolName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ClusterPoolImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ClusterPool getByResourceGroup(String resourceGroupName, String clusterPoolName) { - ClusterPoolInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterPoolName); - if (inner != null) { - return new ClusterPoolImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String clusterPoolName) { - this.serviceClient().delete(resourceGroupName, clusterPoolName); - } - - public void delete(String resourceGroupName, String clusterPoolName, Context context) { - this.serviceClient().delete(resourceGroupName, clusterPoolName, context); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPoolImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPoolImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPoolImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPoolImpl(inner1, this.manager())); - } - - public ClusterPool upgrade(String resourceGroupName, String clusterPoolName, - ClusterPoolUpgrade clusterPoolUpgradeRequest) { - ClusterPoolInner inner - = this.serviceClient().upgrade(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest); - if (inner != null) { - return new ClusterPoolImpl(inner, this.manager()); - } else { - return null; - } - } - - public ClusterPool upgrade(String resourceGroupName, String clusterPoolName, - ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { - ClusterPoolInner inner - = this.serviceClient().upgrade(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, context); - if (inner != null) { - return new ClusterPoolImpl(inner, this.manager()); - } else { - return null; - } - } - - public ClusterPool getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); - if (clusterPoolName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); - if (clusterPoolName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); - if (clusterPoolName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); - } - this.delete(resourceGroupName, clusterPoolName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); - if (clusterPoolName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); - } - this.delete(resourceGroupName, clusterPoolName, context); - } - - private ClusterPoolsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager() { - return this.serviceManager; - } - - public ClusterPoolImpl define(String name) { - return new ClusterPoolImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index 3dc355d227df..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterUpgradeHistoriesClientImpl.java +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index d1b35fa8c61f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterUpgradeHistoriesImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 deleted file mode 100644 index a6ad23a6aaa7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterUpgradeHistoryImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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/ClusterVersionImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterVersionImpl.java deleted file mode 100644 index 237d61277f10..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterVersionImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersion; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionProperties; - -public final class ClusterVersionImpl implements ClusterVersion { - private ClusterVersionInner innerObject; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - ClusterVersionImpl(ClusterVersionInner 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 ClusterVersionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ClusterVersionInner 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 deleted file mode 100644 index 2f79d33a7c6f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersClientImpl.java +++ /dev/null @@ -1,2623 +0,0 @@ -// Copyright (c) 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.Delete; -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.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -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.ClustersClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInner; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ServiceConfigResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewsResult; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterListResult; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatch; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollback; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ClustersClient. - */ -public final class ClustersClientImpl implements ClustersClient { - /** - * The proxy service used to perform REST calls. - */ - private final ClustersService service; - - /** - * The service client containing this operation class. - */ - private final HDInsightContainersManagementClientImpl client; - - /** - * Initializes an instance of ClustersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ClustersClientImpl(HDInsightContainersManagementClientImpl client) { - this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HDInsightContainersManagementClientClusters to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HDInsightContainersM") - public interface ClustersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByClusterPoolName(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/upgrade") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> upgrade(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterPoolName") String clusterPoolName, - @PathParam("clusterName") String clusterName, - @BodyParam("application/json") 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 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resize(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterPoolName") String clusterPoolName, - @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterResizeData clusterResizeRequest, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterInner hDInsightCluster, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterPoolName") String clusterPoolName, - @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterPatch clusterPatchRequest, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/serviceConfigs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listServiceConfigs(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listInstanceViews(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews/default") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getInstanceView(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByClusterPoolNameNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listServiceConfigsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listInstanceViewsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterPoolNameSinglePageAsync(String resourceGroupName, - String clusterPoolName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.listByClusterPoolName(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), clusterPoolName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterPoolNameSinglePageAsync(String resourceGroupName, - String clusterPoolName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listByClusterPoolName(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterPoolNameAsync(String resourceGroupName, String clusterPoolName) { - return new PagedFlux<>(() -> listByClusterPoolNameSinglePageAsync(resourceGroupName, clusterPoolName), - nextLink -> listByClusterPoolNameNextSinglePageAsync(nextLink)); - } - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterPoolNameAsync(String resourceGroupName, String clusterPoolName, - Context context) { - return new PagedFlux<>(() -> listByClusterPoolNameSinglePageAsync(resourceGroupName, clusterPoolName, context), - nextLink -> listByClusterPoolNameNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName) { - return new PagedIterable<>(listByClusterPoolNameAsync(resourceGroupName, clusterPoolName)); - } - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName, - Context context) { - return new PagedIterable<>(listByClusterPoolNameAsync(resourceGroupName, clusterPoolName, context)); - } - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterUpgrade clusterUpgradeRequest) { - 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 (clusterUpgradeRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterUpgradeRequest is required and cannot be null.")); - } else { - clusterUpgradeRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.upgrade(this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), this.client.getSubscriptionId(), clusterPoolName, clusterName, - clusterUpgradeRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterUpgrade clusterUpgradeRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (clusterPoolName == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); - } - if (clusterName == null) { - return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); - } - if (clusterUpgradeRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterUpgradeRequest is required and cannot be null.")); - } else { - clusterUpgradeRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.upgrade(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), - this.client.getSubscriptionId(), clusterPoolName, clusterName, clusterUpgradeRequest, accept, context); - } - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginUpgradeAsync(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterUpgrade clusterUpgradeRequest) { - Mono>> mono - = upgradeWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, this.client.getContext()); - } - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginUpgradeAsync(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterUpgrade clusterUpgradeRequest, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = upgradeWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, context); - } - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpgrade(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterUpgrade clusterUpgradeRequest) { - return this.beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest) - .getSyncPoller(); - } - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpgrade(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterUpgrade clusterUpgradeRequest, Context context) { - return this.beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, context) - .getSyncPoller(); - } - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeAsync(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterUpgrade clusterUpgradeRequest) { - return beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeAsync(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterUpgrade clusterUpgradeRequest, Context context) { - return beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner upgrade(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterUpgrade clusterUpgradeRequest) { - return upgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest).block(); - } - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner upgrade(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterUpgrade clusterUpgradeRequest, Context context) { - return upgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, context).block(); - } - - /** - * 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. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resizeWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterResizeData clusterResizeRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (clusterPoolName == null) { - return Mono - .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 (clusterResizeRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterResizeRequest is required and cannot be null.")); - } else { - clusterResizeRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.resize(this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), this.client.getSubscriptionId(), clusterPoolName, clusterName, - clusterResizeRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize 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>> resizeWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterResizeData clusterResizeRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (clusterResizeRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterResizeRequest is required and cannot be null.")); - } else { - clusterResizeRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resize(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), - this.client.getSubscriptionId(), clusterPoolName, clusterName, clusterResizeRequest, accept, context); - } - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginResizeAsync(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest) { - Mono>> mono - = resizeWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, this.client.getContext()); - } - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize a cluster. - * @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> beginResizeAsync(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = resizeWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, context); - } - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the cluster. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginResize(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest) { - return this.beginResizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest) - .getSyncPoller(); - } - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize 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> beginResize(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest, Context context) { - return this.beginResizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context) - .getSyncPoller(); - } - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resizeAsync(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterResizeData clusterResizeRequest) { - return beginResizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize 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 resizeAsync(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterResizeData clusterResizeRequest, Context context) { - return beginResizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner resize(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterResizeData clusterResizeRequest) { - return resizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest).block(); - } - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize 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 resize(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterResizeData clusterResizeRequest, Context context) { - return resizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context).block(); - } - - /** - * Gets a HDInsight cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 HDInsight cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName) { - 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.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a HDInsight cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 HDInsight cluster along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName, Context context) { - 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.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, clusterName, accept, context); - } - - /** - * Gets a HDInsight cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 HDInsight cluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String clusterPoolName, String clusterName) { - return getWithResponseAsync(resourceGroupName, clusterPoolName, clusterName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a HDInsight cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 HDInsight cluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String clusterPoolName, String clusterName, - Context context) { - return getWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, context).block(); - } - - /** - * Gets a HDInsight cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 HDInsight cluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner get(String resourceGroupName, String clusterPoolName, String clusterName) { - return getWithResponse(resourceGroupName, clusterPoolName, clusterName, Context.NONE).getValue(); - } - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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>> createWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterInner hDInsightCluster) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (hDInsightCluster == null) { - return Mono - .error(new IllegalArgumentException("Parameter hDInsightCluster is required and cannot be null.")); - } else { - hDInsightCluster.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, clusterName, hDInsightCluster, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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>> createWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterInner hDInsightCluster, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (hDInsightCluster == null) { - return Mono - .error(new IllegalArgumentException("Parameter hDInsightCluster is required and cannot be null.")); - } else { - hDInsightCluster.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, clusterName, hDInsightCluster, accept, context); - } - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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> beginCreateAsync(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterInner hDInsightCluster) { - Mono>> mono - = createWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, this.client.getContext()); - } - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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> beginCreateAsync(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterInner hDInsightCluster, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, context); - } - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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> beginCreate(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterInner hDInsightCluster) { - return this.beginCreateAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster).getSyncPoller(); - } - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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> beginCreate(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterInner hDInsightCluster, Context context) { - return this.beginCreateAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster, context) - .getSyncPoller(); - } - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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 createAsync(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterInner hDInsightCluster) { - return beginCreateAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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 createAsync(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterInner hDInsightCluster, Context context) { - return beginCreateAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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 create(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterInner hDInsightCluster) { - return createAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster).block(); - } - - /** - * Creates a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param hDInsightCluster The cluster to create. - * @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 create(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterInner hDInsightCluster, Context context) { - return createAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster, context).block(); - } - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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>> updateWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterPatch clusterPatchRequest) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (clusterPatchRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterPatchRequest is required and cannot be null.")); - } else { - clusterPatchRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), this.client.getSubscriptionId(), clusterPoolName, clusterName, - clusterPatchRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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>> updateWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName, ClusterPatch clusterPatchRequest, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 (clusterPatchRequest == null) { - return Mono - .error(new IllegalArgumentException("Parameter clusterPatchRequest is required and cannot be null.")); - } else { - clusterPatchRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), - this.client.getSubscriptionId(), clusterPoolName, clusterName, clusterPatchRequest, accept, context); - } - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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> beginUpdateAsync(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, this.client.getContext()); - } - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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> beginUpdateAsync(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ClusterInner.class, ClusterInner.class, context); - } - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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> beginUpdate(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest) { - return this.beginUpdateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest) - .getSyncPoller(); - } - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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> beginUpdate(String resourceGroupName, - String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest, Context context) { - return this.beginUpdateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest, context) - .getSyncPoller(); - } - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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 updateAsync(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterPatch clusterPatchRequest) { - return beginUpdateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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 updateAsync(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterPatch clusterPatchRequest, Context context) { - return beginUpdateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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 update(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterPatch clusterPatchRequest) { - return updateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest).block(); - } - - /** - * Updates an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterPatchRequest Patch 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 update(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterPatch clusterPatchRequest, Context context) { - return updateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest, context).block(); - } - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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>> deleteWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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>> deleteWithResponseAsync(String resourceGroupName, String clusterPoolName, - String clusterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, clusterName, accept, context); - } - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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> beginDeleteAsync(String resourceGroupName, String clusterPoolName, - String clusterName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterPoolName, clusterName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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> beginDeleteAsync(String resourceGroupName, String clusterPoolName, - String clusterName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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> beginDelete(String resourceGroupName, String clusterPoolName, - String clusterName) { - return this.beginDeleteAsync(resourceGroupName, clusterPoolName, clusterName).getSyncPoller(); - } - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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> beginDelete(String resourceGroupName, String clusterPoolName, - String clusterName, Context context) { - return this.beginDeleteAsync(resourceGroupName, clusterPoolName, clusterName, context).getSyncPoller(); - } - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 deleteAsync(String resourceGroupName, String clusterPoolName, String clusterName) { - return beginDeleteAsync(resourceGroupName, clusterPoolName, clusterName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 deleteAsync(String resourceGroupName, String clusterPoolName, String clusterName, - Context context) { - return beginDeleteAsync(resourceGroupName, clusterPoolName, clusterName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 delete(String resourceGroupName, String clusterPoolName, String clusterName) { - deleteAsync(resourceGroupName, clusterPoolName, clusterName).block(); - } - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 delete(String resourceGroupName, String clusterPoolName, String clusterName, Context context) { - deleteAsync(resourceGroupName, clusterPoolName, clusterName, context).block(); - } - - /** - * Lists the config dump of all services running in cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster instance service configs api response along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listServiceConfigsSinglePageAsync(String resourceGroupName, - String clusterPoolName, String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.listServiceConfigs(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the config dump of all services running in cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster instance service configs api response along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listServiceConfigsSinglePageAsync(String resourceGroupName, - String clusterPoolName, String clusterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listServiceConfigs(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, clusterName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the config dump of all services running in cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster instance service configs api response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listServiceConfigsAsync(String resourceGroupName, - String clusterPoolName, String clusterName) { - return new PagedFlux<>(() -> listServiceConfigsSinglePageAsync(resourceGroupName, clusterPoolName, clusterName), - nextLink -> listServiceConfigsNextSinglePageAsync(nextLink)); - } - - /** - * Lists the config dump of all services running in cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster instance service configs api response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listServiceConfigsAsync(String resourceGroupName, - String clusterPoolName, String clusterName, Context context) { - return new PagedFlux<>( - () -> listServiceConfigsSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, context), - nextLink -> listServiceConfigsNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the config dump of all services running in cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster instance service configs api response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, - String clusterName) { - return new PagedIterable<>(listServiceConfigsAsync(resourceGroupName, clusterPoolName, clusterName)); - } - - /** - * Lists the config dump of all services running in cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster instance service configs api response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, - String clusterName, Context context) { - return new PagedIterable<>(listServiceConfigsAsync(resourceGroupName, clusterPoolName, clusterName, context)); - } - - /** - * Lists the lists of instance views. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the instance view of a HDInsight Cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listInstanceViewsSinglePageAsync(String resourceGroupName, String clusterPoolName, String clusterName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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.listInstanceViews(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists the lists of instance views. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the instance view of a HDInsight Cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInstanceViewsSinglePageAsync( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - 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 - .listInstanceViews(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, clusterName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the lists of instance views. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the instance view of a HDInsight Cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listInstanceViewsAsync(String resourceGroupName, - String clusterPoolName, String clusterName) { - return new PagedFlux<>(() -> listInstanceViewsSinglePageAsync(resourceGroupName, clusterPoolName, clusterName), - nextLink -> listInstanceViewsNextSinglePageAsync(nextLink)); - } - - /** - * Lists the lists of instance views. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the instance view of a HDInsight Cluster as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listInstanceViewsAsync(String resourceGroupName, - String clusterPoolName, String clusterName, Context context) { - return new PagedFlux<>( - () -> listInstanceViewsSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, context), - nextLink -> listInstanceViewsNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the lists of instance views. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the instance view of a HDInsight Cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listInstanceViews(String resourceGroupName, - String clusterPoolName, String clusterName) { - return new PagedIterable<>(listInstanceViewsAsync(resourceGroupName, clusterPoolName, clusterName)); - } - - /** - * Lists the lists of instance views. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the instance view of a HDInsight Cluster as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listInstanceViews(String resourceGroupName, - String clusterPoolName, String clusterName, Context context) { - return new PagedIterable<>(listInstanceViewsAsync(resourceGroupName, clusterPoolName, clusterName, context)); - } - - /** - * Gets the status of a cluster instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 status of a cluster instance along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getInstanceViewWithResponseAsync(String resourceGroupName, - String clusterPoolName, String clusterName) { - 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.getInstanceView(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the status of a cluster instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 status of a cluster instance along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getInstanceViewWithResponseAsync(String resourceGroupName, - String clusterPoolName, String clusterName, Context context) { - 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.getInstanceView(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), clusterPoolName, clusterName, accept, context); - } - - /** - * Gets the status of a cluster instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 status of a cluster instance on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getInstanceViewAsync(String resourceGroupName, String clusterPoolName, - String clusterName) { - return getInstanceViewWithResponseAsync(resourceGroupName, clusterPoolName, clusterName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the status of a cluster instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 status of a cluster instance along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getInstanceViewWithResponse(String resourceGroupName, - String clusterPoolName, String clusterName, Context context) { - return getInstanceViewWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, context).block(); - } - - /** - * Gets the status of a cluster instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 status of a cluster instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInstanceViewResultInner getInstanceView(String resourceGroupName, String clusterPoolName, - String clusterName) { - return getInstanceViewWithResponse(resourceGroupName, clusterPoolName, clusterName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterPoolNameNextSinglePageAsync(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.listByClusterPoolNameNext(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 the list cluster operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterPoolNameNextSinglePageAsync(String nextLink, - Context context) { - 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.listByClusterPoolNameNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster instance service configs api response along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listServiceConfigsNextSinglePageAsync(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.listServiceConfigsNext(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 cluster instance service configs api response along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listServiceConfigsNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listServiceConfigsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * 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 the instance view of a HDInsight Cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInstanceViewsNextSinglePageAsync(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.listInstanceViewsNext(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 the instance view of a HDInsight Cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInstanceViewsNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listInstanceViewsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} 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 deleted file mode 100644 index bd2897085453..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersImpl.java +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright (c) 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.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.hdinsight.containers.fluent.ClustersClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInner; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ServiceConfigResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.Cluster; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResult; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; -import com.azure.resourcemanager.hdinsight.containers.models.Clusters; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollback; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigResult; - -public final class ClustersImpl implements Clusters { - private static final ClientLogger LOGGER = new ClientLogger(ClustersImpl.class); - - private final ClustersClient innerClient; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - public ClustersImpl(ClustersClient innerClient, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName) { - PagedIterable inner - = this.serviceClient().listByClusterPoolName(resourceGroupName, clusterPoolName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); - } - - public PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName, - Context context) { - PagedIterable inner - = this.serviceClient().listByClusterPoolName(resourceGroupName, clusterPoolName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); - } - - public Cluster upgrade(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterUpgrade clusterUpgradeRequest) { - ClusterInner inner - = this.serviceClient().upgrade(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest); - if (inner != null) { - return new ClusterImpl(inner, this.manager()); - } else { - return null; - } - } - - public Cluster upgrade(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterUpgrade clusterUpgradeRequest, Context context) { - ClusterInner inner = this.serviceClient() - .upgrade(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, context); - if (inner != null) { - return new ClusterImpl(inner, this.manager()); - } else { - return null; - } - } - - public Cluster 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 { - return null; - } - } - - public Cluster resize(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterResizeData clusterResizeRequest) { - ClusterInner inner - = this.serviceClient().resize(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest); - if (inner != null) { - return new ClusterImpl(inner, this.manager()); - } else { - return null; - } - } - - public Cluster resize(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterResizeData clusterResizeRequest, Context context) { - ClusterInner inner = this.serviceClient() - .resize(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context); - if (inner != null) { - return new ClusterImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String clusterPoolName, String clusterName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, clusterPoolName, clusterName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ClusterImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Cluster get(String resourceGroupName, String clusterPoolName, String clusterName) { - ClusterInner inner = this.serviceClient().get(resourceGroupName, clusterPoolName, clusterName); - if (inner != null) { - return new ClusterImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String clusterPoolName, String clusterName) { - this.serviceClient().delete(resourceGroupName, clusterPoolName, clusterName); - } - - public void delete(String resourceGroupName, String clusterPoolName, String clusterName, Context context) { - this.serviceClient().delete(resourceGroupName, clusterPoolName, clusterName, context); - } - - public PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, - String clusterName) { - PagedIterable inner - = this.serviceClient().listServiceConfigs(resourceGroupName, clusterPoolName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ServiceConfigResultImpl(inner1, this.manager())); - } - - public PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, - String clusterName, Context context) { - PagedIterable inner - = this.serviceClient().listServiceConfigs(resourceGroupName, clusterPoolName, clusterName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ServiceConfigResultImpl(inner1, this.manager())); - } - - public PagedIterable listInstanceViews(String resourceGroupName, String clusterPoolName, - String clusterName) { - PagedIterable inner - = this.serviceClient().listInstanceViews(resourceGroupName, clusterPoolName, clusterName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterInstanceViewResultImpl(inner1, this.manager())); - } - - public PagedIterable listInstanceViews(String resourceGroupName, String clusterPoolName, - String clusterName, Context context) { - PagedIterable inner - = this.serviceClient().listInstanceViews(resourceGroupName, clusterPoolName, clusterName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterInstanceViewResultImpl(inner1, this.manager())); - } - - public Response getInstanceViewWithResponse(String resourceGroupName, - String clusterPoolName, String clusterName, Context context) { - Response inner = this.serviceClient() - .getInstanceViewWithResponse(resourceGroupName, clusterPoolName, clusterName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ClusterInstanceViewResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ClusterInstanceViewResult getInstanceView(String resourceGroupName, String clusterPoolName, - String clusterName) { - ClusterInstanceViewResultInner inner - = this.serviceClient().getInstanceView(resourceGroupName, clusterPoolName, clusterName); - if (inner != null) { - return new ClusterInstanceViewResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Cluster getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); - if (clusterPoolName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); - } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - return this.getWithResponse(resourceGroupName, clusterPoolName, clusterName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); - if (clusterPoolName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); - } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - return this.getWithResponse(resourceGroupName, clusterPoolName, clusterName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); - if (clusterPoolName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); - } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - this.delete(resourceGroupName, clusterPoolName, clusterName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); - if (clusterPoolName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); - } - String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); - if (clusterName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); - } - this.delete(resourceGroupName, clusterPoolName, clusterName, context); - } - - private ClustersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager() { - return this.serviceManager; - } - - public ClusterImpl define(String name) { - return new ClusterImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index d65726c533dc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientBuilder.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) 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.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** - * A builder for creating a new instance of the HDInsightContainersManagementClientImpl type. - */ -@ServiceClientBuilder(serviceClients = { HDInsightContainersManagementClientImpl.class }) -public final class HDInsightContainersManagementClientBuilder { - /* - * The ID of the target subscription. The value must be an UUID. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. The value must be an UUID. - * - * @param subscriptionId the subscriptionId value. - * @return the HDInsightContainersManagementClientBuilder. - */ - public HDInsightContainersManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the HDInsightContainersManagementClientBuilder. - */ - public HDInsightContainersManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the HDInsightContainersManagementClientBuilder. - */ - public HDInsightContainersManagementClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the HDInsightContainersManagementClientBuilder. - */ - public HDInsightContainersManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the HDInsightContainersManagementClientBuilder. - */ - public HDInsightContainersManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the HDInsightContainersManagementClientBuilder. - */ - public HDInsightContainersManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of HDInsightContainersManagementClientImpl with the provided parameters. - * - * @return an instance of HDInsightContainersManagementClientImpl. - */ - public HDInsightContainersManagementClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval - = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - HDInsightContainersManagementClientImpl client = new HDInsightContainersManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); - return client; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientImpl.java deleted file mode 100644 index 541d950cff66..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientImpl.java +++ /dev/null @@ -1,464 +0,0 @@ -// Copyright (c) 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.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; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.hdinsight.containers.fluent.AvailableClusterPoolVersionsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.AvailableClusterVersionsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterAvailableUpgradesClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterJobsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.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; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * Initializes a new instance of the HDInsightContainersManagementClientImpl type. - */ -@ServiceClient(builder = HDInsightContainersManagementClientBuilder.class) -public final class HDInsightContainersManagementClientImpl implements HDInsightContainersManagementClient { - /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. - */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Api Version. - */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** - * The HTTP pipeline to send requests through. - */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** - * The serializer to serialize an object into a string. - */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The default poll interval for long-running operation. - */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** - * The ClusterPoolsClient object to access its operations. - */ - private final ClusterPoolsClient clusterPools; - - /** - * Gets the ClusterPoolsClient object to access its operations. - * - * @return the ClusterPoolsClient object. - */ - public ClusterPoolsClient getClusterPools() { - return this.clusterPools; - } - - /** - * The ClusterPoolAvailableUpgradesClient object to access its operations. - */ - private final ClusterPoolAvailableUpgradesClient clusterPoolAvailableUpgrades; - - /** - * Gets the ClusterPoolAvailableUpgradesClient object to access its operations. - * - * @return the ClusterPoolAvailableUpgradesClient object. - */ - public ClusterPoolAvailableUpgradesClient getClusterPoolAvailableUpgrades() { - return this.clusterPoolAvailableUpgrades; - } - - /** - * The 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. - */ - private final ClustersClient clusters; - - /** - * Gets the ClustersClient object to access its operations. - * - * @return the ClustersClient object. - */ - public ClustersClient getClusters() { - return this.clusters; - } - - /** - * The ClusterAvailableUpgradesClient object to access its operations. - */ - private final ClusterAvailableUpgradesClient clusterAvailableUpgrades; - - /** - * Gets the ClusterAvailableUpgradesClient object to access its operations. - * - * @return the ClusterAvailableUpgradesClient object. - */ - public ClusterAvailableUpgradesClient getClusterAvailableUpgrades() { - return this.clusterAvailableUpgrades; - } - - /** - * The 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. - */ - private final ClusterJobsClient clusterJobs; - - /** - * Gets the ClusterJobsClient object to access its operations. - * - * @return the ClusterJobsClient object. - */ - public ClusterJobsClient getClusterJobs() { - return this.clusterJobs; - } - - /** - * The LocationsClient object to access its operations. - */ - private final LocationsClient locations; - - /** - * Gets the LocationsClient object to access its operations. - * - * @return the LocationsClient object. - */ - public LocationsClient getLocations() { - return this.locations; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The AvailableClusterPoolVersionsClient object to access its operations. - */ - private final AvailableClusterPoolVersionsClient availableClusterPoolVersions; - - /** - * Gets the AvailableClusterPoolVersionsClient object to access its operations. - * - * @return the AvailableClusterPoolVersionsClient object. - */ - public AvailableClusterPoolVersionsClient getAvailableClusterPoolVersions() { - return this.availableClusterPoolVersions; - } - - /** - * The AvailableClusterVersionsClient object to access its operations. - */ - private final AvailableClusterVersionsClient availableClusterVersions; - - /** - * Gets the AvailableClusterVersionsClient object to access its operations. - * - * @return the AvailableClusterVersionsClient object. - */ - 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. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. - */ - HDInsightContainersManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - 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); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(HDInsightContainersManagementClientImpl.class); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsClientImpl.java deleted file mode 100644 index d6e3786562ef..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsClientImpl.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) 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.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.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.LocationsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in LocationsClient. - */ -public final class LocationsClientImpl implements LocationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final LocationsService service; - - /** - * The service client containing this operation class. - */ - private final HDInsightContainersManagementClientImpl client; - - /** - * Initializes an instance of LocationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - LocationsClientImpl(HDInsightContainersManagementClientImpl client) { - this.service - = RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HDInsightContainersManagementClientLocations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HDInsightContainersM") - public interface LocationsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @PathParam("location") String location, - @BodyParam("application/json") NameAvailabilityParameters nameAvailabilityParameters, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Check the availability of the resource name. - * - * @param location The name of the Azure region. - * @param nameAvailabilityParameters The name and type of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 result of check name availability along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync(String location, - NameAvailabilityParameters nameAvailabilityParameters) { - 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (nameAvailabilityParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter nameAvailabilityParameters is required and cannot be null.")); - } else { - nameAvailabilityParameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), location, nameAvailabilityParameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check the availability of the resource name. - * - * @param location The name of the Azure region. - * @param nameAvailabilityParameters The name and type of the resource. - * @param context The context to associate with this operation. - * @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 result of check name availability along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync(String location, - NameAvailabilityParameters nameAvailabilityParameters, Context context) { - 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (nameAvailabilityParameters == null) { - return Mono.error( - new IllegalArgumentException("Parameter nameAvailabilityParameters is required and cannot be null.")); - } else { - nameAvailabilityParameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), location, nameAvailabilityParameters, accept, context); - } - - /** - * Check the availability of the resource name. - * - * @param location The name of the Azure region. - * @param nameAvailabilityParameters The name and type of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 result of check name availability on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync(String location, - NameAvailabilityParameters nameAvailabilityParameters) { - return checkNameAvailabilityWithResponseAsync(location, nameAvailabilityParameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Check the availability of the resource name. - * - * @param location The name of the Azure region. - * @param nameAvailabilityParameters The name and type of the resource. - * @param context The context to associate with this operation. - * @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 result of check name availability along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse(String location, - NameAvailabilityParameters nameAvailabilityParameters, Context context) { - return checkNameAvailabilityWithResponseAsync(location, nameAvailabilityParameters, context).block(); - } - - /** - * Check the availability of the resource name. - * - * @param location The name of the Azure region. - * @param nameAvailabilityParameters The name and type of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 result of check name availability. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NameAvailabilityResultInner checkNameAvailability(String location, - NameAvailabilityParameters nameAvailabilityParameters) { - return checkNameAvailabilityWithResponse(location, nameAvailabilityParameters, Context.NONE).getValue(); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsImpl.java deleted file mode 100644 index eb75b5db8f78..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.hdinsight.containers.fluent.LocationsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.Locations; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityResult; - -public final class LocationsImpl implements Locations { - private static final ClientLogger LOGGER = new ClientLogger(LocationsImpl.class); - - private final LocationsClient innerClient; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - public LocationsImpl(LocationsClient innerClient, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response checkNameAvailabilityWithResponse(String location, - NameAvailabilityParameters nameAvailabilityParameters, Context context) { - Response inner - = this.serviceClient().checkNameAvailabilityWithResponse(location, nameAvailabilityParameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NameAvailabilityResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public NameAvailabilityResult checkNameAvailability(String location, - NameAvailabilityParameters nameAvailabilityParameters) { - NameAvailabilityResultInner inner - = this.serviceClient().checkNameAvailability(location, nameAvailabilityParameters); - if (inner != null) { - return new NameAvailabilityResultImpl(inner, this.manager()); - } else { - return null; - } - } - - private LocationsClient 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/NameAvailabilityResultImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/NameAvailabilityResultImpl.java deleted file mode 100644 index f507570c7393..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/NameAvailabilityResultImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityResult; - -public final class NameAvailabilityResultImpl implements NameAvailabilityResult { - private NameAvailabilityResultInner innerObject; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - NameAvailabilityResultImpl(NameAvailabilityResultInner innerObject, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Boolean nameAvailable() { - return this.innerModel().nameAvailable(); - } - - public String reason() { - return this.innerModel().reason(); - } - - public String message() { - return this.innerModel().message(); - } - - public NameAvailabilityResultInner 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/OperationImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationImpl.java deleted file mode 100644 index c185664e6c57..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.resourcemanager.hdinsight.containers.fluent.models.OperationInner; -import com.azure.resourcemanager.hdinsight.containers.models.ActionType; -import com.azure.resourcemanager.hdinsight.containers.models.Operation; -import com.azure.resourcemanager.hdinsight.containers.models.OperationDisplay; -import com.azure.resourcemanager.hdinsight.containers.models.Origin; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - OperationImpl(OperationInner innerObject, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public Origin origin() { - return this.innerModel().origin(); - } - - public ActionType actionType() { - return this.innerModel().actionType(); - } - - public OperationInner 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/OperationsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationsClientImpl.java deleted file mode 100644 index affea8fbc362..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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.OperationsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.OperationInner; -import com.azure.resourcemanager.hdinsight.containers.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final HDInsightContainersManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(HDInsightContainersManagementClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HDInsightContainersManagementClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HDInsightContainersM") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.HDInsight/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @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 list of operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns list of operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns list of operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns list of operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Returns list of operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(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 a list of REST API operations supported by an Azure Resource Provider 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 a list of REST API operations supported by an Azure Resource Provider 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/OperationsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationsImpl.java deleted file mode 100644 index 06bfa4f8c13d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationsImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.OperationsClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.OperationInner; -import com.azure.resourcemanager.hdinsight.containers.models.Operation; -import com.azure.resourcemanager.hdinsight.containers.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - public OperationsImpl(OperationsClient innerClient, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient 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/ResourceManagerUtils.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ResourceManagerUtils.java deleted file mode 100644 index 3ff5f0b188ad..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) 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.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.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class ResourceManagerUtils { - private ResourceManagerUtils() { - } - - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (!segments.isEmpty() && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl<>(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux - .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ServiceConfigResultImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ServiceConfigResultImpl.java deleted file mode 100644 index 778c3a68b4dc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ServiceConfigResultImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.implementation; - -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ServiceConfigResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigResult; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigResultProperties; - -public final class ServiceConfigResultImpl implements ServiceConfigResult { - private ServiceConfigResultInner innerObject; - - private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - - ServiceConfigResultImpl(ServiceConfigResultInner innerObject, - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public ServiceConfigResultProperties properties() { - return this.innerModel().properties(); - } - - public ServiceConfigResultInner 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/package-info.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/package-info.java deleted file mode 100644 index 2fe549fa9a32..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the implementations for HDInsightContainersManagementClient. - * HDInsight Containers Management Client. - */ -package com.azure.resourcemanager.hdinsight.containers.implementation; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Action.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Action.java deleted file mode 100644 index 895757f71fa6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Action.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 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; - -/** - * A string property that indicates the action to be performed on the Flink job. It can have one of the following enum - * values => NEW, UPDATE, STATELESS_UPDATE, STOP, START, CANCEL, SAVEPOINT, LIST_SAVEPOINT, or DELETE. - */ -public final class Action extends ExpandableStringEnum { - /** - * Static value NEW for Action. - */ - public static final Action NEW = fromString("NEW"); - - /** - * Static value UPDATE for Action. - */ - public static final Action UPDATE = fromString("UPDATE"); - - /** - * Static value STATELESS_UPDATE for Action. - */ - public static final Action STATELESS_UPDATE = fromString("STATELESS_UPDATE"); - - /** - * Static value STOP for Action. - */ - public static final Action STOP = fromString("STOP"); - - /** - * Static value START for Action. - */ - public static final Action START = fromString("START"); - - /** - * Static value CANCEL for Action. - */ - public static final Action CANCEL = fromString("CANCEL"); - - /** - * Static value SAVEPOINT for Action. - */ - public static final Action SAVEPOINT = fromString("SAVEPOINT"); - - /** - * Static value LIST_SAVEPOINT for Action. - */ - public static final Action LIST_SAVEPOINT = fromString("LIST_SAVEPOINT"); - - /** - * Static value DELETE for Action. - */ - public static final Action DELETE = fromString("DELETE"); - - /** - * Static value LAST_STATE_UPDATE for Action. - */ - public static final Action LAST_STATE_UPDATE = fromString("LAST_STATE_UPDATE"); - - /** - * Static value RE_LAUNCH for Action. - */ - public static final Action RE_LAUNCH = fromString("RE_LAUNCH"); - - /** - * Creates a new instance of Action value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Action() { - } - - /** - * Creates or finds a Action from its string representation. - * - * @param name a name to look for. - * @return the corresponding Action. - */ - public static Action fromString(String name) { - return fromString(name, Action.class); - } - - /** - * Gets known Action values. - * - * @return known Action values. - */ - public static Collection values() { - return values(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 deleted file mode 100644 index d703f8172316..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ActionType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - */ -public final class ActionType extends ExpandableStringEnum { - /** - * Static value Internal for ActionType. - */ - public static final ActionType INTERNAL = fromString("Internal"); - - /** - * Creates a new instance of ActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActionType() { - } - - /** - * Creates or finds a ActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActionType. - */ - public static ActionType fromString(String name) { - return fromString(name, ActionType.class); - } - - /** - * Gets known ActionType values. - * - * @return known ActionType values. - */ - public static Collection values() { - return values(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 deleted file mode 100644 index 82d7311650e3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfile.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) 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.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 implements JsonSerializable { - /* - * ARM Resource ID of the AKS cluster - */ - private String aksClusterResourceId; - - /* - * Identity properties of the AKS cluster agentpool MSI - */ - private AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile; - - /* - * AKS control plane and default node pool version of this ClusterPool - */ - private String aksVersion; - - /** - * Creates an instance of AksClusterProfile class. - */ - public AksClusterProfile() { - } - - /** - * Get the aksClusterResourceId property: ARM Resource ID of the AKS cluster. - * - * @return the aksClusterResourceId value. - */ - public String aksClusterResourceId() { - return this.aksClusterResourceId; - } - - /** - * Set the aksClusterResourceId property: ARM Resource ID of the AKS cluster. - * - * @param aksClusterResourceId the aksClusterResourceId value to set. - * @return the AksClusterProfile object itself. - */ - public AksClusterProfile withAksClusterResourceId(String aksClusterResourceId) { - this.aksClusterResourceId = aksClusterResourceId; - return this; - } - - /** - * Get the aksClusterAgentPoolIdentityProfile property: Identity properties of the AKS cluster agentpool MSI. - * - * @return the aksClusterAgentPoolIdentityProfile value. - */ - public AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile() { - return this.aksClusterAgentPoolIdentityProfile; - } - - /** - * Set the aksClusterAgentPoolIdentityProfile property: Identity properties of the AKS cluster agentpool MSI. - * - * @param aksClusterAgentPoolIdentityProfile the aksClusterAgentPoolIdentityProfile value to set. - * @return the AksClusterProfile object itself. - */ - public AksClusterProfile withAksClusterAgentPoolIdentityProfile( - AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile) { - this.aksClusterAgentPoolIdentityProfile = aksClusterAgentPoolIdentityProfile; - return this; - } - - /** - * Get the aksVersion property: AKS control plane and default node pool version of this ClusterPool. - * - * @return the aksVersion value. - */ - 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (aksClusterAgentPoolIdentityProfile() != null) { - 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 deleted file mode 100644 index 43006dc41153..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfileAksClusterAgentPoolIdentityProfile.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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. - */ -@Fluent -public final class AksClusterProfileAksClusterAgentPoolIdentityProfile extends IdentityProfile { - /** - * Creates an instance of AksClusterProfileAksClusterAgentPoolIdentityProfile class. - */ - public AksClusterProfileAksClusterAgentPoolIdentityProfile() { - } - - /** - * {@inheritDoc} - */ - @Override - public AksClusterProfileAksClusterAgentPoolIdentityProfile withMsiResourceId(String msiResourceId) { - super.withMsiResourceId(msiResourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AksClusterProfileAksClusterAgentPoolIdentityProfile withMsiClientId(String msiClientId) { - super.withMsiClientId(msiClientId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AksClusterProfileAksClusterAgentPoolIdentityProfile withMsiObjectId(String msiObjectId) { - super.withMsiObjectId(msiObjectId); - 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("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 deleted file mode 100644 index 5fbfb2f0c9fa..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AuthorizationProfile.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 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 implements JsonSerializable { - /* - * AAD user Ids authorized for data plane access. - */ - private List userIds; - - /* - * AAD group Ids authorized for data plane access. - */ - private List groupIds; - - /** - * Creates an instance of AuthorizationProfile class. - */ - public AuthorizationProfile() { - } - - /** - * Get the userIds property: AAD user Ids authorized for data plane access. - * - * @return the userIds value. - */ - public List userIds() { - return this.userIds; - } - - /** - * Set the userIds property: AAD user Ids authorized for data plane access. - * - * @param userIds the userIds value to set. - * @return the AuthorizationProfile object itself. - */ - public AuthorizationProfile withUserIds(List userIds) { - this.userIds = userIds; - return this; - } - - /** - * Get the groupIds property: AAD group Ids authorized for data plane access. - * - * @return the groupIds value. - */ - public List groupIds() { - return this.groupIds; - } - - /** - * Set the groupIds property: AAD group Ids authorized for data plane access. - * - * @param groupIds the groupIds value to set. - * @return the AuthorizationProfile object itself. - */ - public AuthorizationProfile withGroupIds(List groupIds) { - this.groupIds = groupIds; - 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.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 deleted file mode 100644 index b0c9e707571e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AutoscaleProfile.java +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) 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.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 implements JsonSerializable { - /* - * This indicates whether auto scale is enabled on HDInsight on AKS cluster. - */ - 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. - */ - private Integer gracefulDecommissionTimeout; - - /* - * User to specify which type of Autoscale to be implemented - Scheduled Based or Load Based. - */ - private AutoscaleType autoscaleType; - - /* - * Profiles of schedule based Autoscale. - */ - private ScheduleBasedConfig scheduleBasedConfig; - - /* - * Profiles of load based Autoscale. - */ - private LoadBasedConfig loadBasedConfig; - - /** - * Creates an instance of AutoscaleProfile class. - */ - public AutoscaleProfile() { - } - - /** - * Get the enabled property: This indicates whether auto scale is enabled on HDInsight on AKS cluster. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: This indicates whether auto scale is enabled on HDInsight on AKS cluster. - * - * @param enabled the enabled value to set. - * @return the AutoscaleProfile object itself. - */ - public AutoscaleProfile withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * 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. - * - * @return the gracefulDecommissionTimeout value. - */ - public Integer gracefulDecommissionTimeout() { - return this.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. - * - * @param gracefulDecommissionTimeout the gracefulDecommissionTimeout value to set. - * @return the AutoscaleProfile object itself. - */ - public AutoscaleProfile withGracefulDecommissionTimeout(Integer gracefulDecommissionTimeout) { - this.gracefulDecommissionTimeout = gracefulDecommissionTimeout; - return this; - } - - /** - * Get the autoscaleType property: User to specify which type of Autoscale to be implemented - Scheduled Based or - * Load Based. - * - * @return the autoscaleType value. - */ - public AutoscaleType autoscaleType() { - return this.autoscaleType; - } - - /** - * Set the autoscaleType property: User to specify which type of Autoscale to be implemented - Scheduled Based or - * Load Based. - * - * @param autoscaleType the autoscaleType value to set. - * @return the AutoscaleProfile object itself. - */ - public AutoscaleProfile withAutoscaleType(AutoscaleType autoscaleType) { - this.autoscaleType = autoscaleType; - return this; - } - - /** - * Get the scheduleBasedConfig property: Profiles of schedule based Autoscale. - * - * @return the scheduleBasedConfig value. - */ - public ScheduleBasedConfig scheduleBasedConfig() { - return this.scheduleBasedConfig; - } - - /** - * Set the scheduleBasedConfig property: Profiles of schedule based Autoscale. - * - * @param scheduleBasedConfig the scheduleBasedConfig value to set. - * @return the AutoscaleProfile object itself. - */ - public AutoscaleProfile withScheduleBasedConfig(ScheduleBasedConfig scheduleBasedConfig) { - this.scheduleBasedConfig = scheduleBasedConfig; - return this; - } - - /** - * Get the loadBasedConfig property: Profiles of load based Autoscale. - * - * @return the loadBasedConfig value. - */ - public LoadBasedConfig loadBasedConfig() { - return this.loadBasedConfig; - } - - /** - * Set the loadBasedConfig property: Profiles of load based Autoscale. - * - * @param loadBasedConfig the loadBasedConfig value to set. - * @return the AutoscaleProfile object itself. - */ - public AutoscaleProfile withLoadBasedConfig(LoadBasedConfig loadBasedConfig) { - this.loadBasedConfig = loadBasedConfig; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scheduleBasedConfig() != null) { - scheduleBasedConfig().validate(); - } - if (loadBasedConfig() != null) { - 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 deleted file mode 100644 index 17ccfa92d2f5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AutoscaleType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * User to specify which type of Autoscale to be implemented - Scheduled Based or Load Based. - */ -public final class AutoscaleType extends ExpandableStringEnum { - /** - * Static value ScheduleBased for AutoscaleType. - */ - public static final AutoscaleType SCHEDULE_BASED = fromString("ScheduleBased"); - - /** - * Static value LoadBased for AutoscaleType. - */ - public static final AutoscaleType LOAD_BASED = fromString("LoadBased"); - - /** - * Creates a new instance of AutoscaleType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AutoscaleType() { - } - - /** - * Creates or finds a AutoscaleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutoscaleType. - */ - public static AutoscaleType fromString(String name) { - return fromString(name, AutoscaleType.class); - } - - /** - * Gets known AutoscaleType values. - * - * @return known AutoscaleType values. - */ - public static Collection values() { - return values(AutoscaleType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterPoolVersions.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterPoolVersions.java deleted file mode 100644 index 4a939db36afd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterPoolVersions.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of AvailableClusterPoolVersions. - */ -public interface AvailableClusterPoolVersions { - /** - * Returns a list of available cluster pool versions. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster pool versions as paginated response with {@link PagedIterable}. - */ - PagedIterable listByLocation(String location); - - /** - * Returns a list of available cluster pool versions. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 versions as paginated response with {@link PagedIterable}. - */ - PagedIterable listByLocation(String location, Context context); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterVersions.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterVersions.java deleted file mode 100644 index 12bf185415dd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterVersions.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of AvailableClusterVersions. - */ -public interface AvailableClusterVersions { - /** - * Returns a list of available cluster versions. - * - * @param location The name of the Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster versions as paginated response with {@link PagedIterable}. - */ - PagedIterable listByLocation(String location); - - /** - * Returns a list of available cluster versions. - * - * @param location The name of the Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 versions as paginated response with {@link PagedIterable}. - */ - PagedIterable listByLocation(String location, Context context); -} 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 deleted file mode 100644 index 4019567839e1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CatalogOptions.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 java.io.IOException; -import java.util.List; - -/** - * Trino cluster catalog options. - */ -@Fluent -public final class CatalogOptions implements JsonSerializable { - /* - * hive catalog options. - */ - private List hive; - - /** - * Creates an instance of CatalogOptions class. - */ - public CatalogOptions() { - } - - /** - * Get the hive property: hive catalog options. - * - * @return the hive value. - */ - public List hive() { - return this.hive; - } - - /** - * Set the hive property: hive catalog options. - * - * @param hive the hive value to set. - * @return the CatalogOptions object itself. - */ - public CatalogOptions withHive(List hive) { - this.hive = hive; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (hive() != null) { - 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 deleted file mode 100644 index 72f790d682d1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Category.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 deleted file mode 100644 index 72046dcad060..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Cluster.java +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright (c) 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.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInner; -import java.util.Map; - -/** - * An immutable client-side representation of Cluster. - */ -public interface Cluster { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: Gets or sets the properties. Define cluster specific properties. - * - * @return the properties value. - */ - ClusterResourceProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInner object. - * - * @return the inner object. - */ - ClusterInner innerModel(); - - /** - * The entirety of the Cluster definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Cluster definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Cluster definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the Cluster definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - - /** - * The stage of the Cluster definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, clusterPoolName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @return the next definition stage. - */ - WithCreate withExistingClusterpool(String resourceGroupName, String clusterPoolName); - } - - /** - * The stage of the Cluster definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Cluster create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Cluster create(Context context); - } - - /** - * The stage of the Cluster definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the Cluster definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Gets or sets the properties. Define cluster specific properties.. - * - * @param properties Gets or sets the properties. Define cluster specific properties. - * @return the next definition stage. - */ - WithCreate withProperties(ClusterResourceProperties properties); - } - } - - /** - * Begins update for the Cluster resource. - * - * @return the stage of resource update. - */ - Cluster.Update update(); - - /** - * The template for Cluster update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Cluster apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Cluster apply(Context context); - } - - /** - * The Cluster update stages. - */ - interface UpdateStages { - /** - * The stage of the Cluster update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the Cluster update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Define cluster patch specific properties.. - * - * @param properties Define cluster patch specific properties. - * @return the next definition stage. - */ - Update withProperties(ClusterPatchProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Cluster refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Cluster refresh(Context context); - - /** - * Upgrade a cluster. - * - * @param clusterUpgradeRequest Upgrade a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster. - */ - Cluster upgrade(ClusterUpgrade clusterUpgradeRequest); - - /** - * Upgrade a cluster. - * - * @param clusterUpgradeRequest Upgrade a cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster. - */ - Cluster upgrade(ClusterUpgrade clusterUpgradeRequest, Context context); - - /** - * 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. - * - * @param clusterResizeRequest Resize a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster. - */ - Cluster resize(ClusterResizeData clusterResizeRequest); - - /** - * Resize an existing Cluster. - * - * @param clusterResizeRequest Resize a cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 resize(ClusterResizeData clusterResizeRequest, Context context); -} 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 deleted file mode 100644 index f29b07dc41bd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAccessProfile.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Cluster access profile. - */ -@Fluent -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. - */ - private boolean enableInternalIngress; - - /* - * Private link service resource ID. Only when enableInternalIngress is true, this property will be returned. - */ - private String privateLinkServiceId; - - /** - * Creates an instance of ClusterAccessProfile class. - */ - public ClusterAccessProfile() { - } - - /** - * Get the enableInternalIngress property: Whether to create cluster using private IP instead of public IP. This - * property must be set at create time. - * - * @return the enableInternalIngress value. - */ - public boolean enableInternalIngress() { - return this.enableInternalIngress; - } - - /** - * Set the enableInternalIngress property: Whether to create cluster using private IP instead of public IP. This - * property must be set at create time. - * - * @param enableInternalIngress the enableInternalIngress value to set. - * @return the ClusterAccessProfile object itself. - */ - public ClusterAccessProfile withEnableInternalIngress(boolean enableInternalIngress) { - this.enableInternalIngress = enableInternalIngress; - return this; - } - - /** - * Get the privateLinkServiceId property: Private link service resource ID. Only when enableInternalIngress is true, - * this property will be returned. - * - * @return the privateLinkServiceId value. - */ - public String privateLinkServiceId() { - return this.privateLinkServiceId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@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 deleted file mode 100644 index acb18d9ef7b6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchUpgradeHistoryProperties.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index 6683708201c4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.annotation.Immutable; -import com.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. - */ -@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. - * - * @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()); - 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 deleted file mode 100644 index e81320332020..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableInPlaceUpgradeProperties.java +++ /dev/null @@ -1,429 +0,0 @@ -// Copyright (c) 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/ClusterAvailableUpgrade.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrade.java deleted file mode 100644 index 1412720b4a91..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrade.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; - -/** - * An immutable client-side representation of ClusterAvailableUpgrade. - */ -public interface ClusterAvailableUpgrade { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Gets or sets the properties. Define cluster upgrade specific properties. - * - * @return the properties value. - */ - ClusterAvailableUpgradeProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner object. - * - * @return the inner object. - */ - ClusterAvailableUpgradeInner innerModel(); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java deleted file mode 100644 index 56c25d74df49..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) 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 available AKS patch version upgrade. - */ -@Fluent -public final class ClusterAvailableUpgradeAksPatchUpgradeProperties extends ClusterAvailableUpgradeProperties { - /* - * Type of upgrade. - */ - private ClusterAvailableUpgradeType upgradeType = ClusterAvailableUpgradeType.AKSPATCH_UPGRADE; - - /* - * Current node pool version. - */ - private String currentVersion; - - /* - * Current AKS version's status: whether it is deprecated or supported - */ - private CurrentClusterAksVersionStatus currentVersionStatus; - - /* - * Latest available version, which should be equal to AKS control plane version if it's not deprecated. - */ - private String latestVersion; - - /** - * Creates an instance of ClusterAvailableUpgradeAksPatchUpgradeProperties class. - */ - 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. - * - * @return the currentVersion value. - */ - public String currentVersion() { - return this.currentVersion; - } - - /** - * Set the currentVersion property: Current node pool version. - * - * @param currentVersion the currentVersion value to set. - * @return the ClusterAvailableUpgradeAksPatchUpgradeProperties object itself. - */ - public ClusterAvailableUpgradeAksPatchUpgradeProperties withCurrentVersion(String currentVersion) { - this.currentVersion = currentVersion; - return this; - } - - /** - * Get the currentVersionStatus property: Current AKS version's status: whether it is deprecated or supported. - * - * @return the currentVersionStatus value. - */ - public CurrentClusterAksVersionStatus currentVersionStatus() { - return this.currentVersionStatus; - } - - /** - * Set the currentVersionStatus property: Current AKS version's status: whether it is deprecated or supported. - * - * @param currentVersionStatus the currentVersionStatus value to set. - * @return the ClusterAvailableUpgradeAksPatchUpgradeProperties object itself. - */ - public ClusterAvailableUpgradeAksPatchUpgradeProperties - withCurrentVersionStatus(CurrentClusterAksVersionStatus currentVersionStatus) { - this.currentVersionStatus = currentVersionStatus; - return this; - } - - /** - * Get the latestVersion property: Latest available version, which should be equal to AKS control plane version if - * it's not deprecated. - * - * @return the latestVersion value. - */ - public String latestVersion() { - return this.latestVersion; - } - - /** - * Set the latestVersion property: Latest available version, which should be equal to AKS control plane version if - * it's not deprecated. - * - * @param latestVersion the latestVersion value to set. - * @return the ClusterAvailableUpgradeAksPatchUpgradeProperties object itself. - */ - public ClusterAvailableUpgradeAksPatchUpgradeProperties withLatestVersion(String latestVersion) { - this.latestVersion = latestVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@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 deleted file mode 100644 index 4dc1edca4de3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) 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 hotfix version upgrade. - */ -@Fluent -public final class ClusterAvailableUpgradeHotfixUpgradeProperties extends ClusterAvailableInPlaceUpgradeProperties { - /* - * Type of upgrade. - */ - private ClusterAvailableUpgradeType upgradeType = ClusterAvailableUpgradeType.HOTFIX_UPGRADE; - - /** - * Creates an instance of ClusterAvailableUpgradeHotfixUpgradeProperties class. - */ - public ClusterAvailableUpgradeHotfixUpgradeProperties() { - } - - /** - * Get the upgradeType property: Type of upgrade. - * - * @return the upgradeType value. - */ - @Override - public ClusterAvailableUpgradeType upgradeType() { - return this.upgradeType; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterAvailableUpgradeHotfixUpgradeProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterAvailableUpgradeHotfixUpgradeProperties withSourceOssVersion(String sourceOssVersion) { - super.withSourceOssVersion(sourceOssVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterAvailableUpgradeHotfixUpgradeProperties withSourceClusterVersion(String sourceClusterVersion) { - super.withSourceClusterVersion(sourceClusterVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterAvailableUpgradeHotfixUpgradeProperties withSourceBuildNumber(String sourceBuildNumber) { - super.withSourceBuildNumber(sourceBuildNumber); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterAvailableUpgradeHotfixUpgradeProperties withTargetOssVersion(String targetOssVersion) { - super.withTargetOssVersion(targetOssVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterAvailableUpgradeHotfixUpgradeProperties withTargetClusterVersion(String targetClusterVersion) { - super.withTargetClusterVersion(targetClusterVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterAvailableUpgradeHotfixUpgradeProperties withTargetBuildNumber(String targetBuildNumber) { - super.withTargetBuildNumber(targetBuildNumber); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterAvailableUpgradeHotfixUpgradeProperties withComponentName(String componentName) { - super.withComponentName(componentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterAvailableUpgradeHotfixUpgradeProperties withSeverity(Severity severity) { - super.withSeverity(severity); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterAvailableUpgradeHotfixUpgradeProperties withExtendedProperties(String extendedProperties) { - super.withExtendedProperties(extendedProperties); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterAvailableUpgradeHotfixUpgradeProperties 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 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 deleted file mode 100644 index 01afc8fa9e1f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeList.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) 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.ClusterAvailableUpgradeInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of cluster available upgrade. - */ -@Fluent -public final class ClusterAvailableUpgradeList implements JsonSerializable { - /* - * Collection of Cluster available upgrade. - */ - private List value; - - /* - * The URL of next result page. - */ - private String nextLink; - - /** - * Creates an instance of ClusterAvailableUpgradeList class. - */ - public ClusterAvailableUpgradeList() { - } - - /** - * Get the value property: Collection of Cluster available upgrade. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of Cluster available upgrade. - * - * @param value the value value to set. - * @return the ClusterAvailableUpgradeList object itself. - */ - public ClusterAvailableUpgradeList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL of next result page. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URL of next result page. - * - * @param nextLink the nextLink value to set. - * @return the ClusterAvailableUpgradeList object itself. - */ - public ClusterAvailableUpgradeList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.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 deleted file mode 100644 index 5e6a94b9e2a6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradePatchVersionUpgradeProperties.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 deleted file mode 100644 index 4b0031dcb504..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeProperties.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.annotation.Immutable; -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. - */ -@Immutable -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. - * - * @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("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 deleted file mode 100644 index d60deaf81ae7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of upgrade. - */ -public final class ClusterAvailableUpgradeType extends ExpandableStringEnum { - /** - * Static value AKSPatchUpgrade for ClusterAvailableUpgradeType. - */ - public static final ClusterAvailableUpgradeType AKSPATCH_UPGRADE = fromString("AKSPatchUpgrade"); - - /** - * Static value HotfixUpgrade for ClusterAvailableUpgradeType. - */ - public static final ClusterAvailableUpgradeType HOTFIX_UPGRADE = fromString("HotfixUpgrade"); - - /** - * Static value PatchVersionUpgrade for ClusterAvailableUpgradeType. - */ - public static final ClusterAvailableUpgradeType PATCH_VERSION_UPGRADE = fromString("PatchVersionUpgrade"); - - /** - * Creates a new instance of ClusterAvailableUpgradeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClusterAvailableUpgradeType() { - } - - /** - * Creates or finds a ClusterAvailableUpgradeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterAvailableUpgradeType. - */ - public static ClusterAvailableUpgradeType fromString(String name) { - return fromString(name, ClusterAvailableUpgradeType.class); - } - - /** - * Gets known ClusterAvailableUpgradeType values. - * - * @return known ClusterAvailableUpgradeType values. - */ - public static Collection values() { - return values(ClusterAvailableUpgradeType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrades.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrades.java deleted file mode 100644 index 379592192fdc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrades.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of ClusterAvailableUpgrades. - */ -public interface ClusterAvailableUpgrades { - /** - * List a cluster available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster available upgrade as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName); - - /** - * List a cluster available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster available upgrade as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName, - Context context); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterComponentsItem.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterComponentsItem.java deleted file mode 100644 index 885b1850a866..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterComponentsItem.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The ClusterComponentsItem model. - */ -@Fluent -public final class ClusterComponentsItem implements JsonSerializable { - /* - * The name property. - */ - private String name; - - /* - * The version property. - */ - private String version; - - /** - * Creates an instance of ClusterComponentsItem class. - */ - public ClusterComponentsItem() { - } - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name property. - * - * @param name the name value to set. - * @return the ClusterComponentsItem object itself. - */ - public ClusterComponentsItem withName(String name) { - this.name = name; - return this; - } - - /** - * Get the version property: The version property. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The version property. - * - * @param version the version value to set. - * @return the ClusterComponentsItem object itself. - */ - public ClusterComponentsItem withVersion(String version) { - this.version = version; - 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("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 deleted file mode 100644 index bd2e69c00bc1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterConfigFile.java +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) 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; -import java.util.Map; - -/** - * Cluster configuration files. - */ -@Fluent -public final class ClusterConfigFile implements JsonSerializable { - /* - * Configuration file name. - */ - private String fileName; - - /* - * Free form content of the entire configuration file. - */ - 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. - */ - private ContentEncoding encoding; - - /* - * Path of the config file if content is specified. - */ - private String path; - - /* - * List of key value pairs - * where key represents a valid service configuration name and value represents the value of the config. - */ - private Map values; - - /** - * Creates an instance of ClusterConfigFile class. - */ - public ClusterConfigFile() { - } - - /** - * Get the fileName property: Configuration file name. - * - * @return the fileName value. - */ - public String fileName() { - return this.fileName; - } - - /** - * Set the fileName property: Configuration file name. - * - * @param fileName the fileName value to set. - * @return the ClusterConfigFile object itself. - */ - public ClusterConfigFile withFileName(String fileName) { - this.fileName = fileName; - return this; - } - - /** - * Get the content property: Free form content of the entire configuration file. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Set the content property: Free form content of the entire configuration file. - * - * @param content the content value to set. - * @return the ClusterConfigFile object itself. - */ - public ClusterConfigFile withContent(String content) { - this.content = content; - return this; - } - - /** - * Get the encoding property: This property indicates if the content is encoded and is case-insensitive. Please set - * the value to base64 if the content is base64 encoded. Set it to none or skip it if the content is plain text. - * - * @return the encoding value. - */ - public ContentEncoding encoding() { - return this.encoding; - } - - /** - * Set the encoding property: This property indicates if the content is encoded and is case-insensitive. Please set - * the value to base64 if the content is base64 encoded. Set it to none or skip it if the content is plain text. - * - * @param encoding the encoding value to set. - * @return the ClusterConfigFile object itself. - */ - public ClusterConfigFile withEncoding(ContentEncoding encoding) { - this.encoding = encoding; - return this; - } - - /** - * Get the path property: Path of the config file if content is specified. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: Path of the config file if content is specified. - * - * @param path the path value to set. - * @return the ClusterConfigFile object itself. - */ - public ClusterConfigFile withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the values property: List of key value pairs - * where key represents a valid service configuration name and value represents the value of the config. - * - * @return the values value. - */ - public Map values() { - return this.values; - } - - /** - * Set the values property: List of key value pairs - * where key represents a valid service configuration name and value represents the value of the config. - * - * @param values the values value to set. - * @return the ClusterConfigFile object itself. - */ - public ClusterConfigFile withValues(Map values) { - this.values = values; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fileName() == null) { - 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 deleted file mode 100644 index bedf2e9f0fff..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeHistoryProperties.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index bf40ad5b66f1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) 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 hotfix. - */ -@Fluent -public final class ClusterHotfixUpgradeProperties extends ClusterInPlaceUpgradeProperties { - /* - * Type of upgrade. - */ - private ClusterUpgradeType upgradeType = ClusterUpgradeType.HOTFIX_UPGRADE; - - /** - * Creates an instance of ClusterHotfixUpgradeProperties class. - */ - public ClusterHotfixUpgradeProperties() { - } - - /** - * Get the upgradeType property: Type of upgrade. - * - * @return the upgradeType value. - */ - @Override - public ClusterUpgradeType upgradeType() { - return this.upgradeType; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterHotfixUpgradeProperties withTargetOssVersion(String targetOssVersion) { - super.withTargetOssVersion(targetOssVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterHotfixUpgradeProperties withTargetClusterVersion(String targetClusterVersion) { - super.withTargetClusterVersion(targetClusterVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterHotfixUpgradeProperties withTargetBuildNumber(String targetBuildNumber) { - super.withTargetBuildNumber(targetBuildNumber); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterHotfixUpgradeProperties 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 ClusterHotfixUpgradeProperties from the JsonReader. - * - * @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. - */ - 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 deleted file mode 100644 index 4fb5702805e7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeRollbackHistoryProperties.java +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index 84b8a8e65c98..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeHistoryProperties.java +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index b6bcd707bae2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeProperties.java +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index d26021084905..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewProperties.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * Cluster Instance View Properties. - */ -@Fluent -public class ClusterInstanceViewProperties implements JsonSerializable { - /* - * Status of the instance view. - */ - private ClusterInstanceViewPropertiesStatus status; - - /* - * List of statuses of relevant services that make up the HDInsight on AKS cluster to surface to the customer. - */ - private List serviceStatuses; - - /** - * Creates an instance of ClusterInstanceViewProperties class. - */ - public ClusterInstanceViewProperties() { - } - - /** - * Get the status property: Status of the instance view. - * - * @return the status value. - */ - public ClusterInstanceViewPropertiesStatus status() { - return this.status; - } - - /** - * Set the status property: Status of the instance view. - * - * @param status the status value to set. - * @return the ClusterInstanceViewProperties object itself. - */ - public ClusterInstanceViewProperties withStatus(ClusterInstanceViewPropertiesStatus status) { - this.status = status; - return this; - } - - /** - * Get the serviceStatuses property: List of statuses of relevant services that make up the HDInsight on AKS cluster - * to surface to the customer. - * - * @return the serviceStatuses value. - */ - public List serviceStatuses() { - return this.serviceStatuses; - } - - /** - * 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. - */ - public ClusterInstanceViewProperties withServiceStatuses(List serviceStatuses) { - this.serviceStatuses = serviceStatuses; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (status() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property status in model ClusterInstanceViewProperties")); - } else { - status().validate(); - } - if (serviceStatuses() == null) { - 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 deleted file mode 100644 index 14a8134d533b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewPropertiesStatus.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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. - */ -@Fluent -public final class ClusterInstanceViewPropertiesStatus extends ClusterInstanceViewStatus { - /** - * Creates an instance of ClusterInstanceViewPropertiesStatus class. - */ - public ClusterInstanceViewPropertiesStatus() { - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterInstanceViewPropertiesStatus withReady(String ready) { - super.withReady(ready); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterInstanceViewPropertiesStatus withReason(String reason) { - super.withReason(reason); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterInstanceViewPropertiesStatus withMessage(String message) { - super.withMessage(message); - 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("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/ClusterInstanceViewResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResult.java deleted file mode 100644 index acd96ba28a38..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResult.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner; - -/** - * An immutable client-side representation of ClusterInstanceViewResult. - */ -public interface ClusterInstanceViewResult { - /** - * Gets the name property: Name of the instance view. - * - * @return the name value. - */ - String name(); - - /** - * Gets the properties property: Properties of the instance view. - * - * @return the properties value. - */ - ClusterInstanceViewResultProperties properties(); - - /** - * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner - * object. - * - * @return the inner object. - */ - ClusterInstanceViewResultInner innerModel(); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResultProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResultProperties.java deleted file mode 100644 index d7961fddea6e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResultProperties.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * Properties of the instance view. - */ -@Fluent -public final class ClusterInstanceViewResultProperties extends ClusterInstanceViewProperties { - /** - * Creates an instance of ClusterInstanceViewResultProperties class. - */ - public ClusterInstanceViewResultProperties() { - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterInstanceViewResultProperties withStatus(ClusterInstanceViewPropertiesStatus status) { - super.withStatus(status); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterInstanceViewResultProperties withServiceStatuses(List serviceStatuses) { - super.withServiceStatuses(serviceStatuses); - 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.writeJsonField("status", status()); - jsonWriter.writeArrayField("serviceStatuses", serviceStatuses(), - (writer, element) -> 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 deleted file mode 100644 index 11357d15fd7c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewStatus.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) 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; - -/** - * Status of the instance view. - */ -@Fluent -public class ClusterInstanceViewStatus implements JsonSerializable { - /* - * The cluster ready status - */ - private String ready; - - /* - * The status reason. - */ - private String reason; - - /* - * The additional message. - */ - private String message; - - /** - * Creates an instance of ClusterInstanceViewStatus class. - */ - public ClusterInstanceViewStatus() { - } - - /** - * Get the ready property: The cluster ready status. - * - * @return the ready value. - */ - public String ready() { - return this.ready; - } - - /** - * Set the ready property: The cluster ready status. - * - * @param ready the ready value to set. - * @return the ClusterInstanceViewStatus object itself. - */ - public ClusterInstanceViewStatus withReady(String ready) { - this.ready = ready; - return this; - } - - /** - * Get the reason property: The status reason. - * - * @return the reason value. - */ - public String reason() { - return this.reason; - } - - /** - * Set the reason property: The status reason. - * - * @param reason the reason value to set. - * @return the ClusterInstanceViewStatus object itself. - */ - public ClusterInstanceViewStatus withReason(String reason) { - this.reason = reason; - return this; - } - - /** - * Get the message property: The additional message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: The additional message. - * - * @param message the message value to set. - * @return the ClusterInstanceViewStatus object itself. - */ - public ClusterInstanceViewStatus withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ready() == null) { - 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 deleted file mode 100644 index af7bb2466368..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewsResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 java.io.IOException; -import java.util.List; - -/** - * The instance view of a HDInsight Cluster. - */ -@Fluent -public final class ClusterInstanceViewsResult implements JsonSerializable { - /* - * Cluster instance view array. - */ - private List value; - - /* - * The link (url) to the next page of results. - */ - private String nextLink; - - /** - * Creates an instance of ClusterInstanceViewsResult class. - */ - public ClusterInstanceViewsResult() { - } - - /** - * Get the value property: Cluster instance view array. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Cluster instance view array. - * - * @param value the value value to set. - * @return the ClusterInstanceViewsResult object itself. - */ - public ClusterInstanceViewsResult 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) { - 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/ClusterJob.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJob.java deleted file mode 100644 index 7e26bb29a78a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJob.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; - -/** - * An immutable client-side representation of ClusterJob. - */ -public interface ClusterJob { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Properties of cluster job. - * - * @return the properties value. - */ - ClusterJobProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner object. - * - * @return the inner object. - */ - ClusterJobInner innerModel(); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobList.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobList.java deleted file mode 100644 index b67d80a74c2e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobList.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) 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.ClusterJobInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of cluster job. - */ -@Fluent -public final class ClusterJobList implements JsonSerializable { - /* - * Collection of cluster job. - */ - private List value; - - /* - * The Url of next result page. - */ - private String nextLink; - - /** - * Creates an instance of ClusterJobList class. - */ - public ClusterJobList() { - } - - /** - * Get the value property: Collection of cluster job. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of cluster job. - * - * @param value the value value to set. - * @return the ClusterJobList object itself. - */ - public ClusterJobList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The Url of next result page. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The Url of next result page. - * - * @param nextLink the nextLink value to set. - * @return the ClusterJobList object itself. - */ - public ClusterJobList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.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 deleted file mode 100644 index b3bc1c50e0ff..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobProperties.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.annotation.Immutable; -import com.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. - */ -@Immutable -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. - * - * @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("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/ClusterJobs.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobs.java deleted file mode 100644 index a14d7f5e2410..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobs.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; - -/** - * Resource collection API of ClusterJobs. - */ -public interface ClusterJobs { - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster job. - */ - ClusterJob runJob(String resourceGroupName, String clusterPoolName, String clusterName, ClusterJobInner clusterJob); - - /** - * Operations on jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterJob The Cluster job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster job. - */ - ClusterJob runJob(String resourceGroupName, String clusterPoolName, String clusterName, ClusterJobInner clusterJob, - Context context); - - /** - * Get jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName); - - /** - * Get jobs of HDInsight on AKS cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq - * {jobName}' or 'jarName eq {jarName}'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName, String filter, - Context context); -} 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 deleted file mode 100644 index 3fc4251f7372..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraries.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 deleted file mode 100644 index 683849bc3ddc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibrary.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 deleted file mode 100644 index 0c8085a26a7e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryList.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index d79c08eeebb0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryManagementOperation.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index c7cba709db00..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryManagementOperationProperties.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 deleted file mode 100644 index d3d35a5b7726..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryProperties.java +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index 6f818ee502fa..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterListResult.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInner; -import java.io.IOException; -import java.util.List; - -/** - * The list cluster operation response. - */ -@Fluent -public final class ClusterListResult implements JsonSerializable { - /* - * The list of clusters. - */ - private List value; - - /* - * The link (url) to the next page of results. - */ - private String nextLink; - - /** - * Creates an instance of ClusterListResult class. - */ - public ClusterListResult() { - } - - /** - * Get the value property: The list of clusters. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of clusters. - * - * @param value the value value to set. - * @return the ClusterListResult object itself. - */ - public ClusterListResult 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) { - 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 deleted file mode 100644 index 184da15810fd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLogAnalyticsApplicationLogs.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 java.io.IOException; - -/** - * Collection of logs to be enabled or disabled for log analytics. - */ -@Fluent -public final class ClusterLogAnalyticsApplicationLogs implements JsonSerializable { - /* - * True if stdout is enabled, otherwise false. - */ - private Boolean stdOutEnabled; - - /* - * True if stderror is enabled, otherwise false. - */ - private Boolean stdErrorEnabled; - - /** - * Creates an instance of ClusterLogAnalyticsApplicationLogs class. - */ - public ClusterLogAnalyticsApplicationLogs() { - } - - /** - * Get the stdOutEnabled property: True if stdout is enabled, otherwise false. - * - * @return the stdOutEnabled value. - */ - public Boolean stdOutEnabled() { - return this.stdOutEnabled; - } - - /** - * Set the stdOutEnabled property: True if stdout is enabled, otherwise false. - * - * @param stdOutEnabled the stdOutEnabled value to set. - * @return the ClusterLogAnalyticsApplicationLogs object itself. - */ - public ClusterLogAnalyticsApplicationLogs withStdOutEnabled(Boolean stdOutEnabled) { - this.stdOutEnabled = stdOutEnabled; - return this; - } - - /** - * Get the stdErrorEnabled property: True if stderror is enabled, otherwise false. - * - * @return the stdErrorEnabled value. - */ - public Boolean stdErrorEnabled() { - return this.stdErrorEnabled; - } - - /** - * Set the stdErrorEnabled property: True if stderror is enabled, otherwise false. - * - * @param stdErrorEnabled the stdErrorEnabled value to set. - * @return the ClusterLogAnalyticsApplicationLogs object itself. - */ - public ClusterLogAnalyticsApplicationLogs withStdErrorEnabled(Boolean stdErrorEnabled) { - this.stdErrorEnabled = stdErrorEnabled; - 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.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 deleted file mode 100644 index e413148da880..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLogAnalyticsProfile.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 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.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 implements JsonSerializable { - /* - * True if log analytics is enabled for the cluster, otherwise false. - */ - private boolean enabled; - - /* - * Collection of logs to be enabled or disabled for log analytics. - */ - private ClusterLogAnalyticsApplicationLogs applicationLogs; - - /* - * True if metrics are enabled, otherwise false. - */ - private Boolean metricsEnabled; - - /** - * Creates an instance of ClusterLogAnalyticsProfile class. - */ - public ClusterLogAnalyticsProfile() { - } - - /** - * Get the enabled property: True if log analytics is enabled for the cluster, otherwise false. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: True if log analytics is enabled for the cluster, otherwise false. - * - * @param enabled the enabled value to set. - * @return the ClusterLogAnalyticsProfile object itself. - */ - public ClusterLogAnalyticsProfile withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the applicationLogs property: Collection of logs to be enabled or disabled for log analytics. - * - * @return the applicationLogs value. - */ - public ClusterLogAnalyticsApplicationLogs applicationLogs() { - return this.applicationLogs; - } - - /** - * Set the applicationLogs property: Collection of logs to be enabled or disabled for log analytics. - * - * @param applicationLogs the applicationLogs value to set. - * @return the ClusterLogAnalyticsProfile object itself. - */ - public ClusterLogAnalyticsProfile withApplicationLogs(ClusterLogAnalyticsApplicationLogs applicationLogs) { - this.applicationLogs = applicationLogs; - return this; - } - - /** - * Get the metricsEnabled property: True if metrics are enabled, otherwise false. - * - * @return the metricsEnabled value. - */ - public Boolean metricsEnabled() { - return this.metricsEnabled; - } - - /** - * Set the metricsEnabled property: True if metrics are enabled, otherwise false. - * - * @param metricsEnabled the metricsEnabled value to set. - * @return the ClusterLogAnalyticsProfile object itself. - */ - public ClusterLogAnalyticsProfile withMetricsEnabled(Boolean metricsEnabled) { - this.metricsEnabled = metricsEnabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (applicationLogs() != null) { - 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 deleted file mode 100644 index a031e0275bd9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatch.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 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.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 implements JsonSerializable { - /* - * Define cluster patch specific properties. - */ - private ClusterPatchProperties properties; - - /* - * Resource tags. - */ - private Map tags; - - /** - * Creates an instance of ClusterPatch class. - */ - public ClusterPatch() { - } - - /** - * Get the properties property: Define cluster patch specific properties. - * - * @return the properties value. - */ - public ClusterPatchProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Define cluster patch specific properties. - * - * @param properties the properties value to set. - * @return the ClusterPatch object itself. - */ - public ClusterPatch withProperties(ClusterPatchProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the ClusterPatch object itself. - */ - public ClusterPatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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 deleted file mode 100644 index 1580460970ee..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchProperties.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Cluster resource patch data. - */ -@Fluent -public final class ClusterPatchProperties implements JsonSerializable { - /* - * Cluster resource patch properties. - */ - private UpdatableClusterProfile clusterProfile; - - /** - * Creates an instance of ClusterPatchProperties class. - */ - public ClusterPatchProperties() { - } - - /** - * Get the clusterProfile property: Cluster resource patch properties. - * - * @return the clusterProfile value. - */ - public UpdatableClusterProfile clusterProfile() { - return this.clusterProfile; - } - - /** - * Set the clusterProfile property: Cluster resource patch properties. - * - * @param clusterProfile the clusterProfile value to set. - * @return the ClusterPatchProperties object itself. - */ - public ClusterPatchProperties withClusterProfile(UpdatableClusterProfile clusterProfile) { - this.clusterProfile = clusterProfile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (clusterProfile() != null) { - 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 deleted file mode 100644 index ef765c8e9cf9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeHistoryProperties.java +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index dab36780a385..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeProperties.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index 509c46d047d7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeRollbackHistoryProperties.java +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) 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/ClusterPool.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPool.java deleted file mode 100644 index fc2407757fb2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPool.java +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright (c) 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.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; -import java.util.Map; - -/** - * An immutable client-side representation of ClusterPool. - */ -public interface ClusterPool { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: Gets or sets the properties. Define cluster pool specific properties. - * - * @return the properties value. - */ - ClusterPoolResourceProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner object. - * - * @return the inner object. - */ - ClusterPoolInner innerModel(); - - /** - * The entirety of the ClusterPool definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The ClusterPool definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ClusterPool definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ClusterPool definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the ClusterPool definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the ClusterPool definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ClusterPool create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ClusterPool create(Context context); - } - - /** - * The stage of the ClusterPool definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the ClusterPool definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Gets or sets the properties. Define cluster pool specific properties.. - * - * @param properties Gets or sets the properties. Define cluster pool specific properties. - * @return the next definition stage. - */ - WithCreate withProperties(ClusterPoolResourceProperties properties); - } - } - - /** - * Begins update for the ClusterPool resource. - * - * @return the stage of resource update. - */ - ClusterPool.Update update(); - - /** - * The template for ClusterPool update. - */ - interface Update extends UpdateStages.WithTags { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ClusterPool apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ClusterPool apply(Context context); - } - - /** - * The ClusterPool update stages. - */ - interface UpdateStages { - /** - * The stage of the ClusterPool update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ClusterPool refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ClusterPool refresh(Context context); - - /** - * Upgrade a cluster pool. - * - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - ClusterPool upgrade(ClusterPoolUpgrade clusterPoolUpgradeRequest); - - /** - * Upgrade a cluster pool. - * - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - ClusterPool upgrade(ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchUpgradeHistoryProperties.java deleted file mode 100644 index dc7149e5f527..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchUpgradeHistoryProperties.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index a182dcf7bd7b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) 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 pool's AKS patch version. - */ -@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. - */ - private Boolean upgradeClusterPool; - - /* - * whether upgrade all clusters' nodes. If it's true, upgradeClusterPool should be false. - */ - private Boolean upgradeAllClusterNodes; - - /* - * Target AKS version. When it's not set, latest version will be used. When upgradeClusterPool is true and - * upgradeAllClusterNodes is false, target version should be greater or equal to current version. When - * upgradeClusterPool is false and upgradeAllClusterNodes is true, target version should be equal to AKS version of - * cluster pool. - */ - private String targetAksVersion; - - /** - * Creates an instance of ClusterPoolAksPatchVersionUpgradeProperties class. - */ - 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. - * - * @return the upgradeClusterPool value. - */ - public Boolean upgradeClusterPool() { - return this.upgradeClusterPool; - } - - /** - * Set the upgradeClusterPool property: whether upgrade cluster pool or not. If it's true, upgradeAllClusterNodes - * should be false. - * - * @param upgradeClusterPool the upgradeClusterPool value to set. - * @return the ClusterPoolAksPatchVersionUpgradeProperties object itself. - */ - public ClusterPoolAksPatchVersionUpgradeProperties withUpgradeClusterPool(Boolean upgradeClusterPool) { - this.upgradeClusterPool = upgradeClusterPool; - return this; - } - - /** - * Get the upgradeAllClusterNodes property: whether upgrade all clusters' nodes. If it's true, upgradeClusterPool - * should be false. - * - * @return the upgradeAllClusterNodes value. - */ - public Boolean upgradeAllClusterNodes() { - return this.upgradeAllClusterNodes; - } - - /** - * Set the upgradeAllClusterNodes property: whether upgrade all clusters' nodes. If it's true, upgradeClusterPool - * should be false. - * - * @param upgradeAllClusterNodes the upgradeAllClusterNodes value to set. - * @return the ClusterPoolAksPatchVersionUpgradeProperties object itself. - */ - public ClusterPoolAksPatchVersionUpgradeProperties withUpgradeAllClusterNodes(Boolean upgradeAllClusterNodes) { - this.upgradeAllClusterNodes = upgradeAllClusterNodes; - return this; - } - - /** - * Get the targetAksVersion property: Target AKS version. When it's not set, latest version will be used. When - * upgradeClusterPool is true and upgradeAllClusterNodes is false, target version should be greater or equal to - * current version. When upgradeClusterPool is false and upgradeAllClusterNodes is true, target version should be - * equal to AKS version of cluster pool. - * - * @return the targetAksVersion value. - */ - public String targetAksVersion() { - return this.targetAksVersion; - } - - /** - * Set the targetAksVersion property: Target AKS version. When it's not set, latest version will be used. When - * upgradeClusterPool is true and upgradeAllClusterNodes is false, target version should be greater or equal to - * current version. When upgradeClusterPool is false and upgradeAllClusterNodes is true, target version should be - * equal to AKS version of cluster pool. - * - * @param targetAksVersion the targetAksVersion value to set. - * @return the ClusterPoolAksPatchVersionUpgradeProperties object itself. - */ - public ClusterPoolAksPatchVersionUpgradeProperties withTargetAksVersion(String targetAksVersion) { - this.targetAksVersion = targetAksVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@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/ClusterPoolAvailableUpgrade.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrade.java deleted file mode 100644 index 6599abb84a25..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrade.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; - -/** - * An immutable client-side representation of ClusterPoolAvailableUpgrade. - */ -public interface ClusterPoolAvailableUpgrade { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Gets or sets the properties. Define cluster pool upgrade specific properties. - * - * @return the properties value. - */ - ClusterPoolAvailableUpgradeProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner - * object. - * - * @return the inner object. - */ - ClusterPoolAvailableUpgradeInner innerModel(); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java deleted file mode 100644 index 68fd297ea328..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) 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 available AKS patch version upgrade. - */ -@Fluent -public final class ClusterPoolAvailableUpgradeAksPatchUpgradeProperties extends ClusterPoolAvailableUpgradeProperties { - /* - * Type of upgrade. - */ - private ClusterPoolAvailableUpgradeType upgradeType = ClusterPoolAvailableUpgradeType.AKSPATCH_UPGRADE; - - /* - * Current AKS version. - */ - private String currentVersion; - - /* - * Current AKS version's status: whether it is deprecated or supported - */ - private CurrentClusterPoolAksVersionStatus currentVersionStatus; - - /* - * Latest AKS patch version. - */ - private String latestVersion; - - /** - * Creates an instance of ClusterPoolAvailableUpgradeAksPatchUpgradeProperties class. - */ - 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. - * - * @return the currentVersion value. - */ - public String currentVersion() { - return this.currentVersion; - } - - /** - * Set the currentVersion property: Current AKS version. - * - * @param currentVersion the currentVersion value to set. - * @return the ClusterPoolAvailableUpgradeAksPatchUpgradeProperties object itself. - */ - public ClusterPoolAvailableUpgradeAksPatchUpgradeProperties withCurrentVersion(String currentVersion) { - this.currentVersion = currentVersion; - return this; - } - - /** - * Get the currentVersionStatus property: Current AKS version's status: whether it is deprecated or supported. - * - * @return the currentVersionStatus value. - */ - public CurrentClusterPoolAksVersionStatus currentVersionStatus() { - return this.currentVersionStatus; - } - - /** - * Set the currentVersionStatus property: Current AKS version's status: whether it is deprecated or supported. - * - * @param currentVersionStatus the currentVersionStatus value to set. - * @return the ClusterPoolAvailableUpgradeAksPatchUpgradeProperties object itself. - */ - public ClusterPoolAvailableUpgradeAksPatchUpgradeProperties - withCurrentVersionStatus(CurrentClusterPoolAksVersionStatus currentVersionStatus) { - this.currentVersionStatus = currentVersionStatus; - return this; - } - - /** - * Get the latestVersion property: Latest AKS patch version. - * - * @return the latestVersion value. - */ - public String latestVersion() { - return this.latestVersion; - } - - /** - * Set the latestVersion property: Latest AKS patch version. - * - * @param latestVersion the latestVersion value to set. - * @return the ClusterPoolAvailableUpgradeAksPatchUpgradeProperties object itself. - */ - public ClusterPoolAvailableUpgradeAksPatchUpgradeProperties withLatestVersion(String latestVersion) { - this.latestVersion = latestVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@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 deleted file mode 100644 index 0dd8d4f05fa2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeList.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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.ClusterPoolAvailableUpgradeInner; -import java.io.IOException; -import java.util.List; - -/** - * collection of cluster pool available upgrade. - */ -@Fluent -public final class ClusterPoolAvailableUpgradeList implements JsonSerializable { - /* - * Collection of cluster pool available upgrade. - */ - private List value; - - /* - * The Url of next result page. - */ - private String nextLink; - - /** - * Creates an instance of ClusterPoolAvailableUpgradeList class. - */ - public ClusterPoolAvailableUpgradeList() { - } - - /** - * Get the value property: Collection of cluster pool available upgrade. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of cluster pool available upgrade. - * - * @param value the value value to set. - * @return the ClusterPoolAvailableUpgradeList object itself. - */ - public ClusterPoolAvailableUpgradeList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The Url of next result page. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The Url of next result page. - * - * @param nextLink the nextLink value to set. - * @return the ClusterPoolAvailableUpgradeList object itself. - */ - public ClusterPoolAvailableUpgradeList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.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 deleted file mode 100644 index bd3696eb1bfe..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 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 available node OS update. - */ -@Fluent -public final class ClusterPoolAvailableUpgradeNodeOsUpgradeProperties extends ClusterPoolAvailableUpgradeProperties { - /* - * Type of upgrade. - */ - private ClusterPoolAvailableUpgradeType upgradeType = ClusterPoolAvailableUpgradeType.NODE_OS_UPGRADE; - - /* - * The latest node OS version. - */ - private String latestVersion; - - /** - * Creates an instance of ClusterPoolAvailableUpgradeNodeOsUpgradeProperties class. - */ - 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. - * - * @return the latestVersion value. - */ - public String latestVersion() { - return this.latestVersion; - } - - /** - * Set the latestVersion property: The latest node OS version. - * - * @param latestVersion the latestVersion value to set. - * @return the ClusterPoolAvailableUpgradeNodeOsUpgradeProperties object itself. - */ - public ClusterPoolAvailableUpgradeNodeOsUpgradeProperties withLatestVersion(String latestVersion) { - this.latestVersion = latestVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@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 deleted file mode 100644 index 7f0369e786c5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeProperties.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.annotation.Immutable; -import com.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. - */ -@Immutable -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. - * - * @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("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 deleted file mode 100644 index 0b023ee4f770..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of upgrade. - */ -public final class ClusterPoolAvailableUpgradeType extends ExpandableStringEnum { - /** - * Static value AKSPatchUpgrade for ClusterPoolAvailableUpgradeType. - */ - public static final ClusterPoolAvailableUpgradeType AKSPATCH_UPGRADE = fromString("AKSPatchUpgrade"); - - /** - * Static value NodeOsUpgrade for ClusterPoolAvailableUpgradeType. - */ - public static final ClusterPoolAvailableUpgradeType NODE_OS_UPGRADE = fromString("NodeOsUpgrade"); - - /** - * Creates a new instance of ClusterPoolAvailableUpgradeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClusterPoolAvailableUpgradeType() { - } - - /** - * Creates or finds a ClusterPoolAvailableUpgradeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterPoolAvailableUpgradeType. - */ - public static ClusterPoolAvailableUpgradeType fromString(String name) { - return fromString(name, ClusterPoolAvailableUpgradeType.class); - } - - /** - * Gets known ClusterPoolAvailableUpgradeType values. - * - * @return known ClusterPoolAvailableUpgradeType values. - */ - public static Collection values() { - return values(ClusterPoolAvailableUpgradeType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrades.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrades.java deleted file mode 100644 index 4195f90de1cd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrades.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of ClusterPoolAvailableUpgrades. - */ -public interface ClusterPoolAvailableUpgrades { - /** - * List a cluster pool available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster pool available upgrade as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String clusterPoolName); - - /** - * List a cluster pool available upgrade. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of cluster pool available upgrade as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String clusterPoolName, Context context); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolComputeProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolComputeProfile.java deleted file mode 100644 index 902b3182c90b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolComputeProfile.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * Cluster pool compute profile. - */ -@Fluent -public class ClusterPoolComputeProfile implements JsonSerializable { - /* - * The virtual machine SKU. - */ - private String vmSize; - - /* - * The number of virtual machines. - */ - private Integer count; - - /* - * The list of Availability zones to use for AKS VMSS nodes. - */ - private List availabilityZones; - - /** - * Creates an instance of ClusterPoolComputeProfile class. - */ - public ClusterPoolComputeProfile() { - } - - /** - * Get the vmSize property: The virtual machine SKU. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: The virtual machine SKU. - * - * @param vmSize the vmSize value to set. - * @return the ClusterPoolComputeProfile object itself. - */ - public ClusterPoolComputeProfile withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the count property: The number of virtual machines. - * - * @return the count value. - */ - 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (vmSize() == null) { - 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 deleted file mode 100644 index 7bba7a6949d2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolListResult.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; -import java.io.IOException; -import java.util.List; - -/** - * The list cluster pools operation response. - */ -@Fluent -public final class ClusterPoolListResult implements JsonSerializable { - /* - * The list of cluster pools. - */ - private List value; - - /* - * The link (url) to the next page of results. - */ - private String nextLink; - - /** - * Creates an instance of ClusterPoolListResult class. - */ - public ClusterPoolListResult() { - } - - /** - * Get the value property: The list of cluster pools. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of cluster pools. - * - * @param value the value value to set. - * @return the ClusterPoolListResult object itself. - */ - public ClusterPoolListResult 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) { - 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 deleted file mode 100644 index 2f5d5d65b5f0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolLogAnalyticsProfile.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 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.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 implements JsonSerializable { - /* - * True if log analytics is enabled for cluster pool, otherwise false. - */ - private boolean enabled; - - /* - * Log analytics workspace to associate with the OMS agent. - */ - private String workspaceId; - - /** - * Creates an instance of ClusterPoolLogAnalyticsProfile class. - */ - public ClusterPoolLogAnalyticsProfile() { - } - - /** - * Get the enabled property: True if log analytics is enabled for cluster pool, otherwise false. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: True if log analytics is enabled for cluster pool, otherwise false. - * - * @param enabled the enabled value to set. - * @return the ClusterPoolLogAnalyticsProfile object itself. - */ - public ClusterPoolLogAnalyticsProfile withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the workspaceId property: Log analytics workspace to associate with the OMS agent. - * - * @return the workspaceId value. - */ - public String workspaceId() { - return this.workspaceId; - } - - /** - * Set the workspaceId property: Log analytics workspace to associate with the OMS agent. - * - * @param workspaceId the workspaceId value to set. - * @return the ClusterPoolLogAnalyticsProfile object itself. - */ - public ClusterPoolLogAnalyticsProfile withWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId; - 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.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 deleted file mode 100644 index 16fea3adbaa6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNetworkProfile.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * Cluster pool networking configuration. - */ -@Fluent -public class ClusterPoolNetworkProfile implements JsonSerializable { - /* - * Cluster pool subnet resource id. - */ - private String subnetId; - - /* - * This can only be set at cluster pool creation time and cannot be changed later. - */ - 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. - */ - private Boolean enablePrivateApiServer; - - /* - * 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. - */ - private List apiServerAuthorizedIpRanges; - - /** - * Creates an instance of ClusterPoolNetworkProfile class. - */ - public ClusterPoolNetworkProfile() { - } - - /** - * Get the subnetId property: Cluster pool subnet resource id. - * - * @return the subnetId value. - */ - public String subnetId() { - return this.subnetId; - } - - /** - * Set the subnetId property: Cluster pool subnet resource id. - * - * @param subnetId the subnetId value to set. - * @return the ClusterPoolNetworkProfile object itself. - */ - public ClusterPoolNetworkProfile withSubnetId(String subnetId) { - this.subnetId = subnetId; - return this; - } - - /** - * Get the outboundType property: This can only be set at cluster pool creation time and cannot be changed later. - * - * @return the outboundType value. - */ - public OutboundType outboundType() { - return this.outboundType; - } - - /** - * Set the outboundType property: This can only be set at cluster pool creation time and cannot be changed later. - * - * @param outboundType the outboundType value to set. - * @return the ClusterPoolNetworkProfile object itself. - */ - public ClusterPoolNetworkProfile withOutboundType(OutboundType outboundType) { - this.outboundType = outboundType; - return this; - } - - /** - * Get the enablePrivateApiServer property: ClusterPool is based on AKS cluster. AKS cluster exposes the API server - * to public internet by default. If you set this property to true, a private AKS cluster will be created, and it - * will use private apiserver, which is not exposed to public internet. - * - * @return the enablePrivateApiServer value. - */ - public Boolean enablePrivateApiServer() { - return this.enablePrivateApiServer; - } - - /** - * Set the enablePrivateApiServer property: ClusterPool is based on AKS cluster. AKS cluster exposes the API server - * to public internet by default. If you set this property to true, a private AKS cluster will be created, and it - * will use private apiserver, which is not exposed to public internet. - * - * @param enablePrivateApiServer the enablePrivateApiServer value to set. - * @return the ClusterPoolNetworkProfile object itself. - */ - public ClusterPoolNetworkProfile withEnablePrivateApiServer(Boolean enablePrivateApiServer) { - this.enablePrivateApiServer = enablePrivateApiServer; - return this; - } - - /** - * Get the apiServerAuthorizedIpRanges property: 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. - */ - public List apiServerAuthorizedIpRanges() { - return this.apiServerAuthorizedIpRanges; - } - - /** - * 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. - */ - public ClusterPoolNetworkProfile withApiServerAuthorizedIpRanges(List apiServerAuthorizedIpRanges) { - this.apiServerAuthorizedIpRanges = apiServerAuthorizedIpRanges; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (subnetId() == null) { - throw LOGGER.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 deleted file mode 100644 index a72f80fe4266..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.annotation.Immutable; -import com.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. - */ -@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. - * - * @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()); - 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 deleted file mode 100644 index 107fdbaaaa47..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsUpgradeHistoryProperties.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index 87b0639fca5e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolProfile.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) 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; - -/** - * Cluster pool profile. - */ -@Fluent -public class ClusterPoolProfile implements JsonSerializable { - /* - * Cluster pool version is a 2-part version. - */ - 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. - */ - public ClusterPoolProfile() { - } - - /** - * Get the clusterPoolVersion property: Cluster pool version is a 2-part version. - * - * @return the clusterPoolVersion value. - */ - public String clusterPoolVersion() { - return this.clusterPoolVersion; - } - - /** - * Set the clusterPoolVersion property: Cluster pool version is a 2-part version. - * - * @param clusterPoolVersion the clusterPoolVersion value to set. - * @return the ClusterPoolProfile object itself. - */ - public ClusterPoolProfile withClusterPoolVersion(String clusterPoolVersion) { - this.clusterPoolVersion = 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (clusterPoolVersion() == null) { - 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 deleted file mode 100644 index 05b047ec6eec..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourceProperties.java +++ /dev/null @@ -1,331 +0,0 @@ -// Copyright (c) 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; - -/** - * Cluster pool resource properties. - */ -@Fluent -public final class ClusterPoolResourceProperties implements JsonSerializable { - /* - * Provisioning state of the resource. - */ - private ProvisioningStatus provisioningState; - - /* - * A unique id generated by the RP to identify the resource. - */ - private String deploymentId; - - /* - * A resource group created by RP, to hold the resources created by RP on-behalf of customers. It will also be used - * to generate aksManagedResourceGroupName by pattern: MC_{managedResourceGroupName}_{clusterPoolName}_{region}. - * Please make sure it meets resource group name restriction. - */ - private String managedResourceGroupName; - - /* - * A resource group created by AKS, to hold the infrastructure resources created by AKS on-behalf of customers. It - * is generated by cluster pool name and managed resource group name by pattern: - * MC_{managedResourceGroupName}_{clusterPoolName}_{region} - */ - private String aksManagedResourceGroupName; - - /* - * CLuster pool profile. - */ - private ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile; - - /* - * CLuster pool compute profile. - */ - private ClusterPoolResourcePropertiesComputeProfile computeProfile; - - /* - * Properties of underlying AKS cluster. - */ - private ClusterPoolResourcePropertiesAksClusterProfile aksClusterProfile; - - /* - * Cluster pool network profile. - */ - private ClusterPoolResourcePropertiesNetworkProfile networkProfile; - - /* - * Cluster pool log analytics profile to enable OMS agent for AKS cluster. - */ - private ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile; - - /* - * Business status of the resource. - */ - private String status; - - /** - * Creates an instance of ClusterPoolResourceProperties class. - */ - public ClusterPoolResourceProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningStatus provisioningState() { - return this.provisioningState; - } - - /** - * Get the deploymentId property: A unique id generated by the RP to identify the resource. - * - * @return the deploymentId value. - */ - public String deploymentId() { - return this.deploymentId; - } - - /** - * Get the managedResourceGroupName property: A resource group created by RP, to hold the resources created by RP - * on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by pattern: - * MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource group name - * restriction. - * - * @return the managedResourceGroupName value. - */ - public String managedResourceGroupName() { - return this.managedResourceGroupName; - } - - /** - * Set the managedResourceGroupName property: A resource group created by RP, to hold the resources created by RP - * on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by pattern: - * MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource group name - * restriction. - * - * @param managedResourceGroupName the managedResourceGroupName value to set. - * @return the ClusterPoolResourceProperties object itself. - */ - public ClusterPoolResourceProperties withManagedResourceGroupName(String managedResourceGroupName) { - this.managedResourceGroupName = managedResourceGroupName; - return this; - } - - /** - * Get the aksManagedResourceGroupName property: A resource group created by AKS, to hold the infrastructure - * resources created by AKS on-behalf of customers. It is generated by cluster pool name and managed resource group - * name by pattern: MC_{managedResourceGroupName}_{clusterPoolName}_{region}. - * - * @return the aksManagedResourceGroupName value. - */ - public String aksManagedResourceGroupName() { - return this.aksManagedResourceGroupName; - } - - /** - * Get the clusterPoolProfile property: CLuster pool profile. - * - * @return the clusterPoolProfile value. - */ - public ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile() { - return this.clusterPoolProfile; - } - - /** - * Set the clusterPoolProfile property: CLuster pool profile. - * - * @param clusterPoolProfile the clusterPoolProfile value to set. - * @return the ClusterPoolResourceProperties object itself. - */ - public ClusterPoolResourceProperties - withClusterPoolProfile(ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile) { - this.clusterPoolProfile = clusterPoolProfile; - return this; - } - - /** - * Get the computeProfile property: CLuster pool compute profile. - * - * @return the computeProfile value. - */ - public ClusterPoolResourcePropertiesComputeProfile computeProfile() { - return this.computeProfile; - } - - /** - * Set the computeProfile property: CLuster pool compute profile. - * - * @param computeProfile the computeProfile value to set. - * @return the ClusterPoolResourceProperties object itself. - */ - public ClusterPoolResourceProperties - withComputeProfile(ClusterPoolResourcePropertiesComputeProfile computeProfile) { - this.computeProfile = computeProfile; - return this; - } - - /** - * Get the aksClusterProfile property: Properties of underlying AKS cluster. - * - * @return the aksClusterProfile value. - */ - public ClusterPoolResourcePropertiesAksClusterProfile aksClusterProfile() { - return this.aksClusterProfile; - } - - /** - * Get the networkProfile property: Cluster pool network profile. - * - * @return the networkProfile value. - */ - public ClusterPoolResourcePropertiesNetworkProfile networkProfile() { - return this.networkProfile; - } - - /** - * Set the networkProfile property: Cluster pool network profile. - * - * @param networkProfile the networkProfile value to set. - * @return the ClusterPoolResourceProperties object itself. - */ - public ClusterPoolResourceProperties - withNetworkProfile(ClusterPoolResourcePropertiesNetworkProfile networkProfile) { - this.networkProfile = networkProfile; - return this; - } - - /** - * Get the logAnalyticsProfile property: Cluster pool log analytics profile to enable OMS agent for AKS cluster. - * - * @return the logAnalyticsProfile value. - */ - public ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile() { - return this.logAnalyticsProfile; - } - - /** - * Set the logAnalyticsProfile property: Cluster pool log analytics profile to enable OMS agent for AKS cluster. - * - * @param logAnalyticsProfile the logAnalyticsProfile value to set. - * @return the ClusterPoolResourceProperties object itself. - */ - public ClusterPoolResourceProperties - withLogAnalyticsProfile(ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile) { - this.logAnalyticsProfile = logAnalyticsProfile; - return this; - } - - /** - * Get the status property: Business status of the resource. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (clusterPoolProfile() != null) { - clusterPoolProfile().validate(); - } - if (computeProfile() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property computeProfile in model ClusterPoolResourceProperties")); - } else { - computeProfile().validate(); - } - if (aksClusterProfile() != null) { - aksClusterProfile().validate(); - } - if (networkProfile() != null) { - networkProfile().validate(); - } - if (logAnalyticsProfile() != null) { - logAnalyticsProfile().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 deleted file mode 100644 index 7f662fbee750..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesAksClusterProfile.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) 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 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} - */ - @Override - public ClusterPoolResourcePropertiesAksClusterProfile withAksClusterResourceId(String aksClusterResourceId) { - super.withAksClusterResourceId(aksClusterResourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterPoolResourcePropertiesAksClusterProfile withAksClusterAgentPoolIdentityProfile( - AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile) { - super.withAksClusterAgentPoolIdentityProfile(aksClusterAgentPoolIdentityProfile); - 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("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 deleted file mode 100644 index d3a20985bf0b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesClusterPoolProfile.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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. - */ -@Fluent -public final class ClusterPoolResourcePropertiesClusterPoolProfile extends ClusterPoolProfile { - /** - * Creates an instance of ClusterPoolResourcePropertiesClusterPoolProfile class. - */ - public ClusterPoolResourcePropertiesClusterPoolProfile() { - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterPoolResourcePropertiesClusterPoolProfile withClusterPoolVersion(String clusterPoolVersion) { - super.withClusterPoolVersion(clusterPoolVersion); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterPoolResourcePropertiesClusterPoolProfile withPublicIpTag(IpTag publicIpTag) { - super.withPublicIpTag(publicIpTag); - 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("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 deleted file mode 100644 index eac314a9a3da..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesComputeProfile.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 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; -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} - */ - @Override - public ClusterPoolResourcePropertiesComputeProfile withVmSize(String vmSize) { - super.withVmSize(vmSize); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterPoolResourcePropertiesComputeProfile withAvailabilityZones(List availabilityZones) { - super.withAvailabilityZones(availabilityZones); - 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("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 deleted file mode 100644 index fb1e25006d4c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesLogAnalyticsProfile.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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. - */ -@Fluent -public final class ClusterPoolResourcePropertiesLogAnalyticsProfile extends ClusterPoolLogAnalyticsProfile { - /** - * Creates an instance of ClusterPoolResourcePropertiesLogAnalyticsProfile class. - */ - public ClusterPoolResourcePropertiesLogAnalyticsProfile() { - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterPoolResourcePropertiesLogAnalyticsProfile withEnabled(boolean enabled) { - super.withEnabled(enabled); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterPoolResourcePropertiesLogAnalyticsProfile withWorkspaceId(String workspaceId) { - super.withWorkspaceId(workspaceId); - 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.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 deleted file mode 100644 index d2614cc53c75..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesNetworkProfile.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * Cluster pool network profile. - */ -@Fluent -public final class ClusterPoolResourcePropertiesNetworkProfile extends ClusterPoolNetworkProfile { - /** - * Creates an instance of ClusterPoolResourcePropertiesNetworkProfile class. - */ - public ClusterPoolResourcePropertiesNetworkProfile() { - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterPoolResourcePropertiesNetworkProfile withSubnetId(String subnetId) { - super.withSubnetId(subnetId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterPoolResourcePropertiesNetworkProfile withOutboundType(OutboundType outboundType) { - super.withOutboundType(outboundType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterPoolResourcePropertiesNetworkProfile withEnablePrivateApiServer(Boolean enablePrivateApiServer) { - super.withEnablePrivateApiServer(enablePrivateApiServer); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterPoolResourcePropertiesNetworkProfile - withApiServerAuthorizedIpRanges(List apiServerAuthorizedIpRanges) { - super.withApiServerAuthorizedIpRanges(apiServerAuthorizedIpRanges); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - 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 deleted file mode 100644 index 56e67b73425e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgrade.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) 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; - -/** - * Cluster Pool Upgrade. - */ -@Fluent -public final class ClusterPoolUpgrade implements JsonSerializable { - /* - * Properties of upgrading cluster pool. - */ - private ClusterPoolUpgradeProperties properties; - - /** - * Creates an instance of ClusterPoolUpgrade class. - */ - public ClusterPoolUpgrade() { - } - - /** - * Get the properties property: Properties of upgrading cluster pool. - * - * @return the properties value. - */ - public ClusterPoolUpgradeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of upgrading cluster pool. - * - * @param properties the properties value to set. - * @return the ClusterPoolUpgrade object itself. - */ - public ClusterPoolUpgrade withProperties(ClusterPoolUpgradeProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.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 deleted file mode 100644 index 003ce6e7906b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistories.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 deleted file mode 100644 index e1ff4c92016a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistory.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 deleted file mode 100644 index c78dcccafdb6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryListResult.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index 24c6851743b8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryProperties.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) 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 deleted file mode 100644 index 8d9f3af4f7a0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 deleted file mode 100644 index 1e4f0ec9e8e5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryUpgradeResultType.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 deleted file mode 100644 index 21345e492c55..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeProperties.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.annotation.Immutable; -import com.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. - */ -@Immutable -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. - * - * @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("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 deleted file mode 100644 index e3db56ca48da..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of upgrade. - */ -public final class ClusterPoolUpgradeType extends ExpandableStringEnum { - /** - * Static value AKSPatchUpgrade for ClusterPoolUpgradeType. - */ - public static final ClusterPoolUpgradeType AKSPATCH_UPGRADE = fromString("AKSPatchUpgrade"); - - /** - * Static value NodeOsUpgrade for ClusterPoolUpgradeType. - */ - public static final ClusterPoolUpgradeType NODE_OS_UPGRADE = fromString("NodeOsUpgrade"); - - /** - * Creates a new instance of ClusterPoolUpgradeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClusterPoolUpgradeType() { - } - - /** - * Creates or finds a ClusterPoolUpgradeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterPoolUpgradeType. - */ - public static ClusterPoolUpgradeType fromString(String name) { - return fromString(name, ClusterPoolUpgradeType.class); - } - - /** - * Gets known ClusterPoolUpgradeType values. - * - * @return known ClusterPoolUpgradeType values. - */ - public static Collection values() { - return values(ClusterPoolUpgradeType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersion.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersion.java deleted file mode 100644 index 4e82734ce780..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersion.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; - -/** - * An immutable client-side representation of ClusterPoolVersion. - */ -public interface ClusterPoolVersion { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Cluster pool version properties. - * - * @return the properties value. - */ - ClusterPoolVersionProperties 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.ClusterPoolVersionInner object. - * - * @return the inner object. - */ - ClusterPoolVersionInner innerModel(); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersionProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersionProperties.java deleted file mode 100644 index 492967f31ecb..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersionProperties.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Cluster pool version properties. - */ -@Fluent -public final class ClusterPoolVersionProperties implements JsonSerializable { - /* - * Cluster pool version is a 2-part version. - */ - private String clusterPoolVersion; - - /* - * AKS version. - */ - private String aksVersion; - - /* - * Indicate if this version is in preview or not. - */ - private Boolean isPreview; - - /** - * Creates an instance of ClusterPoolVersionProperties class. - */ - public ClusterPoolVersionProperties() { - } - - /** - * Get the clusterPoolVersion property: Cluster pool version is a 2-part version. - * - * @return the clusterPoolVersion value. - */ - public String clusterPoolVersion() { - return this.clusterPoolVersion; - } - - /** - * Set the clusterPoolVersion property: Cluster pool version is a 2-part version. - * - * @param clusterPoolVersion the clusterPoolVersion value to set. - * @return the ClusterPoolVersionProperties object itself. - */ - public ClusterPoolVersionProperties withClusterPoolVersion(String clusterPoolVersion) { - this.clusterPoolVersion = clusterPoolVersion; - return this; - } - - /** - * Get the aksVersion property: AKS version. - * - * @return the aksVersion value. - */ - public String aksVersion() { - return this.aksVersion; - } - - /** - * Set the aksVersion property: AKS version. - * - * @param aksVersion the aksVersion value to set. - * @return the ClusterPoolVersionProperties object itself. - */ - public ClusterPoolVersionProperties withAksVersion(String aksVersion) { - this.aksVersion = aksVersion; - return this; - } - - /** - * Get the isPreview property: Indicate if this version is in preview or not. - * - * @return the isPreview value. - */ - public Boolean isPreview() { - return this.isPreview; - } - - /** - * Set the isPreview property: Indicate if this version is in preview or not. - * - * @param isPreview the isPreview value to set. - * @return the ClusterPoolVersionProperties object itself. - */ - public ClusterPoolVersionProperties withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - 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("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 deleted file mode 100644 index f33e89175934..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersionsListResult.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 java.io.IOException; -import java.util.List; - -/** - * Represents a list of cluster pool versions. - */ -@Fluent -public final class ClusterPoolVersionsListResult implements JsonSerializable { - /* - * The list of cluster pool versions. - */ - private List value; - - /* - * The link (url) to the next page of results. - */ - private String nextLink; - - /** - * Creates an instance of ClusterPoolVersionsListResult class. - */ - public ClusterPoolVersionsListResult() { - } - - /** - * Get the value property: The list of cluster pool versions. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of cluster pool versions. - * - * @param value the value value to set. - * @return the ClusterPoolVersionsListResult object itself. - */ - public ClusterPoolVersionsListResult 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) { - 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/ClusterPools.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPools.java deleted file mode 100644 index 0e24680bff06..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPools.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 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.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ClusterPools. - */ -public interface ClusterPools { - /** - * Gets a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster pool along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String clusterPoolName, - Context context); - - /** - * Gets a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster pool. - */ - ClusterPool getByResourceGroup(String resourceGroupName, String clusterPoolName); - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @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 deleteByResourceGroup(String resourceGroupName, String clusterPoolName); - - /** - * Deletes a Cluster Pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @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 delete(String resourceGroupName, String clusterPoolName, Context context); - - /** - * Gets the list of Cluster Pools within a Subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cluster Pools within a Subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Gets the list of Cluster Pools within a Subscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Cluster Pools within a Subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster pools operation response as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster pools operation response as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - ClusterPool upgrade(String resourceGroupName, String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest); - - /** - * Upgrade a cluster pool. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterPoolUpgradeRequest Upgrade a cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster pool. - */ - ClusterPool upgrade(String resourceGroupName, String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest, - Context context); - - /** - * Gets a cluster pool. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster pool along with {@link Response}. - */ - ClusterPool getById(String id); - - /** - * Gets a cluster pool. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a cluster pool along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a Cluster Pool. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a Cluster Pool. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ClusterPool resource. - * - * @param name resource name. - * @return the first stage of the new ClusterPool definition. - */ - ClusterPool.DefinitionStages.Blank define(String name); -} 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 deleted file mode 100644 index 6d42cd3a096c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterProfile.java +++ /dev/null @@ -1,776 +0,0 @@ -// Copyright (c) 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; -import java.util.List; -import java.util.Map; - -/** - * Cluster profile. - */ -@Fluent -public final class ClusterProfile implements JsonSerializable { - /* - * Version with 3/4 part. - */ - private String clusterVersion; - - /* - * Version with three part. - */ - private String ossVersion; - - /* - * Component list of this cluster type and version. - */ - private List components; - - /* - * This is deprecated. Please use managed identity profile instead. - */ - 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. - */ - private AuthorizationProfile authorizationProfile; - - /* - * The cluster secret profile. - */ - private SecretsProfile secretsProfile; - - /* - * The service configs profiles. - */ - private List serviceConfigsProfiles; - - /* - * Cluster connectivity profile. - */ - private ConnectivityProfile connectivityProfile; - - /* - * Cluster access profile. - */ - private ClusterAccessProfile clusterAccessProfile; - - /* - * Cluster log analytics profile to enable or disable OMS agent for cluster. - */ - private ClusterLogAnalyticsProfile logAnalyticsProfile; - - /* - * Cluster Prometheus profile. - */ - private ClusterPrometheusProfile prometheusProfile; - - /* - * Ssh profile for the cluster. - */ - private SshProfile sshProfile; - - /* - * This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. - */ - private AutoscaleProfile autoscaleProfile; - - /* - * Cluster Ranger plugin profile. - */ - private ClusterRangerPluginProfile rangerPluginProfile; - - /* - * The Kafka cluster profile. - */ - private KafkaProfile kafkaProfile; - - /* - * Trino Cluster profile. - */ - private TrinoProfile trinoProfile; - - /* - * LLAP cluster profile. - */ - private Map llapProfile; - - /* - * The Flink cluster profile. - */ - private FlinkProfile flinkProfile; - - /* - * The spark cluster profile. - */ - private SparkProfile sparkProfile; - - /* - * The ranger cluster profile. - */ - private RangerProfile rangerProfile; - - /* - * Stub cluster profile. - */ - private Map stubProfile; - - /* - * The script action profile list. - */ - private List scriptActionProfiles; - - /** - * Creates an instance of ClusterProfile class. - */ - public ClusterProfile() { - } - - /** - * Get the clusterVersion property: Version with 3/4 part. - * - * @return the clusterVersion value. - */ - public String clusterVersion() { - return this.clusterVersion; - } - - /** - * Set the clusterVersion property: Version with 3/4 part. - * - * @param clusterVersion the clusterVersion value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withClusterVersion(String clusterVersion) { - this.clusterVersion = clusterVersion; - return this; - } - - /** - * Get the ossVersion property: Version with three part. - * - * @return the ossVersion value. - */ - public String ossVersion() { - return this.ossVersion; - } - - /** - * Set the ossVersion property: Version with three part. - * - * @param ossVersion the ossVersion value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withOssVersion(String ossVersion) { - this.ossVersion = ossVersion; - return this; - } - - /** - * Get the components property: Component list of this cluster type and version. - * - * @return the components value. - */ - public List components() { - return this.components; - } - - /** - * Get the identityProfile property: This is deprecated. Please use managed identity profile instead. - * - * @return the identityProfile value. - */ - public IdentityProfile identityProfile() { - return this.identityProfile; - } - - /** - * 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. - */ - public ClusterProfile withIdentityProfile(IdentityProfile identityProfile) { - this.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. - * - * @return the authorizationProfile value. - */ - public AuthorizationProfile authorizationProfile() { - return this.authorizationProfile; - } - - /** - * Set the authorizationProfile property: Authorization profile with details of AAD user Ids and group Ids - * authorized for data plane access. - * - * @param authorizationProfile the authorizationProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withAuthorizationProfile(AuthorizationProfile authorizationProfile) { - this.authorizationProfile = authorizationProfile; - return this; - } - - /** - * Get the secretsProfile property: The cluster secret profile. - * - * @return the secretsProfile value. - */ - public SecretsProfile secretsProfile() { - return this.secretsProfile; - } - - /** - * Set the secretsProfile property: The cluster secret profile. - * - * @param secretsProfile the secretsProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withSecretsProfile(SecretsProfile secretsProfile) { - this.secretsProfile = secretsProfile; - return this; - } - - /** - * Get the serviceConfigsProfiles property: The service configs profiles. - * - * @return the serviceConfigsProfiles value. - */ - public List serviceConfigsProfiles() { - return this.serviceConfigsProfiles; - } - - /** - * Set the serviceConfigsProfiles property: The service configs profiles. - * - * @param serviceConfigsProfiles the serviceConfigsProfiles value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withServiceConfigsProfiles(List serviceConfigsProfiles) { - this.serviceConfigsProfiles = serviceConfigsProfiles; - return this; - } - - /** - * Get the connectivityProfile property: Cluster connectivity profile. - * - * @return the connectivityProfile value. - */ - public ConnectivityProfile connectivityProfile() { - return this.connectivityProfile; - } - - /** - * Get the clusterAccessProfile property: Cluster access profile. - * - * @return the clusterAccessProfile value. - */ - public ClusterAccessProfile clusterAccessProfile() { - return this.clusterAccessProfile; - } - - /** - * Set the clusterAccessProfile property: Cluster access profile. - * - * @param clusterAccessProfile the clusterAccessProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withClusterAccessProfile(ClusterAccessProfile clusterAccessProfile) { - this.clusterAccessProfile = clusterAccessProfile; - return this; - } - - /** - * Get the logAnalyticsProfile property: Cluster log analytics profile to enable or disable OMS agent for cluster. - * - * @return the logAnalyticsProfile value. - */ - public ClusterLogAnalyticsProfile logAnalyticsProfile() { - return this.logAnalyticsProfile; - } - - /** - * Set the logAnalyticsProfile property: Cluster log analytics profile to enable or disable OMS agent for cluster. - * - * @param logAnalyticsProfile the logAnalyticsProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withLogAnalyticsProfile(ClusterLogAnalyticsProfile logAnalyticsProfile) { - this.logAnalyticsProfile = logAnalyticsProfile; - return this; - } - - /** - * Get the prometheusProfile property: Cluster Prometheus profile. - * - * @return the prometheusProfile value. - */ - public ClusterPrometheusProfile prometheusProfile() { - return this.prometheusProfile; - } - - /** - * Set the prometheusProfile property: Cluster Prometheus profile. - * - * @param prometheusProfile the prometheusProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withPrometheusProfile(ClusterPrometheusProfile prometheusProfile) { - this.prometheusProfile = prometheusProfile; - return this; - } - - /** - * Get the sshProfile property: Ssh profile for the cluster. - * - * @return the sshProfile value. - */ - public SshProfile sshProfile() { - return this.sshProfile; - } - - /** - * Set the sshProfile property: Ssh profile for the cluster. - * - * @param sshProfile the sshProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withSshProfile(SshProfile sshProfile) { - this.sshProfile = sshProfile; - return this; - } - - /** - * Get the autoscaleProfile property: This is the Autoscale profile for the cluster. This will allow customer to - * create cluster enabled with Autoscale. - * - * @return the autoscaleProfile value. - */ - public AutoscaleProfile autoscaleProfile() { - return this.autoscaleProfile; - } - - /** - * Set the autoscaleProfile property: This is the Autoscale profile for the cluster. This will allow customer to - * create cluster enabled with Autoscale. - * - * @param autoscaleProfile the autoscaleProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withAutoscaleProfile(AutoscaleProfile autoscaleProfile) { - this.autoscaleProfile = autoscaleProfile; - return this; - } - - /** - * Get the rangerPluginProfile property: Cluster Ranger plugin profile. - * - * @return the rangerPluginProfile value. - */ - public ClusterRangerPluginProfile rangerPluginProfile() { - return this.rangerPluginProfile; - } - - /** - * Set the rangerPluginProfile property: Cluster Ranger plugin profile. - * - * @param rangerPluginProfile the rangerPluginProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withRangerPluginProfile(ClusterRangerPluginProfile rangerPluginProfile) { - this.rangerPluginProfile = rangerPluginProfile; - return this; - } - - /** - * Get the kafkaProfile property: The Kafka cluster profile. - * - * @return the kafkaProfile value. - */ - public KafkaProfile kafkaProfile() { - return this.kafkaProfile; - } - - /** - * Set the kafkaProfile property: The Kafka cluster profile. - * - * @param kafkaProfile the kafkaProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withKafkaProfile(KafkaProfile kafkaProfile) { - this.kafkaProfile = kafkaProfile; - return this; - } - - /** - * Get the trinoProfile property: Trino Cluster profile. - * - * @return the trinoProfile value. - */ - public TrinoProfile trinoProfile() { - return this.trinoProfile; - } - - /** - * Set the trinoProfile property: Trino Cluster profile. - * - * @param trinoProfile the trinoProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withTrinoProfile(TrinoProfile trinoProfile) { - this.trinoProfile = trinoProfile; - return this; - } - - /** - * Get the llapProfile property: LLAP cluster profile. - * - * @return the llapProfile value. - */ - public Map llapProfile() { - return this.llapProfile; - } - - /** - * Set the llapProfile property: LLAP cluster profile. - * - * @param llapProfile the llapProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withLlapProfile(Map llapProfile) { - this.llapProfile = llapProfile; - return this; - } - - /** - * Get the flinkProfile property: The Flink cluster profile. - * - * @return the flinkProfile value. - */ - public FlinkProfile flinkProfile() { - return this.flinkProfile; - } - - /** - * Set the flinkProfile property: The Flink cluster profile. - * - * @param flinkProfile the flinkProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withFlinkProfile(FlinkProfile flinkProfile) { - this.flinkProfile = flinkProfile; - return this; - } - - /** - * Get the sparkProfile property: The spark cluster profile. - * - * @return the sparkProfile value. - */ - public SparkProfile sparkProfile() { - return this.sparkProfile; - } - - /** - * Set the sparkProfile property: The spark cluster profile. - * - * @param sparkProfile the sparkProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withSparkProfile(SparkProfile sparkProfile) { - this.sparkProfile = sparkProfile; - return this; - } - - /** - * Get the rangerProfile property: The ranger cluster profile. - * - * @return the rangerProfile value. - */ - public RangerProfile rangerProfile() { - return this.rangerProfile; - } - - /** - * Set the rangerProfile property: The ranger cluster profile. - * - * @param rangerProfile the rangerProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withRangerProfile(RangerProfile rangerProfile) { - this.rangerProfile = rangerProfile; - return this; - } - - /** - * Get the stubProfile property: Stub cluster profile. - * - * @return the stubProfile value. - */ - public Map stubProfile() { - return this.stubProfile; - } - - /** - * Set the stubProfile property: Stub cluster profile. - * - * @param stubProfile the stubProfile value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withStubProfile(Map stubProfile) { - this.stubProfile = stubProfile; - return this; - } - - /** - * Get the scriptActionProfiles property: The script action profile list. - * - * @return the scriptActionProfiles value. - */ - public List scriptActionProfiles() { - return this.scriptActionProfiles; - } - - /** - * Set the scriptActionProfiles property: The script action profile list. - * - * @param scriptActionProfiles the scriptActionProfiles value to set. - * @return the ClusterProfile object itself. - */ - public ClusterProfile withScriptActionProfiles(List scriptActionProfiles) { - this.scriptActionProfiles = scriptActionProfiles; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (clusterVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property clusterVersion in model ClusterProfile")); - } - if (ossVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property ossVersion in model ClusterProfile")); - } - if (components() != null) { - components().forEach(e -> e.validate()); - } - if (identityProfile() != null) { - identityProfile().validate(); - } - if (managedIdentityProfile() != null) { - managedIdentityProfile().validate(); - } - if (authorizationProfile() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property authorizationProfile in model ClusterProfile")); - } else { - authorizationProfile().validate(); - } - if (secretsProfile() != null) { - secretsProfile().validate(); - } - if (serviceConfigsProfiles() != null) { - serviceConfigsProfiles().forEach(e -> e.validate()); - } - if (connectivityProfile() != null) { - connectivityProfile().validate(); - } - if (clusterAccessProfile() != null) { - clusterAccessProfile().validate(); - } - if (logAnalyticsProfile() != null) { - logAnalyticsProfile().validate(); - } - if (prometheusProfile() != null) { - prometheusProfile().validate(); - } - if (sshProfile() != null) { - sshProfile().validate(); - } - if (autoscaleProfile() != null) { - autoscaleProfile().validate(); - } - if (rangerPluginProfile() != null) { - rangerPluginProfile().validate(); - } - if (kafkaProfile() != null) { - kafkaProfile().validate(); - } - if (trinoProfile() != null) { - trinoProfile().validate(); - } - if (flinkProfile() != null) { - flinkProfile().validate(); - } - if (sparkProfile() != null) { - sparkProfile().validate(); - } - if (rangerProfile() != null) { - rangerProfile().validate(); - } - if (scriptActionProfiles() != null) { - scriptActionProfiles().forEach(e -> e.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 deleted file mode 100644 index c1bf21d5bc92..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPrometheusProfile.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 java.io.IOException; - -/** - * Cluster Prometheus profile. - */ -@Fluent -public final class ClusterPrometheusProfile implements JsonSerializable { - /* - * Enable Prometheus for cluster or not. - */ - private boolean enabled; - - /** - * Creates an instance of ClusterPrometheusProfile class. - */ - public ClusterPrometheusProfile() { - } - - /** - * Get the enabled property: Enable Prometheus for cluster or not. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Enable Prometheus for cluster or not. - * - * @param enabled the enabled value to set. - * @return the ClusterPrometheusProfile object itself. - */ - public ClusterPrometheusProfile withEnabled(boolean enabled) { - this.enabled = enabled; - 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.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 deleted file mode 100644 index 54f20a152d1b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterRangerPluginProfile.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 java.io.IOException; - -/** - * Cluster Ranger plugin profile. - */ -@Fluent -public final class ClusterRangerPluginProfile implements JsonSerializable { - /* - * Enable Ranger for cluster or not. - */ - private boolean enabled; - - /** - * Creates an instance of ClusterRangerPluginProfile class. - */ - public ClusterRangerPluginProfile() { - } - - /** - * Get the enabled property: Enable Ranger for cluster or not. - * - * @return the enabled value. - */ - public boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Enable Ranger for cluster or not. - * - * @param enabled the enabled value to set. - * @return the ClusterRangerPluginProfile object itself. - */ - public ClusterRangerPluginProfile withEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@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 deleted file mode 100644 index d5d94c97b2c7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResizeData.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) 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.Resource; -import com.azure.core.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The parameters for resizing a cluster. - */ -@Fluent -public final class ClusterResizeData extends Resource { - /* - * Sets the properties. Define cluster resize specific properties. - */ - private ClusterResizeProperties 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 ClusterResizeData class. - */ - public ClusterResizeData() { - } - - /** - * Get the properties property: Sets the properties. Define cluster resize specific properties. - * - * @return the properties value. - */ - public ClusterResizeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Sets the properties. Define cluster resize specific properties. - * - * @param properties the properties value to set. - * @return the ClusterResizeData object itself. - */ - public ClusterResizeData withProperties(ClusterResizeProperties 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; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterResizeData withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ClusterResizeData withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - 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 deleted file mode 100644 index 94f6a1d274c5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResizeProperties.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 java.io.IOException; - -/** - * The properties for resizing a cluster. - */ -@Fluent -public final class ClusterResizeProperties implements JsonSerializable { - /* - * Target node count of worker node. - */ - private int targetWorkerNodeCount; - - /** - * Creates an instance of ClusterResizeProperties class. - */ - public ClusterResizeProperties() { - } - - /** - * Get the targetWorkerNodeCount property: Target node count of worker node. - * - * @return the targetWorkerNodeCount value. - */ - public int targetWorkerNodeCount() { - return this.targetWorkerNodeCount; - } - - /** - * Set the targetWorkerNodeCount property: Target node count of worker node. - * - * @param targetWorkerNodeCount the targetWorkerNodeCount value to set. - * @return the ClusterResizeProperties object itself. - */ - public ClusterResizeProperties withTargetWorkerNodeCount(int targetWorkerNodeCount) { - this.targetWorkerNodeCount = targetWorkerNodeCount; - 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.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 deleted file mode 100644 index e052ce230be9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResourceProperties.java +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) 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; - -/** - * Cluster resource properties. - */ -@Fluent -public final class ClusterResourceProperties implements JsonSerializable { - /* - * Provisioning state of the resource. - */ - private ProvisioningStatus provisioningState; - - /* - * The type of cluster. - */ - private String clusterType; - - /* - * A unique id generated by the RP to identify the resource. - */ - private String deploymentId; - - /* - * The compute profile. - */ - private ComputeProfile computeProfile; - - /* - * Cluster profile. - */ - private ClusterProfile clusterProfile; - - /* - * Business status of the resource. - */ - private String status; - - /** - * Creates an instance of ClusterResourceProperties class. - */ - public ClusterResourceProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the resource. - * - * @return the provisioningState value. - */ - public ProvisioningStatus provisioningState() { - return this.provisioningState; - } - - /** - * Get the clusterType property: The type of cluster. - * - * @return the clusterType value. - */ - public String clusterType() { - return this.clusterType; - } - - /** - * Set the clusterType property: The type of cluster. - * - * @param clusterType the clusterType value to set. - * @return the ClusterResourceProperties object itself. - */ - public ClusterResourceProperties withClusterType(String clusterType) { - this.clusterType = clusterType; - return this; - } - - /** - * Get the deploymentId property: A unique id generated by the RP to identify the resource. - * - * @return the deploymentId value. - */ - public String deploymentId() { - return this.deploymentId; - } - - /** - * Get the computeProfile property: The compute profile. - * - * @return the computeProfile value. - */ - public ComputeProfile computeProfile() { - return this.computeProfile; - } - - /** - * Set the computeProfile property: The compute profile. - * - * @param computeProfile the computeProfile value to set. - * @return the ClusterResourceProperties object itself. - */ - public ClusterResourceProperties withComputeProfile(ComputeProfile computeProfile) { - this.computeProfile = computeProfile; - return this; - } - - /** - * Get the clusterProfile property: Cluster profile. - * - * @return the clusterProfile value. - */ - public ClusterProfile clusterProfile() { - return this.clusterProfile; - } - - /** - * Set the clusterProfile property: Cluster profile. - * - * @param clusterProfile the clusterProfile value to set. - * @return the ClusterResourceProperties object itself. - */ - public ClusterResourceProperties withClusterProfile(ClusterProfile clusterProfile) { - this.clusterProfile = clusterProfile; - return this; - } - - /** - * Get the status property: Business status of the resource. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (clusterType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property clusterType in model ClusterResourceProperties")); - } - if (computeProfile() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property computeProfile in model ClusterResourceProperties")); - } else { - computeProfile().validate(); - } - if (clusterProfile() == null) { - 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 deleted file mode 100644 index 0fd69aa529c1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterServiceConfig.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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; -import java.util.List; - -/** - * Cluster configs per component. - */ -@Fluent -public final class ClusterServiceConfig implements JsonSerializable { - /* - * Name of the component the config files should apply to. - */ - private String component; - - /* - * List of Config Files. - */ - private List files; - - /** - * Creates an instance of ClusterServiceConfig class. - */ - public ClusterServiceConfig() { - } - - /** - * Get the component property: Name of the component the config files should apply to. - * - * @return the component value. - */ - public String component() { - return this.component; - } - - /** - * Set the component property: Name of the component the config files should apply to. - * - * @param component the component value to set. - * @return the ClusterServiceConfig object itself. - */ - public ClusterServiceConfig withComponent(String component) { - this.component = component; - return this; - } - - /** - * Get the files property: List of Config Files. - * - * @return the files value. - */ - public List files() { - return this.files; - } - - /** - * Set the files property: List of Config Files. - * - * @param files the files value to set. - * @return the ClusterServiceConfig object itself. - */ - public ClusterServiceConfig withFiles(List files) { - this.files = files; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (component() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property component in model ClusterServiceConfig")); - } - if (files() == null) { - 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 deleted file mode 100644 index a68a2d9bb8b2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterServiceConfigsProfile.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * Cluster service configs. - */ -@Fluent -public final class ClusterServiceConfigsProfile implements JsonSerializable { - /* - * Name of the service the configurations should apply to. - */ - private String serviceName; - - /* - * List of service configs. - */ - private List configs; - - /** - * Creates an instance of ClusterServiceConfigsProfile class. - */ - public ClusterServiceConfigsProfile() { - } - - /** - * Get the serviceName property: Name of the service the configurations should apply to. - * - * @return the serviceName value. - */ - public String serviceName() { - return this.serviceName; - } - - /** - * Set the serviceName property: Name of the service the configurations should apply to. - * - * @param serviceName the serviceName value to set. - * @return the ClusterServiceConfigsProfile object itself. - */ - public ClusterServiceConfigsProfile withServiceName(String serviceName) { - this.serviceName = serviceName; - return this; - } - - /** - * Get the configs property: List of service configs. - * - * @return the configs value. - */ - public List configs() { - return this.configs; - } - - /** - * Set the configs property: List of service configs. - * - * @param configs the configs value to set. - * @return the ClusterServiceConfigsProfile object itself. - */ - public ClusterServiceConfigsProfile withConfigs(List configs) { - this.configs = configs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property serviceName in model ClusterServiceConfigsProfile")); - } - if (configs() == null) { - 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 deleted file mode 100644 index d82a1c1884e0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgrade.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) 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; - -/** - * Cluster Upgrade. - */ -@Fluent -public final class ClusterUpgrade implements JsonSerializable { - /* - * Properties of upgrading cluster. - */ - private ClusterUpgradeProperties properties; - - /** - * Creates an instance of ClusterUpgrade class. - */ - public ClusterUpgrade() { - } - - /** - * Get the properties property: Properties of upgrading cluster. - * - * @return the properties value. - */ - public ClusterUpgradeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of upgrading cluster. - * - * @param properties the properties value to set. - * @return the ClusterUpgrade object itself. - */ - public ClusterUpgrade withProperties(ClusterUpgradeProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.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 deleted file mode 100644 index 8b9be6812150..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistories.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 deleted file mode 100644 index 20c234cabef9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistory.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 deleted file mode 100644 index 465e4b1cd42a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryListResult.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 deleted file mode 100644 index 591d388f59e9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryProperties.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) 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 { - /* - * Type of upgrade. - */ - private ClusterUpgradeHistoryType upgradeType - = ClusterUpgradeHistoryType.fromString("ClusterUpgradeHistoryProperties"); - - /* - * Time when created this upgrade history. - */ - private String utcTime; - - /* - * Result of this upgrade. - */ - private ClusterUpgradeHistoryUpgradeResultType upgradeResult; - - /** - * Creates an instance of ClusterUpgradeHistoryProperties class. - */ - public ClusterUpgradeHistoryProperties() { - } - - /** - * Get the upgradeType property: Type of upgrade. - * - * @return the upgradeType value. - */ - public ClusterUpgradeHistoryType 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 ClusterUpgradeHistoryProperties object itself. - */ - public ClusterUpgradeHistoryProperties withUtcTime(String utcTime) { - this.utcTime = utcTime; - return this; - } - - /** - * Get the upgradeResult property: Result of this upgrade. - * - * @return the upgradeResult value. - */ - public ClusterUpgradeHistoryUpgradeResultType upgradeResult() { - return this.upgradeResult; - } - - /** - * Set the upgradeResult property: Result of this upgrade. - * - * @param upgradeResult the upgradeResult value to set. - * @return the ClusterUpgradeHistoryProperties object itself. - */ - public ClusterUpgradeHistoryProperties withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType 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 ClusterUpgradeHistoryProperties")); - } - if (upgradeResult() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property upgradeResult in model ClusterUpgradeHistoryProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ClusterUpgradeHistoryProperties.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 ClusterUpgradeHistoryProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterUpgradeHistoryProperties 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 ClusterUpgradeHistoryProperties. - */ - public static ClusterUpgradeHistoryProperties 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 ("ClusterInPlaceUpgradeHistoryProperties".equals(discriminatorValue)) { - return ClusterInPlaceUpgradeHistoryProperties.fromJsonKnownDiscriminator(readerToUse.reset()); - } else 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 if ("AKSPatchUpgrade".equals(discriminatorValue)) { - return ClusterAksPatchUpgradeHistoryProperties.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static ClusterUpgradeHistoryProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterUpgradeHistoryProperties deserializedClusterUpgradeHistoryProperties - = new ClusterUpgradeHistoryProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("utcTime".equals(fieldName)) { - deserializedClusterUpgradeHistoryProperties.utcTime = reader.getString(); - } else if ("upgradeResult".equals(fieldName)) { - deserializedClusterUpgradeHistoryProperties.upgradeResult - = ClusterUpgradeHistoryUpgradeResultType.fromString(reader.getString()); - } else if ("upgradeType".equals(fieldName)) { - deserializedClusterUpgradeHistoryProperties.upgradeType - = ClusterUpgradeHistoryType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterUpgradeHistoryProperties; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistorySeverityType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistorySeverityType.java deleted file mode 100644 index 051219c98c92..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistorySeverityType.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Severity of this upgrade. - */ -public final class ClusterUpgradeHistorySeverityType extends ExpandableStringEnum { - /** - * Static value low for ClusterUpgradeHistorySeverityType. - */ - public static final ClusterUpgradeHistorySeverityType LOW = fromString("low"); - - /** - * Static value medium for ClusterUpgradeHistorySeverityType. - */ - public static final ClusterUpgradeHistorySeverityType MEDIUM = fromString("medium"); - - /** - * Static value high for ClusterUpgradeHistorySeverityType. - */ - public static final ClusterUpgradeHistorySeverityType HIGH = fromString("high"); - - /** - * Static value critical for ClusterUpgradeHistorySeverityType. - */ - public static final ClusterUpgradeHistorySeverityType CRITICAL = fromString("critical"); - - /** - * Creates a new instance of ClusterUpgradeHistorySeverityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClusterUpgradeHistorySeverityType() { - } - - /** - * Creates or finds a ClusterUpgradeHistorySeverityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterUpgradeHistorySeverityType. - */ - public static ClusterUpgradeHistorySeverityType fromString(String name) { - return fromString(name, ClusterUpgradeHistorySeverityType.class); - } - - /** - * Gets known ClusterUpgradeHistorySeverityType values. - * - * @return known ClusterUpgradeHistorySeverityType values. - */ - public static Collection values() { - return values(ClusterUpgradeHistorySeverityType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryType.java deleted file mode 100644 index c74cc9fd0177..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryType.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of upgrade. - */ -public final class ClusterUpgradeHistoryType extends ExpandableStringEnum { - /** - * Static value AKSPatchUpgrade for ClusterUpgradeHistoryType. - */ - public static final ClusterUpgradeHistoryType AKSPATCH_UPGRADE = fromString("AKSPatchUpgrade"); - - /** - * Static value HotfixUpgrade for ClusterUpgradeHistoryType. - */ - public static final ClusterUpgradeHistoryType HOTFIX_UPGRADE = fromString("HotfixUpgrade"); - - /** - * Static value HotfixUpgradeRollback for ClusterUpgradeHistoryType. - */ - public static final ClusterUpgradeHistoryType HOTFIX_UPGRADE_ROLLBACK = fromString("HotfixUpgradeRollback"); - - /** - * Static value PatchVersionUpgrade for ClusterUpgradeHistoryType. - */ - public static final ClusterUpgradeHistoryType PATCH_VERSION_UPGRADE = fromString("PatchVersionUpgrade"); - - /** - * Static value PatchVersionUpgradeRollback for ClusterUpgradeHistoryType. - */ - public static final ClusterUpgradeHistoryType PATCH_VERSION_UPGRADE_ROLLBACK - = fromString("PatchVersionUpgradeRollback"); - - /** - * Creates a new instance of ClusterUpgradeHistoryType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClusterUpgradeHistoryType() { - } - - /** - * Creates or finds a ClusterUpgradeHistoryType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterUpgradeHistoryType. - */ - public static ClusterUpgradeHistoryType fromString(String name) { - return fromString(name, ClusterUpgradeHistoryType.class); - } - - /** - * Gets known ClusterUpgradeHistoryType values. - * - * @return known ClusterUpgradeHistoryType values. - */ - public static Collection values() { - return values(ClusterUpgradeHistoryType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryUpgradeResultType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryUpgradeResultType.java deleted file mode 100644 index 11bf6b89f95b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryUpgradeResultType.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Result of this upgrade. - */ -public final class ClusterUpgradeHistoryUpgradeResultType - extends ExpandableStringEnum { - /** - * Static value Succeed for ClusterUpgradeHistoryUpgradeResultType. - */ - public static final ClusterUpgradeHistoryUpgradeResultType SUCCEED = fromString("Succeed"); - - /** - * Static value Failed for ClusterUpgradeHistoryUpgradeResultType. - */ - public static final ClusterUpgradeHistoryUpgradeResultType FAILED = fromString("Failed"); - - /** - * Creates a new instance of ClusterUpgradeHistoryUpgradeResultType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClusterUpgradeHistoryUpgradeResultType() { - } - - /** - * Creates or finds a ClusterUpgradeHistoryUpgradeResultType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterUpgradeHistoryUpgradeResultType. - */ - public static ClusterUpgradeHistoryUpgradeResultType fromString(String name) { - return fromString(name, ClusterUpgradeHistoryUpgradeResultType.class); - } - - /** - * Gets known ClusterUpgradeHistoryUpgradeResultType values. - * - * @return known ClusterUpgradeHistoryUpgradeResultType values. - */ - public static Collection values() { - return values(ClusterUpgradeHistoryUpgradeResultType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeProperties.java deleted file mode 100644 index d2b6db8d751d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.annotation.Immutable; -import com.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. - */ -@Immutable -public class ClusterUpgradeProperties implements JsonSerializable { - /* - * Type of upgrade. - */ - private ClusterUpgradeType upgradeType = ClusterUpgradeType.fromString("ClusterUpgradeProperties"); - - /** - * Creates an instance of ClusterUpgradeProperties class. - */ - public ClusterUpgradeProperties() { - } - - /** - * Get the upgradeType property: Type of upgrade. - * - * @return the upgradeType value. - */ - public ClusterUpgradeType upgradeType() { - return this.upgradeType; - } - - /** - * 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("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterUpgradeProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterUpgradeProperties 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 ClusterUpgradeProperties. - */ - public static ClusterUpgradeProperties 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 ClusterAksPatchVersionUpgradeProperties.fromJson(readerToUse.reset()); - } else if ("ClusterInPlaceUpgradeProperties".equals(discriminatorValue)) { - return ClusterInPlaceUpgradeProperties.fromJsonKnownDiscriminator(readerToUse.reset()); - } else 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 ClusterUpgradeProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterUpgradeProperties deserializedClusterUpgradeProperties = new ClusterUpgradeProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("upgradeType".equals(fieldName)) { - deserializedClusterUpgradeProperties.upgradeType - = ClusterUpgradeType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterUpgradeProperties; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeRollback.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeRollback.java deleted file mode 100644 index 51a7ec0c96d2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeRollback.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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; - -/** - * Cluster Upgrade. - */ -@Fluent -public final class ClusterUpgradeRollback implements JsonSerializable { - /* - * Properties for manual rollback of cluster's upgrade. - */ - private ClusterUpgradeRollbackProperties properties; - - /** - * Creates an instance of ClusterUpgradeRollback class. - */ - public ClusterUpgradeRollback() { - } - - /** - * Get the properties property: Properties for manual rollback of cluster's upgrade. - * - * @return the properties value. - */ - public ClusterUpgradeRollbackProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties for manual rollback of cluster's upgrade. - * - * @param properties the properties value to set. - * @return the ClusterUpgradeRollback object itself. - */ - public ClusterUpgradeRollback withProperties(ClusterUpgradeRollbackProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property properties in model ClusterUpgradeRollback")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ClusterUpgradeRollback.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterUpgradeRollback from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterUpgradeRollback 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 ClusterUpgradeRollback. - */ - public static ClusterUpgradeRollback fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterUpgradeRollback deserializedClusterUpgradeRollback = new ClusterUpgradeRollback(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedClusterUpgradeRollback.properties = ClusterUpgradeRollbackProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterUpgradeRollback; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeRollbackProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeRollbackProperties.java deleted file mode 100644 index afbacfefe08b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeRollbackProperties.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) 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 for manual rollback of cluster's upgrade. - */ -@Fluent -public final class ClusterUpgradeRollbackProperties implements JsonSerializable { - /* - * A specific upgrade history to rollback - */ - private String upgradeHistory; - - /** - * Creates an instance of ClusterUpgradeRollbackProperties class. - */ - public ClusterUpgradeRollbackProperties() { - } - - /** - * Get the upgradeHistory property: A specific upgrade history to rollback. - * - * @return the upgradeHistory value. - */ - public String upgradeHistory() { - return this.upgradeHistory; - } - - /** - * Set the upgradeHistory property: A specific upgrade history to rollback. - * - * @param upgradeHistory the upgradeHistory value to set. - * @return the ClusterUpgradeRollbackProperties object itself. - */ - public ClusterUpgradeRollbackProperties withUpgradeHistory(String upgradeHistory) { - this.upgradeHistory = upgradeHistory; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (upgradeHistory() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property upgradeHistory in model ClusterUpgradeRollbackProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ClusterUpgradeRollbackProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("upgradeHistory", this.upgradeHistory); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterUpgradeRollbackProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterUpgradeRollbackProperties 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 ClusterUpgradeRollbackProperties. - */ - public static ClusterUpgradeRollbackProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterUpgradeRollbackProperties deserializedClusterUpgradeRollbackProperties - = new ClusterUpgradeRollbackProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("upgradeHistory".equals(fieldName)) { - deserializedClusterUpgradeRollbackProperties.upgradeHistory = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterUpgradeRollbackProperties; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeType.java deleted file mode 100644 index c7c80fa9299a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of upgrade. - */ -public final class ClusterUpgradeType extends ExpandableStringEnum { - /** - * Static value AKSPatchUpgrade for ClusterUpgradeType. - */ - public static final ClusterUpgradeType AKSPATCH_UPGRADE = fromString("AKSPatchUpgrade"); - - /** - * Static value HotfixUpgrade for ClusterUpgradeType. - */ - public static final ClusterUpgradeType HOTFIX_UPGRADE = fromString("HotfixUpgrade"); - - /** - * Static value PatchVersionUpgrade for ClusterUpgradeType. - */ - public static final ClusterUpgradeType PATCH_VERSION_UPGRADE = fromString("PatchVersionUpgrade"); - - /** - * Creates a new instance of ClusterUpgradeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClusterUpgradeType() { - } - - /** - * Creates or finds a ClusterUpgradeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterUpgradeType. - */ - public static ClusterUpgradeType fromString(String name) { - return fromString(name, ClusterUpgradeType.class); - } - - /** - * Gets known ClusterUpgradeType values. - * - * @return known ClusterUpgradeType values. - */ - public static Collection values() { - return values(ClusterUpgradeType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersion.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersion.java deleted file mode 100644 index 83c438a98d6c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersion.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; - -/** - * An immutable client-side representation of ClusterVersion. - */ -public interface ClusterVersion { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: Cluster version properties. - * - * @return the properties value. - */ - ClusterVersionProperties 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.ClusterVersionInner object. - * - * @return the inner object. - */ - ClusterVersionInner innerModel(); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersionProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersionProperties.java deleted file mode 100644 index 1540da824ea7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersionProperties.java +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Cluster version properties. - */ -@Fluent -public final class ClusterVersionProperties implements JsonSerializable { - /* - * The type of cluster. - */ - private String clusterType; - - /* - * Version with three part. - */ - private String clusterVersion; - - /* - * Version with three part. - */ - private String ossVersion; - - /* - * The two part cluster pool version. If the cluster version is before cluster pool version on-board, the return - * value will be empty string - */ - private String clusterPoolVersion; - - /* - * Indicate if this version is in preview or not. - */ - private Boolean isPreview; - - /* - * Component list of this cluster type and version. - */ - private List components; - - /** - * Creates an instance of ClusterVersionProperties class. - */ - public ClusterVersionProperties() { - } - - /** - * Get the clusterType property: The type of cluster. - * - * @return the clusterType value. - */ - public String clusterType() { - return this.clusterType; - } - - /** - * Set the clusterType property: The type of cluster. - * - * @param clusterType the clusterType value to set. - * @return the ClusterVersionProperties object itself. - */ - public ClusterVersionProperties withClusterType(String clusterType) { - this.clusterType = clusterType; - return this; - } - - /** - * Get the clusterVersion property: Version with three part. - * - * @return the clusterVersion value. - */ - public String clusterVersion() { - return this.clusterVersion; - } - - /** - * Set the clusterVersion property: Version with three part. - * - * @param clusterVersion the clusterVersion value to set. - * @return the ClusterVersionProperties object itself. - */ - public ClusterVersionProperties withClusterVersion(String clusterVersion) { - this.clusterVersion = clusterVersion; - return this; - } - - /** - * Get the ossVersion property: Version with three part. - * - * @return the ossVersion value. - */ - public String ossVersion() { - return this.ossVersion; - } - - /** - * Set the ossVersion property: Version with three part. - * - * @param ossVersion the ossVersion value to set. - * @return the ClusterVersionProperties object itself. - */ - public ClusterVersionProperties withOssVersion(String ossVersion) { - this.ossVersion = ossVersion; - return this; - } - - /** - * Get the clusterPoolVersion property: The two part cluster pool version. If the cluster version is before cluster - * pool version on-board, the return value will be empty string. - * - * @return the clusterPoolVersion value. - */ - public String clusterPoolVersion() { - return this.clusterPoolVersion; - } - - /** - * Set the clusterPoolVersion property: The two part cluster pool version. If the cluster version is before cluster - * pool version on-board, the return value will be empty string. - * - * @param clusterPoolVersion the clusterPoolVersion value to set. - * @return the ClusterVersionProperties object itself. - */ - public ClusterVersionProperties withClusterPoolVersion(String clusterPoolVersion) { - this.clusterPoolVersion = clusterPoolVersion; - return this; - } - - /** - * Get the isPreview property: Indicate if this version is in preview or not. - * - * @return the isPreview value. - */ - public Boolean isPreview() { - return this.isPreview; - } - - /** - * Set the isPreview property: Indicate if this version is in preview or not. - * - * @param isPreview the isPreview value to set. - * @return the ClusterVersionProperties object itself. - */ - public ClusterVersionProperties withIsPreview(Boolean isPreview) { - this.isPreview = isPreview; - return this; - } - - /** - * Get the components property: Component list of this cluster type and version. - * - * @return the components value. - */ - public List components() { - return this.components; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (components() != null) { - components().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clusterType", this.clusterType); - jsonWriter.writeStringField("clusterVersion", this.clusterVersion); - jsonWriter.writeStringField("ossVersion", this.ossVersion); - jsonWriter.writeStringField("clusterPoolVersion", this.clusterPoolVersion); - jsonWriter.writeBooleanField("isPreview", this.isPreview); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClusterVersionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterVersionProperties 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 ClusterVersionProperties. - */ - public static ClusterVersionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterVersionProperties deserializedClusterVersionProperties = new ClusterVersionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clusterType".equals(fieldName)) { - deserializedClusterVersionProperties.clusterType = reader.getString(); - } else if ("clusterVersion".equals(fieldName)) { - deserializedClusterVersionProperties.clusterVersion = reader.getString(); - } else if ("ossVersion".equals(fieldName)) { - deserializedClusterVersionProperties.ossVersion = reader.getString(); - } else if ("clusterPoolVersion".equals(fieldName)) { - deserializedClusterVersionProperties.clusterPoolVersion = reader.getString(); - } else if ("isPreview".equals(fieldName)) { - deserializedClusterVersionProperties.isPreview = reader.getNullable(JsonReader::getBoolean); - } else if ("components".equals(fieldName)) { - List components - = reader.readArray(reader1 -> ClusterComponentsItem.fromJson(reader1)); - deserializedClusterVersionProperties.components = components; - } else { - reader.skipChildren(); - } - } - - return deserializedClusterVersionProperties; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersionsListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersionsListResult.java deleted file mode 100644 index 1953ad0c129e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersionsListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.ClusterVersionInner; -import java.io.IOException; -import java.util.List; - -/** - * Represents a list of cluster versions. - */ -@Fluent -public final class ClusterVersionsListResult implements JsonSerializable { - /* - * The list of cluster versions. - */ - private List value; - - /* - * The link (url) to the next page of results. - */ - private String nextLink; - - /** - * Creates an instance of ClusterVersionsListResult class. - */ - public ClusterVersionsListResult() { - } - - /** - * Get the value property: The list of cluster versions. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of cluster versions. - * - * @param value the value value to set. - * @return the ClusterVersionsListResult object itself. - */ - public ClusterVersionsListResult 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) { - 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 ClusterVersionsListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClusterVersionsListResult 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 ClusterVersionsListResult. - */ - public static ClusterVersionsListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClusterVersionsListResult deserializedClusterVersionsListResult = new ClusterVersionsListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ClusterVersionInner.fromJson(reader1)); - deserializedClusterVersionsListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedClusterVersionsListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedClusterVersionsListResult; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Clusters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Clusters.java deleted file mode 100644 index 37d3c76594a3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Clusters.java +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright (c) 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.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Clusters. - */ -public interface Clusters { - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response as paginated response with {@link PagedIterable}. - */ - PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName); - - /** - * Lists the HDInsight cluster pools under a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response as paginated response with {@link PagedIterable}. - */ - PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName, Context context); - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster. - */ - Cluster upgrade(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterUpgrade clusterUpgradeRequest); - - /** - * Upgrade a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterUpgradeRequest Upgrade a cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster. - */ - Cluster upgrade(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterUpgrade clusterUpgradeRequest, Context context); - - /** - * 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. - */ - Cluster 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. - */ - Cluster upgradeManualRollback(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterUpgradeRollback clusterRollbackUpgradeRequest, Context context); - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize a cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the cluster. - */ - Cluster resize(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterResizeData clusterResizeRequest); - - /** - * Resize an existing Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize a cluster. - * @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 resize(String resourceGroupName, String clusterPoolName, String clusterName, - ClusterResizeData clusterResizeRequest, Context context); - - /** - * Gets a HDInsight cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a HDInsight cluster along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String clusterPoolName, String clusterName, - Context context); - - /** - * Gets a HDInsight cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a HDInsight cluster. - */ - Cluster get(String resourceGroupName, String clusterPoolName, String clusterName); - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 delete(String resourceGroupName, String clusterPoolName, String clusterName); - - /** - * Deletes a cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 delete(String resourceGroupName, String clusterPoolName, String clusterName, Context context); - - /** - * Lists the config dump of all services running in cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster instance service configs api response as paginated response with {@link PagedIterable}. - */ - PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, - String clusterName); - - /** - * Lists the config dump of all services running in cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cluster instance service configs api response as paginated response with {@link PagedIterable}. - */ - PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, - String clusterName, Context context); - - /** - * Lists the lists of instance views. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 instance view of a HDInsight Cluster as paginated response with {@link PagedIterable}. - */ - PagedIterable listInstanceViews(String resourceGroupName, String clusterPoolName, - String clusterName); - - /** - * Lists the lists of instance views. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 instance view of a HDInsight Cluster as paginated response with {@link PagedIterable}. - */ - PagedIterable listInstanceViews(String resourceGroupName, String clusterPoolName, - String clusterName, Context context); - - /** - * Gets the status of a cluster instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 status of a cluster instance along with {@link Response}. - */ - Response getInstanceViewWithResponse(String resourceGroupName, String clusterPoolName, - String clusterName, Context context); - - /** - * Gets the status of a cluster instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterPoolName The name of the cluster pool. - * @param clusterName The name of the HDInsight cluster. - * @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 status of a cluster instance. - */ - ClusterInstanceViewResult getInstanceView(String resourceGroupName, String clusterPoolName, String clusterName); - - /** - * Gets a HDInsight cluster. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a HDInsight cluster along with {@link Response}. - */ - Cluster getById(String id); - - /** - * Gets a HDInsight cluster. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a HDInsight cluster along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a cluster. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a cluster. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Cluster resource. - * - * @param name resource name. - * @return the first stage of the new Cluster definition. - */ - Cluster.DefinitionStages.Blank define(String name); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonOperator.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonOperator.java deleted file mode 100644 index e6092f0c799e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonOperator.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The comparison operator. - */ -public final class ComparisonOperator extends ExpandableStringEnum { - /** - * Static value greaterThan for ComparisonOperator. - */ - public static final ComparisonOperator GREATER_THAN = fromString("greaterThan"); - - /** - * Static value greaterThanOrEqual for ComparisonOperator. - */ - public static final ComparisonOperator GREATER_THAN_OR_EQUAL = fromString("greaterThanOrEqual"); - - /** - * Static value lessThan for ComparisonOperator. - */ - public static final ComparisonOperator LESS_THAN = fromString("lessThan"); - - /** - * Static value lessThanOrEqual for ComparisonOperator. - */ - public static final ComparisonOperator LESS_THAN_OR_EQUAL = fromString("lessThanOrEqual"); - - /** - * Creates a new instance of ComparisonOperator value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ComparisonOperator() { - } - - /** - * Creates or finds a ComparisonOperator from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComparisonOperator. - */ - public static ComparisonOperator fromString(String name) { - return fromString(name, ComparisonOperator.class); - } - - /** - * Gets known ComparisonOperator values. - * - * @return known ComparisonOperator values. - */ - public static Collection values() { - return values(ComparisonOperator.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonRule.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonRule.java deleted file mode 100644 index 77dedb8e7984..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonRule.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 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; - -/** - * The comparison rule. - */ -@Fluent -public final class ComparisonRule implements JsonSerializable { - /* - * The comparison operator. - */ - private ComparisonOperator operator; - - /* - * Threshold setting. - */ - private float threshold; - - /** - * Creates an instance of ComparisonRule class. - */ - public ComparisonRule() { - } - - /** - * Get the operator property: The comparison operator. - * - * @return the operator value. - */ - public ComparisonOperator operator() { - return this.operator; - } - - /** - * Set the operator property: The comparison operator. - * - * @param operator the operator value to set. - * @return the ComparisonRule object itself. - */ - public ComparisonRule withOperator(ComparisonOperator operator) { - this.operator = operator; - return this; - } - - /** - * Get the threshold property: Threshold setting. - * - * @return the threshold value. - */ - public float threshold() { - return this.threshold; - } - - /** - * Set the threshold property: Threshold setting. - * - * @param threshold the threshold value to set. - * @return the ComparisonRule object itself. - */ - public ComparisonRule withThreshold(float threshold) { - this.threshold = threshold; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (operator() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property operator in model ComparisonRule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ComparisonRule.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); - jsonWriter.writeFloatField("threshold", this.threshold); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComparisonRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComparisonRule 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 ComparisonRule. - */ - public static ComparisonRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComparisonRule deserializedComparisonRule = new ComparisonRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("operator".equals(fieldName)) { - deserializedComparisonRule.operator = ComparisonOperator.fromString(reader.getString()); - } else if ("threshold".equals(fieldName)) { - deserializedComparisonRule.threshold = reader.getFloat(); - } else { - reader.skipChildren(); - } - } - - return deserializedComparisonRule; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeProfile.java deleted file mode 100644 index e4a0c1012bc2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeProfile.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * The compute profile. - */ -@Fluent -public final class ComputeProfile implements JsonSerializable { - /* - * The nodes definitions. - */ - private List nodes; - - /* - * The list of Availability zones to use for AKS VMSS nodes. - */ - private List availabilityZones; - - /** - * Creates an instance of ComputeProfile class. - */ - public ComputeProfile() { - } - - /** - * Get the nodes property: The nodes definitions. - * - * @return the nodes value. - */ - public List nodes() { - return this.nodes; - } - - /** - * Set the nodes property: The nodes definitions. - * - * @param nodes the nodes value to set. - * @return the ComputeProfile object itself. - */ - public ComputeProfile withNodes(List nodes) { - this.nodes = nodes; - 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 ComputeProfile object itself. - */ - public ComputeProfile withAvailabilityZones(List availabilityZones) { - this.availabilityZones = availabilityZones; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nodes() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property nodes in model ComputeProfile")); - } else { - nodes().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ComputeProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("nodes", this.nodes, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("availabilityZones", this.availabilityZones, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeProfile 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 ComputeProfile. - */ - public static ComputeProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeProfile deserializedComputeProfile = new ComputeProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nodes".equals(fieldName)) { - List nodes = reader.readArray(reader1 -> NodeProfile.fromJson(reader1)); - deserializedComputeProfile.nodes = nodes; - } else if ("availabilityZones".equals(fieldName)) { - List availabilityZones = reader.readArray(reader1 -> reader1.getString()); - deserializedComputeProfile.availabilityZones = availabilityZones; - } else { - reader.skipChildren(); - } - } - - return deserializedComputeProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeResourceDefinition.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeResourceDefinition.java deleted file mode 100644 index 1e8c02bca6ab..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeResourceDefinition.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The cpu and memory requirement definition. - */ -@Fluent -public final class ComputeResourceDefinition implements JsonSerializable { - /* - * The required CPU. - */ - private float cpu; - - /* - * The required memory in MB, Container memory will be 110 percentile - */ - private long memory; - - /** - * Creates an instance of ComputeResourceDefinition class. - */ - public ComputeResourceDefinition() { - } - - /** - * Get the cpu property: The required CPU. - * - * @return the cpu value. - */ - public float cpu() { - return this.cpu; - } - - /** - * Set the cpu property: The required CPU. - * - * @param cpu the cpu value to set. - * @return the ComputeResourceDefinition object itself. - */ - public ComputeResourceDefinition withCpu(float cpu) { - this.cpu = cpu; - return this; - } - - /** - * Get the memory property: The required memory in MB, Container memory will be 110 percentile. - * - * @return the memory value. - */ - public long memory() { - return this.memory; - } - - /** - * Set the memory property: The required memory in MB, Container memory will be 110 percentile. - * - * @param memory the memory value to set. - * @return the ComputeResourceDefinition object itself. - */ - public ComputeResourceDefinition withMemory(long memory) { - this.memory = memory; - 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.writeFloatField("cpu", this.cpu); - jsonWriter.writeLongField("memory", this.memory); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeResourceDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeResourceDefinition 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 ComputeResourceDefinition. - */ - public static ComputeResourceDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeResourceDefinition deserializedComputeResourceDefinition = new ComputeResourceDefinition(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("cpu".equals(fieldName)) { - deserializedComputeResourceDefinition.cpu = reader.getFloat(); - } else if ("memory".equals(fieldName)) { - deserializedComputeResourceDefinition.memory = reader.getLong(); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeResourceDefinition; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfile.java deleted file mode 100644 index 54de815d83c9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfile.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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; -import java.util.List; - -/** - * Cluster connectivity profile. - */ -@Fluent -public final class ConnectivityProfile implements JsonSerializable { - /* - * Web connectivity endpoint details. - */ - private ConnectivityProfileWeb web; - - /* - * List of SSH connectivity endpoints. - */ - private List ssh; - - /** - * Creates an instance of ConnectivityProfile class. - */ - public ConnectivityProfile() { - } - - /** - * Get the web property: Web connectivity endpoint details. - * - * @return the web value. - */ - public ConnectivityProfileWeb web() { - return this.web; - } - - /** - * Set the web property: Web connectivity endpoint details. - * - * @param web the web value to set. - * @return the ConnectivityProfile object itself. - */ - public ConnectivityProfile withWeb(ConnectivityProfileWeb web) { - this.web = web; - return this; - } - - /** - * Get the ssh property: List of SSH connectivity endpoints. - * - * @return the ssh value. - */ - public List ssh() { - return this.ssh; - } - - /** - * Set the ssh property: List of SSH connectivity endpoints. - * - * @param ssh the ssh value to set. - * @return the ConnectivityProfile object itself. - */ - public ConnectivityProfile withSsh(List ssh) { - this.ssh = ssh; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (web() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property web in model ConnectivityProfile")); - } else { - web().validate(); - } - if (ssh() != null) { - ssh().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ConnectivityProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("web", this.web); - jsonWriter.writeArrayField("ssh", this.ssh, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectivityProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectivityProfile 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 ConnectivityProfile. - */ - public static ConnectivityProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectivityProfile deserializedConnectivityProfile = new ConnectivityProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("web".equals(fieldName)) { - deserializedConnectivityProfile.web = ConnectivityProfileWeb.fromJson(reader); - } else if ("ssh".equals(fieldName)) { - List ssh - = reader.readArray(reader1 -> SshConnectivityEndpoint.fromJson(reader1)); - deserializedConnectivityProfile.ssh = ssh; - } else { - reader.skipChildren(); - } - } - - return deserializedConnectivityProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfileWeb.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfileWeb.java deleted file mode 100644 index 2d3d167ceed5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfileWeb.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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; - -/** - * Web connectivity endpoint details. - */ -@Fluent -public final class ConnectivityProfileWeb extends WebConnectivityEndpoint { - /** - * Creates an instance of ConnectivityProfileWeb class. - */ - public ConnectivityProfileWeb() { - } - - /** - * {@inheritDoc} - */ - @Override - public ConnectivityProfileWeb withFqdn(String fqdn) { - super.withFqdn(fqdn); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ConnectivityProfileWeb withPrivateFqdn(String privateFqdn) { - super.withPrivateFqdn(privateFqdn); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fqdn", fqdn()); - jsonWriter.writeStringField("privateFqdn", privateFqdn()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectivityProfileWeb from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectivityProfileWeb 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 ConnectivityProfileWeb. - */ - public static ConnectivityProfileWeb fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectivityProfileWeb deserializedConnectivityProfileWeb = new ConnectivityProfileWeb(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fqdn".equals(fieldName)) { - deserializedConnectivityProfileWeb.withFqdn(reader.getString()); - } else if ("privateFqdn".equals(fieldName)) { - deserializedConnectivityProfileWeb.withPrivateFqdn(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedConnectivityProfileWeb; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ContentEncoding.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ContentEncoding.java deleted file mode 100644 index e9cade236f83..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ContentEncoding.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * 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. - */ -public final class ContentEncoding extends ExpandableStringEnum { - /** - * Static value Base64 for ContentEncoding. - */ - public static final ContentEncoding BASE64 = fromString("Base64"); - - /** - * Static value None for ContentEncoding. - */ - public static final ContentEncoding NONE = fromString("None"); - - /** - * Creates a new instance of ContentEncoding value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContentEncoding() { - } - - /** - * Creates or finds a ContentEncoding from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContentEncoding. - */ - public static ContentEncoding fromString(String name) { - return fromString(name, ContentEncoding.class); - } - - /** - * Gets known ContentEncoding values. - * - * @return known ContentEncoding values. - */ - public static Collection values() { - return values(ContentEncoding.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterAksVersionStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterAksVersionStatus.java deleted file mode 100644 index af84a6a854fd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterAksVersionStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current AKS version's status: whether it is deprecated or supported. - */ -public final class CurrentClusterAksVersionStatus extends ExpandableStringEnum { - /** - * Static value Deprecated for CurrentClusterAksVersionStatus. - */ - public static final CurrentClusterAksVersionStatus DEPRECATED = fromString("Deprecated"); - - /** - * Static value Supported for CurrentClusterAksVersionStatus. - */ - public static final CurrentClusterAksVersionStatus SUPPORTED = fromString("Supported"); - - /** - * Creates a new instance of CurrentClusterAksVersionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CurrentClusterAksVersionStatus() { - } - - /** - * Creates or finds a CurrentClusterAksVersionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding CurrentClusterAksVersionStatus. - */ - public static CurrentClusterAksVersionStatus fromString(String name) { - return fromString(name, CurrentClusterAksVersionStatus.class); - } - - /** - * Gets known CurrentClusterAksVersionStatus values. - * - * @return known CurrentClusterAksVersionStatus values. - */ - public static Collection values() { - return values(CurrentClusterAksVersionStatus.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterPoolAksVersionStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterPoolAksVersionStatus.java deleted file mode 100644 index 975284912d60..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterPoolAksVersionStatus.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current AKS version's status: whether it is deprecated or supported. - */ -public final class CurrentClusterPoolAksVersionStatus extends ExpandableStringEnum { - /** - * Static value Deprecated for CurrentClusterPoolAksVersionStatus. - */ - public static final CurrentClusterPoolAksVersionStatus DEPRECATED = fromString("Deprecated"); - - /** - * Static value Supported for CurrentClusterPoolAksVersionStatus. - */ - public static final CurrentClusterPoolAksVersionStatus SUPPORTED = fromString("Supported"); - - /** - * Creates a new instance of CurrentClusterPoolAksVersionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CurrentClusterPoolAksVersionStatus() { - } - - /** - * Creates or finds a CurrentClusterPoolAksVersionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding CurrentClusterPoolAksVersionStatus. - */ - public static CurrentClusterPoolAksVersionStatus fromString(String name) { - return fromString(name, CurrentClusterPoolAksVersionStatus.class); - } - - /** - * Gets known CurrentClusterPoolAksVersionStatus values. - * - * @return known CurrentClusterPoolAksVersionStatus values. - */ - public static Collection values() { - return values(CurrentClusterPoolAksVersionStatus.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DataDiskType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DataDiskType.java deleted file mode 100644 index c4f718aacf16..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DataDiskType.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Managed Disk Type. - */ -public final class DataDiskType extends ExpandableStringEnum { - /** - * Static value Standard_HDD_LRS for DataDiskType. - */ - public static final DataDiskType STANDARD_HDD_LRS = fromString("Standard_HDD_LRS"); - - /** - * Static value Standard_SSD_LRS for DataDiskType. - */ - public static final DataDiskType STANDARD_SSD_LRS = fromString("Standard_SSD_LRS"); - - /** - * Static value Standard_SSD_ZRS for DataDiskType. - */ - public static final DataDiskType STANDARD_SSD_ZRS = fromString("Standard_SSD_ZRS"); - - /** - * Static value Premium_SSD_LRS for DataDiskType. - */ - public static final DataDiskType PREMIUM_SSD_LRS = fromString("Premium_SSD_LRS"); - - /** - * Static value Premium_SSD_ZRS for DataDiskType. - */ - public static final DataDiskType PREMIUM_SSD_ZRS = fromString("Premium_SSD_ZRS"); - - /** - * Static value Premium_SSD_v2_LRS for DataDiskType. - */ - public static final DataDiskType PREMIUM_SSD_V2_LRS = fromString("Premium_SSD_v2_LRS"); - - /** - * Creates a new instance of DataDiskType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DataDiskType() { - } - - /** - * Creates or finds a DataDiskType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataDiskType. - */ - public static DataDiskType fromString(String name) { - return fromString(name, DataDiskType.class); - } - - /** - * Gets known DataDiskType values. - * - * @return known DataDiskType values. - */ - public static Collection values() { - return values(DataDiskType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DbConnectionAuthenticationMode.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DbConnectionAuthenticationMode.java deleted file mode 100644 index f5aa8985deb4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DbConnectionAuthenticationMode.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The authentication mode to connect to your Hive metastore database. More details: - * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. - */ -public final class DbConnectionAuthenticationMode extends ExpandableStringEnum { - /** - * Static value SqlAuth for DbConnectionAuthenticationMode. - */ - public static final DbConnectionAuthenticationMode SQL_AUTH = fromString("SqlAuth"); - - /** - * Static value IdentityAuth for DbConnectionAuthenticationMode. - */ - public static final DbConnectionAuthenticationMode IDENTITY_AUTH = fromString("IdentityAuth"); - - /** - * Creates a new instance of DbConnectionAuthenticationMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DbConnectionAuthenticationMode() { - } - - /** - * Creates or finds a DbConnectionAuthenticationMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding DbConnectionAuthenticationMode. - */ - public static DbConnectionAuthenticationMode fromString(String name) { - return fromString(name, DbConnectionAuthenticationMode.class); - } - - /** - * Gets known DbConnectionAuthenticationMode values. - * - * @return known DbConnectionAuthenticationMode values. - */ - public static Collection values() { - return values(DbConnectionAuthenticationMode.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DeploymentMode.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DeploymentMode.java deleted file mode 100644 index 72924f34872a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DeploymentMode.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A string property that indicates the deployment mode of Flink cluster. It can have one of the following enum values - * => Application, Session. Default value is Session. - */ -public final class DeploymentMode extends ExpandableStringEnum { - /** - * Static value Application for DeploymentMode. - */ - public static final DeploymentMode APPLICATION = fromString("Application"); - - /** - * Static value Session for DeploymentMode. - */ - public static final DeploymentMode SESSION = fromString("Session"); - - /** - * Creates a new instance of DeploymentMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DeploymentMode() { - } - - /** - * Creates or finds a DeploymentMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeploymentMode. - */ - public static DeploymentMode fromString(String name) { - return fromString(name, DeploymentMode.class); - } - - /** - * Gets known DeploymentMode values. - * - * @return known DeploymentMode values. - */ - public static Collection values() { - return values(DeploymentMode.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DiskStorageProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DiskStorageProfile.java deleted file mode 100644 index e9647e25d804..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DiskStorageProfile.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 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; - -/** - * Kafka disk storage profile. - */ -@Fluent -public final class DiskStorageProfile implements JsonSerializable { - /* - * Managed Disk size in GB. The maximum supported disk size for Standard and Premium HDD/SSD is 32TB, except for - * Premium SSD v2, which supports up to 64TB. - */ - private int dataDiskSize; - - /* - * Managed Disk Type. - */ - private DataDiskType dataDiskType; - - /** - * Creates an instance of DiskStorageProfile class. - */ - public DiskStorageProfile() { - } - - /** - * Get the dataDiskSize property: Managed Disk size in GB. The maximum supported disk size for Standard and Premium - * HDD/SSD is 32TB, except for Premium SSD v2, which supports up to 64TB. - * - * @return the dataDiskSize value. - */ - public int dataDiskSize() { - return this.dataDiskSize; - } - - /** - * Set the dataDiskSize property: Managed Disk size in GB. The maximum supported disk size for Standard and Premium - * HDD/SSD is 32TB, except for Premium SSD v2, which supports up to 64TB. - * - * @param dataDiskSize the dataDiskSize value to set. - * @return the DiskStorageProfile object itself. - */ - public DiskStorageProfile withDataDiskSize(int dataDiskSize) { - this.dataDiskSize = dataDiskSize; - return this; - } - - /** - * Get the dataDiskType property: Managed Disk Type. - * - * @return the dataDiskType value. - */ - public DataDiskType dataDiskType() { - return this.dataDiskType; - } - - /** - * Set the dataDiskType property: Managed Disk Type. - * - * @param dataDiskType the dataDiskType value to set. - * @return the DiskStorageProfile object itself. - */ - public DiskStorageProfile withDataDiskType(DataDiskType dataDiskType) { - this.dataDiskType = dataDiskType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataDiskType() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property dataDiskType in model DiskStorageProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DiskStorageProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("dataDiskSize", this.dataDiskSize); - jsonWriter.writeStringField("dataDiskType", this.dataDiskType == null ? null : this.dataDiskType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiskStorageProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiskStorageProfile 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 DiskStorageProfile. - */ - public static DiskStorageProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiskStorageProfile deserializedDiskStorageProfile = new DiskStorageProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dataDiskSize".equals(fieldName)) { - deserializedDiskStorageProfile.dataDiskSize = reader.getInt(); - } else if ("dataDiskType".equals(fieldName)) { - deserializedDiskStorageProfile.dataDiskType = DataDiskType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDiskStorageProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkCatalogOptions.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkCatalogOptions.java deleted file mode 100644 index a17521aa48f4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkCatalogOptions.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Flink cluster catalog options. - */ -@Fluent -public final class FlinkCatalogOptions implements JsonSerializable { - /* - * Hive Catalog Option for Flink cluster. - */ - private FlinkHiveCatalogOption hive; - - /** - * Creates an instance of FlinkCatalogOptions class. - */ - public FlinkCatalogOptions() { - } - - /** - * Get the hive property: Hive Catalog Option for Flink cluster. - * - * @return the hive value. - */ - public FlinkHiveCatalogOption hive() { - return this.hive; - } - - /** - * Set the hive property: Hive Catalog Option for Flink cluster. - * - * @param hive the hive value to set. - * @return the FlinkCatalogOptions object itself. - */ - public FlinkCatalogOptions withHive(FlinkHiveCatalogOption hive) { - this.hive = hive; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (hive() != null) { - hive().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("hive", this.hive); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FlinkCatalogOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FlinkCatalogOptions 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 FlinkCatalogOptions. - */ - public static FlinkCatalogOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FlinkCatalogOptions deserializedFlinkCatalogOptions = new FlinkCatalogOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("hive".equals(fieldName)) { - deserializedFlinkCatalogOptions.hive = FlinkHiveCatalogOption.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFlinkCatalogOptions; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkHiveCatalogOption.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkHiveCatalogOption.java deleted file mode 100644 index 084fabf873da..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkHiveCatalogOption.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) 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; - -/** - * Hive Catalog Option for Flink cluster. - */ -@Fluent -public final class FlinkHiveCatalogOption implements JsonSerializable { - /* - * The authentication mode to connect to your Hive metastore database. More details: - * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and- - * authorization - */ - private MetastoreDbConnectionAuthenticationMode metastoreDbConnectionAuthenticationMode; - - /* - * Secret reference name from secretsProfile.secrets containing password for database connection. - */ - private String metastoreDbConnectionPasswordSecret; - - /* - * Connection string for hive metastore database. - */ - private String metastoreDbConnectionUrl; - - /* - * User name for database connection. - */ - private String metastoreDbConnectionUsername; - - /** - * Creates an instance of FlinkHiveCatalogOption class. - */ - public FlinkHiveCatalogOption() { - } - - /** - * Get the metastoreDbConnectionAuthenticationMode property: The authentication mode to connect to your Hive - * metastore database. More details: - * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. - * - * @return the metastoreDbConnectionAuthenticationMode value. - */ - public MetastoreDbConnectionAuthenticationMode metastoreDbConnectionAuthenticationMode() { - return this.metastoreDbConnectionAuthenticationMode; - } - - /** - * Set the metastoreDbConnectionAuthenticationMode property: The authentication mode to connect to your Hive - * metastore database. More details: - * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. - * - * @param metastoreDbConnectionAuthenticationMode the metastoreDbConnectionAuthenticationMode value to set. - * @return the FlinkHiveCatalogOption object itself. - */ - public FlinkHiveCatalogOption withMetastoreDbConnectionAuthenticationMode( - MetastoreDbConnectionAuthenticationMode metastoreDbConnectionAuthenticationMode) { - this.metastoreDbConnectionAuthenticationMode = metastoreDbConnectionAuthenticationMode; - return this; - } - - /** - * Get the metastoreDbConnectionPasswordSecret property: Secret reference name from secretsProfile.secrets - * containing password for database connection. - * - * @return the metastoreDbConnectionPasswordSecret value. - */ - public String metastoreDbConnectionPasswordSecret() { - return this.metastoreDbConnectionPasswordSecret; - } - - /** - * Set the metastoreDbConnectionPasswordSecret property: Secret reference name from secretsProfile.secrets - * containing password for database connection. - * - * @param metastoreDbConnectionPasswordSecret the metastoreDbConnectionPasswordSecret value to set. - * @return the FlinkHiveCatalogOption object itself. - */ - public FlinkHiveCatalogOption withMetastoreDbConnectionPasswordSecret(String metastoreDbConnectionPasswordSecret) { - this.metastoreDbConnectionPasswordSecret = metastoreDbConnectionPasswordSecret; - return this; - } - - /** - * Get the metastoreDbConnectionUrl property: Connection string for hive metastore database. - * - * @return the metastoreDbConnectionUrl value. - */ - public String metastoreDbConnectionUrl() { - return this.metastoreDbConnectionUrl; - } - - /** - * Set the metastoreDbConnectionUrl property: Connection string for hive metastore database. - * - * @param metastoreDbConnectionUrl the metastoreDbConnectionUrl value to set. - * @return the FlinkHiveCatalogOption object itself. - */ - public FlinkHiveCatalogOption withMetastoreDbConnectionUrl(String metastoreDbConnectionUrl) { - this.metastoreDbConnectionUrl = metastoreDbConnectionUrl; - return this; - } - - /** - * Get the metastoreDbConnectionUsername property: User name for database connection. - * - * @return the metastoreDbConnectionUsername value. - */ - public String metastoreDbConnectionUsername() { - return this.metastoreDbConnectionUsername; - } - - /** - * Set the metastoreDbConnectionUsername property: User name for database connection. - * - * @param metastoreDbConnectionUsername the metastoreDbConnectionUsername value to set. - * @return the FlinkHiveCatalogOption object itself. - */ - public FlinkHiveCatalogOption withMetastoreDbConnectionUsername(String metastoreDbConnectionUsername) { - this.metastoreDbConnectionUsername = metastoreDbConnectionUsername; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metastoreDbConnectionUrl() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metastoreDbConnectionUrl in model FlinkHiveCatalogOption")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FlinkHiveCatalogOption.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("metastoreDbConnectionURL", this.metastoreDbConnectionUrl); - jsonWriter.writeStringField("metastoreDbConnectionAuthenticationMode", - this.metastoreDbConnectionAuthenticationMode == null - ? null - : this.metastoreDbConnectionAuthenticationMode.toString()); - jsonWriter.writeStringField("metastoreDbConnectionPasswordSecret", this.metastoreDbConnectionPasswordSecret); - jsonWriter.writeStringField("metastoreDbConnectionUserName", this.metastoreDbConnectionUsername); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FlinkHiveCatalogOption from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FlinkHiveCatalogOption 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 FlinkHiveCatalogOption. - */ - public static FlinkHiveCatalogOption fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FlinkHiveCatalogOption deserializedFlinkHiveCatalogOption = new FlinkHiveCatalogOption(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("metastoreDbConnectionURL".equals(fieldName)) { - deserializedFlinkHiveCatalogOption.metastoreDbConnectionUrl = reader.getString(); - } else if ("metastoreDbConnectionAuthenticationMode".equals(fieldName)) { - deserializedFlinkHiveCatalogOption.metastoreDbConnectionAuthenticationMode - = MetastoreDbConnectionAuthenticationMode.fromString(reader.getString()); - } else if ("metastoreDbConnectionPasswordSecret".equals(fieldName)) { - deserializedFlinkHiveCatalogOption.metastoreDbConnectionPasswordSecret = reader.getString(); - } else if ("metastoreDbConnectionUserName".equals(fieldName)) { - deserializedFlinkHiveCatalogOption.metastoreDbConnectionUsername = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFlinkHiveCatalogOption; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProfile.java deleted file mode 100644 index b68f6bf16b58..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProfile.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) 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; - -/** - * Job specifications for flink clusters in application deployment mode. The specification is immutable even if job - * properties are changed by calling the RunJob API, please use the ListJob API to get the latest job information. - */ -@Fluent -public final class FlinkJobProfile implements JsonSerializable { - /* - * A string property that specifies the directory where the job JAR is located. - */ - private String jobJarDirectory; - - /* - * A string property that represents the name of the job JAR. - */ - private String jarName; - - /* - * A string property that specifies the entry class for the Flink job. If not specified, the entry point is - * auto-detected from the flink job jar package. - */ - private String entryClass; - - /* - * A string property representing additional JVM arguments for the Flink job. It should be space separated value. - */ - private String args; - - /* - * A string property that represents the name of the savepoint for the Flink job - */ - private String savePointName; - - /* - * A string property that indicates the upgrade mode to be performed on the Flink job. It can have one of the - * following enum values => STATELESS_UPDATE, UPDATE, LAST_STATE_UPDATE. - */ - private UpgradeMode upgradeMode; - - /** - * Creates an instance of FlinkJobProfile class. - */ - public FlinkJobProfile() { - } - - /** - * Get the jobJarDirectory property: A string property that specifies the directory where the job JAR is located. - * - * @return the jobJarDirectory value. - */ - public String jobJarDirectory() { - return this.jobJarDirectory; - } - - /** - * Set the jobJarDirectory property: A string property that specifies the directory where the job JAR is located. - * - * @param jobJarDirectory the jobJarDirectory value to set. - * @return the FlinkJobProfile object itself. - */ - public FlinkJobProfile withJobJarDirectory(String jobJarDirectory) { - this.jobJarDirectory = jobJarDirectory; - return this; - } - - /** - * Get the jarName property: A string property that represents the name of the job JAR. - * - * @return the jarName value. - */ - public String jarName() { - return this.jarName; - } - - /** - * Set the jarName property: A string property that represents the name of the job JAR. - * - * @param jarName the jarName value to set. - * @return the FlinkJobProfile object itself. - */ - public FlinkJobProfile withJarName(String jarName) { - this.jarName = jarName; - return this; - } - - /** - * Get the entryClass property: A string property that specifies the entry class for the Flink job. If not - * specified, the entry point is auto-detected from the flink job jar package. - * - * @return the entryClass value. - */ - public String entryClass() { - return this.entryClass; - } - - /** - * Set the entryClass property: A string property that specifies the entry class for the Flink job. If not - * specified, the entry point is auto-detected from the flink job jar package. - * - * @param entryClass the entryClass value to set. - * @return the FlinkJobProfile object itself. - */ - public FlinkJobProfile withEntryClass(String entryClass) { - this.entryClass = entryClass; - return this; - } - - /** - * Get the args property: A string property representing additional JVM arguments for the Flink job. It should be - * space separated value. - * - * @return the args value. - */ - public String args() { - return this.args; - } - - /** - * Set the args property: A string property representing additional JVM arguments for the Flink job. It should be - * space separated value. - * - * @param args the args value to set. - * @return the FlinkJobProfile object itself. - */ - public FlinkJobProfile withArgs(String args) { - this.args = args; - return this; - } - - /** - * Get the savePointName property: A string property that represents the name of the savepoint for the Flink job. - * - * @return the savePointName value. - */ - public String savePointName() { - return this.savePointName; - } - - /** - * Set the savePointName property: A string property that represents the name of the savepoint for the Flink job. - * - * @param savePointName the savePointName value to set. - * @return the FlinkJobProfile object itself. - */ - public FlinkJobProfile withSavePointName(String savePointName) { - this.savePointName = savePointName; - return this; - } - - /** - * Get the upgradeMode property: A string property that indicates the upgrade mode to be performed on the Flink job. - * It can have one of the following enum values => STATELESS_UPDATE, UPDATE, LAST_STATE_UPDATE. - * - * @return the upgradeMode value. - */ - public UpgradeMode upgradeMode() { - return this.upgradeMode; - } - - /** - * Set the upgradeMode property: A string property that indicates the upgrade mode to be performed on the Flink job. - * It can have one of the following enum values => STATELESS_UPDATE, UPDATE, LAST_STATE_UPDATE. - * - * @param upgradeMode the upgradeMode value to set. - * @return the FlinkJobProfile object itself. - */ - public FlinkJobProfile withUpgradeMode(UpgradeMode upgradeMode) { - this.upgradeMode = upgradeMode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (jobJarDirectory() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property jobJarDirectory in model FlinkJobProfile")); - } - if (jarName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property jarName in model FlinkJobProfile")); - } - if (upgradeMode() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property upgradeMode in model FlinkJobProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FlinkJobProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("jobJarDirectory", this.jobJarDirectory); - jsonWriter.writeStringField("jarName", this.jarName); - jsonWriter.writeStringField("upgradeMode", this.upgradeMode == null ? null : this.upgradeMode.toString()); - jsonWriter.writeStringField("entryClass", this.entryClass); - jsonWriter.writeStringField("args", this.args); - jsonWriter.writeStringField("savePointName", this.savePointName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FlinkJobProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FlinkJobProfile 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 FlinkJobProfile. - */ - public static FlinkJobProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FlinkJobProfile deserializedFlinkJobProfile = new FlinkJobProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobJarDirectory".equals(fieldName)) { - deserializedFlinkJobProfile.jobJarDirectory = reader.getString(); - } else if ("jarName".equals(fieldName)) { - deserializedFlinkJobProfile.jarName = reader.getString(); - } else if ("upgradeMode".equals(fieldName)) { - deserializedFlinkJobProfile.upgradeMode = UpgradeMode.fromString(reader.getString()); - } else if ("entryClass".equals(fieldName)) { - deserializedFlinkJobProfile.entryClass = reader.getString(); - } else if ("args".equals(fieldName)) { - deserializedFlinkJobProfile.args = reader.getString(); - } else if ("savePointName".equals(fieldName)) { - deserializedFlinkJobProfile.savePointName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFlinkJobProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProperties.java deleted file mode 100644 index 4798bed61a5d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProperties.java +++ /dev/null @@ -1,432 +0,0 @@ -// Copyright (c) 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; -import java.util.Map; - -/** - * Properties of flink job. - */ -@Fluent -public final class FlinkJobProperties extends ClusterJobProperties { - /* - * Type of cluster job. - */ - private JobType jobType = JobType.FLINK_JOB; - - /* - * Run id of job - */ - private String runId; - - /* - * Name of job - */ - private String jobName; - - /* - * A string property that specifies the directory where the job JAR is located. - */ - private String jobJarDirectory; - - /* - * A string property that represents the name of the job JAR. - */ - private String jarName; - - /* - * A string property that specifies the entry class for the Flink job. - */ - private String entryClass; - - /* - * A string property representing additional JVM arguments for the Flink job. It should be space separated value. - */ - private String args; - - /* - * A string property that represents the name of the savepoint for the Flink job - */ - private String savePointName; - - /* - * A string property that indicates the action to be performed on the Flink job. It can have one of the following - * enum values => NEW, UPDATE, STATELESS_UPDATE, STOP, START, CANCEL, SAVEPOINT, LIST_SAVEPOINT, or DELETE. - */ - private Action action; - - /* - * Additional properties used to configure Flink jobs. It allows users to set properties such as parallelism and - * jobSavePointDirectory. It accepts additional key-value pairs as properties, where the keys are strings and the - * values are strings as well. - */ - private Map flinkConfiguration; - - /* - * Unique id for identifying a job - */ - private String jobId; - - /* - * Status of job. - */ - private String status; - - /* - * Output of job. - */ - private String jobOutput; - - /* - * Action result of job. - */ - private String actionResult; - - /* - * The last savepoint. - */ - private String lastSavePoint; - - /** - * Creates an instance of FlinkJobProperties class. - */ - public FlinkJobProperties() { - } - - /** - * Get the jobType property: Type of cluster job. - * - * @return the jobType value. - */ - @Override - public JobType jobType() { - return this.jobType; - } - - /** - * Get the runId property: Run id of job. - * - * @return the runId value. - */ - public String runId() { - return this.runId; - } - - /** - * Set the runId property: Run id of job. - * - * @param runId the runId value to set. - * @return the FlinkJobProperties object itself. - */ - public FlinkJobProperties withRunId(String runId) { - this.runId = runId; - return this; - } - - /** - * Get the jobName property: Name of job. - * - * @return the jobName value. - */ - public String jobName() { - return this.jobName; - } - - /** - * Set the jobName property: Name of job. - * - * @param jobName the jobName value to set. - * @return the FlinkJobProperties object itself. - */ - public FlinkJobProperties withJobName(String jobName) { - this.jobName = jobName; - return this; - } - - /** - * Get the jobJarDirectory property: A string property that specifies the directory where the job JAR is located. - * - * @return the jobJarDirectory value. - */ - public String jobJarDirectory() { - return this.jobJarDirectory; - } - - /** - * Set the jobJarDirectory property: A string property that specifies the directory where the job JAR is located. - * - * @param jobJarDirectory the jobJarDirectory value to set. - * @return the FlinkJobProperties object itself. - */ - public FlinkJobProperties withJobJarDirectory(String jobJarDirectory) { - this.jobJarDirectory = jobJarDirectory; - return this; - } - - /** - * Get the jarName property: A string property that represents the name of the job JAR. - * - * @return the jarName value. - */ - public String jarName() { - return this.jarName; - } - - /** - * Set the jarName property: A string property that represents the name of the job JAR. - * - * @param jarName the jarName value to set. - * @return the FlinkJobProperties object itself. - */ - public FlinkJobProperties withJarName(String jarName) { - this.jarName = jarName; - return this; - } - - /** - * Get the entryClass property: A string property that specifies the entry class for the Flink job. - * - * @return the entryClass value. - */ - public String entryClass() { - return this.entryClass; - } - - /** - * Set the entryClass property: A string property that specifies the entry class for the Flink job. - * - * @param entryClass the entryClass value to set. - * @return the FlinkJobProperties object itself. - */ - public FlinkJobProperties withEntryClass(String entryClass) { - this.entryClass = entryClass; - return this; - } - - /** - * Get the args property: A string property representing additional JVM arguments for the Flink job. It should be - * space separated value. - * - * @return the args value. - */ - public String args() { - return this.args; - } - - /** - * Set the args property: A string property representing additional JVM arguments for the Flink job. It should be - * space separated value. - * - * @param args the args value to set. - * @return the FlinkJobProperties object itself. - */ - public FlinkJobProperties withArgs(String args) { - this.args = args; - return this; - } - - /** - * Get the savePointName property: A string property that represents the name of the savepoint for the Flink job. - * - * @return the savePointName value. - */ - public String savePointName() { - return this.savePointName; - } - - /** - * Set the savePointName property: A string property that represents the name of the savepoint for the Flink job. - * - * @param savePointName the savePointName value to set. - * @return the FlinkJobProperties object itself. - */ - public FlinkJobProperties withSavePointName(String savePointName) { - this.savePointName = savePointName; - return this; - } - - /** - * Get the action property: A string property that indicates the action to be performed on the Flink job. It can - * have one of the following enum values => NEW, UPDATE, STATELESS_UPDATE, STOP, START, CANCEL, SAVEPOINT, - * LIST_SAVEPOINT, or DELETE. - * - * @return the action value. - */ - public Action action() { - return this.action; - } - - /** - * Set the action property: A string property that indicates the action to be performed on the Flink job. It can - * have one of the following enum values => NEW, UPDATE, STATELESS_UPDATE, STOP, START, CANCEL, SAVEPOINT, - * LIST_SAVEPOINT, or DELETE. - * - * @param action the action value to set. - * @return the FlinkJobProperties object itself. - */ - public FlinkJobProperties withAction(Action action) { - this.action = action; - return this; - } - - /** - * Get the flinkConfiguration property: Additional properties used to configure Flink jobs. It allows users to set - * properties such as parallelism and jobSavePointDirectory. It accepts additional key-value pairs as properties, - * where the keys are strings and the values are strings as well. - * - * @return the flinkConfiguration value. - */ - public Map flinkConfiguration() { - return this.flinkConfiguration; - } - - /** - * Set the flinkConfiguration property: Additional properties used to configure Flink jobs. It allows users to set - * properties such as parallelism and jobSavePointDirectory. It accepts additional key-value pairs as properties, - * where the keys are strings and the values are strings as well. - * - * @param flinkConfiguration the flinkConfiguration value to set. - * @return the FlinkJobProperties object itself. - */ - public FlinkJobProperties withFlinkConfiguration(Map flinkConfiguration) { - this.flinkConfiguration = flinkConfiguration; - return this; - } - - /** - * Get the jobId property: Unique id for identifying a job. - * - * @return the jobId value. - */ - public String jobId() { - return this.jobId; - } - - /** - * Get the status property: Status of job. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Get the jobOutput property: Output of job. - * - * @return the jobOutput value. - */ - public String jobOutput() { - return this.jobOutput; - } - - /** - * Get the actionResult property: Action result of job. - * - * @return the actionResult value. - */ - public String actionResult() { - return this.actionResult; - } - - /** - * Get the lastSavePoint property: The last savepoint. - * - * @return the lastSavePoint value. - */ - public String lastSavePoint() { - return this.lastSavePoint; - } - - /** - * 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("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeStringField("runId", this.runId); - jsonWriter.writeStringField("jobName", this.jobName); - jsonWriter.writeStringField("jobJarDirectory", this.jobJarDirectory); - jsonWriter.writeStringField("jarName", this.jarName); - jsonWriter.writeStringField("entryClass", this.entryClass); - jsonWriter.writeStringField("args", this.args); - jsonWriter.writeStringField("savePointName", this.savePointName); - jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); - jsonWriter.writeMapField("flinkConfiguration", this.flinkConfiguration, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FlinkJobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FlinkJobProperties 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 FlinkJobProperties. - */ - public static FlinkJobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FlinkJobProperties deserializedFlinkJobProperties = new FlinkJobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jobType".equals(fieldName)) { - deserializedFlinkJobProperties.jobType = JobType.fromString(reader.getString()); - } else if ("runId".equals(fieldName)) { - deserializedFlinkJobProperties.runId = reader.getString(); - } else if ("jobName".equals(fieldName)) { - deserializedFlinkJobProperties.jobName = reader.getString(); - } else if ("jobJarDirectory".equals(fieldName)) { - deserializedFlinkJobProperties.jobJarDirectory = reader.getString(); - } else if ("jarName".equals(fieldName)) { - deserializedFlinkJobProperties.jarName = reader.getString(); - } else if ("entryClass".equals(fieldName)) { - deserializedFlinkJobProperties.entryClass = reader.getString(); - } else if ("args".equals(fieldName)) { - deserializedFlinkJobProperties.args = reader.getString(); - } else if ("savePointName".equals(fieldName)) { - deserializedFlinkJobProperties.savePointName = reader.getString(); - } else if ("action".equals(fieldName)) { - deserializedFlinkJobProperties.action = Action.fromString(reader.getString()); - } else if ("flinkConfiguration".equals(fieldName)) { - Map flinkConfiguration = reader.readMap(reader1 -> reader1.getString()); - deserializedFlinkJobProperties.flinkConfiguration = flinkConfiguration; - } else if ("jobId".equals(fieldName)) { - deserializedFlinkJobProperties.jobId = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedFlinkJobProperties.status = reader.getString(); - } else if ("jobOutput".equals(fieldName)) { - deserializedFlinkJobProperties.jobOutput = reader.getString(); - } else if ("actionResult".equals(fieldName)) { - deserializedFlinkJobProperties.actionResult = reader.getString(); - } else if ("lastSavePoint".equals(fieldName)) { - deserializedFlinkJobProperties.lastSavePoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFlinkJobProperties; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkProfile.java deleted file mode 100644 index 4fc72ad39f29..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkProfile.java +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright (c) 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; - -/** - * The Flink cluster profile. - */ -@Fluent -public final class FlinkProfile implements JsonSerializable { - /* - * The storage profile - */ - private FlinkStorageProfile storage; - - /* - * The number of task managers. - */ - private Integer numReplicas; - - /* - * Job Manager container/ process CPU and memory requirements - */ - private ComputeResourceDefinition jobManager; - - /* - * History Server container/ process CPU and memory requirements - */ - private ComputeResourceDefinition historyServer; - - /* - * Task Manager container/ process CPU and memory requirements - */ - private ComputeResourceDefinition taskManager; - - /* - * Flink cluster catalog options. - */ - private FlinkCatalogOptions catalogOptions; - - /* - * A string property that indicates the deployment mode of Flink cluster. It can have one of the following enum - * values => Application, Session. Default value is Session - */ - private DeploymentMode deploymentMode; - - /* - * Job specifications for flink clusters in application deployment mode. The specification is immutable even if job - * properties are changed by calling the RunJob API, please use the ListJob API to get the latest job information. - */ - private FlinkJobProfile jobSpec; - - /** - * Creates an instance of FlinkProfile class. - */ - public FlinkProfile() { - } - - /** - * Get the storage property: The storage profile. - * - * @return the storage value. - */ - public FlinkStorageProfile storage() { - return this.storage; - } - - /** - * Set the storage property: The storage profile. - * - * @param storage the storage value to set. - * @return the FlinkProfile object itself. - */ - public FlinkProfile withStorage(FlinkStorageProfile storage) { - this.storage = storage; - return this; - } - - /** - * Get the numReplicas property: The number of task managers. - * - * @return the numReplicas value. - */ - public Integer numReplicas() { - return this.numReplicas; - } - - /** - * Set the numReplicas property: The number of task managers. - * - * @param numReplicas the numReplicas value to set. - * @return the FlinkProfile object itself. - */ - public FlinkProfile withNumReplicas(Integer numReplicas) { - this.numReplicas = numReplicas; - return this; - } - - /** - * Get the jobManager property: Job Manager container/ process CPU and memory requirements. - * - * @return the jobManager value. - */ - public ComputeResourceDefinition jobManager() { - return this.jobManager; - } - - /** - * Set the jobManager property: Job Manager container/ process CPU and memory requirements. - * - * @param jobManager the jobManager value to set. - * @return the FlinkProfile object itself. - */ - public FlinkProfile withJobManager(ComputeResourceDefinition jobManager) { - this.jobManager = jobManager; - return this; - } - - /** - * Get the historyServer property: History Server container/ process CPU and memory requirements. - * - * @return the historyServer value. - */ - public ComputeResourceDefinition historyServer() { - return this.historyServer; - } - - /** - * Set the historyServer property: History Server container/ process CPU and memory requirements. - * - * @param historyServer the historyServer value to set. - * @return the FlinkProfile object itself. - */ - public FlinkProfile withHistoryServer(ComputeResourceDefinition historyServer) { - this.historyServer = historyServer; - return this; - } - - /** - * Get the taskManager property: Task Manager container/ process CPU and memory requirements. - * - * @return the taskManager value. - */ - public ComputeResourceDefinition taskManager() { - return this.taskManager; - } - - /** - * Set the taskManager property: Task Manager container/ process CPU and memory requirements. - * - * @param taskManager the taskManager value to set. - * @return the FlinkProfile object itself. - */ - public FlinkProfile withTaskManager(ComputeResourceDefinition taskManager) { - this.taskManager = taskManager; - return this; - } - - /** - * Get the catalogOptions property: Flink cluster catalog options. - * - * @return the catalogOptions value. - */ - public FlinkCatalogOptions catalogOptions() { - return this.catalogOptions; - } - - /** - * Set the catalogOptions property: Flink cluster catalog options. - * - * @param catalogOptions the catalogOptions value to set. - * @return the FlinkProfile object itself. - */ - public FlinkProfile withCatalogOptions(FlinkCatalogOptions catalogOptions) { - this.catalogOptions = catalogOptions; - return this; - } - - /** - * Get the deploymentMode property: A string property that indicates the deployment mode of Flink cluster. It can - * have one of the following enum values => Application, Session. Default value is Session. - * - * @return the deploymentMode value. - */ - public DeploymentMode deploymentMode() { - return this.deploymentMode; - } - - /** - * Set the deploymentMode property: A string property that indicates the deployment mode of Flink cluster. It can - * have one of the following enum values => Application, Session. Default value is Session. - * - * @param deploymentMode the deploymentMode value to set. - * @return the FlinkProfile object itself. - */ - public FlinkProfile withDeploymentMode(DeploymentMode deploymentMode) { - this.deploymentMode = deploymentMode; - return this; - } - - /** - * Get the jobSpec property: Job specifications for flink clusters in application deployment mode. The specification - * is immutable even if job properties are changed by calling the RunJob API, please use the ListJob API to get the - * latest job information. - * - * @return the jobSpec value. - */ - public FlinkJobProfile jobSpec() { - return this.jobSpec; - } - - /** - * Set the jobSpec property: Job specifications for flink clusters in application deployment mode. The specification - * is immutable even if job properties are changed by calling the RunJob API, please use the ListJob API to get the - * latest job information. - * - * @param jobSpec the jobSpec value to set. - * @return the FlinkProfile object itself. - */ - public FlinkProfile withJobSpec(FlinkJobProfile jobSpec) { - this.jobSpec = jobSpec; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storage() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property storage in model FlinkProfile")); - } else { - storage().validate(); - } - if (jobManager() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property jobManager in model FlinkProfile")); - } else { - jobManager().validate(); - } - if (historyServer() != null) { - historyServer().validate(); - } - if (taskManager() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property taskManager in model FlinkProfile")); - } else { - taskManager().validate(); - } - if (catalogOptions() != null) { - catalogOptions().validate(); - } - if (jobSpec() != null) { - jobSpec().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FlinkProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("storage", this.storage); - jsonWriter.writeJsonField("jobManager", this.jobManager); - jsonWriter.writeJsonField("taskManager", this.taskManager); - jsonWriter.writeNumberField("numReplicas", this.numReplicas); - jsonWriter.writeJsonField("historyServer", this.historyServer); - jsonWriter.writeJsonField("catalogOptions", this.catalogOptions); - jsonWriter.writeStringField("deploymentMode", - this.deploymentMode == null ? null : this.deploymentMode.toString()); - jsonWriter.writeJsonField("jobSpec", this.jobSpec); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FlinkProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FlinkProfile 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 FlinkProfile. - */ - public static FlinkProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FlinkProfile deserializedFlinkProfile = new FlinkProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("storage".equals(fieldName)) { - deserializedFlinkProfile.storage = FlinkStorageProfile.fromJson(reader); - } else if ("jobManager".equals(fieldName)) { - deserializedFlinkProfile.jobManager = ComputeResourceDefinition.fromJson(reader); - } else if ("taskManager".equals(fieldName)) { - deserializedFlinkProfile.taskManager = ComputeResourceDefinition.fromJson(reader); - } else if ("numReplicas".equals(fieldName)) { - deserializedFlinkProfile.numReplicas = reader.getNullable(JsonReader::getInt); - } else if ("historyServer".equals(fieldName)) { - deserializedFlinkProfile.historyServer = ComputeResourceDefinition.fromJson(reader); - } else if ("catalogOptions".equals(fieldName)) { - deserializedFlinkProfile.catalogOptions = FlinkCatalogOptions.fromJson(reader); - } else if ("deploymentMode".equals(fieldName)) { - deserializedFlinkProfile.deploymentMode = DeploymentMode.fromString(reader.getString()); - } else if ("jobSpec".equals(fieldName)) { - deserializedFlinkProfile.jobSpec = FlinkJobProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFlinkProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkStorageProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkStorageProfile.java deleted file mode 100644 index 86def0ff6daa..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkStorageProfile.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 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; - -/** - * The storage profile. - */ -@Fluent -public final class FlinkStorageProfile implements JsonSerializable { - /* - * Storage account uri which is used for savepoint and checkpoint state. - */ - private String storageUri; - - /* - * Storage key is only required for wasb(s) storage. - */ - private String storagekey; - - /** - * Creates an instance of FlinkStorageProfile class. - */ - public FlinkStorageProfile() { - } - - /** - * Get the storageUri property: Storage account uri which is used for savepoint and checkpoint state. - * - * @return the storageUri value. - */ - public String storageUri() { - return this.storageUri; - } - - /** - * Set the storageUri property: Storage account uri which is used for savepoint and checkpoint state. - * - * @param storageUri the storageUri value to set. - * @return the FlinkStorageProfile object itself. - */ - public FlinkStorageProfile withStorageUri(String storageUri) { - this.storageUri = storageUri; - return this; - } - - /** - * Get the storagekey property: Storage key is only required for wasb(s) storage. - * - * @return the storagekey value. - */ - public String storagekey() { - return this.storagekey; - } - - /** - * Set the storagekey property: Storage key is only required for wasb(s) storage. - * - * @param storagekey the storagekey value to set. - * @return the FlinkStorageProfile object itself. - */ - public FlinkStorageProfile withStoragekey(String storagekey) { - this.storagekey = storagekey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageUri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property storageUri in model FlinkStorageProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FlinkStorageProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("storageUri", this.storageUri); - jsonWriter.writeStringField("storagekey", this.storagekey); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FlinkStorageProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FlinkStorageProfile 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 FlinkStorageProfile. - */ - public static FlinkStorageProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FlinkStorageProfile deserializedFlinkStorageProfile = new FlinkStorageProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("storageUri".equals(fieldName)) { - deserializedFlinkStorageProfile.storageUri = reader.getString(); - } else if ("storagekey".equals(fieldName)) { - deserializedFlinkStorageProfile.storagekey = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFlinkStorageProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/HiveCatalogOption.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/HiveCatalogOption.java deleted file mode 100644 index 544133dfe2da..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/HiveCatalogOption.java +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) 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; - -/** - * Hive Catalog Option. - */ -@Fluent -public final class HiveCatalogOption implements JsonSerializable { - /* - * Name of trino catalog which should use specified hive metastore. - */ - private String catalogName; - - /* - * The authentication mode to connect to your Hive metastore database. More details: - * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and- - * authorization - */ - private MetastoreDbConnectionAuthenticationMode metastoreDbConnectionAuthenticationMode; - - /* - * Secret reference name from secretsProfile.secrets containing password for database connection. - */ - private String metastoreDbConnectionPasswordSecret; - - /* - * Connection string for hive metastore database. - */ - private String metastoreDbConnectionUrl; - - /* - * User name for database connection. - */ - private String metastoreDbConnectionUsername; - - /* - * Metastore root directory URI, format: abfs[s]://@.dfs.core.windows.net/. More - * details: https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction-abfs-uri - */ - private String metastoreWarehouseDir; - - /** - * Creates an instance of HiveCatalogOption class. - */ - public HiveCatalogOption() { - } - - /** - * Get the catalogName property: Name of trino catalog which should use specified hive metastore. - * - * @return the catalogName value. - */ - public String catalogName() { - return this.catalogName; - } - - /** - * Set the catalogName property: Name of trino catalog which should use specified hive metastore. - * - * @param catalogName the catalogName value to set. - * @return the HiveCatalogOption object itself. - */ - public HiveCatalogOption withCatalogName(String catalogName) { - this.catalogName = catalogName; - return this; - } - - /** - * Get the metastoreDbConnectionAuthenticationMode property: The authentication mode to connect to your Hive - * metastore database. More details: - * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. - * - * @return the metastoreDbConnectionAuthenticationMode value. - */ - public MetastoreDbConnectionAuthenticationMode metastoreDbConnectionAuthenticationMode() { - return this.metastoreDbConnectionAuthenticationMode; - } - - /** - * Set the metastoreDbConnectionAuthenticationMode property: The authentication mode to connect to your Hive - * metastore database. More details: - * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. - * - * @param metastoreDbConnectionAuthenticationMode the metastoreDbConnectionAuthenticationMode value to set. - * @return the HiveCatalogOption object itself. - */ - public HiveCatalogOption withMetastoreDbConnectionAuthenticationMode( - MetastoreDbConnectionAuthenticationMode metastoreDbConnectionAuthenticationMode) { - this.metastoreDbConnectionAuthenticationMode = metastoreDbConnectionAuthenticationMode; - return this; - } - - /** - * Get the metastoreDbConnectionPasswordSecret property: Secret reference name from secretsProfile.secrets - * containing password for database connection. - * - * @return the metastoreDbConnectionPasswordSecret value. - */ - public String metastoreDbConnectionPasswordSecret() { - return this.metastoreDbConnectionPasswordSecret; - } - - /** - * Set the metastoreDbConnectionPasswordSecret property: Secret reference name from secretsProfile.secrets - * containing password for database connection. - * - * @param metastoreDbConnectionPasswordSecret the metastoreDbConnectionPasswordSecret value to set. - * @return the HiveCatalogOption object itself. - */ - public HiveCatalogOption withMetastoreDbConnectionPasswordSecret(String metastoreDbConnectionPasswordSecret) { - this.metastoreDbConnectionPasswordSecret = metastoreDbConnectionPasswordSecret; - return this; - } - - /** - * Get the metastoreDbConnectionUrl property: Connection string for hive metastore database. - * - * @return the metastoreDbConnectionUrl value. - */ - public String metastoreDbConnectionUrl() { - return this.metastoreDbConnectionUrl; - } - - /** - * Set the metastoreDbConnectionUrl property: Connection string for hive metastore database. - * - * @param metastoreDbConnectionUrl the metastoreDbConnectionUrl value to set. - * @return the HiveCatalogOption object itself. - */ - public HiveCatalogOption withMetastoreDbConnectionUrl(String metastoreDbConnectionUrl) { - this.metastoreDbConnectionUrl = metastoreDbConnectionUrl; - return this; - } - - /** - * Get the metastoreDbConnectionUsername property: User name for database connection. - * - * @return the metastoreDbConnectionUsername value. - */ - public String metastoreDbConnectionUsername() { - return this.metastoreDbConnectionUsername; - } - - /** - * Set the metastoreDbConnectionUsername property: User name for database connection. - * - * @param metastoreDbConnectionUsername the metastoreDbConnectionUsername value to set. - * @return the HiveCatalogOption object itself. - */ - public HiveCatalogOption withMetastoreDbConnectionUsername(String metastoreDbConnectionUsername) { - this.metastoreDbConnectionUsername = metastoreDbConnectionUsername; - return this; - } - - /** - * Get the metastoreWarehouseDir property: Metastore root directory URI, format: - * abfs[s]://<container>@<account_name>.dfs.core.windows.net/<path>. More details: - * https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction-abfs-uri. - * - * @return the metastoreWarehouseDir value. - */ - public String metastoreWarehouseDir() { - return this.metastoreWarehouseDir; - } - - /** - * Set the metastoreWarehouseDir property: Metastore root directory URI, format: - * abfs[s]://<container>@<account_name>.dfs.core.windows.net/<path>. More details: - * https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction-abfs-uri. - * - * @param metastoreWarehouseDir the metastoreWarehouseDir value to set. - * @return the HiveCatalogOption object itself. - */ - public HiveCatalogOption withMetastoreWarehouseDir(String metastoreWarehouseDir) { - this.metastoreWarehouseDir = metastoreWarehouseDir; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (catalogName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property catalogName in model HiveCatalogOption")); - } - if (metastoreDbConnectionUrl() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metastoreDbConnectionUrl in model HiveCatalogOption")); - } - if (metastoreWarehouseDir() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metastoreWarehouseDir in model HiveCatalogOption")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(HiveCatalogOption.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("catalogName", this.catalogName); - jsonWriter.writeStringField("metastoreDbConnectionURL", this.metastoreDbConnectionUrl); - jsonWriter.writeStringField("metastoreWarehouseDir", this.metastoreWarehouseDir); - jsonWriter.writeStringField("metastoreDbConnectionAuthenticationMode", - this.metastoreDbConnectionAuthenticationMode == null - ? null - : this.metastoreDbConnectionAuthenticationMode.toString()); - jsonWriter.writeStringField("metastoreDbConnectionPasswordSecret", this.metastoreDbConnectionPasswordSecret); - jsonWriter.writeStringField("metastoreDbConnectionUserName", this.metastoreDbConnectionUsername); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HiveCatalogOption from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HiveCatalogOption 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 HiveCatalogOption. - */ - public static HiveCatalogOption fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HiveCatalogOption deserializedHiveCatalogOption = new HiveCatalogOption(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("catalogName".equals(fieldName)) { - deserializedHiveCatalogOption.catalogName = reader.getString(); - } else if ("metastoreDbConnectionURL".equals(fieldName)) { - deserializedHiveCatalogOption.metastoreDbConnectionUrl = reader.getString(); - } else if ("metastoreWarehouseDir".equals(fieldName)) { - deserializedHiveCatalogOption.metastoreWarehouseDir = reader.getString(); - } else if ("metastoreDbConnectionAuthenticationMode".equals(fieldName)) { - deserializedHiveCatalogOption.metastoreDbConnectionAuthenticationMode - = MetastoreDbConnectionAuthenticationMode.fromString(reader.getString()); - } else if ("metastoreDbConnectionPasswordSecret".equals(fieldName)) { - deserializedHiveCatalogOption.metastoreDbConnectionPasswordSecret = reader.getString(); - } else if ("metastoreDbConnectionUserName".equals(fieldName)) { - deserializedHiveCatalogOption.metastoreDbConnectionUsername = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHiveCatalogOption; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/IdentityProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/IdentityProfile.java deleted file mode 100644 index 1d576af037cb..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/IdentityProfile.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) 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; - -/** - * Identity Profile with details of an MSI. - */ -@Fluent -public class IdentityProfile implements JsonSerializable { - /* - * ResourceId of the MSI. - */ - private String msiResourceId; - - /* - * ClientId of the MSI. - */ - private String msiClientId; - - /* - * ObjectId of the MSI. - */ - private String msiObjectId; - - /** - * Creates an instance of IdentityProfile class. - */ - public IdentityProfile() { - } - - /** - * Get the msiResourceId property: ResourceId of the MSI. - * - * @return the msiResourceId value. - */ - public String msiResourceId() { - return this.msiResourceId; - } - - /** - * Set the msiResourceId property: ResourceId of the MSI. - * - * @param msiResourceId the msiResourceId value to set. - * @return the IdentityProfile object itself. - */ - public IdentityProfile withMsiResourceId(String msiResourceId) { - this.msiResourceId = msiResourceId; - return this; - } - - /** - * Get the msiClientId property: ClientId of the MSI. - * - * @return the msiClientId value. - */ - public String msiClientId() { - return this.msiClientId; - } - - /** - * Set the msiClientId property: ClientId of the MSI. - * - * @param msiClientId the msiClientId value to set. - * @return the IdentityProfile object itself. - */ - public IdentityProfile withMsiClientId(String msiClientId) { - this.msiClientId = msiClientId; - return this; - } - - /** - * Get the msiObjectId property: ObjectId of the MSI. - * - * @return the msiObjectId value. - */ - public String msiObjectId() { - return this.msiObjectId; - } - - /** - * Set the msiObjectId property: ObjectId of the MSI. - * - * @param msiObjectId the msiObjectId value to set. - * @return the IdentityProfile object itself. - */ - public IdentityProfile withMsiObjectId(String msiObjectId) { - this.msiObjectId = msiObjectId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (msiResourceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property msiResourceId in model IdentityProfile")); - } - if (msiClientId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property msiClientId in model IdentityProfile")); - } - if (msiObjectId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property msiObjectId in model IdentityProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IdentityProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("msiResourceId", this.msiResourceId); - jsonWriter.writeStringField("msiClientId", this.msiClientId); - jsonWriter.writeStringField("msiObjectId", this.msiObjectId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityProfile 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 IdentityProfile. - */ - public static IdentityProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityProfile deserializedIdentityProfile = new IdentityProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("msiResourceId".equals(fieldName)) { - deserializedIdentityProfile.msiResourceId = reader.getString(); - } else if ("msiClientId".equals(fieldName)) { - deserializedIdentityProfile.msiClientId = reader.getString(); - } else if ("msiObjectId".equals(fieldName)) { - deserializedIdentityProfile.msiObjectId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/IpTag.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/IpTag.java deleted file mode 100644 index eedda0d3a868..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/IpTag.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) 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; - -/** - * Contains the IpTag associated with the public IP address. - */ -@Fluent -public final class IpTag implements JsonSerializable { - /* - * Gets or sets the ipTag type: Example FirstPartyUsage. - */ - private String ipTagType; - - /* - * Gets or sets value of the IpTag associated with the public IP. Example HDInsight, SQL, Storage etc - */ - private String tag; - - /** - * Creates an instance of IpTag class. - */ - public IpTag() { - } - - /** - * Get the ipTagType property: Gets or sets the ipTag type: Example FirstPartyUsage. - * - * @return the ipTagType value. - */ - public String ipTagType() { - return this.ipTagType; - } - - /** - * Set the ipTagType property: Gets or sets the ipTag type: Example FirstPartyUsage. - * - * @param ipTagType the ipTagType value to set. - * @return the IpTag object itself. - */ - public IpTag withIpTagType(String ipTagType) { - this.ipTagType = ipTagType; - return this; - } - - /** - * Get the tag property: Gets or sets value of the IpTag associated with the public IP. Example HDInsight, SQL, - * Storage etc. - * - * @return the tag value. - */ - public String tag() { - return this.tag; - } - - /** - * Set the tag property: Gets or sets value of the IpTag associated with the public IP. Example HDInsight, SQL, - * Storage etc. - * - * @param tag the tag value to set. - * @return the IpTag object itself. - */ - public IpTag withTag(String tag) { - this.tag = tag; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (ipTagType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property ipTagType in model IpTag")); - } - if (tag() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property tag in model IpTag")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpTag.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("ipTagType", this.ipTagType); - jsonWriter.writeStringField("tag", this.tag); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpTag from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpTag 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 IpTag. - */ - public static IpTag fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpTag deserializedIpTag = new IpTag(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipTagType".equals(fieldName)) { - deserializedIpTag.ipTagType = reader.getString(); - } else if ("tag".equals(fieldName)) { - deserializedIpTag.tag = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIpTag; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/JobType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/JobType.java deleted file mode 100644 index d97b651bc9ab..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/JobType.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of cluster job. - */ -public final class JobType extends ExpandableStringEnum { - /** - * Static value FlinkJob for JobType. - */ - public static final JobType FLINK_JOB = fromString("FlinkJob"); - - /** - * Creates a new instance of JobType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobType() { - } - - /** - * Creates or finds a JobType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobType. - */ - public static JobType fromString(String name) { - return fromString(name, JobType.class); - } - - /** - * Gets known JobType values. - * - * @return known JobType values. - */ - public static Collection values() { - return values(JobType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaConnectivityEndpoints.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaConnectivityEndpoints.java deleted file mode 100644 index a0a60ee77950..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaConnectivityEndpoints.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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 java.io.IOException; -import java.util.List; - -/** - * Kafka bootstrap server and broker related connectivity endpoints. - */ -@Fluent -public final class KafkaConnectivityEndpoints implements JsonSerializable { - /* - * bootstrap server connectivity endpoint. - */ - private String bootstrapServerEndpoint; - - /* - * Kafka broker endpoint list. - */ - private List brokerEndpoints; - - /** - * Creates an instance of KafkaConnectivityEndpoints class. - */ - public KafkaConnectivityEndpoints() { - } - - /** - * Get the bootstrapServerEndpoint property: bootstrap server connectivity endpoint. - * - * @return the bootstrapServerEndpoint value. - */ - public String bootstrapServerEndpoint() { - return this.bootstrapServerEndpoint; - } - - /** - * Set the bootstrapServerEndpoint property: bootstrap server connectivity endpoint. - * - * @param bootstrapServerEndpoint the bootstrapServerEndpoint value to set. - * @return the KafkaConnectivityEndpoints object itself. - */ - public KafkaConnectivityEndpoints withBootstrapServerEndpoint(String bootstrapServerEndpoint) { - this.bootstrapServerEndpoint = bootstrapServerEndpoint; - return this; - } - - /** - * Get the brokerEndpoints property: Kafka broker endpoint list. - * - * @return the brokerEndpoints value. - */ - public List brokerEndpoints() { - return this.brokerEndpoints; - } - - /** - * Set the brokerEndpoints property: Kafka broker endpoint list. - * - * @param brokerEndpoints the brokerEndpoints value to set. - * @return the KafkaConnectivityEndpoints object itself. - */ - public KafkaConnectivityEndpoints withBrokerEndpoints(List brokerEndpoints) { - this.brokerEndpoints = brokerEndpoints; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("bootstrapServerEndpoint", this.bootstrapServerEndpoint); - jsonWriter.writeArrayField("brokerEndpoints", this.brokerEndpoints, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KafkaConnectivityEndpoints from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KafkaConnectivityEndpoints 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 KafkaConnectivityEndpoints. - */ - public static KafkaConnectivityEndpoints fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KafkaConnectivityEndpoints deserializedKafkaConnectivityEndpoints = new KafkaConnectivityEndpoints(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("bootstrapServerEndpoint".equals(fieldName)) { - deserializedKafkaConnectivityEndpoints.bootstrapServerEndpoint = reader.getString(); - } else if ("brokerEndpoints".equals(fieldName)) { - List brokerEndpoints = reader.readArray(reader1 -> reader1.getString()); - deserializedKafkaConnectivityEndpoints.brokerEndpoints = brokerEndpoints; - } else { - reader.skipChildren(); - } - } - - return deserializedKafkaConnectivityEndpoints; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaProfile.java deleted file mode 100644 index adde24165fe0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaProfile.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) 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; - -/** - * The Kafka cluster profile. - */ -@Fluent -public final class KafkaProfile implements JsonSerializable { - /* - * Expose Kafka cluster in KRaft mode. - */ - private Boolean enableKRaft; - - /* - * Expose worker nodes as public endpoints. - */ - private Boolean enablePublicEndpoints; - - /* - * Fully qualified path of Azure Storage container used for Tiered Storage. - */ - private String remoteStorageUri; - - /* - * Kafka disk storage profile. - */ - private DiskStorageProfile diskStorage; - - /* - * Kafka bootstrap server and brokers related connectivity endpoints. - */ - private KafkaConnectivityEndpoints connectivityEndpoints; - - /** - * Creates an instance of KafkaProfile class. - */ - public KafkaProfile() { - } - - /** - * Get the enableKRaft property: Expose Kafka cluster in KRaft mode. - * - * @return the enableKRaft value. - */ - public Boolean enableKRaft() { - return this.enableKRaft; - } - - /** - * Set the enableKRaft property: Expose Kafka cluster in KRaft mode. - * - * @param enableKRaft the enableKRaft value to set. - * @return the KafkaProfile object itself. - */ - public KafkaProfile withEnableKRaft(Boolean enableKRaft) { - this.enableKRaft = enableKRaft; - return this; - } - - /** - * Get the enablePublicEndpoints property: Expose worker nodes as public endpoints. - * - * @return the enablePublicEndpoints value. - */ - public Boolean enablePublicEndpoints() { - return this.enablePublicEndpoints; - } - - /** - * Set the enablePublicEndpoints property: Expose worker nodes as public endpoints. - * - * @param enablePublicEndpoints the enablePublicEndpoints value to set. - * @return the KafkaProfile object itself. - */ - public KafkaProfile withEnablePublicEndpoints(Boolean enablePublicEndpoints) { - this.enablePublicEndpoints = enablePublicEndpoints; - return this; - } - - /** - * Get the remoteStorageUri property: Fully qualified path of Azure Storage container used for Tiered Storage. - * - * @return the remoteStorageUri value. - */ - public String remoteStorageUri() { - return this.remoteStorageUri; - } - - /** - * Set the remoteStorageUri property: Fully qualified path of Azure Storage container used for Tiered Storage. - * - * @param remoteStorageUri the remoteStorageUri value to set. - * @return the KafkaProfile object itself. - */ - public KafkaProfile withRemoteStorageUri(String remoteStorageUri) { - this.remoteStorageUri = remoteStorageUri; - return this; - } - - /** - * Get the diskStorage property: Kafka disk storage profile. - * - * @return the diskStorage value. - */ - public DiskStorageProfile diskStorage() { - return this.diskStorage; - } - - /** - * Set the diskStorage property: Kafka disk storage profile. - * - * @param diskStorage the diskStorage value to set. - * @return the KafkaProfile object itself. - */ - public KafkaProfile withDiskStorage(DiskStorageProfile diskStorage) { - this.diskStorage = diskStorage; - return this; - } - - /** - * Get the connectivityEndpoints property: Kafka bootstrap server and brokers related connectivity endpoints. - * - * @return the connectivityEndpoints value. - */ - public KafkaConnectivityEndpoints connectivityEndpoints() { - return this.connectivityEndpoints; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (diskStorage() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property diskStorage in model KafkaProfile")); - } else { - diskStorage().validate(); - } - if (connectivityEndpoints() != null) { - connectivityEndpoints().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KafkaProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("diskStorage", this.diskStorage); - jsonWriter.writeBooleanField("enableKRaft", this.enableKRaft); - jsonWriter.writeBooleanField("enablePublicEndpoints", this.enablePublicEndpoints); - jsonWriter.writeStringField("remoteStorageUri", this.remoteStorageUri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KafkaProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KafkaProfile 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 KafkaProfile. - */ - public static KafkaProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KafkaProfile deserializedKafkaProfile = new KafkaProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("diskStorage".equals(fieldName)) { - deserializedKafkaProfile.diskStorage = DiskStorageProfile.fromJson(reader); - } else if ("enableKRaft".equals(fieldName)) { - deserializedKafkaProfile.enableKRaft = reader.getNullable(JsonReader::getBoolean); - } else if ("enablePublicEndpoints".equals(fieldName)) { - deserializedKafkaProfile.enablePublicEndpoints = reader.getNullable(JsonReader::getBoolean); - } else if ("remoteStorageUri".equals(fieldName)) { - deserializedKafkaProfile.remoteStorageUri = reader.getString(); - } else if ("connectivityEndpoints".equals(fieldName)) { - deserializedKafkaProfile.connectivityEndpoints = KafkaConnectivityEndpoints.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedKafkaProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KeyVaultObjectType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KeyVaultObjectType.java deleted file mode 100644 index f764e0a5f115..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KeyVaultObjectType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of key vault object: secret, key or certificate. - */ -public final class KeyVaultObjectType extends ExpandableStringEnum { - /** - * Static value Key for KeyVaultObjectType. - */ - public static final KeyVaultObjectType KEY = fromString("Key"); - - /** - * Static value Secret for KeyVaultObjectType. - */ - public static final KeyVaultObjectType SECRET = fromString("Secret"); - - /** - * Static value Certificate for KeyVaultObjectType. - */ - public static final KeyVaultObjectType CERTIFICATE = fromString("Certificate"); - - /** - * Creates a new instance of KeyVaultObjectType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public KeyVaultObjectType() { - } - - /** - * Creates or finds a KeyVaultObjectType from its string representation. - * - * @param name a name to look for. - * @return the corresponding KeyVaultObjectType. - */ - public static KeyVaultObjectType fromString(String name) { - return fromString(name, KeyVaultObjectType.class); - } - - /** - * Gets known KeyVaultObjectType values. - * - * @return known KeyVaultObjectType values. - */ - public static Collection values() { - return values(KeyVaultObjectType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/LibraryManagementAction.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/LibraryManagementAction.java deleted file mode 100644 index fca095d77c70..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/LibraryManagementAction.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The library management action. - */ -public final class LibraryManagementAction extends ExpandableStringEnum { - /** - * Static value Install for LibraryManagementAction. - */ - public static final LibraryManagementAction INSTALL = fromString("Install"); - - /** - * Static value Uninstall for LibraryManagementAction. - */ - public static final LibraryManagementAction UNINSTALL = fromString("Uninstall"); - - /** - * Creates a new instance of LibraryManagementAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LibraryManagementAction() { - } - - /** - * Creates or finds a LibraryManagementAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding LibraryManagementAction. - */ - public static LibraryManagementAction fromString(String name) { - return fromString(name, LibraryManagementAction.class); - } - - /** - * Gets known LibraryManagementAction values. - * - * @return known LibraryManagementAction values. - */ - public static Collection values() { - return values(LibraryManagementAction.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/LoadBasedConfig.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/LoadBasedConfig.java deleted file mode 100644 index 4fa6158b4425..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/LoadBasedConfig.java +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * Profile of load based Autoscale. - */ -@Fluent -public final class LoadBasedConfig implements JsonSerializable { - /* - * User needs to set the minimum number of nodes for load based scaling, the load based scaling will use this to - * scale up and scale down between minimum and maximum number of nodes. - */ - private int minNodes; - - /* - * User needs to set the maximum number of nodes for load based scaling, the load based scaling will use this to - * scale up and scale down between minimum and maximum number of nodes. - */ - private int maxNodes; - - /* - * User can specify the poll interval, this is the time period (in seconds) after which scaling metrics are polled - * for triggering a scaling operation. - */ - private Integer pollInterval; - - /* - * This is a cool down period, this is a time period in seconds, which determines the amount of time that must - * elapse between a scaling activity started by a rule and the start of the next scaling activity, regardless of the - * rule that triggers it. The default value is 300 seconds. - */ - private Integer cooldownPeriod; - - /* - * The scaling rules. - */ - private List scalingRules; - - /** - * Creates an instance of LoadBasedConfig class. - */ - public LoadBasedConfig() { - } - - /** - * Get the minNodes property: User needs to set the minimum number of nodes for load based scaling, the load based - * scaling will use this to scale up and scale down between minimum and maximum number of nodes. - * - * @return the minNodes value. - */ - public int minNodes() { - return this.minNodes; - } - - /** - * Set the minNodes property: User needs to set the minimum number of nodes for load based scaling, the load based - * scaling will use this to scale up and scale down between minimum and maximum number of nodes. - * - * @param minNodes the minNodes value to set. - * @return the LoadBasedConfig object itself. - */ - public LoadBasedConfig withMinNodes(int minNodes) { - this.minNodes = minNodes; - return this; - } - - /** - * Get the maxNodes property: User needs to set the maximum number of nodes for load based scaling, the load based - * scaling will use this to scale up and scale down between minimum and maximum number of nodes. - * - * @return the maxNodes value. - */ - public int maxNodes() { - return this.maxNodes; - } - - /** - * Set the maxNodes property: User needs to set the maximum number of nodes for load based scaling, the load based - * scaling will use this to scale up and scale down between minimum and maximum number of nodes. - * - * @param maxNodes the maxNodes value to set. - * @return the LoadBasedConfig object itself. - */ - public LoadBasedConfig withMaxNodes(int maxNodes) { - this.maxNodes = maxNodes; - return this; - } - - /** - * Get the pollInterval property: User can specify the poll interval, this is the time period (in seconds) after - * which scaling metrics are polled for triggering a scaling operation. - * - * @return the pollInterval value. - */ - public Integer pollInterval() { - return this.pollInterval; - } - - /** - * Set the pollInterval property: User can specify the poll interval, this is the time period (in seconds) after - * which scaling metrics are polled for triggering a scaling operation. - * - * @param pollInterval the pollInterval value to set. - * @return the LoadBasedConfig object itself. - */ - public LoadBasedConfig withPollInterval(Integer pollInterval) { - this.pollInterval = pollInterval; - return this; - } - - /** - * Get the cooldownPeriod property: This is a cool down period, this is a time period in seconds, which determines - * the amount of time that must elapse between a scaling activity started by a rule and the start of the next - * scaling activity, regardless of the rule that triggers it. The default value is 300 seconds. - * - * @return the cooldownPeriod value. - */ - public Integer cooldownPeriod() { - return this.cooldownPeriod; - } - - /** - * Set the cooldownPeriod property: This is a cool down period, this is a time period in seconds, which determines - * the amount of time that must elapse between a scaling activity started by a rule and the start of the next - * scaling activity, regardless of the rule that triggers it. The default value is 300 seconds. - * - * @param cooldownPeriod the cooldownPeriod value to set. - * @return the LoadBasedConfig object itself. - */ - public LoadBasedConfig withCooldownPeriod(Integer cooldownPeriod) { - this.cooldownPeriod = cooldownPeriod; - return this; - } - - /** - * Get the scalingRules property: The scaling rules. - * - * @return the scalingRules value. - */ - public List scalingRules() { - return this.scalingRules; - } - - /** - * Set the scalingRules property: The scaling rules. - * - * @param scalingRules the scalingRules value to set. - * @return the LoadBasedConfig object itself. - */ - public LoadBasedConfig withScalingRules(List scalingRules) { - this.scalingRules = scalingRules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scalingRules() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property scalingRules in model LoadBasedConfig")); - } else { - scalingRules().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LoadBasedConfig.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("minNodes", this.minNodes); - jsonWriter.writeIntField("maxNodes", this.maxNodes); - jsonWriter.writeArrayField("scalingRules", this.scalingRules, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeNumberField("pollInterval", this.pollInterval); - jsonWriter.writeNumberField("cooldownPeriod", this.cooldownPeriod); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LoadBasedConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LoadBasedConfig 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 LoadBasedConfig. - */ - public static LoadBasedConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LoadBasedConfig deserializedLoadBasedConfig = new LoadBasedConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("minNodes".equals(fieldName)) { - deserializedLoadBasedConfig.minNodes = reader.getInt(); - } else if ("maxNodes".equals(fieldName)) { - deserializedLoadBasedConfig.maxNodes = reader.getInt(); - } else if ("scalingRules".equals(fieldName)) { - List scalingRules = reader.readArray(reader1 -> ScalingRule.fromJson(reader1)); - deserializedLoadBasedConfig.scalingRules = scalingRules; - } else if ("pollInterval".equals(fieldName)) { - deserializedLoadBasedConfig.pollInterval = reader.getNullable(JsonReader::getInt); - } else if ("cooldownPeriod".equals(fieldName)) { - deserializedLoadBasedConfig.cooldownPeriod = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedLoadBasedConfig; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Locations.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Locations.java deleted file mode 100644 index a8233fbe4794..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Locations.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Locations. - */ -public interface Locations { - /** - * Check the availability of the resource name. - * - * @param location The name of the Azure region. - * @param nameAvailabilityParameters The name and type of the resource. - * @param context The context to associate with this operation. - * @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 result of check name availability along with {@link Response}. - */ - Response checkNameAvailabilityWithResponse(String location, - NameAvailabilityParameters nameAvailabilityParameters, Context context); - - /** - * Check the availability of the resource name. - * - * @param location The name of the Azure region. - * @param nameAvailabilityParameters The name and type of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 result of check name availability. - */ - NameAvailabilityResult checkNameAvailability(String location, - NameAvailabilityParameters nameAvailabilityParameters); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ManagedIdentityProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ManagedIdentityProfile.java deleted file mode 100644 index d9aeda07c8be..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ManagedIdentityProfile.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * The details of managed identity. - */ -@Fluent -public final class ManagedIdentityProfile implements JsonSerializable { - /* - * The list of managed identity. - */ - private List identityList; - - /** - * Creates an instance of ManagedIdentityProfile class. - */ - public ManagedIdentityProfile() { - } - - /** - * Get the identityList property: The list of managed identity. - * - * @return the identityList value. - */ - public List identityList() { - return this.identityList; - } - - /** - * Set the identityList property: The list of managed identity. - * - * @param identityList the identityList value to set. - * @return the ManagedIdentityProfile object itself. - */ - public ManagedIdentityProfile withIdentityList(List identityList) { - this.identityList = identityList; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identityList() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property identityList in model ManagedIdentityProfile")); - } else { - identityList().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedIdentityProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("identityList", this.identityList, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedIdentityProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedIdentityProfile 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 ManagedIdentityProfile. - */ - public static ManagedIdentityProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedIdentityProfile deserializedManagedIdentityProfile = new ManagedIdentityProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("identityList".equals(fieldName)) { - List identityList - = reader.readArray(reader1 -> ManagedIdentitySpec.fromJson(reader1)); - deserializedManagedIdentityProfile.identityList = identityList; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedIdentityProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ManagedIdentitySpec.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ManagedIdentitySpec.java deleted file mode 100644 index aa2173d8dbf1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ManagedIdentitySpec.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) 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; - -/** - * The details of a managed identity. - */ -@Fluent -public final class ManagedIdentitySpec implements JsonSerializable { - /* - * The type of managed identity. - */ - private ManagedIdentityType type; - - /* - * ResourceId of the managed identity. - */ - private String resourceId; - - /* - * ClientId of the managed identity. - */ - private String clientId; - - /* - * ObjectId of the managed identity. - */ - private String objectId; - - /** - * Creates an instance of ManagedIdentitySpec class. - */ - public ManagedIdentitySpec() { - } - - /** - * Get the type property: The type of managed identity. - * - * @return the type value. - */ - public ManagedIdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of managed identity. - * - * @param type the type value to set. - * @return the ManagedIdentitySpec object itself. - */ - public ManagedIdentitySpec withType(ManagedIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the resourceId property: ResourceId of the managed identity. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: ResourceId of the managed identity. - * - * @param resourceId the resourceId value to set. - * @return the ManagedIdentitySpec object itself. - */ - public ManagedIdentitySpec withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the clientId property: ClientId of the managed identity. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: ClientId of the managed identity. - * - * @param clientId the clientId value to set. - * @return the ManagedIdentitySpec object itself. - */ - public ManagedIdentitySpec withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the objectId property: ObjectId of the managed identity. - * - * @return the objectId value. - */ - public String objectId() { - return this.objectId; - } - - /** - * Set the objectId property: ObjectId of the managed identity. - * - * @param objectId the objectId value to set. - * @return the ManagedIdentitySpec object itself. - */ - public ManagedIdentitySpec withObjectId(String objectId) { - this.objectId = objectId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model ManagedIdentitySpec")); - } - if (resourceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property resourceId in model ManagedIdentitySpec")); - } - if (clientId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property clientId in model ManagedIdentitySpec")); - } - if (objectId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property objectId in model ManagedIdentitySpec")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedIdentitySpec.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("resourceId", this.resourceId); - jsonWriter.writeStringField("clientId", this.clientId); - jsonWriter.writeStringField("objectId", this.objectId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedIdentitySpec from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedIdentitySpec 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 ManagedIdentitySpec. - */ - public static ManagedIdentitySpec fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedIdentitySpec deserializedManagedIdentitySpec = new ManagedIdentitySpec(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedManagedIdentitySpec.type = ManagedIdentityType.fromString(reader.getString()); - } else if ("resourceId".equals(fieldName)) { - deserializedManagedIdentitySpec.resourceId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedManagedIdentitySpec.clientId = reader.getString(); - } else if ("objectId".equals(fieldName)) { - deserializedManagedIdentitySpec.objectId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedIdentitySpec; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ManagedIdentityType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ManagedIdentityType.java deleted file mode 100644 index 3bc604c2c841..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ManagedIdentityType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of managed identity. - */ -public final class ManagedIdentityType extends ExpandableStringEnum { - /** - * Static value cluster for ManagedIdentityType. - */ - public static final ManagedIdentityType CLUSTER = fromString("cluster"); - - /** - * Static value user for ManagedIdentityType. - */ - public static final ManagedIdentityType USER = fromString("user"); - - /** - * Static value internal for ManagedIdentityType. - */ - public static final ManagedIdentityType INTERNAL = fromString("internal"); - - /** - * Creates a new instance of ManagedIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedIdentityType() { - } - - /** - * Creates or finds a ManagedIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedIdentityType. - */ - public static ManagedIdentityType fromString(String name) { - return fromString(name, ManagedIdentityType.class); - } - - /** - * Gets known ManagedIdentityType values. - * - * @return known ManagedIdentityType values. - */ - public static Collection values() { - return values(ManagedIdentityType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/MavenLibraryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/MavenLibraryProperties.java deleted file mode 100644 index a2deb2148320..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/MavenLibraryProperties.java +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) 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.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Properties of a Maven library in the cluster. - */ -@Fluent -public final class MavenLibraryProperties extends ClusterLibraryProperties { - /* - * Type of the library. - */ - private Type type = Type.MAVEN; - - /* - * GroupId of the Maven package. - */ - private String groupId; - - /* - * ArtifactId of the Maven package. - */ - private String name; - - /* - * Version of the Maven package. - */ - private String version; - - /* - * Timestamp of the latest library management operation. - */ - private OffsetDateTime timestamp; - - /* - * Status of the library. - */ - private Status status; - - /* - * Error message of the library operation when a failure occurs. - */ - private String message; - - /** - * Creates an instance of MavenLibraryProperties class. - */ - public MavenLibraryProperties() { - } - - /** - * Get the type property: Type of the library. - * - * @return the type value. - */ - @Override - public Type type() { - return this.type; - } - - /** - * Get the groupId property: GroupId of the Maven package. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Set the groupId property: GroupId of the Maven package. - * - * @param groupId the groupId value to set. - * @return the MavenLibraryProperties object itself. - */ - public MavenLibraryProperties withGroupId(String groupId) { - this.groupId = groupId; - return this; - } - - /** - * Get the name property: ArtifactId of the Maven package. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: ArtifactId of the Maven package. - * - * @param name the name value to set. - * @return the MavenLibraryProperties object itself. - */ - public MavenLibraryProperties withName(String name) { - this.name = name; - return this; - } - - /** - * Get the version property: Version of the Maven package. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version of the Maven package. - * - * @param version the version value to set. - * @return the MavenLibraryProperties object itself. - */ - public MavenLibraryProperties withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the timestamp property: Timestamp of the latest library management operation. - * - * @return the timestamp value. - */ - @Override - public OffsetDateTime timestamp() { - return this.timestamp; - } - - /** - * Get the status property: Status of the library. - * - * @return the status value. - */ - @Override - public Status status() { - return this.status; - } - - /** - * Get the message property: Error message of the library operation when a failure occurs. - * - * @return the message value. - */ - @Override - public String message() { - return this.message; - } - - /** - * {@inheritDoc} - */ - @Override - public MavenLibraryProperties withRemarks(String remarks) { - super.withRemarks(remarks); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (groupId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property groupId in model MavenLibraryProperties")); - } - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model MavenLibraryProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MavenLibraryProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("remarks", remarks()); - jsonWriter.writeStringField("groupId", this.groupId); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("version", this.version); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MavenLibraryProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MavenLibraryProperties 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 MavenLibraryProperties. - */ - public static MavenLibraryProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MavenLibraryProperties deserializedMavenLibraryProperties = new MavenLibraryProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("remarks".equals(fieldName)) { - deserializedMavenLibraryProperties.withRemarks(reader.getString()); - } else if ("timestamp".equals(fieldName)) { - deserializedMavenLibraryProperties.timestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("status".equals(fieldName)) { - deserializedMavenLibraryProperties.status = Status.fromString(reader.getString()); - } else if ("message".equals(fieldName)) { - deserializedMavenLibraryProperties.message = reader.getString(); - } else if ("groupId".equals(fieldName)) { - deserializedMavenLibraryProperties.groupId = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedMavenLibraryProperties.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedMavenLibraryProperties.type = Type.fromString(reader.getString()); - } else if ("version".equals(fieldName)) { - deserializedMavenLibraryProperties.version = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMavenLibraryProperties; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/MetastoreDbConnectionAuthenticationMode.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/MetastoreDbConnectionAuthenticationMode.java deleted file mode 100644 index 15f9410ebfdd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/MetastoreDbConnectionAuthenticationMode.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The authentication mode to connect to your Hive metastore database. More details: - * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. - */ -public final class MetastoreDbConnectionAuthenticationMode - extends ExpandableStringEnum { - /** - * Static value SqlAuth for MetastoreDbConnectionAuthenticationMode. - */ - public static final MetastoreDbConnectionAuthenticationMode SQL_AUTH = fromString("SqlAuth"); - - /** - * Static value IdentityAuth for MetastoreDbConnectionAuthenticationMode. - */ - public static final MetastoreDbConnectionAuthenticationMode IDENTITY_AUTH = fromString("IdentityAuth"); - - /** - * Creates a new instance of MetastoreDbConnectionAuthenticationMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MetastoreDbConnectionAuthenticationMode() { - } - - /** - * Creates or finds a MetastoreDbConnectionAuthenticationMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding MetastoreDbConnectionAuthenticationMode. - */ - public static MetastoreDbConnectionAuthenticationMode fromString(String name) { - return fromString(name, MetastoreDbConnectionAuthenticationMode.class); - } - - /** - * Gets known MetastoreDbConnectionAuthenticationMode values. - * - * @return known MetastoreDbConnectionAuthenticationMode values. - */ - public static Collection values() { - return values(MetastoreDbConnectionAuthenticationMode.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityParameters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityParameters.java deleted file mode 100644 index 0964bdedf96d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityParameters.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Details of check name availability request body. - */ -@Fluent -public final class NameAvailabilityParameters implements JsonSerializable { - /* - * Name for checking availability. - */ - private String name; - - /* - * The resource type in Microsoft.HDInsight. - */ - private String type; - - /** - * Creates an instance of NameAvailabilityParameters class. - */ - public NameAvailabilityParameters() { - } - - /** - * Get the name property: Name for checking availability. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name for checking availability. - * - * @param name the name value to set. - * @return the NameAvailabilityParameters object itself. - */ - public NameAvailabilityParameters withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The resource type in Microsoft.HDInsight. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: The resource type in Microsoft.HDInsight. - * - * @param type the type value to set. - * @return the NameAvailabilityParameters object itself. - */ - public NameAvailabilityParameters withType(String type) { - this.type = type; - 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("name", this.name); - jsonWriter.writeStringField("type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NameAvailabilityParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NameAvailabilityParameters 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 NameAvailabilityParameters. - */ - public static NameAvailabilityParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NameAvailabilityParameters deserializedNameAvailabilityParameters = new NameAvailabilityParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedNameAvailabilityParameters.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedNameAvailabilityParameters.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNameAvailabilityParameters; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityResult.java deleted file mode 100644 index 67b28e3b0ba7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityResult.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner; - -/** - * An immutable client-side representation of NameAvailabilityResult. - */ -public interface NameAvailabilityResult { - /** - * Gets the nameAvailable property: Indicator of availability of the Microsoft.HDInsight resource name. - * - * @return the nameAvailable value. - */ - Boolean nameAvailable(); - - /** - * Gets the reason property: The reason of unavailability. - * - * @return the reason value. - */ - String reason(); - - /** - * Gets the message property: The error message of unavailability. - * - * @return the message value. - */ - String message(); - - /** - * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner object. - * - * @return the inner object. - */ - NameAvailabilityResultInner innerModel(); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NodeProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NodeProfile.java deleted file mode 100644 index 3ae941ba9639..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NodeProfile.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) 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; - -/** - * The node profile. - */ -@Fluent -public final class NodeProfile implements JsonSerializable { - /* - * The node type. - */ - private String type; - - /* - * The virtual machine SKU. - */ - private String vmSize; - - /* - * The number of virtual machines. - */ - private int count; - - /** - * Creates an instance of NodeProfile class. - */ - public NodeProfile() { - } - - /** - * Get the type property: The node type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: The node type. - * - * @param type the type value to set. - * @return the NodeProfile object itself. - */ - public NodeProfile withType(String type) { - this.type = type; - return this; - } - - /** - * Get the vmSize property: The virtual machine SKU. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: The virtual machine SKU. - * - * @param vmSize the vmSize value to set. - * @return the NodeProfile object itself. - */ - public NodeProfile withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the count property: The number of virtual machines. - * - * @return the count value. - */ - public int count() { - return this.count; - } - - /** - * Set the count property: The number of virtual machines. - * - * @param count the count value to set. - * @return the NodeProfile object itself. - */ - public NodeProfile withCount(int count) { - this.count = count; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model NodeProfile")); - } - if (vmSize() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property vmSize in model NodeProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NodeProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeStringField("vmSize", this.vmSize); - jsonWriter.writeIntField("count", this.count); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NodeProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NodeProfile 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 NodeProfile. - */ - public static NodeProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NodeProfile deserializedNodeProfile = new NodeProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedNodeProfile.type = reader.getString(); - } else if ("vmSize".equals(fieldName)) { - deserializedNodeProfile.vmSize = reader.getString(); - } else if ("count".equals(fieldName)) { - deserializedNodeProfile.count = reader.getInt(); - } else { - reader.skipChildren(); - } - } - - return deserializedNodeProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operation.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operation.java deleted file mode 100644 index 6ff030318479..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operation.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.resourcemanager.hdinsight.containers.fluent.models.OperationInner; - -/** - * An immutable client-side representation of Operation. - */ -public interface Operation { - /** - * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * - * @return the name value. - */ - String name(); - - /** - * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the display property: Localized display information for this particular operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and - * audit logs UX. Default value is "user,system". - * - * @return the origin value. - */ - Origin origin(); - - /** - * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. - * - * @return the actionType value. - */ - ActionType actionType(); - - /** - * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationDisplay.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationDisplay.java deleted file mode 100644 index 4cda8f158bb4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationDisplay.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Localized display information for this particular operation. - */ -@Immutable -public final class OperationDisplay implements JsonSerializable { - /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or - * "Microsoft Compute". - */ - private String provider; - - /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or - * "Job Schedule Collections". - */ - private String resource; - - /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - */ - private String operation; - - /* - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - */ - private String description; - - /** - * Creates an instance of OperationDisplay class. - */ - public OperationDisplay() { - } - - /** - * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring - * Insights" or "Microsoft Compute". - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. - * "Virtual Machines" or "Job Schedule Collections". - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. - * "Create or Update Virtual Machine", "Restart Virtual Machine". - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the description property: The short, localized friendly description of the operation; suitable for tool tips - * and detailed views. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDisplay from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDisplay 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 OperationDisplay. - */ - public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDisplay deserializedOperationDisplay = new OperationDisplay(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedOperationDisplay.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationDisplay.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedOperationDisplay.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDisplay.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDisplay; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationListResult.java deleted file mode 100644 index 932f2e7bae0c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationListResult.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.annotation.Immutable; -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.OperationInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. - */ -@Immutable -public final class OperationListResult implements JsonSerializable { - /* - * List of operations supported by the resource provider - */ - private List value; - - /* - * URL to get the next set of operation list results (if there are any). - */ - private String nextLink; - - /** - * Creates an instance of OperationListResult class. - */ - public OperationListResult() { - } - - /** - * Get the value property: List of operations supported by the resource provider. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationListResult 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 OperationListResult. - */ - public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationListResult deserializedOperationListResult = new OperationListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); - deserializedOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationListResult; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operations.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operations.java deleted file mode 100644 index 31648e4e0225..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operations.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of Operations. - */ -public interface Operations { - /** - * Returns list of operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Returns list of operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Origin.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Origin.java deleted file mode 100644 index 80cf1334618e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Origin.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value - * is "user,system". - */ -public final class Origin extends ExpandableStringEnum { - /** - * Static value user for Origin. - */ - public static final Origin USER = fromString("user"); - - /** - * Static value system for Origin. - */ - public static final Origin SYSTEM = fromString("system"); - - /** - * Static value user,system for Origin. - */ - public static final Origin USER_SYSTEM = fromString("user,system"); - - /** - * Creates a new instance of Origin value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Origin() { - } - - /** - * Creates or finds a Origin from its string representation. - * - * @param name a name to look for. - * @return the corresponding Origin. - */ - public static Origin fromString(String name) { - return fromString(name, Origin.class); - } - - /** - * Gets known Origin values. - * - * @return known Origin values. - */ - public static Collection values() { - return values(Origin.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OutboundType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OutboundType.java deleted file mode 100644 index 982e8bcb633d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OutboundType.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The outbound (egress) routing method. - * - * This can only be set at cluster pool creation time and cannot be changed later. - */ -public final class OutboundType extends ExpandableStringEnum { - /** - * Static value loadBalancer for OutboundType. - */ - public static final OutboundType LOAD_BALANCER = fromString("loadBalancer"); - - /** - * Static value userDefinedRouting for OutboundType. - */ - public static final OutboundType USER_DEFINED_ROUTING = fromString("userDefinedRouting"); - - /** - * Creates a new instance of OutboundType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OutboundType() { - } - - /** - * Creates or finds a OutboundType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OutboundType. - */ - public static OutboundType fromString(String name) { - return fromString(name, OutboundType.class); - } - - /** - * Gets known OutboundType values. - * - * @return known OutboundType values. - */ - public static Collection values() { - return values(OutboundType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ProvisioningStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ProvisioningStatus.java deleted file mode 100644 index a9677fc9d66b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ProvisioningStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state of the resource. - */ -public final class ProvisioningStatus extends ExpandableStringEnum { - /** - * Static value Accepted for ProvisioningStatus. - */ - public static final ProvisioningStatus ACCEPTED = fromString("Accepted"); - - /** - * Static value Succeeded for ProvisioningStatus. - */ - public static final ProvisioningStatus SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Canceled for ProvisioningStatus. - */ - public static final ProvisioningStatus CANCELED = fromString("Canceled"); - - /** - * Static value Failed for ProvisioningStatus. - */ - public static final ProvisioningStatus FAILED = fromString("Failed"); - - /** - * Creates a new instance of ProvisioningStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ProvisioningStatus() { - } - - /** - * Creates or finds a ProvisioningStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningStatus. - */ - public static ProvisioningStatus fromString(String name) { - return fromString(name, ProvisioningStatus.class); - } - - /** - * Gets known ProvisioningStatus values. - * - * @return known ProvisioningStatus values. - */ - public static Collection values() { - return values(ProvisioningStatus.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/PyPiLibraryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/PyPiLibraryProperties.java deleted file mode 100644 index ad0c7df477a2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/PyPiLibraryProperties.java +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) 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.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Properties of a PyPi library in the cluster. - */ -@Fluent -public final class PyPiLibraryProperties extends ClusterLibraryProperties { - /* - * Type of the library. - */ - private Type type = Type.PYPI; - - /* - * Name of the PyPi package. - */ - private String name; - - /* - * Version of the PyPi package. - */ - private String version; - - /* - * Timestamp of the latest library management operation. - */ - private OffsetDateTime timestamp; - - /* - * Status of the library. - */ - private Status status; - - /* - * Error message of the library operation when a failure occurs. - */ - private String message; - - /** - * Creates an instance of PyPiLibraryProperties class. - */ - public PyPiLibraryProperties() { - } - - /** - * Get the type property: Type of the library. - * - * @return the type value. - */ - @Override - public Type type() { - return this.type; - } - - /** - * Get the name property: Name of the PyPi package. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the PyPi package. - * - * @param name the name value to set. - * @return the PyPiLibraryProperties object itself. - */ - public PyPiLibraryProperties withName(String name) { - this.name = name; - return this; - } - - /** - * Get the version property: Version of the PyPi package. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version of the PyPi package. - * - * @param version the version value to set. - * @return the PyPiLibraryProperties object itself. - */ - public PyPiLibraryProperties withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the timestamp property: Timestamp of the latest library management operation. - * - * @return the timestamp value. - */ - @Override - public OffsetDateTime timestamp() { - return this.timestamp; - } - - /** - * Get the status property: Status of the library. - * - * @return the status value. - */ - @Override - public Status status() { - return this.status; - } - - /** - * Get the message property: Error message of the library operation when a failure occurs. - * - * @return the message value. - */ - @Override - public String message() { - return this.message; - } - - /** - * {@inheritDoc} - */ - @Override - public PyPiLibraryProperties withRemarks(String remarks) { - super.withRemarks(remarks); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model PyPiLibraryProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PyPiLibraryProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("remarks", remarks()); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("version", this.version); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PyPiLibraryProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PyPiLibraryProperties 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 PyPiLibraryProperties. - */ - public static PyPiLibraryProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PyPiLibraryProperties deserializedPyPiLibraryProperties = new PyPiLibraryProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("remarks".equals(fieldName)) { - deserializedPyPiLibraryProperties.withRemarks(reader.getString()); - } else if ("timestamp".equals(fieldName)) { - deserializedPyPiLibraryProperties.timestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("status".equals(fieldName)) { - deserializedPyPiLibraryProperties.status = Status.fromString(reader.getString()); - } else if ("message".equals(fieldName)) { - deserializedPyPiLibraryProperties.message = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPyPiLibraryProperties.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPyPiLibraryProperties.type = Type.fromString(reader.getString()); - } else if ("version".equals(fieldName)) { - deserializedPyPiLibraryProperties.version = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPyPiLibraryProperties; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpec.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpec.java deleted file mode 100644 index e820bafc040c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpec.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * Specification for the Ranger Admin service. - */ -@Fluent -public final class RangerAdminSpec implements JsonSerializable { - /* - * List of usernames that should be marked as ranger admins. These usernames should match the user principal name - * (UPN) of the respective AAD users. - */ - private List admins; - - /* - * The database property. - */ - private RangerAdminSpecDatabase database; - - /** - * Creates an instance of RangerAdminSpec class. - */ - public RangerAdminSpec() { - } - - /** - * Get the admins property: List of usernames that should be marked as ranger admins. These usernames should match - * the user principal name (UPN) of the respective AAD users. - * - * @return the admins value. - */ - public List admins() { - return this.admins; - } - - /** - * Set the admins property: List of usernames that should be marked as ranger admins. These usernames should match - * the user principal name (UPN) of the respective AAD users. - * - * @param admins the admins value to set. - * @return the RangerAdminSpec object itself. - */ - public RangerAdminSpec withAdmins(List admins) { - this.admins = admins; - return this; - } - - /** - * Get the database property: The database property. - * - * @return the database value. - */ - public RangerAdminSpecDatabase database() { - return this.database; - } - - /** - * Set the database property: The database property. - * - * @param database the database value to set. - * @return the RangerAdminSpec object itself. - */ - public RangerAdminSpec withDatabase(RangerAdminSpecDatabase database) { - this.database = database; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (admins() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property admins in model RangerAdminSpec")); - } - if (database() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property database in model RangerAdminSpec")); - } else { - database().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RangerAdminSpec.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("admins", this.admins, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("database", this.database); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RangerAdminSpec from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RangerAdminSpec 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 RangerAdminSpec. - */ - public static RangerAdminSpec fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RangerAdminSpec deserializedRangerAdminSpec = new RangerAdminSpec(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("admins".equals(fieldName)) { - List admins = reader.readArray(reader1 -> reader1.getString()); - deserializedRangerAdminSpec.admins = admins; - } else if ("database".equals(fieldName)) { - deserializedRangerAdminSpec.database = RangerAdminSpecDatabase.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRangerAdminSpec; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpecDatabase.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpecDatabase.java deleted file mode 100644 index 4d114f91e1b0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpecDatabase.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) 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; - -/** - * The RangerAdminSpecDatabase model. - */ -@Fluent -public final class RangerAdminSpecDatabase implements JsonSerializable { - /* - * The database URL - */ - private String host; - - /* - * The database name - */ - private String name; - - /* - * Reference for the database password - */ - private String passwordSecretRef; - - /* - * The name of the database user - */ - private String username; - - /** - * Creates an instance of RangerAdminSpecDatabase class. - */ - public RangerAdminSpecDatabase() { - } - - /** - * Get the host property: The database URL. - * - * @return the host value. - */ - public String host() { - return this.host; - } - - /** - * Set the host property: The database URL. - * - * @param host the host value to set. - * @return the RangerAdminSpecDatabase object itself. - */ - public RangerAdminSpecDatabase withHost(String host) { - this.host = host; - return this; - } - - /** - * Get the name property: The database name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The database name. - * - * @param name the name value to set. - * @return the RangerAdminSpecDatabase object itself. - */ - public RangerAdminSpecDatabase withName(String name) { - this.name = name; - return this; - } - - /** - * Get the passwordSecretRef property: Reference for the database password. - * - * @return the passwordSecretRef value. - */ - public String passwordSecretRef() { - return this.passwordSecretRef; - } - - /** - * Set the passwordSecretRef property: Reference for the database password. - * - * @param passwordSecretRef the passwordSecretRef value to set. - * @return the RangerAdminSpecDatabase object itself. - */ - public RangerAdminSpecDatabase withPasswordSecretRef(String passwordSecretRef) { - this.passwordSecretRef = passwordSecretRef; - return this; - } - - /** - * Get the username property: The name of the database user. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: The name of the database user. - * - * @param username the username value to set. - * @return the RangerAdminSpecDatabase object itself. - */ - public RangerAdminSpecDatabase withUsername(String username) { - this.username = username; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (host() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property host in model RangerAdminSpecDatabase")); - } - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model RangerAdminSpecDatabase")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RangerAdminSpecDatabase.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("host", this.host); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("passwordSecretRef", this.passwordSecretRef); - jsonWriter.writeStringField("username", this.username); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RangerAdminSpecDatabase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RangerAdminSpecDatabase 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 RangerAdminSpecDatabase. - */ - public static RangerAdminSpecDatabase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RangerAdminSpecDatabase deserializedRangerAdminSpecDatabase = new RangerAdminSpecDatabase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("host".equals(fieldName)) { - deserializedRangerAdminSpecDatabase.host = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRangerAdminSpecDatabase.name = reader.getString(); - } else if ("passwordSecretRef".equals(fieldName)) { - deserializedRangerAdminSpecDatabase.passwordSecretRef = reader.getString(); - } else if ("username".equals(fieldName)) { - deserializedRangerAdminSpecDatabase.username = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRangerAdminSpecDatabase; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAuditSpec.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAuditSpec.java deleted file mode 100644 index b53560af1000..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAuditSpec.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties required to describe audit log storage. - */ -@Fluent -public final class RangerAuditSpec implements JsonSerializable { - /* - * Azure storage location of the blobs. MSI should have read/write access to this Storage account. - */ - private String storageAccount; - - /** - * Creates an instance of RangerAuditSpec class. - */ - public RangerAuditSpec() { - } - - /** - * Get the storageAccount property: Azure storage location of the blobs. MSI should have read/write access to this - * Storage account. - * - * @return the storageAccount value. - */ - public String storageAccount() { - return this.storageAccount; - } - - /** - * Set the storageAccount property: Azure storage location of the blobs. MSI should have read/write access to this - * Storage account. - * - * @param storageAccount the storageAccount value to set. - * @return the RangerAuditSpec object itself. - */ - public RangerAuditSpec withStorageAccount(String storageAccount) { - this.storageAccount = storageAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("storageAccount", this.storageAccount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RangerAuditSpec from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RangerAuditSpec 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 RangerAuditSpec. - */ - public static RangerAuditSpec fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RangerAuditSpec deserializedRangerAuditSpec = new RangerAuditSpec(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("storageAccount".equals(fieldName)) { - deserializedRangerAuditSpec.storageAccount = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRangerAuditSpec; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerProfile.java deleted file mode 100644 index 06dd70158b55..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerProfile.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 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; - -/** - * The ranger cluster profile. - */ -@Fluent -public final class RangerProfile implements JsonSerializable { - /* - * Specification for the Ranger Admin service. - */ - private RangerAdminSpec rangerAdmin; - - /* - * Properties required to describe audit log storage. - */ - private RangerAuditSpec rangerAudit; - - /* - * Specification for the Ranger Usersync service - */ - private RangerUsersyncSpec rangerUsersync; - - /** - * Creates an instance of RangerProfile class. - */ - public RangerProfile() { - } - - /** - * Get the rangerAdmin property: Specification for the Ranger Admin service. - * - * @return the rangerAdmin value. - */ - public RangerAdminSpec rangerAdmin() { - return this.rangerAdmin; - } - - /** - * Set the rangerAdmin property: Specification for the Ranger Admin service. - * - * @param rangerAdmin the rangerAdmin value to set. - * @return the RangerProfile object itself. - */ - public RangerProfile withRangerAdmin(RangerAdminSpec rangerAdmin) { - this.rangerAdmin = rangerAdmin; - return this; - } - - /** - * Get the rangerAudit property: Properties required to describe audit log storage. - * - * @return the rangerAudit value. - */ - public RangerAuditSpec rangerAudit() { - return this.rangerAudit; - } - - /** - * Set the rangerAudit property: Properties required to describe audit log storage. - * - * @param rangerAudit the rangerAudit value to set. - * @return the RangerProfile object itself. - */ - public RangerProfile withRangerAudit(RangerAuditSpec rangerAudit) { - this.rangerAudit = rangerAudit; - return this; - } - - /** - * Get the rangerUsersync property: Specification for the Ranger Usersync service. - * - * @return the rangerUsersync value. - */ - public RangerUsersyncSpec rangerUsersync() { - return this.rangerUsersync; - } - - /** - * Set the rangerUsersync property: Specification for the Ranger Usersync service. - * - * @param rangerUsersync the rangerUsersync value to set. - * @return the RangerProfile object itself. - */ - public RangerProfile withRangerUsersync(RangerUsersyncSpec rangerUsersync) { - this.rangerUsersync = rangerUsersync; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rangerAdmin() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property rangerAdmin in model RangerProfile")); - } else { - rangerAdmin().validate(); - } - if (rangerAudit() != null) { - rangerAudit().validate(); - } - if (rangerUsersync() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property rangerUsersync in model RangerProfile")); - } else { - rangerUsersync().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RangerProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("rangerAdmin", this.rangerAdmin); - jsonWriter.writeJsonField("rangerUsersync", this.rangerUsersync); - jsonWriter.writeJsonField("rangerAudit", this.rangerAudit); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RangerProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RangerProfile 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 RangerProfile. - */ - public static RangerProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RangerProfile deserializedRangerProfile = new RangerProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("rangerAdmin".equals(fieldName)) { - deserializedRangerProfile.rangerAdmin = RangerAdminSpec.fromJson(reader); - } else if ("rangerUsersync".equals(fieldName)) { - deserializedRangerProfile.rangerUsersync = RangerUsersyncSpec.fromJson(reader); - } else if ("rangerAudit".equals(fieldName)) { - deserializedRangerProfile.rangerAudit = RangerAuditSpec.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRangerProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncMode.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncMode.java deleted file mode 100644 index 0e1f5dcc5df9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * User & groups can be synced automatically or via a static list that's refreshed. - */ -public final class RangerUsersyncMode extends ExpandableStringEnum { - /** - * Static value static for RangerUsersyncMode. - */ - public static final RangerUsersyncMode STATIC = fromString("static"); - - /** - * Static value automatic for RangerUsersyncMode. - */ - public static final RangerUsersyncMode AUTOMATIC = fromString("automatic"); - - /** - * Creates a new instance of RangerUsersyncMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RangerUsersyncMode() { - } - - /** - * Creates or finds a RangerUsersyncMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding RangerUsersyncMode. - */ - public static RangerUsersyncMode fromString(String name) { - return fromString(name, RangerUsersyncMode.class); - } - - /** - * Gets known RangerUsersyncMode values. - * - * @return known RangerUsersyncMode values. - */ - public static Collection values() { - return values(RangerUsersyncMode.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncSpec.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncSpec.java deleted file mode 100644 index 5d7a472e3901..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncSpec.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 java.io.IOException; -import java.util.List; - -/** - * Specification for the Ranger Usersync service. - */ -@Fluent -public final class RangerUsersyncSpec implements JsonSerializable { - /* - * Denotes whether usersync service should be enabled - */ - private Boolean enabled; - - /* - * List of groups that should be synced. These group names should match the object id of the respective AAD groups. - */ - private List groups; - - /* - * User & groups can be synced automatically or via a static list that's refreshed. - */ - private RangerUsersyncMode mode; - - /* - * Azure storage location of a mapping file that lists user & group associations. - */ - private String userMappingLocation; - - /* - * List of user names that should be synced. These usernames should match the User principal name of the respective - * AAD users. - */ - private List users; - - /** - * Creates an instance of RangerUsersyncSpec class. - */ - public RangerUsersyncSpec() { - } - - /** - * Get the enabled property: Denotes whether usersync service should be enabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Denotes whether usersync service should be enabled. - * - * @param enabled the enabled value to set. - * @return the RangerUsersyncSpec object itself. - */ - public RangerUsersyncSpec withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the groups property: List of groups that should be synced. These group names should match the object id of - * the respective AAD groups. - * - * @return the groups value. - */ - public List groups() { - return this.groups; - } - - /** - * Set the groups property: List of groups that should be synced. These group names should match the object id of - * the respective AAD groups. - * - * @param groups the groups value to set. - * @return the RangerUsersyncSpec object itself. - */ - public RangerUsersyncSpec withGroups(List groups) { - this.groups = groups; - return this; - } - - /** - * Get the mode property: User & groups can be synced automatically or via a static list that's refreshed. - * - * @return the mode value. - */ - public RangerUsersyncMode mode() { - return this.mode; - } - - /** - * Set the mode property: User & groups can be synced automatically or via a static list that's refreshed. - * - * @param mode the mode value to set. - * @return the RangerUsersyncSpec object itself. - */ - public RangerUsersyncSpec withMode(RangerUsersyncMode mode) { - this.mode = mode; - return this; - } - - /** - * Get the userMappingLocation property: Azure storage location of a mapping file that lists user & group - * associations. - * - * @return the userMappingLocation value. - */ - public String userMappingLocation() { - return this.userMappingLocation; - } - - /** - * Set the userMappingLocation property: Azure storage location of a mapping file that lists user & group - * associations. - * - * @param userMappingLocation the userMappingLocation value to set. - * @return the RangerUsersyncSpec object itself. - */ - public RangerUsersyncSpec withUserMappingLocation(String userMappingLocation) { - this.userMappingLocation = userMappingLocation; - return this; - } - - /** - * Get the users property: List of user names that should be synced. These usernames should match the User principal - * name of the respective AAD users. - * - * @return the users value. - */ - public List users() { - return this.users; - } - - /** - * Set the users property: List of user names that should be synced. These usernames should match the User principal - * name of the respective AAD users. - * - * @param users the users value to set. - * @return the RangerUsersyncSpec object itself. - */ - public RangerUsersyncSpec withUsers(List users) { - this.users = users; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeArrayField("groups", this.groups, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - jsonWriter.writeStringField("userMappingLocation", this.userMappingLocation); - jsonWriter.writeArrayField("users", this.users, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RangerUsersyncSpec from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RangerUsersyncSpec 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 RangerUsersyncSpec. - */ - public static RangerUsersyncSpec fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RangerUsersyncSpec deserializedRangerUsersyncSpec = new RangerUsersyncSpec(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedRangerUsersyncSpec.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("groups".equals(fieldName)) { - List groups = reader.readArray(reader1 -> reader1.getString()); - deserializedRangerUsersyncSpec.groups = groups; - } else if ("mode".equals(fieldName)) { - deserializedRangerUsersyncSpec.mode = RangerUsersyncMode.fromString(reader.getString()); - } else if ("userMappingLocation".equals(fieldName)) { - deserializedRangerUsersyncSpec.userMappingLocation = reader.getString(); - } else if ("users".equals(fieldName)) { - List users = reader.readArray(reader1 -> reader1.getString()); - deserializedRangerUsersyncSpec.users = users; - } else { - reader.skipChildren(); - } - } - - return deserializedRangerUsersyncSpec; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScaleActionType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScaleActionType.java deleted file mode 100644 index ee1e2806a561..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScaleActionType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The action type. - */ -public final class ScaleActionType extends ExpandableStringEnum { - /** - * Static value scaleup for ScaleActionType. - */ - public static final ScaleActionType SCALEUP = fromString("scaleup"); - - /** - * Static value scaledown for ScaleActionType. - */ - public static final ScaleActionType SCALEDOWN = fromString("scaledown"); - - /** - * Creates a new instance of ScaleActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScaleActionType() { - } - - /** - * Creates or finds a ScaleActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScaleActionType. - */ - public static ScaleActionType fromString(String name) { - return fromString(name, ScaleActionType.class); - } - - /** - * Gets known ScaleActionType values. - * - * @return known ScaleActionType values. - */ - public static Collection values() { - return values(ScaleActionType.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScalingRule.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScalingRule.java deleted file mode 100644 index f0642f2ac331..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScalingRule.java +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) 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; - -/** - * The scaling rule. - */ -@Fluent -public final class ScalingRule implements JsonSerializable { - /* - * The action type. - */ - private ScaleActionType actionType; - - /* - * This is an evaluation count for a scaling condition, the number of times a trigger condition should be - * successful, before scaling activity is triggered. - */ - private int evaluationCount; - - /* - * Metrics name for individual workloads. For example: cpu - */ - private String scalingMetric; - - /* - * The comparison rule. - */ - private ComparisonRule comparisonRule; - - /** - * Creates an instance of ScalingRule class. - */ - public ScalingRule() { - } - - /** - * Get the actionType property: The action type. - * - * @return the actionType value. - */ - public ScaleActionType actionType() { - return this.actionType; - } - - /** - * Set the actionType property: The action type. - * - * @param actionType the actionType value to set. - * @return the ScalingRule object itself. - */ - public ScalingRule withActionType(ScaleActionType actionType) { - this.actionType = actionType; - return this; - } - - /** - * Get the evaluationCount property: This is an evaluation count for a scaling condition, the number of times a - * trigger condition should be successful, before scaling activity is triggered. - * - * @return the evaluationCount value. - */ - public int evaluationCount() { - return this.evaluationCount; - } - - /** - * Set the evaluationCount property: This is an evaluation count for a scaling condition, the number of times a - * trigger condition should be successful, before scaling activity is triggered. - * - * @param evaluationCount the evaluationCount value to set. - * @return the ScalingRule object itself. - */ - public ScalingRule withEvaluationCount(int evaluationCount) { - this.evaluationCount = evaluationCount; - return this; - } - - /** - * Get the scalingMetric property: Metrics name for individual workloads. For example: cpu. - * - * @return the scalingMetric value. - */ - public String scalingMetric() { - return this.scalingMetric; - } - - /** - * Set the scalingMetric property: Metrics name for individual workloads. For example: cpu. - * - * @param scalingMetric the scalingMetric value to set. - * @return the ScalingRule object itself. - */ - public ScalingRule withScalingMetric(String scalingMetric) { - this.scalingMetric = scalingMetric; - return this; - } - - /** - * Get the comparisonRule property: The comparison rule. - * - * @return the comparisonRule value. - */ - public ComparisonRule comparisonRule() { - return this.comparisonRule; - } - - /** - * Set the comparisonRule property: The comparison rule. - * - * @param comparisonRule the comparisonRule value to set. - * @return the ScalingRule object itself. - */ - public ScalingRule withComparisonRule(ComparisonRule comparisonRule) { - this.comparisonRule = comparisonRule; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (actionType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property actionType in model ScalingRule")); - } - if (scalingMetric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property scalingMetric in model ScalingRule")); - } - if (comparisonRule() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property comparisonRule in model ScalingRule")); - } else { - comparisonRule().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScalingRule.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString()); - jsonWriter.writeIntField("evaluationCount", this.evaluationCount); - jsonWriter.writeStringField("scalingMetric", this.scalingMetric); - jsonWriter.writeJsonField("comparisonRule", this.comparisonRule); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScalingRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScalingRule 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 ScalingRule. - */ - public static ScalingRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScalingRule deserializedScalingRule = new ScalingRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("actionType".equals(fieldName)) { - deserializedScalingRule.actionType = ScaleActionType.fromString(reader.getString()); - } else if ("evaluationCount".equals(fieldName)) { - deserializedScalingRule.evaluationCount = reader.getInt(); - } else if ("scalingMetric".equals(fieldName)) { - deserializedScalingRule.scalingMetric = reader.getString(); - } else if ("comparisonRule".equals(fieldName)) { - deserializedScalingRule.comparisonRule = ComparisonRule.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScalingRule; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Schedule.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Schedule.java deleted file mode 100644 index 453ea283af87..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Schedule.java +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * Schedule definition. - */ -@Fluent -public final class Schedule implements JsonSerializable { - /* - * User has to set the start time of current schedule configuration, format like 10:30 (HH:MM). - */ - private String startTime; - - /* - * User has to set the end time of current schedule configuration, format like 10:30 (HH:MM). - */ - private String endTime; - - /* - * User has to set the node count anticipated at end of the scaling operation of the set current schedule - * configuration, format is integer. - */ - private int count; - - /* - * User has to set the days where schedule has to be set for autoscale operation. - */ - private List days; - - /** - * Creates an instance of Schedule class. - */ - public Schedule() { - } - - /** - * Get the startTime property: User has to set the start time of current schedule configuration, format like 10:30 - * (HH:MM). - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Set the startTime property: User has to set the start time of current schedule configuration, format like 10:30 - * (HH:MM). - * - * @param startTime the startTime value to set. - * @return the Schedule object itself. - */ - public Schedule withStartTime(String startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: User has to set the end time of current schedule configuration, format like 10:30 - * (HH:MM). - * - * @return the endTime value. - */ - public String endTime() { - return this.endTime; - } - - /** - * Set the endTime property: User has to set the end time of current schedule configuration, format like 10:30 - * (HH:MM). - * - * @param endTime the endTime value to set. - * @return the Schedule object itself. - */ - public Schedule withEndTime(String endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the count property: User has to set the node count anticipated at end of the scaling operation of the set - * current schedule configuration, format is integer. - * - * @return the count value. - */ - public int count() { - return this.count; - } - - /** - * Set the count property: User has to set the node count anticipated at end of the scaling operation of the set - * current schedule configuration, format is integer. - * - * @param count the count value to set. - * @return the Schedule object itself. - */ - public Schedule withCount(int count) { - this.count = count; - return this; - } - - /** - * Get the days property: User has to set the days where schedule has to be set for autoscale operation. - * - * @return the days value. - */ - public List days() { - return this.days; - } - - /** - * Set the days property: User has to set the days where schedule has to be set for autoscale operation. - * - * @param days the days value to set. - * @return the Schedule object itself. - */ - public Schedule withDays(List days) { - this.days = days; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (startTime() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property startTime in model Schedule")); - } - if (endTime() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property endTime in model Schedule")); - } - if (days() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property days in model Schedule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Schedule.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("startTime", this.startTime); - jsonWriter.writeStringField("endTime", this.endTime); - jsonWriter.writeIntField("count", this.count); - jsonWriter.writeArrayField("days", this.days, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Schedule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Schedule 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 Schedule. - */ - public static Schedule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Schedule deserializedSchedule = new Schedule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("startTime".equals(fieldName)) { - deserializedSchedule.startTime = reader.getString(); - } else if ("endTime".equals(fieldName)) { - deserializedSchedule.endTime = reader.getString(); - } else if ("count".equals(fieldName)) { - deserializedSchedule.count = reader.getInt(); - } else if ("days".equals(fieldName)) { - List days = reader.readArray(reader1 -> ScheduleDay.fromString(reader1.getString())); - deserializedSchedule.days = days; - } else { - reader.skipChildren(); - } - } - - return deserializedSchedule; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleBasedConfig.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleBasedConfig.java deleted file mode 100644 index 9a5880042891..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleBasedConfig.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * Profile of schedule based Autoscale. - */ -@Fluent -public final class ScheduleBasedConfig implements JsonSerializable { - /* - * User has to specify the timezone on which the schedule has to be set for schedule based autoscale configuration. - */ - private String timeZone; - - /* - * Setting default node count of current schedule configuration. Default node count specifies the number of nodes - * which are default when an specified scaling operation is executed (scale up/scale down) - */ - private int defaultCount; - - /* - * This specifies the schedules where scheduled based Autoscale to be enabled, the user has a choice to set multiple - * rules within the schedule across days and times (start/end). - */ - private List schedules; - - /** - * Creates an instance of ScheduleBasedConfig class. - */ - public ScheduleBasedConfig() { - } - - /** - * Get the timeZone property: User has to specify the timezone on which the schedule has to be set for schedule - * based autoscale configuration. - * - * @return the timeZone value. - */ - public String timeZone() { - return this.timeZone; - } - - /** - * Set the timeZone property: User has to specify the timezone on which the schedule has to be set for schedule - * based autoscale configuration. - * - * @param timeZone the timeZone value to set. - * @return the ScheduleBasedConfig object itself. - */ - public ScheduleBasedConfig withTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * Get the defaultCount property: Setting default node count of current schedule configuration. Default node count - * specifies the number of nodes which are default when an specified scaling operation is executed (scale up/scale - * down). - * - * @return the defaultCount value. - */ - public int defaultCount() { - return this.defaultCount; - } - - /** - * Set the defaultCount property: Setting default node count of current schedule configuration. Default node count - * specifies the number of nodes which are default when an specified scaling operation is executed (scale up/scale - * down). - * - * @param defaultCount the defaultCount value to set. - * @return the ScheduleBasedConfig object itself. - */ - public ScheduleBasedConfig withDefaultCount(int defaultCount) { - this.defaultCount = defaultCount; - return this; - } - - /** - * Get the schedules property: This specifies the schedules where scheduled based Autoscale to be enabled, the user - * has a choice to set multiple rules within the schedule across days and times (start/end). - * - * @return the schedules value. - */ - public List schedules() { - return this.schedules; - } - - /** - * Set the schedules property: This specifies the schedules where scheduled based Autoscale to be enabled, the user - * has a choice to set multiple rules within the schedule across days and times (start/end). - * - * @param schedules the schedules value to set. - * @return the ScheduleBasedConfig object itself. - */ - public ScheduleBasedConfig withSchedules(List schedules) { - this.schedules = schedules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (timeZone() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property timeZone in model ScheduleBasedConfig")); - } - if (schedules() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property schedules in model ScheduleBasedConfig")); - } else { - schedules().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScheduleBasedConfig.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("timeZone", this.timeZone); - jsonWriter.writeIntField("defaultCount", this.defaultCount); - jsonWriter.writeArrayField("schedules", this.schedules, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScheduleBasedConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScheduleBasedConfig 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 ScheduleBasedConfig. - */ - public static ScheduleBasedConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScheduleBasedConfig deserializedScheduleBasedConfig = new ScheduleBasedConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("timeZone".equals(fieldName)) { - deserializedScheduleBasedConfig.timeZone = reader.getString(); - } else if ("defaultCount".equals(fieldName)) { - deserializedScheduleBasedConfig.defaultCount = reader.getInt(); - } else if ("schedules".equals(fieldName)) { - List schedules = reader.readArray(reader1 -> Schedule.fromJson(reader1)); - deserializedScheduleBasedConfig.schedules = schedules; - } else { - reader.skipChildren(); - } - } - - return deserializedScheduleBasedConfig; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleDay.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleDay.java deleted file mode 100644 index 9266aea4d909..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleDay.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for ScheduleDay. - */ -public final class ScheduleDay extends ExpandableStringEnum { - /** - * Static value Sunday for ScheduleDay. - */ - public static final ScheduleDay SUNDAY = fromString("Sunday"); - - /** - * Static value Monday for ScheduleDay. - */ - public static final ScheduleDay MONDAY = fromString("Monday"); - - /** - * Static value Tuesday for ScheduleDay. - */ - public static final ScheduleDay TUESDAY = fromString("Tuesday"); - - /** - * Static value Wednesday for ScheduleDay. - */ - public static final ScheduleDay WEDNESDAY = fromString("Wednesday"); - - /** - * Static value Thursday for ScheduleDay. - */ - public static final ScheduleDay THURSDAY = fromString("Thursday"); - - /** - * Static value Friday for ScheduleDay. - */ - public static final ScheduleDay FRIDAY = fromString("Friday"); - - /** - * Static value Saturday for ScheduleDay. - */ - public static final ScheduleDay SATURDAY = fromString("Saturday"); - - /** - * Creates a new instance of ScheduleDay value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScheduleDay() { - } - - /** - * Creates or finds a ScheduleDay from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleDay. - */ - public static ScheduleDay fromString(String name) { - return fromString(name, ScheduleDay.class); - } - - /** - * Gets known ScheduleDay values. - * - * @return known ScheduleDay values. - */ - public static Collection values() { - return values(ScheduleDay.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScriptActionProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScriptActionProfile.java deleted file mode 100644 index 9d2a0b9c94b7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScriptActionProfile.java +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (c) 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; -import java.util.List; - -/** - * The script action profile. - */ -@Fluent -public final class ScriptActionProfile implements JsonSerializable { - /* - * Type of the script action. Supported type is bash scripts. - */ - private String type; - - /* - * Script name. - */ - private String name; - - /* - * Url of the script file. - */ - private String url; - - /* - * Additional parameters for the script action. It should be space-separated list of arguments required for script - * execution. - */ - private String parameters; - - /* - * List of services to apply the script action. - */ - private List services; - - /* - * Timeout duration for the script action in minutes. - */ - private Integer timeoutInMinutes; - - /* - * Specify if the script should persist on the cluster. - */ - private Boolean shouldPersist; - - /** - * Creates an instance of ScriptActionProfile class. - */ - public ScriptActionProfile() { - } - - /** - * Get the type property: Type of the script action. Supported type is bash scripts. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Type of the script action. Supported type is bash scripts. - * - * @param type the type value to set. - * @return the ScriptActionProfile object itself. - */ - public ScriptActionProfile withType(String type) { - this.type = type; - return this; - } - - /** - * Get the name property: Script name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Script name. - * - * @param name the name value to set. - * @return the ScriptActionProfile object itself. - */ - public ScriptActionProfile withName(String name) { - this.name = name; - return this; - } - - /** - * Get the url property: Url of the script file. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: Url of the script file. - * - * @param url the url value to set. - * @return the ScriptActionProfile object itself. - */ - public ScriptActionProfile withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the parameters property: Additional parameters for the script action. It should be space-separated list of - * arguments required for script execution. - * - * @return the parameters value. - */ - public String parameters() { - return this.parameters; - } - - /** - * Set the parameters property: Additional parameters for the script action. It should be space-separated list of - * arguments required for script execution. - * - * @param parameters the parameters value to set. - * @return the ScriptActionProfile object itself. - */ - public ScriptActionProfile withParameters(String parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the services property: List of services to apply the script action. - * - * @return the services value. - */ - public List services() { - return this.services; - } - - /** - * Set the services property: List of services to apply the script action. - * - * @param services the services value to set. - * @return the ScriptActionProfile object itself. - */ - public ScriptActionProfile withServices(List services) { - this.services = services; - return this; - } - - /** - * Get the timeoutInMinutes property: Timeout duration for the script action in minutes. - * - * @return the timeoutInMinutes value. - */ - public Integer timeoutInMinutes() { - return this.timeoutInMinutes; - } - - /** - * Set the timeoutInMinutes property: Timeout duration for the script action in minutes. - * - * @param timeoutInMinutes the timeoutInMinutes value to set. - * @return the ScriptActionProfile object itself. - */ - public ScriptActionProfile withTimeoutInMinutes(Integer timeoutInMinutes) { - this.timeoutInMinutes = timeoutInMinutes; - return this; - } - - /** - * Get the shouldPersist property: Specify if the script should persist on the cluster. - * - * @return the shouldPersist value. - */ - public Boolean shouldPersist() { - return this.shouldPersist; - } - - /** - * Set the shouldPersist property: Specify if the script should persist on the cluster. - * - * @param shouldPersist the shouldPersist value to set. - * @return the ScriptActionProfile object itself. - */ - public ScriptActionProfile withShouldPersist(Boolean shouldPersist) { - this.shouldPersist = shouldPersist; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model ScriptActionProfile")); - } - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model ScriptActionProfile")); - } - if (url() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property url in model ScriptActionProfile")); - } - if (services() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property services in model ScriptActionProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScriptActionProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("url", this.url); - jsonWriter.writeArrayField("services", this.services, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("parameters", this.parameters); - jsonWriter.writeNumberField("timeoutInMinutes", this.timeoutInMinutes); - jsonWriter.writeBooleanField("shouldPersist", this.shouldPersist); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScriptActionProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScriptActionProfile 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 ScriptActionProfile. - */ - public static ScriptActionProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScriptActionProfile deserializedScriptActionProfile = new ScriptActionProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedScriptActionProfile.type = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedScriptActionProfile.name = reader.getString(); - } else if ("url".equals(fieldName)) { - deserializedScriptActionProfile.url = reader.getString(); - } else if ("services".equals(fieldName)) { - List services = reader.readArray(reader1 -> reader1.getString()); - deserializedScriptActionProfile.services = services; - } else if ("parameters".equals(fieldName)) { - deserializedScriptActionProfile.parameters = reader.getString(); - } else if ("timeoutInMinutes".equals(fieldName)) { - deserializedScriptActionProfile.timeoutInMinutes = reader.getNullable(JsonReader::getInt); - } else if ("shouldPersist".equals(fieldName)) { - deserializedScriptActionProfile.shouldPersist = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedScriptActionProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretReference.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretReference.java deleted file mode 100644 index 1fc5ba547e04..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretReference.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) 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; - -/** - * Secret reference and corresponding properties of a key vault secret. - */ -@Fluent -public final class SecretReference implements JsonSerializable { - /* - * Reference name of the secret to be used in service configs. - */ - private String referenceName; - - /* - * Type of key vault object: secret, key or certificate. - */ - private KeyVaultObjectType type; - - /* - * Version of the secret in key vault. - */ - private String version; - - /* - * Object identifier name of the secret in key vault. - */ - private String keyVaultObjectName; - - /** - * Creates an instance of SecretReference class. - */ - public SecretReference() { - } - - /** - * Get the referenceName property: Reference name of the secret to be used in service configs. - * - * @return the referenceName value. - */ - public String referenceName() { - return this.referenceName; - } - - /** - * Set the referenceName property: Reference name of the secret to be used in service configs. - * - * @param referenceName the referenceName value to set. - * @return the SecretReference object itself. - */ - public SecretReference withReferenceName(String referenceName) { - this.referenceName = referenceName; - return this; - } - - /** - * Get the type property: Type of key vault object: secret, key or certificate. - * - * @return the type value. - */ - public KeyVaultObjectType type() { - return this.type; - } - - /** - * Set the type property: Type of key vault object: secret, key or certificate. - * - * @param type the type value to set. - * @return the SecretReference object itself. - */ - public SecretReference withType(KeyVaultObjectType type) { - this.type = type; - return this; - } - - /** - * Get the version property: Version of the secret in key vault. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version of the secret in key vault. - * - * @param version the version value to set. - * @return the SecretReference object itself. - */ - public SecretReference withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the keyVaultObjectName property: Object identifier name of the secret in key vault. - * - * @return the keyVaultObjectName value. - */ - public String keyVaultObjectName() { - return this.keyVaultObjectName; - } - - /** - * Set the keyVaultObjectName property: Object identifier name of the secret in key vault. - * - * @param keyVaultObjectName the keyVaultObjectName value to set. - * @return the SecretReference object itself. - */ - public SecretReference withKeyVaultObjectName(String keyVaultObjectName) { - this.keyVaultObjectName = keyVaultObjectName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (referenceName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property referenceName in model SecretReference")); - } - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model SecretReference")); - } - if (keyVaultObjectName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVaultObjectName in model SecretReference")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SecretReference.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("referenceName", this.referenceName); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("keyVaultObjectName", this.keyVaultObjectName); - jsonWriter.writeStringField("version", this.version); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SecretReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SecretReference 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 SecretReference. - */ - public static SecretReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SecretReference deserializedSecretReference = new SecretReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("referenceName".equals(fieldName)) { - deserializedSecretReference.referenceName = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedSecretReference.type = KeyVaultObjectType.fromString(reader.getString()); - } else if ("keyVaultObjectName".equals(fieldName)) { - deserializedSecretReference.keyVaultObjectName = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedSecretReference.version = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSecretReference; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretsProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretsProfile.java deleted file mode 100644 index 85844107d743..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretsProfile.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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; -import java.util.List; - -/** - * The cluster secret profile. - */ -@Fluent -public final class SecretsProfile implements JsonSerializable { - /* - * Name of the user Key Vault where all the cluster specific user secrets are stored. - */ - private String keyVaultResourceId; - - /* - * Properties of Key Vault secret. - */ - private List secrets; - - /** - * Creates an instance of SecretsProfile class. - */ - public SecretsProfile() { - } - - /** - * Get the keyVaultResourceId property: Name of the user Key Vault where all the cluster specific user secrets are - * stored. - * - * @return the keyVaultResourceId value. - */ - public String keyVaultResourceId() { - return this.keyVaultResourceId; - } - - /** - * Set the keyVaultResourceId property: Name of the user Key Vault where all the cluster specific user secrets are - * stored. - * - * @param keyVaultResourceId the keyVaultResourceId value to set. - * @return the SecretsProfile object itself. - */ - public SecretsProfile withKeyVaultResourceId(String keyVaultResourceId) { - this.keyVaultResourceId = keyVaultResourceId; - return this; - } - - /** - * Get the secrets property: Properties of Key Vault secret. - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: Properties of Key Vault secret. - * - * @param secrets the secrets value to set. - * @return the SecretsProfile object itself. - */ - public SecretsProfile withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVaultResourceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVaultResourceId in model SecretsProfile")); - } - if (secrets() != null) { - secrets().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SecretsProfile.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("keyVaultResourceId", this.keyVaultResourceId); - jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SecretsProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SecretsProfile 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 SecretsProfile. - */ - public static SecretsProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SecretsProfile deserializedSecretsProfile = new SecretsProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keyVaultResourceId".equals(fieldName)) { - deserializedSecretsProfile.keyVaultResourceId = reader.getString(); - } else if ("secrets".equals(fieldName)) { - List secrets = reader.readArray(reader1 -> SecretReference.fromJson(reader1)); - deserializedSecretsProfile.secrets = secrets; - } else { - reader.skipChildren(); - } - } - - return deserializedSecretsProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResult.java deleted file mode 100644 index b9f33133a8a1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.ServiceConfigResultInner; -import java.io.IOException; -import java.util.List; - -/** - * Cluster instance service configs api response. - */ -@Fluent -public final class ServiceConfigListResult implements JsonSerializable { - /* - * Cluster instance service config array. - */ - private List value; - - /* - * The link (url) to the next page of results. - */ - private String nextLink; - - /** - * Creates an instance of ServiceConfigListResult class. - */ - public ServiceConfigListResult() { - } - - /** - * Get the value property: Cluster instance service config array. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Cluster instance service config array. - * - * @param value the value value to set. - * @return the ServiceConfigListResult object itself. - */ - public ServiceConfigListResult 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) { - 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 ServiceConfigListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServiceConfigListResult 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 ServiceConfigListResult. - */ - public static ServiceConfigListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServiceConfigListResult deserializedServiceConfigListResult = new ServiceConfigListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ServiceConfigResultInner.fromJson(reader1)); - deserializedServiceConfigListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedServiceConfigListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedServiceConfigListResult; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultProperties.java deleted file mode 100644 index 05df783339d2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultProperties.java +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright (c) 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; -import java.util.Map; - -/** - * Service config response. - */ -@Fluent -public class ServiceConfigListResultProperties implements JsonSerializable { - /* - * Service Config Name. - */ - private String serviceName; - - /* - * File Name. - */ - private String fileName; - - /* - * Content in the service config file. - */ - private String content; - - /* - * Component Name. - */ - private String componentName; - - /* - * Config type. - */ - private String type; - - /* - * Config file path. - */ - private String path; - - /* - * The custom keys. - */ - private Map customKeys; - - /* - * The default keys. - */ - private Map defaultKeys; - - /** - * Creates an instance of ServiceConfigListResultProperties class. - */ - public ServiceConfigListResultProperties() { - } - - /** - * Get the serviceName property: Service Config Name. - * - * @return the serviceName value. - */ - public String serviceName() { - return this.serviceName; - } - - /** - * Set the serviceName property: Service Config Name. - * - * @param serviceName the serviceName value to set. - * @return the ServiceConfigListResultProperties object itself. - */ - public ServiceConfigListResultProperties withServiceName(String serviceName) { - this.serviceName = serviceName; - return this; - } - - /** - * Get the fileName property: File Name. - * - * @return the fileName value. - */ - public String fileName() { - return this.fileName; - } - - /** - * Set the fileName property: File Name. - * - * @param fileName the fileName value to set. - * @return the ServiceConfigListResultProperties object itself. - */ - public ServiceConfigListResultProperties withFileName(String fileName) { - this.fileName = fileName; - return this; - } - - /** - * Get the content property: Content in the service config file. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Set the content property: Content in the service config file. - * - * @param content the content value to set. - * @return the ServiceConfigListResultProperties object itself. - */ - public ServiceConfigListResultProperties withContent(String content) { - this.content = content; - return this; - } - - /** - * Get the componentName property: Component Name. - * - * @return the componentName value. - */ - public String componentName() { - return this.componentName; - } - - /** - * Set the componentName property: Component Name. - * - * @param componentName the componentName value to set. - * @return the ServiceConfigListResultProperties object itself. - */ - public ServiceConfigListResultProperties withComponentName(String componentName) { - this.componentName = componentName; - return this; - } - - /** - * Get the type property: Config type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Config type. - * - * @param type the type value to set. - * @return the ServiceConfigListResultProperties object itself. - */ - public ServiceConfigListResultProperties withType(String type) { - this.type = type; - return this; - } - - /** - * Get the path property: Config file path. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: Config file path. - * - * @param path the path value to set. - * @return the ServiceConfigListResultProperties object itself. - */ - public ServiceConfigListResultProperties withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the customKeys property: The custom keys. - * - * @return the customKeys value. - */ - public Map customKeys() { - return this.customKeys; - } - - /** - * Set the customKeys property: The custom keys. - * - * @param customKeys the customKeys value to set. - * @return the ServiceConfigListResultProperties object itself. - */ - public ServiceConfigListResultProperties withCustomKeys(Map customKeys) { - this.customKeys = customKeys; - return this; - } - - /** - * Get the defaultKeys property: The default keys. - * - * @return the defaultKeys value. - */ - public Map defaultKeys() { - return this.defaultKeys; - } - - /** - * Set the defaultKeys property: The default keys. - * - * @param defaultKeys the defaultKeys value to set. - * @return the ServiceConfigListResultProperties object itself. - */ - public ServiceConfigListResultProperties - withDefaultKeys(Map defaultKeys) { - this.defaultKeys = defaultKeys; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property serviceName in model ServiceConfigListResultProperties")); - } - if (fileName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property fileName in model ServiceConfigListResultProperties")); - } - if (componentName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property componentName in model ServiceConfigListResultProperties")); - } - if (defaultKeys() != null) { - defaultKeys().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServiceConfigListResultProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("serviceName", this.serviceName); - jsonWriter.writeStringField("fileName", this.fileName); - jsonWriter.writeStringField("componentName", this.componentName); - jsonWriter.writeStringField("content", this.content); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeStringField("path", this.path); - jsonWriter.writeMapField("customKeys", this.customKeys, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("defaultKeys", this.defaultKeys, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServiceConfigListResultProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServiceConfigListResultProperties 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 ServiceConfigListResultProperties. - */ - public static ServiceConfigListResultProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServiceConfigListResultProperties deserializedServiceConfigListResultProperties - = new ServiceConfigListResultProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serviceName".equals(fieldName)) { - deserializedServiceConfigListResultProperties.serviceName = reader.getString(); - } else if ("fileName".equals(fieldName)) { - deserializedServiceConfigListResultProperties.fileName = reader.getString(); - } else if ("componentName".equals(fieldName)) { - deserializedServiceConfigListResultProperties.componentName = reader.getString(); - } else if ("content".equals(fieldName)) { - deserializedServiceConfigListResultProperties.content = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedServiceConfigListResultProperties.type = reader.getString(); - } else if ("path".equals(fieldName)) { - deserializedServiceConfigListResultProperties.path = reader.getString(); - } else if ("customKeys".equals(fieldName)) { - Map customKeys = reader.readMap(reader1 -> reader1.getString()); - deserializedServiceConfigListResultProperties.customKeys = customKeys; - } else if ("defaultKeys".equals(fieldName)) { - Map defaultKeys - = reader.readMap(reader1 -> ServiceConfigListResultValueEntity.fromJson(reader1)); - deserializedServiceConfigListResultProperties.defaultKeys = defaultKeys; - } else { - reader.skipChildren(); - } - } - - return deserializedServiceConfigListResultProperties; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultValueEntity.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultValueEntity.java deleted file mode 100644 index 33a59ab2b377..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultValueEntity.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 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; - -/** - * Default config details. - */ -@Fluent -public final class ServiceConfigListResultValueEntity implements JsonSerializable { - /* - * Config value. - */ - private String value; - - /* - * Config description. - */ - private String description; - - /** - * Creates an instance of ServiceConfigListResultValueEntity class. - */ - public ServiceConfigListResultValueEntity() { - } - - /** - * Get the value property: Config value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Config value. - * - * @param value the value value to set. - * @return the ServiceConfigListResultValueEntity object itself. - */ - public ServiceConfigListResultValueEntity withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the description property: Config description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Config description. - * - * @param description the description value to set. - * @return the ServiceConfigListResultValueEntity object itself. - */ - public ServiceConfigListResultValueEntity withDescription(String description) { - this.description = description; - return this; - } - - /** - * 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 ServiceConfigListResultValueEntity")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServiceConfigListResultValueEntity.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("value", this.value); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServiceConfigListResultValueEntity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServiceConfigListResultValueEntity 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 ServiceConfigListResultValueEntity. - */ - public static ServiceConfigListResultValueEntity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServiceConfigListResultValueEntity deserializedServiceConfigListResultValueEntity - = new ServiceConfigListResultValueEntity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - deserializedServiceConfigListResultValueEntity.value = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedServiceConfigListResultValueEntity.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedServiceConfigListResultValueEntity; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResult.java deleted file mode 100644 index 8331790778c1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResult.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ServiceConfigResultInner; - -/** - * An immutable client-side representation of ServiceConfigResult. - */ -public interface ServiceConfigResult { - /** - * Gets the properties property: Cluster instance service config properties. - * - * @return the properties value. - */ - ServiceConfigResultProperties properties(); - - /** - * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ServiceConfigResultInner object. - * - * @return the inner object. - */ - ServiceConfigResultInner innerModel(); -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResultProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResultProperties.java deleted file mode 100644 index d35ac2912890..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResultProperties.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 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; -import java.util.Map; - -/** - * Cluster instance service config properties. - */ -@Fluent -public final class ServiceConfigResultProperties extends ServiceConfigListResultProperties { - /** - * Creates an instance of ServiceConfigResultProperties class. - */ - public ServiceConfigResultProperties() { - } - - /** - * {@inheritDoc} - */ - @Override - public ServiceConfigResultProperties withServiceName(String serviceName) { - super.withServiceName(serviceName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServiceConfigResultProperties withFileName(String fileName) { - super.withFileName(fileName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServiceConfigResultProperties withContent(String content) { - super.withContent(content); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServiceConfigResultProperties withComponentName(String componentName) { - super.withComponentName(componentName); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServiceConfigResultProperties withType(String type) { - super.withType(type); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServiceConfigResultProperties withPath(String path) { - super.withPath(path); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServiceConfigResultProperties withCustomKeys(Map customKeys) { - super.withCustomKeys(customKeys); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServiceConfigResultProperties withDefaultKeys(Map defaultKeys) { - super.withDefaultKeys(defaultKeys); - 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("serviceName", serviceName()); - jsonWriter.writeStringField("fileName", fileName()); - jsonWriter.writeStringField("componentName", componentName()); - jsonWriter.writeStringField("content", content()); - jsonWriter.writeStringField("type", type()); - jsonWriter.writeStringField("path", path()); - jsonWriter.writeMapField("customKeys", customKeys(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("defaultKeys", defaultKeys(), (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServiceConfigResultProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServiceConfigResultProperties 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 ServiceConfigResultProperties. - */ - public static ServiceConfigResultProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServiceConfigResultProperties deserializedServiceConfigResultProperties - = new ServiceConfigResultProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serviceName".equals(fieldName)) { - deserializedServiceConfigResultProperties.withServiceName(reader.getString()); - } else if ("fileName".equals(fieldName)) { - deserializedServiceConfigResultProperties.withFileName(reader.getString()); - } else if ("componentName".equals(fieldName)) { - deserializedServiceConfigResultProperties.withComponentName(reader.getString()); - } else if ("content".equals(fieldName)) { - deserializedServiceConfigResultProperties.withContent(reader.getString()); - } else if ("type".equals(fieldName)) { - deserializedServiceConfigResultProperties.withType(reader.getString()); - } else if ("path".equals(fieldName)) { - deserializedServiceConfigResultProperties.withPath(reader.getString()); - } else if ("customKeys".equals(fieldName)) { - Map customKeys = reader.readMap(reader1 -> reader1.getString()); - deserializedServiceConfigResultProperties.withCustomKeys(customKeys); - } else if ("defaultKeys".equals(fieldName)) { - Map defaultKeys - = reader.readMap(reader1 -> ServiceConfigListResultValueEntity.fromJson(reader1)); - deserializedServiceConfigResultProperties.withDefaultKeys(defaultKeys); - } else { - reader.skipChildren(); - } - } - - return deserializedServiceConfigResultProperties; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceStatus.java deleted file mode 100644 index f6964bcde64b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceStatus.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) 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; - -/** - * Describes the status of a service of a HDInsight on AKS cluster. - */ -@Fluent -public final class ServiceStatus implements JsonSerializable { - /* - * Kind of the service. E.g. "Zookeeper". - */ - private String kind; - - /* - * Indicates if the service is ready / healthy. Values can be "true", "false", "unknown" or anything else. - */ - private String ready; - - /* - * A message describing the error if any. - */ - private String message; - - /** - * Creates an instance of ServiceStatus class. - */ - public ServiceStatus() { - } - - /** - * Get the kind property: Kind of the service. E.g. "Zookeeper". - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Kind of the service. E.g. "Zookeeper". - * - * @param kind the kind value to set. - * @return the ServiceStatus object itself. - */ - public ServiceStatus withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the ready property: Indicates if the service is ready / healthy. Values can be "true", "false", "unknown" or - * anything else. - * - * @return the ready value. - */ - public String ready() { - return this.ready; - } - - /** - * Set the ready property: Indicates if the service is ready / healthy. Values can be "true", "false", "unknown" or - * anything else. - * - * @param ready the ready value to set. - * @return the ServiceStatus object itself. - */ - public ServiceStatus withReady(String ready) { - this.ready = ready; - return this; - } - - /** - * Get the message property: A message describing the error if any. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: A message describing the error if any. - * - * @param message the message value to set. - * @return the ServiceStatus object itself. - */ - public ServiceStatus withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kind() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property kind in model ServiceStatus")); - } - if (ready() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property ready in model ServiceStatus")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServiceStatus.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("kind", this.kind); - jsonWriter.writeStringField("ready", this.ready); - jsonWriter.writeStringField("message", this.message); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServiceStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServiceStatus 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 ServiceStatus. - */ - public static ServiceStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServiceStatus deserializedServiceStatus = new ServiceStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("kind".equals(fieldName)) { - deserializedServiceStatus.kind = reader.getString(); - } else if ("ready".equals(fieldName)) { - deserializedServiceStatus.ready = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedServiceStatus.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedServiceStatus; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Severity.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Severity.java deleted file mode 100644 index 5c60dedebb55..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Severity.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Severity of this upgrade. - */ -public final class Severity extends ExpandableStringEnum { - /** - * Static value low for Severity. - */ - public static final Severity LOW = fromString("low"); - - /** - * Static value medium for Severity. - */ - public static final Severity MEDIUM = fromString("medium"); - - /** - * Static value high for Severity. - */ - public static final Severity HIGH = fromString("high"); - - /** - * Static value critical for Severity. - */ - public static final Severity CRITICAL = fromString("critical"); - - /** - * Creates a new instance of Severity value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Severity() { - } - - /** - * Creates or finds a Severity from its string representation. - * - * @param name a name to look for. - * @return the corresponding Severity. - */ - public static Severity fromString(String name) { - return fromString(name, Severity.class); - } - - /** - * Gets known Severity values. - * - * @return known Severity values. - */ - public static Collection values() { - return values(Severity.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkMetastoreSpec.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkMetastoreSpec.java deleted file mode 100644 index c071b34bf798..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkMetastoreSpec.java +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright (c) 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; - -/** - * The metastore specification for Spark cluster. - */ -@Fluent -public final class SparkMetastoreSpec implements JsonSerializable { - /* - * The database server host. - */ - private String dbServerHost; - - /* - * The database name. - */ - private String dbName; - - /* - * The authentication mode to connect to your Hive metastore database. More details: - * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and- - * authorization - */ - private DbConnectionAuthenticationMode dbConnectionAuthenticationMode; - - /* - * The database user name. - */ - private String dbUsername; - - /* - * The secret name which contains the database user password. - */ - private String dbPasswordSecretName; - - /* - * The key vault resource id. - */ - private String keyVaultId; - - /* - * The thrift url. - */ - private String thriftUrl; - - /** - * Creates an instance of SparkMetastoreSpec class. - */ - public SparkMetastoreSpec() { - } - - /** - * Get the dbServerHost property: The database server host. - * - * @return the dbServerHost value. - */ - public String dbServerHost() { - return this.dbServerHost; - } - - /** - * Set the dbServerHost property: The database server host. - * - * @param dbServerHost the dbServerHost value to set. - * @return the SparkMetastoreSpec object itself. - */ - public SparkMetastoreSpec withDbServerHost(String dbServerHost) { - this.dbServerHost = dbServerHost; - return this; - } - - /** - * Get the dbName property: The database name. - * - * @return the dbName value. - */ - public String dbName() { - return this.dbName; - } - - /** - * Set the dbName property: The database name. - * - * @param dbName the dbName value to set. - * @return the SparkMetastoreSpec object itself. - */ - public SparkMetastoreSpec withDbName(String dbName) { - this.dbName = dbName; - return this; - } - - /** - * Get the dbConnectionAuthenticationMode property: The authentication mode to connect to your Hive metastore - * database. More details: - * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. - * - * @return the dbConnectionAuthenticationMode value. - */ - public DbConnectionAuthenticationMode dbConnectionAuthenticationMode() { - return this.dbConnectionAuthenticationMode; - } - - /** - * Set the dbConnectionAuthenticationMode property: The authentication mode to connect to your Hive metastore - * database. More details: - * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. - * - * @param dbConnectionAuthenticationMode the dbConnectionAuthenticationMode value to set. - * @return the SparkMetastoreSpec object itself. - */ - public SparkMetastoreSpec - withDbConnectionAuthenticationMode(DbConnectionAuthenticationMode dbConnectionAuthenticationMode) { - this.dbConnectionAuthenticationMode = dbConnectionAuthenticationMode; - return this; - } - - /** - * Get the dbUsername property: The database user name. - * - * @return the dbUsername value. - */ - public String dbUsername() { - return this.dbUsername; - } - - /** - * Set the dbUsername property: The database user name. - * - * @param dbUsername the dbUsername value to set. - * @return the SparkMetastoreSpec object itself. - */ - public SparkMetastoreSpec withDbUsername(String dbUsername) { - this.dbUsername = dbUsername; - return this; - } - - /** - * Get the dbPasswordSecretName property: The secret name which contains the database user password. - * - * @return the dbPasswordSecretName value. - */ - public String dbPasswordSecretName() { - return this.dbPasswordSecretName; - } - - /** - * Set the dbPasswordSecretName property: The secret name which contains the database user password. - * - * @param dbPasswordSecretName the dbPasswordSecretName value to set. - * @return the SparkMetastoreSpec object itself. - */ - public SparkMetastoreSpec withDbPasswordSecretName(String dbPasswordSecretName) { - this.dbPasswordSecretName = dbPasswordSecretName; - return this; - } - - /** - * Get the keyVaultId property: The key vault resource id. - * - * @return the keyVaultId value. - */ - public String keyVaultId() { - return this.keyVaultId; - } - - /** - * Set the keyVaultId property: The key vault resource id. - * - * @param keyVaultId the keyVaultId value to set. - * @return the SparkMetastoreSpec object itself. - */ - public SparkMetastoreSpec withKeyVaultId(String keyVaultId) { - this.keyVaultId = keyVaultId; - return this; - } - - /** - * Get the thriftUrl property: The thrift url. - * - * @return the thriftUrl value. - */ - public String thriftUrl() { - return this.thriftUrl; - } - - /** - * Set the thriftUrl property: The thrift url. - * - * @param thriftUrl the thriftUrl value to set. - * @return the SparkMetastoreSpec object itself. - */ - public SparkMetastoreSpec withThriftUrl(String thriftUrl) { - this.thriftUrl = thriftUrl; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dbServerHost() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property dbServerHost in model SparkMetastoreSpec")); - } - if (dbName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property dbName in model SparkMetastoreSpec")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SparkMetastoreSpec.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dbServerHost", this.dbServerHost); - jsonWriter.writeStringField("dbName", this.dbName); - jsonWriter.writeStringField("dbConnectionAuthenticationMode", - this.dbConnectionAuthenticationMode == null ? null : this.dbConnectionAuthenticationMode.toString()); - jsonWriter.writeStringField("dbUserName", this.dbUsername); - jsonWriter.writeStringField("dbPasswordSecretName", this.dbPasswordSecretName); - jsonWriter.writeStringField("keyVaultId", this.keyVaultId); - jsonWriter.writeStringField("thriftUrl", this.thriftUrl); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SparkMetastoreSpec from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SparkMetastoreSpec 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 SparkMetastoreSpec. - */ - public static SparkMetastoreSpec fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SparkMetastoreSpec deserializedSparkMetastoreSpec = new SparkMetastoreSpec(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dbServerHost".equals(fieldName)) { - deserializedSparkMetastoreSpec.dbServerHost = reader.getString(); - } else if ("dbName".equals(fieldName)) { - deserializedSparkMetastoreSpec.dbName = reader.getString(); - } else if ("dbConnectionAuthenticationMode".equals(fieldName)) { - deserializedSparkMetastoreSpec.dbConnectionAuthenticationMode - = DbConnectionAuthenticationMode.fromString(reader.getString()); - } else if ("dbUserName".equals(fieldName)) { - deserializedSparkMetastoreSpec.dbUsername = reader.getString(); - } else if ("dbPasswordSecretName".equals(fieldName)) { - deserializedSparkMetastoreSpec.dbPasswordSecretName = reader.getString(); - } else if ("keyVaultId".equals(fieldName)) { - deserializedSparkMetastoreSpec.keyVaultId = reader.getString(); - } else if ("thriftUrl".equals(fieldName)) { - deserializedSparkMetastoreSpec.thriftUrl = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSparkMetastoreSpec; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkProfile.java deleted file mode 100644 index f43c6fba812c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkProfile.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The spark cluster profile. - */ -@Fluent -public final class SparkProfile implements JsonSerializable { - /* - * The default storage URL. - */ - private String defaultStorageUrl; - - /* - * The metastore specification for Spark cluster. - */ - private SparkMetastoreSpec metastoreSpec; - - /* - * Spark user plugins spec - */ - private SparkUserPlugins userPluginsSpec; - - /** - * Creates an instance of SparkProfile class. - */ - public SparkProfile() { - } - - /** - * Get the defaultStorageUrl property: The default storage URL. - * - * @return the defaultStorageUrl value. - */ - public String defaultStorageUrl() { - return this.defaultStorageUrl; - } - - /** - * Set the defaultStorageUrl property: The default storage URL. - * - * @param defaultStorageUrl the defaultStorageUrl value to set. - * @return the SparkProfile object itself. - */ - public SparkProfile withDefaultStorageUrl(String defaultStorageUrl) { - this.defaultStorageUrl = defaultStorageUrl; - return this; - } - - /** - * Get the metastoreSpec property: The metastore specification for Spark cluster. - * - * @return the metastoreSpec value. - */ - public SparkMetastoreSpec metastoreSpec() { - return this.metastoreSpec; - } - - /** - * Set the metastoreSpec property: The metastore specification for Spark cluster. - * - * @param metastoreSpec the metastoreSpec value to set. - * @return the SparkProfile object itself. - */ - public SparkProfile withMetastoreSpec(SparkMetastoreSpec metastoreSpec) { - this.metastoreSpec = metastoreSpec; - return this; - } - - /** - * Get the userPluginsSpec property: Spark user plugins spec. - * - * @return the userPluginsSpec value. - */ - public SparkUserPlugins userPluginsSpec() { - return this.userPluginsSpec; - } - - /** - * Set the userPluginsSpec property: Spark user plugins spec. - * - * @param userPluginsSpec the userPluginsSpec value to set. - * @return the SparkProfile object itself. - */ - public SparkProfile withUserPluginsSpec(SparkUserPlugins userPluginsSpec) { - this.userPluginsSpec = userPluginsSpec; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metastoreSpec() != null) { - metastoreSpec().validate(); - } - if (userPluginsSpec() != null) { - userPluginsSpec().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("defaultStorageUrl", this.defaultStorageUrl); - jsonWriter.writeJsonField("metastoreSpec", this.metastoreSpec); - jsonWriter.writeJsonField("userPluginsSpec", this.userPluginsSpec); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SparkProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SparkProfile 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 SparkProfile. - */ - public static SparkProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SparkProfile deserializedSparkProfile = new SparkProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("defaultStorageUrl".equals(fieldName)) { - deserializedSparkProfile.defaultStorageUrl = reader.getString(); - } else if ("metastoreSpec".equals(fieldName)) { - deserializedSparkProfile.metastoreSpec = SparkMetastoreSpec.fromJson(reader); - } else if ("userPluginsSpec".equals(fieldName)) { - deserializedSparkProfile.userPluginsSpec = SparkUserPlugins.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSparkProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugin.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugin.java deleted file mode 100644 index f148119362c3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugin.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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; - -/** - * Spark user plugin. - */ -@Fluent -public final class SparkUserPlugin implements JsonSerializable { - /* - * Fully qualified path to the folder containing the plugins. - */ - private String path; - - /** - * Creates an instance of SparkUserPlugin class. - */ - public SparkUserPlugin() { - } - - /** - * Get the path property: Fully qualified path to the folder containing the plugins. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: Fully qualified path to the folder containing the plugins. - * - * @param path the path value to set. - * @return the SparkUserPlugin object itself. - */ - public SparkUserPlugin withPath(String path) { - this.path = path; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (path() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property path in model SparkUserPlugin")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SparkUserPlugin.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("path", this.path); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SparkUserPlugin from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SparkUserPlugin 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 SparkUserPlugin. - */ - public static SparkUserPlugin fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SparkUserPlugin deserializedSparkUserPlugin = new SparkUserPlugin(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("path".equals(fieldName)) { - deserializedSparkUserPlugin.path = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSparkUserPlugin; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugins.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugins.java deleted file mode 100644 index c35d6e177fd6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugins.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 java.io.IOException; -import java.util.List; - -/** - * Spark user plugins spec. - */ -@Fluent -public final class SparkUserPlugins implements JsonSerializable { - /* - * Spark user plugins. - */ - private List plugins; - - /** - * Creates an instance of SparkUserPlugins class. - */ - public SparkUserPlugins() { - } - - /** - * Get the plugins property: Spark user plugins. - * - * @return the plugins value. - */ - public List plugins() { - return this.plugins; - } - - /** - * Set the plugins property: Spark user plugins. - * - * @param plugins the plugins value to set. - * @return the SparkUserPlugins object itself. - */ - public SparkUserPlugins withPlugins(List plugins) { - this.plugins = plugins; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (plugins() != null) { - plugins().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("plugins", this.plugins, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SparkUserPlugins from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SparkUserPlugins 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 SparkUserPlugins. - */ - public static SparkUserPlugins fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SparkUserPlugins deserializedSparkUserPlugins = new SparkUserPlugins(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("plugins".equals(fieldName)) { - List plugins = reader.readArray(reader1 -> SparkUserPlugin.fromJson(reader1)); - deserializedSparkUserPlugins.plugins = plugins; - } else { - reader.skipChildren(); - } - } - - return deserializedSparkUserPlugins; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshConnectivityEndpoint.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshConnectivityEndpoint.java deleted file mode 100644 index 09329fc70b23..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshConnectivityEndpoint.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 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; - -/** - * SSH connectivity endpoint details. - */ -@Fluent -public final class SshConnectivityEndpoint implements JsonSerializable { - /* - * SSH connectivity endpoint. - */ - private String endpoint; - - /* - * Private SSH connectivity endpoint. This property will only be returned when enableInternalIngress is true. - */ - private String privateSshEndpoint; - - /** - * Creates an instance of SshConnectivityEndpoint class. - */ - public SshConnectivityEndpoint() { - } - - /** - * Get the endpoint property: SSH connectivity endpoint. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: SSH connectivity endpoint. - * - * @param endpoint the endpoint value to set. - * @return the SshConnectivityEndpoint object itself. - */ - public SshConnectivityEndpoint withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the privateSshEndpoint property: Private SSH connectivity endpoint. This property will only be returned when - * enableInternalIngress is true. - * - * @return the privateSshEndpoint value. - */ - public String privateSshEndpoint() { - return this.privateSshEndpoint; - } - - /** - * Set the privateSshEndpoint property: Private SSH connectivity endpoint. This property will only be returned when - * enableInternalIngress is true. - * - * @param privateSshEndpoint the privateSshEndpoint value to set. - * @return the SshConnectivityEndpoint object itself. - */ - public SshConnectivityEndpoint withPrivateSshEndpoint(String privateSshEndpoint) { - this.privateSshEndpoint = privateSshEndpoint; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property endpoint in model SshConnectivityEndpoint")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SshConnectivityEndpoint.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("endpoint", this.endpoint); - jsonWriter.writeStringField("privateSshEndpoint", this.privateSshEndpoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SshConnectivityEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SshConnectivityEndpoint 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 SshConnectivityEndpoint. - */ - public static SshConnectivityEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SshConnectivityEndpoint deserializedSshConnectivityEndpoint = new SshConnectivityEndpoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("endpoint".equals(fieldName)) { - deserializedSshConnectivityEndpoint.endpoint = reader.getString(); - } else if ("privateSshEndpoint".equals(fieldName)) { - deserializedSshConnectivityEndpoint.privateSshEndpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSshConnectivityEndpoint; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshProfile.java deleted file mode 100644 index 97957896875f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshProfile.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Ssh profile for the cluster. - */ -@Fluent -public final class SshProfile implements JsonSerializable { - /* - * Number of ssh pods per cluster. - */ - private int count; - - /* - * Prefix of the pod names. Pod number will be appended to the prefix. The ingress URLs for the pods will be - * available at //- - */ - private String podPrefix; - - /* - * The virtual machine SKU. - */ - private String vmSize; - - /** - * Creates an instance of SshProfile class. - */ - public SshProfile() { - } - - /** - * Get the count property: Number of ssh pods per cluster. - * - * @return the count value. - */ - public int count() { - return this.count; - } - - /** - * Set the count property: Number of ssh pods per cluster. - * - * @param count the count value to set. - * @return the SshProfile object itself. - */ - public SshProfile withCount(int count) { - this.count = count; - return this; - } - - /** - * Get the podPrefix property: Prefix of the pod names. Pod number will be appended to the prefix. The ingress URLs - * for the pods will be available at <clusterFqdn>/<sshBasePath>/<prefix>-<number>. - * - * @return the podPrefix value. - */ - public String podPrefix() { - return this.podPrefix; - } - - /** - * Get the vmSize property: The virtual machine SKU. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: The virtual machine SKU. - * - * @param vmSize the vmSize value to set. - * @return the SshProfile object itself. - */ - public SshProfile withVmSize(String vmSize) { - this.vmSize = vmSize; - 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.writeIntField("count", this.count); - jsonWriter.writeStringField("vmSize", this.vmSize); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SshProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SshProfile 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 SshProfile. - */ - public static SshProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SshProfile deserializedSshProfile = new SshProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("count".equals(fieldName)) { - deserializedSshProfile.count = reader.getInt(); - } else if ("podPrefix".equals(fieldName)) { - deserializedSshProfile.podPrefix = reader.getString(); - } else if ("vmSize".equals(fieldName)) { - deserializedSshProfile.vmSize = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSshProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Status.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Status.java deleted file mode 100644 index 99985a2ffc1a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Status.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Status of the library. - */ -public final class Status extends ExpandableStringEnum { - /** - * Static value INSTALLING for Status. - */ - public static final Status INSTALLING = fromString("INSTALLING"); - - /** - * Static value INSTALLED for Status. - */ - public static final Status INSTALLED = fromString("INSTALLED"); - - /** - * Static value INSTALL_FAILED for Status. - */ - public static final Status INSTALL_FAILED = fromString("INSTALL_FAILED"); - - /** - * Static value UNINSTALLING for Status. - */ - public static final Status UNINSTALLING = fromString("UNINSTALLING"); - - /** - * Static value UNINSTALL_FAILED for Status. - */ - public static final Status UNINSTALL_FAILED = fromString("UNINSTALL_FAILED"); - - /** - * Creates a new instance of Status value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Status() { - } - - /** - * Creates or finds a Status from its string representation. - * - * @param name a name to look for. - * @return the corresponding Status. - */ - public static Status fromString(String name) { - return fromString(name, Status.class); - } - - /** - * Gets known Status values. - * - * @return known Status values. - */ - public static Collection values() { - return values(Status.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TagsObject.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TagsObject.java deleted file mode 100644 index 34ae7cdc6577..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TagsObject.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Tags object for patch operations. - */ -@Fluent -public final class TagsObject implements JsonSerializable { - /* - * Resource tags. - */ - private Map tags; - - /** - * Creates an instance of TagsObject class. - */ - public TagsObject() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the TagsObject object itself. - */ - public TagsObject withTags(Map tags) { - this.tags = tags; - 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.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TagsObject from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TagsObject 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 TagsObject. - */ - public static TagsObject fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TagsObject deserializedTagsObject = new TagsObject(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedTagsObject.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedTagsObject; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoCoordinator.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoCoordinator.java deleted file mode 100644 index 8b8a87929c2d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoCoordinator.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Trino Coordinator. - */ -@Fluent -public final class TrinoCoordinator implements JsonSerializable { - /* - * Trino debug configuration. - */ - private TrinoDebugConfig debug; - - /* - * The flag that if enable coordinator HA, uses multiple coordinator replicas with auto failover, one per each head - * node. Default: true. - */ - private Boolean highAvailabilityEnabled; - - /** - * Creates an instance of TrinoCoordinator class. - */ - public TrinoCoordinator() { - } - - /** - * Get the debug property: Trino debug configuration. - * - * @return the debug value. - */ - public TrinoDebugConfig debug() { - return this.debug; - } - - /** - * Set the debug property: Trino debug configuration. - * - * @param debug the debug value to set. - * @return the TrinoCoordinator object itself. - */ - public TrinoCoordinator withDebug(TrinoDebugConfig debug) { - this.debug = debug; - return this; - } - - /** - * Get the highAvailabilityEnabled property: The flag that if enable coordinator HA, uses multiple coordinator - * replicas with auto failover, one per each head node. Default: true. - * - * @return the highAvailabilityEnabled value. - */ - public Boolean highAvailabilityEnabled() { - return this.highAvailabilityEnabled; - } - - /** - * Set the highAvailabilityEnabled property: The flag that if enable coordinator HA, uses multiple coordinator - * replicas with auto failover, one per each head node. Default: true. - * - * @param highAvailabilityEnabled the highAvailabilityEnabled value to set. - * @return the TrinoCoordinator object itself. - */ - public TrinoCoordinator withHighAvailabilityEnabled(Boolean highAvailabilityEnabled) { - this.highAvailabilityEnabled = highAvailabilityEnabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (debug() != null) { - debug().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("debug", this.debug); - jsonWriter.writeBooleanField("highAvailabilityEnabled", this.highAvailabilityEnabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrinoCoordinator from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrinoCoordinator 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 TrinoCoordinator. - */ - public static TrinoCoordinator fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrinoCoordinator deserializedTrinoCoordinator = new TrinoCoordinator(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("debug".equals(fieldName)) { - deserializedTrinoCoordinator.debug = TrinoDebugConfig.fromJson(reader); - } else if ("highAvailabilityEnabled".equals(fieldName)) { - deserializedTrinoCoordinator.highAvailabilityEnabled = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedTrinoCoordinator; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoDebugConfig.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoDebugConfig.java deleted file mode 100644 index 2534a05a3942..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoDebugConfig.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Trino debug configuration. - */ -@Fluent -public final class TrinoDebugConfig implements JsonSerializable { - /* - * The flag that if enable debug or not. - */ - private Boolean enable; - - /* - * The debug port. - */ - private Integer port; - - /* - * The flag that if suspend debug or not. - */ - private Boolean suspend; - - /** - * Creates an instance of TrinoDebugConfig class. - */ - public TrinoDebugConfig() { - } - - /** - * Get the enable property: The flag that if enable debug or not. - * - * @return the enable value. - */ - public Boolean enable() { - return this.enable; - } - - /** - * Set the enable property: The flag that if enable debug or not. - * - * @param enable the enable value to set. - * @return the TrinoDebugConfig object itself. - */ - public TrinoDebugConfig withEnable(Boolean enable) { - this.enable = enable; - return this; - } - - /** - * Get the port property: The debug port. - * - * @return the port value. - */ - public Integer port() { - return this.port; - } - - /** - * Set the port property: The debug port. - * - * @param port the port value to set. - * @return the TrinoDebugConfig object itself. - */ - public TrinoDebugConfig withPort(Integer port) { - this.port = port; - return this; - } - - /** - * Get the suspend property: The flag that if suspend debug or not. - * - * @return the suspend value. - */ - public Boolean suspend() { - return this.suspend; - } - - /** - * Set the suspend property: The flag that if suspend debug or not. - * - * @param suspend the suspend value to set. - * @return the TrinoDebugConfig object itself. - */ - public TrinoDebugConfig withSuspend(Boolean suspend) { - this.suspend = suspend; - 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.writeBooleanField("enable", this.enable); - jsonWriter.writeNumberField("port", this.port); - jsonWriter.writeBooleanField("suspend", this.suspend); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrinoDebugConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrinoDebugConfig 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 TrinoDebugConfig. - */ - public static TrinoDebugConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrinoDebugConfig deserializedTrinoDebugConfig = new TrinoDebugConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enable".equals(fieldName)) { - deserializedTrinoDebugConfig.enable = reader.getNullable(JsonReader::getBoolean); - } else if ("port".equals(fieldName)) { - deserializedTrinoDebugConfig.port = reader.getNullable(JsonReader::getInt); - } else if ("suspend".equals(fieldName)) { - deserializedTrinoDebugConfig.suspend = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedTrinoDebugConfig; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoProfile.java deleted file mode 100644 index 458100890757..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoProfile.java +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Trino Cluster profile. - */ -@Fluent -public final class TrinoProfile implements JsonSerializable { - /* - * Trino cluster catalog options. - */ - private CatalogOptions catalogOptions; - - /* - * Trino Coordinator. - */ - private TrinoCoordinator coordinator; - - /* - * Trino user plugins spec - */ - private TrinoUserPlugins userPluginsSpec; - - /* - * User telemetry - */ - private TrinoUserTelemetry userTelemetrySpec; - - /* - * Trino worker. - */ - private TrinoWorker worker; - - /** - * Creates an instance of TrinoProfile class. - */ - public TrinoProfile() { - } - - /** - * Get the catalogOptions property: Trino cluster catalog options. - * - * @return the catalogOptions value. - */ - public CatalogOptions catalogOptions() { - return this.catalogOptions; - } - - /** - * Set the catalogOptions property: Trino cluster catalog options. - * - * @param catalogOptions the catalogOptions value to set. - * @return the TrinoProfile object itself. - */ - public TrinoProfile withCatalogOptions(CatalogOptions catalogOptions) { - this.catalogOptions = catalogOptions; - return this; - } - - /** - * Get the coordinator property: Trino Coordinator. - * - * @return the coordinator value. - */ - public TrinoCoordinator coordinator() { - return this.coordinator; - } - - /** - * Set the coordinator property: Trino Coordinator. - * - * @param coordinator the coordinator value to set. - * @return the TrinoProfile object itself. - */ - public TrinoProfile withCoordinator(TrinoCoordinator coordinator) { - this.coordinator = coordinator; - return this; - } - - /** - * Get the userPluginsSpec property: Trino user plugins spec. - * - * @return the userPluginsSpec value. - */ - public TrinoUserPlugins userPluginsSpec() { - return this.userPluginsSpec; - } - - /** - * Set the userPluginsSpec property: Trino user plugins spec. - * - * @param userPluginsSpec the userPluginsSpec value to set. - * @return the TrinoProfile object itself. - */ - public TrinoProfile withUserPluginsSpec(TrinoUserPlugins userPluginsSpec) { - this.userPluginsSpec = userPluginsSpec; - return this; - } - - /** - * Get the userTelemetrySpec property: User telemetry. - * - * @return the userTelemetrySpec value. - */ - public TrinoUserTelemetry userTelemetrySpec() { - return this.userTelemetrySpec; - } - - /** - * Set the userTelemetrySpec property: User telemetry. - * - * @param userTelemetrySpec the userTelemetrySpec value to set. - * @return the TrinoProfile object itself. - */ - public TrinoProfile withUserTelemetrySpec(TrinoUserTelemetry userTelemetrySpec) { - this.userTelemetrySpec = userTelemetrySpec; - return this; - } - - /** - * Get the worker property: Trino worker. - * - * @return the worker value. - */ - public TrinoWorker worker() { - return this.worker; - } - - /** - * Set the worker property: Trino worker. - * - * @param worker the worker value to set. - * @return the TrinoProfile object itself. - */ - public TrinoProfile withWorker(TrinoWorker worker) { - this.worker = worker; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (catalogOptions() != null) { - catalogOptions().validate(); - } - if (coordinator() != null) { - coordinator().validate(); - } - if (userPluginsSpec() != null) { - userPluginsSpec().validate(); - } - if (userTelemetrySpec() != null) { - userTelemetrySpec().validate(); - } - if (worker() != null) { - worker().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("catalogOptions", this.catalogOptions); - jsonWriter.writeJsonField("coordinator", this.coordinator); - jsonWriter.writeJsonField("userPluginsSpec", this.userPluginsSpec); - jsonWriter.writeJsonField("userTelemetrySpec", this.userTelemetrySpec); - jsonWriter.writeJsonField("worker", this.worker); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrinoProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrinoProfile 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 TrinoProfile. - */ - public static TrinoProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrinoProfile deserializedTrinoProfile = new TrinoProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("catalogOptions".equals(fieldName)) { - deserializedTrinoProfile.catalogOptions = CatalogOptions.fromJson(reader); - } else if ("coordinator".equals(fieldName)) { - deserializedTrinoProfile.coordinator = TrinoCoordinator.fromJson(reader); - } else if ("userPluginsSpec".equals(fieldName)) { - deserializedTrinoProfile.userPluginsSpec = TrinoUserPlugins.fromJson(reader); - } else if ("userTelemetrySpec".equals(fieldName)) { - deserializedTrinoProfile.userTelemetrySpec = TrinoUserTelemetry.fromJson(reader); - } else if ("worker".equals(fieldName)) { - deserializedTrinoProfile.worker = TrinoWorker.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTrinoProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoTelemetryConfig.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoTelemetryConfig.java deleted file mode 100644 index 031314a63649..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoTelemetryConfig.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Trino user telemetry definition. - */ -@Fluent -public final class TrinoTelemetryConfig implements JsonSerializable { - /* - * Hive Catalog name used to mount external tables on the logs written by trino, if not specified there tables are - * not created. - */ - private String hivecatalogName; - - /* - * Schema of the above catalog to use, to mount query logs as external tables, if not specified tables will be - * mounted under schema trinologs. - */ - private String hivecatalogSchema; - - /* - * Retention period for query log table partitions, this doesn't have any affect on actual data. - */ - private Integer partitionRetentionInDays; - - /* - * Azure storage location of the blobs. - */ - private String path; - - /** - * Creates an instance of TrinoTelemetryConfig class. - */ - public TrinoTelemetryConfig() { - } - - /** - * Get the hivecatalogName property: Hive Catalog name used to mount external tables on the logs written by trino, - * if not specified there tables are not created. - * - * @return the hivecatalogName value. - */ - public String hivecatalogName() { - return this.hivecatalogName; - } - - /** - * Set the hivecatalogName property: Hive Catalog name used to mount external tables on the logs written by trino, - * if not specified there tables are not created. - * - * @param hivecatalogName the hivecatalogName value to set. - * @return the TrinoTelemetryConfig object itself. - */ - public TrinoTelemetryConfig withHivecatalogName(String hivecatalogName) { - this.hivecatalogName = hivecatalogName; - return this; - } - - /** - * Get the hivecatalogSchema property: Schema of the above catalog to use, to mount query logs as external tables, - * if not specified tables will be mounted under schema trinologs. - * - * @return the hivecatalogSchema value. - */ - public String hivecatalogSchema() { - return this.hivecatalogSchema; - } - - /** - * Set the hivecatalogSchema property: Schema of the above catalog to use, to mount query logs as external tables, - * if not specified tables will be mounted under schema trinologs. - * - * @param hivecatalogSchema the hivecatalogSchema value to set. - * @return the TrinoTelemetryConfig object itself. - */ - public TrinoTelemetryConfig withHivecatalogSchema(String hivecatalogSchema) { - this.hivecatalogSchema = hivecatalogSchema; - return this; - } - - /** - * Get the partitionRetentionInDays property: Retention period for query log table partitions, this doesn't have any - * affect on actual data. - * - * @return the partitionRetentionInDays value. - */ - public Integer partitionRetentionInDays() { - return this.partitionRetentionInDays; - } - - /** - * Set the partitionRetentionInDays property: Retention period for query log table partitions, this doesn't have any - * affect on actual data. - * - * @param partitionRetentionInDays the partitionRetentionInDays value to set. - * @return the TrinoTelemetryConfig object itself. - */ - public TrinoTelemetryConfig withPartitionRetentionInDays(Integer partitionRetentionInDays) { - this.partitionRetentionInDays = partitionRetentionInDays; - return this; - } - - /** - * Get the path property: Azure storage location of the blobs. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: Azure storage location of the blobs. - * - * @param path the path value to set. - * @return the TrinoTelemetryConfig object itself. - */ - public TrinoTelemetryConfig withPath(String path) { - this.path = path; - 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("hivecatalogName", this.hivecatalogName); - jsonWriter.writeStringField("hivecatalogSchema", this.hivecatalogSchema); - jsonWriter.writeNumberField("partitionRetentionInDays", this.partitionRetentionInDays); - jsonWriter.writeStringField("path", this.path); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrinoTelemetryConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrinoTelemetryConfig 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 TrinoTelemetryConfig. - */ - public static TrinoTelemetryConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrinoTelemetryConfig deserializedTrinoTelemetryConfig = new TrinoTelemetryConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("hivecatalogName".equals(fieldName)) { - deserializedTrinoTelemetryConfig.hivecatalogName = reader.getString(); - } else if ("hivecatalogSchema".equals(fieldName)) { - deserializedTrinoTelemetryConfig.hivecatalogSchema = reader.getString(); - } else if ("partitionRetentionInDays".equals(fieldName)) { - deserializedTrinoTelemetryConfig.partitionRetentionInDays = reader.getNullable(JsonReader::getInt); - } else if ("path".equals(fieldName)) { - deserializedTrinoTelemetryConfig.path = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTrinoTelemetryConfig; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugin.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugin.java deleted file mode 100644 index 0cec4ceed268..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugin.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Trino user plugin. - */ -@Fluent -public final class TrinoUserPlugin implements JsonSerializable { - /* - * Denotes whether the plugin is active or not. - */ - private Boolean enabled; - - /* - * This field maps to the sub-directory in trino plugins location, that will contain all the plugins under path. - */ - private String name; - - /* - * Fully qualified path to the folder containing the plugins. - */ - private String path; - - /** - * Creates an instance of TrinoUserPlugin class. - */ - public TrinoUserPlugin() { - } - - /** - * Get the enabled property: Denotes whether the plugin is active or not. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Denotes whether the plugin is active or not. - * - * @param enabled the enabled value to set. - * @return the TrinoUserPlugin object itself. - */ - public TrinoUserPlugin withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the name property: This field maps to the sub-directory in trino plugins location, that will contain all the - * plugins under path. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: This field maps to the sub-directory in trino plugins location, that will contain all the - * plugins under path. - * - * @param name the name value to set. - * @return the TrinoUserPlugin object itself. - */ - public TrinoUserPlugin withName(String name) { - this.name = name; - return this; - } - - /** - * Get the path property: Fully qualified path to the folder containing the plugins. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: Fully qualified path to the folder containing the plugins. - * - * @param path the path value to set. - * @return the TrinoUserPlugin object itself. - */ - public TrinoUserPlugin withPath(String path) { - this.path = path; - 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.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("path", this.path); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrinoUserPlugin from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrinoUserPlugin 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 TrinoUserPlugin. - */ - public static TrinoUserPlugin fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrinoUserPlugin deserializedTrinoUserPlugin = new TrinoUserPlugin(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedTrinoUserPlugin.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("name".equals(fieldName)) { - deserializedTrinoUserPlugin.name = reader.getString(); - } else if ("path".equals(fieldName)) { - deserializedTrinoUserPlugin.path = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTrinoUserPlugin; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugins.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugins.java deleted file mode 100644 index b351ed903728..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugins.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 java.io.IOException; -import java.util.List; - -/** - * Trino user plugins spec. - */ -@Fluent -public final class TrinoUserPlugins implements JsonSerializable { - /* - * Trino user plugins. - */ - private List plugins; - - /** - * Creates an instance of TrinoUserPlugins class. - */ - public TrinoUserPlugins() { - } - - /** - * Get the plugins property: Trino user plugins. - * - * @return the plugins value. - */ - public List plugins() { - return this.plugins; - } - - /** - * Set the plugins property: Trino user plugins. - * - * @param plugins the plugins value to set. - * @return the TrinoUserPlugins object itself. - */ - public TrinoUserPlugins withPlugins(List plugins) { - this.plugins = plugins; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (plugins() != null) { - plugins().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("plugins", this.plugins, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrinoUserPlugins from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrinoUserPlugins 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 TrinoUserPlugins. - */ - public static TrinoUserPlugins fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrinoUserPlugins deserializedTrinoUserPlugins = new TrinoUserPlugins(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("plugins".equals(fieldName)) { - List plugins = reader.readArray(reader1 -> TrinoUserPlugin.fromJson(reader1)); - deserializedTrinoUserPlugins.plugins = plugins; - } else { - reader.skipChildren(); - } - } - - return deserializedTrinoUserPlugins; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserTelemetry.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserTelemetry.java deleted file mode 100644 index 8cb653c87297..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserTelemetry.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * User telemetry. - */ -@Fluent -public final class TrinoUserTelemetry implements JsonSerializable { - /* - * Trino user telemetry definition. - */ - private TrinoTelemetryConfig storage; - - /** - * Creates an instance of TrinoUserTelemetry class. - */ - public TrinoUserTelemetry() { - } - - /** - * Get the storage property: Trino user telemetry definition. - * - * @return the storage value. - */ - public TrinoTelemetryConfig storage() { - return this.storage; - } - - /** - * Set the storage property: Trino user telemetry definition. - * - * @param storage the storage value to set. - * @return the TrinoUserTelemetry object itself. - */ - public TrinoUserTelemetry withStorage(TrinoTelemetryConfig storage) { - this.storage = storage; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storage() != null) { - storage().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("storage", this.storage); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrinoUserTelemetry from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrinoUserTelemetry 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 TrinoUserTelemetry. - */ - public static TrinoUserTelemetry fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrinoUserTelemetry deserializedTrinoUserTelemetry = new TrinoUserTelemetry(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("storage".equals(fieldName)) { - deserializedTrinoUserTelemetry.storage = TrinoTelemetryConfig.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTrinoUserTelemetry; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoWorker.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoWorker.java deleted file mode 100644 index 5e062bb37108..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoWorker.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Trino worker. - */ -@Fluent -public final class TrinoWorker implements JsonSerializable { - /* - * Trino debug configuration. - */ - private TrinoDebugConfig debug; - - /** - * Creates an instance of TrinoWorker class. - */ - public TrinoWorker() { - } - - /** - * Get the debug property: Trino debug configuration. - * - * @return the debug value. - */ - public TrinoDebugConfig debug() { - return this.debug; - } - - /** - * Set the debug property: Trino debug configuration. - * - * @param debug the debug value to set. - * @return the TrinoWorker object itself. - */ - public TrinoWorker withDebug(TrinoDebugConfig debug) { - this.debug = debug; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (debug() != null) { - debug().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("debug", this.debug); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TrinoWorker from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TrinoWorker 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 TrinoWorker. - */ - public static TrinoWorker fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TrinoWorker deserializedTrinoWorker = new TrinoWorker(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("debug".equals(fieldName)) { - deserializedTrinoWorker.debug = TrinoDebugConfig.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTrinoWorker; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Type.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Type.java deleted file mode 100644 index fe6eb1cd3e58..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Type.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of the library. - */ -public final class Type extends ExpandableStringEnum { - /** - * Static value pypi for Type. - */ - public static final Type PYPI = fromString("pypi"); - - /** - * Static value maven for Type. - */ - public static final Type MAVEN = fromString("maven"); - - /** - * Creates a new instance of Type value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Type() { - } - - /** - * Creates or finds a Type from its string representation. - * - * @param name a name to look for. - * @return the corresponding Type. - */ - public static Type fromString(String name) { - return fromString(name, Type.class); - } - - /** - * Gets known Type values. - * - * @return known Type values. - */ - public static Collection values() { - return values(Type.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpdatableClusterProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpdatableClusterProfile.java deleted file mode 100644 index d5e3bcf17517..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpdatableClusterProfile.java +++ /dev/null @@ -1,420 +0,0 @@ -// Copyright (c) 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.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Cluster resource patch properties. - */ -@Fluent -public final class UpdatableClusterProfile implements JsonSerializable { - /* - * The service configs profiles. - */ - private List serviceConfigsProfiles; - - /* - * Ssh profile for the cluster. - */ - private SshProfile sshProfile; - - /* - * This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. - */ - private AutoscaleProfile autoscaleProfile; - - /* - * Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. - */ - private AuthorizationProfile authorizationProfile; - - /* - * Cluster log analytics profile to enable or disable OMS agent for cluster. - */ - private ClusterLogAnalyticsProfile logAnalyticsProfile; - - /* - * Cluster Prometheus profile. - */ - private ClusterPrometheusProfile prometheusProfile; - - /* - * Cluster Ranger plugin profile. - */ - private ClusterRangerPluginProfile rangerPluginProfile; - - /* - * The ranger cluster profile. - */ - private RangerProfile rangerProfile; - - /* - * The script action profile list. - */ - private List scriptActionProfiles; - - /* - * The cluster secret profile. - */ - private SecretsProfile secretsProfile; - - /* - * Trino Cluster profile. - */ - private TrinoProfile trinoProfile; - - /** - * Creates an instance of UpdatableClusterProfile class. - */ - public UpdatableClusterProfile() { - } - - /** - * Get the serviceConfigsProfiles property: The service configs profiles. - * - * @return the serviceConfigsProfiles value. - */ - public List serviceConfigsProfiles() { - return this.serviceConfigsProfiles; - } - - /** - * Set the serviceConfigsProfiles property: The service configs profiles. - * - * @param serviceConfigsProfiles the serviceConfigsProfiles value to set. - * @return the UpdatableClusterProfile object itself. - */ - public UpdatableClusterProfile - withServiceConfigsProfiles(List serviceConfigsProfiles) { - this.serviceConfigsProfiles = serviceConfigsProfiles; - return this; - } - - /** - * Get the sshProfile property: Ssh profile for the cluster. - * - * @return the sshProfile value. - */ - public SshProfile sshProfile() { - return this.sshProfile; - } - - /** - * Set the sshProfile property: Ssh profile for the cluster. - * - * @param sshProfile the sshProfile value to set. - * @return the UpdatableClusterProfile object itself. - */ - public UpdatableClusterProfile withSshProfile(SshProfile sshProfile) { - this.sshProfile = sshProfile; - return this; - } - - /** - * Get the autoscaleProfile property: This is the Autoscale profile for the cluster. This will allow customer to - * create cluster enabled with Autoscale. - * - * @return the autoscaleProfile value. - */ - public AutoscaleProfile autoscaleProfile() { - return this.autoscaleProfile; - } - - /** - * Set the autoscaleProfile property: This is the Autoscale profile for the cluster. This will allow customer to - * create cluster enabled with Autoscale. - * - * @param autoscaleProfile the autoscaleProfile value to set. - * @return the UpdatableClusterProfile object itself. - */ - public UpdatableClusterProfile withAutoscaleProfile(AutoscaleProfile autoscaleProfile) { - this.autoscaleProfile = autoscaleProfile; - return this; - } - - /** - * Get the authorizationProfile property: Authorization profile with details of AAD user Ids and group Ids - * authorized for data plane access. - * - * @return the authorizationProfile value. - */ - public AuthorizationProfile authorizationProfile() { - return this.authorizationProfile; - } - - /** - * Set the authorizationProfile property: Authorization profile with details of AAD user Ids and group Ids - * authorized for data plane access. - * - * @param authorizationProfile the authorizationProfile value to set. - * @return the UpdatableClusterProfile object itself. - */ - public UpdatableClusterProfile withAuthorizationProfile(AuthorizationProfile authorizationProfile) { - this.authorizationProfile = authorizationProfile; - return this; - } - - /** - * Get the logAnalyticsProfile property: Cluster log analytics profile to enable or disable OMS agent for cluster. - * - * @return the logAnalyticsProfile value. - */ - public ClusterLogAnalyticsProfile logAnalyticsProfile() { - return this.logAnalyticsProfile; - } - - /** - * Set the logAnalyticsProfile property: Cluster log analytics profile to enable or disable OMS agent for cluster. - * - * @param logAnalyticsProfile the logAnalyticsProfile value to set. - * @return the UpdatableClusterProfile object itself. - */ - public UpdatableClusterProfile withLogAnalyticsProfile(ClusterLogAnalyticsProfile logAnalyticsProfile) { - this.logAnalyticsProfile = logAnalyticsProfile; - return this; - } - - /** - * Get the prometheusProfile property: Cluster Prometheus profile. - * - * @return the prometheusProfile value. - */ - public ClusterPrometheusProfile prometheusProfile() { - return this.prometheusProfile; - } - - /** - * Set the prometheusProfile property: Cluster Prometheus profile. - * - * @param prometheusProfile the prometheusProfile value to set. - * @return the UpdatableClusterProfile object itself. - */ - public UpdatableClusterProfile withPrometheusProfile(ClusterPrometheusProfile prometheusProfile) { - this.prometheusProfile = prometheusProfile; - return this; - } - - /** - * Get the rangerPluginProfile property: Cluster Ranger plugin profile. - * - * @return the rangerPluginProfile value. - */ - public ClusterRangerPluginProfile rangerPluginProfile() { - return this.rangerPluginProfile; - } - - /** - * Set the rangerPluginProfile property: Cluster Ranger plugin profile. - * - * @param rangerPluginProfile the rangerPluginProfile value to set. - * @return the UpdatableClusterProfile object itself. - */ - public UpdatableClusterProfile withRangerPluginProfile(ClusterRangerPluginProfile rangerPluginProfile) { - this.rangerPluginProfile = rangerPluginProfile; - return this; - } - - /** - * Get the rangerProfile property: The ranger cluster profile. - * - * @return the rangerProfile value. - */ - public RangerProfile rangerProfile() { - return this.rangerProfile; - } - - /** - * Set the rangerProfile property: The ranger cluster profile. - * - * @param rangerProfile the rangerProfile value to set. - * @return the UpdatableClusterProfile object itself. - */ - public UpdatableClusterProfile withRangerProfile(RangerProfile rangerProfile) { - this.rangerProfile = rangerProfile; - return this; - } - - /** - * Get the scriptActionProfiles property: The script action profile list. - * - * @return the scriptActionProfiles value. - */ - public List scriptActionProfiles() { - return this.scriptActionProfiles; - } - - /** - * Set the scriptActionProfiles property: The script action profile list. - * - * @param scriptActionProfiles the scriptActionProfiles value to set. - * @return the UpdatableClusterProfile object itself. - */ - public UpdatableClusterProfile withScriptActionProfiles(List scriptActionProfiles) { - this.scriptActionProfiles = scriptActionProfiles; - return this; - } - - /** - * Get the secretsProfile property: The cluster secret profile. - * - * @return the secretsProfile value. - */ - public SecretsProfile secretsProfile() { - return this.secretsProfile; - } - - /** - * Set the secretsProfile property: The cluster secret profile. - * - * @param secretsProfile the secretsProfile value to set. - * @return the UpdatableClusterProfile object itself. - */ - public UpdatableClusterProfile withSecretsProfile(SecretsProfile secretsProfile) { - this.secretsProfile = secretsProfile; - return this; - } - - /** - * Get the trinoProfile property: Trino Cluster profile. - * - * @return the trinoProfile value. - */ - public TrinoProfile trinoProfile() { - return this.trinoProfile; - } - - /** - * Set the trinoProfile property: Trino Cluster profile. - * - * @param trinoProfile the trinoProfile value to set. - * @return the UpdatableClusterProfile object itself. - */ - public UpdatableClusterProfile withTrinoProfile(TrinoProfile trinoProfile) { - this.trinoProfile = trinoProfile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceConfigsProfiles() != null) { - serviceConfigsProfiles().forEach(e -> e.validate()); - } - if (sshProfile() != null) { - sshProfile().validate(); - } - if (autoscaleProfile() != null) { - autoscaleProfile().validate(); - } - if (authorizationProfile() != null) { - authorizationProfile().validate(); - } - if (logAnalyticsProfile() != null) { - logAnalyticsProfile().validate(); - } - if (prometheusProfile() != null) { - prometheusProfile().validate(); - } - if (rangerPluginProfile() != null) { - rangerPluginProfile().validate(); - } - if (rangerProfile() != null) { - rangerProfile().validate(); - } - if (scriptActionProfiles() != null) { - scriptActionProfiles().forEach(e -> e.validate()); - } - if (secretsProfile() != null) { - secretsProfile().validate(); - } - if (trinoProfile() != null) { - trinoProfile().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("serviceConfigsProfiles", this.serviceConfigsProfiles, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("sshProfile", this.sshProfile); - jsonWriter.writeJsonField("autoscaleProfile", this.autoscaleProfile); - jsonWriter.writeJsonField("authorizationProfile", this.authorizationProfile); - jsonWriter.writeJsonField("logAnalyticsProfile", this.logAnalyticsProfile); - jsonWriter.writeJsonField("prometheusProfile", this.prometheusProfile); - jsonWriter.writeJsonField("rangerPluginProfile", this.rangerPluginProfile); - jsonWriter.writeJsonField("rangerProfile", this.rangerProfile); - jsonWriter.writeArrayField("scriptActionProfiles", this.scriptActionProfiles, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("secretsProfile", this.secretsProfile); - jsonWriter.writeJsonField("trinoProfile", this.trinoProfile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UpdatableClusterProfile from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UpdatableClusterProfile 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 UpdatableClusterProfile. - */ - public static UpdatableClusterProfile fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UpdatableClusterProfile deserializedUpdatableClusterProfile = new UpdatableClusterProfile(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serviceConfigsProfiles".equals(fieldName)) { - List serviceConfigsProfiles - = reader.readArray(reader1 -> ClusterServiceConfigsProfile.fromJson(reader1)); - deserializedUpdatableClusterProfile.serviceConfigsProfiles = serviceConfigsProfiles; - } else if ("sshProfile".equals(fieldName)) { - deserializedUpdatableClusterProfile.sshProfile = SshProfile.fromJson(reader); - } else if ("autoscaleProfile".equals(fieldName)) { - deserializedUpdatableClusterProfile.autoscaleProfile = AutoscaleProfile.fromJson(reader); - } else if ("authorizationProfile".equals(fieldName)) { - deserializedUpdatableClusterProfile.authorizationProfile = AuthorizationProfile.fromJson(reader); - } else if ("logAnalyticsProfile".equals(fieldName)) { - deserializedUpdatableClusterProfile.logAnalyticsProfile - = ClusterLogAnalyticsProfile.fromJson(reader); - } else if ("prometheusProfile".equals(fieldName)) { - deserializedUpdatableClusterProfile.prometheusProfile = ClusterPrometheusProfile.fromJson(reader); - } else if ("rangerPluginProfile".equals(fieldName)) { - deserializedUpdatableClusterProfile.rangerPluginProfile - = ClusterRangerPluginProfile.fromJson(reader); - } else if ("rangerProfile".equals(fieldName)) { - deserializedUpdatableClusterProfile.rangerProfile = RangerProfile.fromJson(reader); - } else if ("scriptActionProfiles".equals(fieldName)) { - List scriptActionProfiles - = reader.readArray(reader1 -> ScriptActionProfile.fromJson(reader1)); - deserializedUpdatableClusterProfile.scriptActionProfiles = scriptActionProfiles; - } else if ("secretsProfile".equals(fieldName)) { - deserializedUpdatableClusterProfile.secretsProfile = SecretsProfile.fromJson(reader); - } else if ("trinoProfile".equals(fieldName)) { - deserializedUpdatableClusterProfile.trinoProfile = TrinoProfile.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUpdatableClusterProfile; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpgradeMode.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpgradeMode.java deleted file mode 100644 index 06a242fc92b1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpgradeMode.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * A string property that indicates the upgrade mode to be performed on the Flink job. It can have one of the following - * enum values => STATELESS_UPDATE, UPDATE, LAST_STATE_UPDATE. - */ -public final class UpgradeMode extends ExpandableStringEnum { - /** - * Static value STATELESS_UPDATE for UpgradeMode. - */ - public static final UpgradeMode STATELESS_UPDATE = fromString("STATELESS_UPDATE"); - - /** - * Static value UPDATE for UpgradeMode. - */ - public static final UpgradeMode UPDATE = fromString("UPDATE"); - - /** - * Static value LAST_STATE_UPDATE for UpgradeMode. - */ - public static final UpgradeMode LAST_STATE_UPDATE = fromString("LAST_STATE_UPDATE"); - - /** - * Creates a new instance of UpgradeMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UpgradeMode() { - } - - /** - * Creates or finds a UpgradeMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding UpgradeMode. - */ - public static UpgradeMode fromString(String name) { - return fromString(name, UpgradeMode.class); - } - - /** - * Gets known UpgradeMode values. - * - * @return known UpgradeMode values. - */ - public static Collection values() { - return values(UpgradeMode.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/WebConnectivityEndpoint.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/WebConnectivityEndpoint.java deleted file mode 100644 index 252e39c2b5db..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/WebConnectivityEndpoint.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 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; - -/** - * Web connectivity endpoint details. - */ -@Fluent -public class WebConnectivityEndpoint implements JsonSerializable { - /* - * Web connectivity endpoint. - */ - private String fqdn; - - /* - * Private web connectivity endpoint. This property will only be returned when enableInternalIngress is true. - */ - private String privateFqdn; - - /** - * Creates an instance of WebConnectivityEndpoint class. - */ - public WebConnectivityEndpoint() { - } - - /** - * Get the fqdn property: Web connectivity endpoint. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Set the fqdn property: Web connectivity endpoint. - * - * @param fqdn the fqdn value to set. - * @return the WebConnectivityEndpoint object itself. - */ - public WebConnectivityEndpoint withFqdn(String fqdn) { - this.fqdn = fqdn; - return this; - } - - /** - * Get the privateFqdn property: Private web connectivity endpoint. This property will only be returned when - * enableInternalIngress is true. - * - * @return the privateFqdn value. - */ - public String privateFqdn() { - return this.privateFqdn; - } - - /** - * Set the privateFqdn property: Private web connectivity endpoint. This property will only be returned when - * enableInternalIngress is true. - * - * @param privateFqdn the privateFqdn value to set. - * @return the WebConnectivityEndpoint object itself. - */ - public WebConnectivityEndpoint withPrivateFqdn(String privateFqdn) { - this.privateFqdn = privateFqdn; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (fqdn() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property fqdn in model WebConnectivityEndpoint")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WebConnectivityEndpoint.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fqdn", this.fqdn); - jsonWriter.writeStringField("privateFqdn", this.privateFqdn); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WebConnectivityEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WebConnectivityEndpoint 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 WebConnectivityEndpoint. - */ - public static WebConnectivityEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WebConnectivityEndpoint deserializedWebConnectivityEndpoint = new WebConnectivityEndpoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fqdn".equals(fieldName)) { - deserializedWebConnectivityEndpoint.fqdn = reader.getString(); - } else if ("privateFqdn".equals(fieldName)) { - deserializedWebConnectivityEndpoint.privateFqdn = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWebConnectivityEndpoint; - }); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/package-info.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/package-info.java deleted file mode 100644 index 7cde563bc6c5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the data models for HDInsightContainersManagementClient. - * HDInsight Containers Management Client. - */ -package com.azure.resourcemanager.hdinsight.containers.models; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/package-info.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/package-info.java deleted file mode 100644 index 17ad0fc29e2a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the classes for HDInsightContainersManagementClient. - * HDInsight Containers Management Client. - */ -package com.azure.resourcemanager.hdinsight.containers; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/module-info.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/module-info.java deleted file mode 100644 index 3f55cf3e4021..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/module-info.java +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.hdinsight.containers { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.hdinsight.containers; - exports com.azure.resourcemanager.hdinsight.containers.fluent; - exports com.azure.resourcemanager.hdinsight.containers.fluent.models; - exports com.azure.resourcemanager.hdinsight.containers.models; - - opens com.azure.resourcemanager.hdinsight.containers.fluent.models to com.azure.core; - opens com.azure.resourcemanager.hdinsight.containers.models to com.azure.core; -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/proxy-config.json b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/proxy-config.json deleted file mode 100644 index 5dd1890bf09e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/proxy-config.json +++ /dev/null @@ -1 +0,0 @@ -[["com.azure.resourcemanager.hdinsight.containers.implementation.AvailableClusterPoolVersionsClientImpl$AvailableClusterPoolVersionsService"],["com.azure.resourcemanager.hdinsight.containers.implementation.AvailableClusterVersionsClientImpl$AvailableClusterVersionsService"],["com.azure.resourcemanager.hdinsight.containers.implementation.ClusterAvailableUpgradesClientImpl$ClusterAvailableUpgradesService"],["com.azure.resourcemanager.hdinsight.containers.implementation.ClusterJobsClientImpl$ClusterJobsService"],["com.azure.resourcemanager.hdinsight.containers.implementation.ClusterLibrariesClientImpl$ClusterLibrariesService"],["com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolAvailableUpgradesClientImpl$ClusterPoolAvailableUpgradesService"],["com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolUpgradeHistoriesClientImpl$ClusterPoolUpgradeHistoriesService"],["com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolsClientImpl$ClusterPoolsService"],["com.azure.resourcemanager.hdinsight.containers.implementation.ClusterUpgradeHistoriesClientImpl$ClusterUpgradeHistoriesService"],["com.azure.resourcemanager.hdinsight.containers.implementation.ClustersClientImpl$ClustersService"],["com.azure.resourcemanager.hdinsight.containers.implementation.LocationsClientImpl$LocationsService"],["com.azure.resourcemanager.hdinsight.containers.implementation.OperationsClientImpl$OperationsService"]] \ No newline at end of file diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/reflect-config.json b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/reflect-config.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/reflect-config.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationSamples.java deleted file mode 100644 index 51ecd75fbd24..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for AvailableClusterPoolVersions ListByLocation. - */ -public final class AvailableClusterPoolVersionsListByLocationSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListAvailableClusterPoolVersions.json - */ - /** - * Sample code: ClusterPoolVersionListResult. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clusterPoolVersionListResult( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.availableClusterPoolVersions().listByLocation("westus2", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationSamples.java deleted file mode 100644 index adbf4599359f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for AvailableClusterVersions ListByLocation. - */ -public final class AvailableClusterVersionsListByLocationSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListAvailableClusterVersions.json - */ - /** - * Sample code: ClusterVersionListResult. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterVersionListResult(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.availableClusterVersions().listByLocation("westus2", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListSamples.java deleted file mode 100644 index 24e1dfa85a78..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for ClusterAvailableUpgrades List. - */ -public final class ClusterAvailableUpgradesListSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterAvailableUpgrades.json - */ - /** - * Sample code: GetClusterAvailableUpgrade. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - getClusterAvailableUpgrade(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterAvailableUpgrades() - .list("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListSamples.java deleted file mode 100644 index d72ae88d6ac7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for ClusterJobs List. - */ -public final class ClusterJobsListSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterJobs.json - */ - /** - * Sample code: ListClusterJobs. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - listClusterJobs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterJobs() - .list("hiloResourcegroup", "clusterPool1", "cluster1", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobSamples.java deleted file mode 100644 index ff05c679afa1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobSamples.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.Action; -import com.azure.resourcemanager.hdinsight.containers.models.FlinkJobProperties; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ClusterJobs RunJob. - */ -public final class ClusterJobsRunJobSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * RunClusterJob.json - */ - /** - * Sample code: RunClusterJob. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - runClusterJob(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterJobs() - .runJob("hiloResourcegroup", "clusterpool1", "cluster1", - new ClusterJobInner() - .withProperties(new FlinkJobProperties().withJobName("flink-job-name") - .withJobJarDirectory("abfs://flinkjob@hilosa.dfs.core.windows.net/jars") - .withJarName("flink-sleep-job-0.0.1-SNAPSHOT.jar") - .withEntryClass("com.microsoft.hilo.flink.job.streaming.SleepJob") - .withAction(Action.START) - .withFlinkConfiguration(mapOf("parallelism", "1", "savepoint.directory", - "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint"))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibrariesListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibrariesListSamples.java deleted file mode 100644 index ad87e0462edc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibrariesListSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -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); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibrariesManageLibrariesSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibrariesManageLibrariesSamples.java deleted file mode 100644 index c523307de4cc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibrariesManageLibrariesSamples.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -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); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListSamples.java deleted file mode 100644 index 99f5fa15e754..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for ClusterPoolAvailableUpgrades List. - */ -public final class ClusterPoolAvailableUpgradesListSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterPoolAvailableUpgrades.json - */ - /** - * Sample code: GetClusterPoolAvailableUpgrade. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void getClusterPoolAvailableUpgrade( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPoolAvailableUpgrades() - .list("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoriesListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoriesListSamples.java deleted file mode 100644 index a372d0015bac..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoriesListSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * 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); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateSamples.java deleted file mode 100644 index 60d91fa76cf1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateSamples.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; - -/** - * Samples for ClusterPools CreateOrUpdate. - */ -public final class ClusterPoolsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateClusterPoolWithPrivateAks.json - */ - /** - * Sample code: ClusterPoolPutWithPrivateAks. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clusterPoolPutWithPrivateAks( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .define("clusterpool1") - .withRegion("West US 2") - .withExistingResourceGroup("hiloResourcegroup") - .withProperties(new ClusterPoolResourceProperties() - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2") - .withAvailabilityZones(Arrays.asList("1", "2", "3"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId( - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withEnablePrivateApiServer(true))) - .create(); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateClusterPoolWithUDRAks.json - */ - /** - * Sample code: ClusterPoolPutWithUDRAks. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolPutWithUDRAks(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .define("clusterpool1") - .withRegion("West US 2") - .withExistingResourceGroup("hiloResourcegroup") - .withProperties(new ClusterPoolResourceProperties() - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2") - .withAvailabilityZones(Arrays.asList("1", "2", "3"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId( - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withOutboundType(OutboundType.USER_DEFINED_ROUTING))) - .create(); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateClusterPool.json - */ - /** - * Sample code: ClusterPoolPut. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .define("clusterpool1") - .withRegion("West US 2") - .withExistingResourceGroup("hiloResourcegroup") - .withProperties(new ClusterPoolResourceProperties() - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2") - .withAvailabilityZones(Arrays.asList("1", "2", "3")))) - .create(); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteSamples.java deleted file mode 100644 index 231ee208eaf0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for ClusterPools Delete. - */ -public final class ClusterPoolsDeleteSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * DeleteClusterPool.json - */ - /** - * Sample code: ClusterPoolDelete. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolDelete(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools().delete("rg1", "clusterpool1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupSamples.java deleted file mode 100644 index 4ac9efde2632..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for ClusterPools GetByResourceGroup. - */ -public final class ClusterPoolsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * GetClusterPool.json - */ - /** - * Sample code: ClusterPoolGet. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolGet(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupSamples.java deleted file mode 100644 index 29d3cc5e69f9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for ClusterPools ListByResourceGroup. - */ -public final class ClusterPoolsListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterPools.json - */ - /** - * Sample code: ClusterPoolsListByResourceGroup. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clusterPoolsListByResourceGroup( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools().listByResourceGroup("hiloResourcegroup", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListSamples.java deleted file mode 100644 index 411122f124e9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for ClusterPools List. - */ -public final class ClusterPoolsListSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterPoolsSubscription.json - */ - /** - * Sample code: ClusterPoolsListBySubscription. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clusterPoolsListBySubscription( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpdateTagsSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpdateTagsSamples.java deleted file mode 100644 index 858039fe138a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpdateTagsSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ClusterPools UpdateTags. - */ -public final class ClusterPoolsUpdateTagsSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * PatchClusterPool.json - */ - /** - * Sample code: ClusterPoolsPatchTags. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolsPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - ClusterPool resource = manager.clusterPools() - .getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeSamples.java deleted file mode 100644 index 9a0673de9357..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeSamples.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAksPatchVersionUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNodeOsImageUpdateProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; - -/** - * Samples for ClusterPools Upgrade. - */ -public final class ClusterPoolsUpgradeSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UpgradeNodeOsForClusterPool.json - */ - /** - * Sample code: ClusterPoolsUpgradeNodeOs. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolsUpgradeNodeOs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .upgrade("hiloResourcegroup", "clusterpool1", - new ClusterPoolUpgrade().withProperties(new ClusterPoolNodeOsImageUpdateProperties()), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UpgradeAKSPatchVersionForClusterPool.json - */ - /** - * Sample code: ClusterPoolsUpgradeAKSPatchVersion. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clusterPoolsUpgradeAKSPatchVersion( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .upgrade("hiloResourcegroup", "clusterpool1", - new ClusterPoolUpgrade() - .withProperties(new ClusterPoolAksPatchVersionUpgradeProperties().withUpgradeClusterPool(true) - .withUpgradeAllClusterNodes(false)), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoriesListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoriesListSamples.java deleted file mode 100644 index df67d85b5130..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoriesListSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * 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); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersCreateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersCreateSamples.java deleted file mode 100644 index 220758569bd8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersCreateSamples.java +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleType; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAccessProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfigsProfile; -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.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; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec; -import com.azure.resourcemanager.hdinsight.containers.models.RangerProfile; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec; -import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; -import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import com.azure.resourcemanager.hdinsight.containers.models.SparkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.SshProfile; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoProfile; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Clusters Create. - */ -public final class ClustersCreateSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateSparkCluster.json - */ - /** - * Sample code: HDInsightSparkClusterPut. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightSparkClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .define("cluster1") - .withRegion("West US 2") - .withExistingClusterpool("hiloResourcegroup", "clusterpool1") - .withProperties(new ClusterResourceProperties().withClusterType("spark") - .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") - .withFiles(Arrays.asList(new ClusterConfigFile().withFileName("spark-defaults.conf") - .withValues(mapOf("spark.eventLog.enabled", "true")))))), - new ClusterServiceConfigsProfile().withServiceName("yarn-service") - .withConfigs(Arrays.asList(new ClusterServiceConfig().withComponent("yarn-config") - .withFiles(Arrays.asList( - new ClusterConfigFile().withFileName("core-site.xml") - .withValues(mapOf("fs.defaultFS", - "wasb://testcontainer@teststorage.dfs.core.windows.net/", - "storage.container", "testcontainer", "storage.key", "fakeTokenPlaceholder", - "storage.name", "teststorage", "storage.protocol", "wasb")), - new ClusterConfigFile().withFileName("yarn-site.xml") - .withValues(mapOf("yarn.webapp.ui2.enable", "false")))))))) - .withSshProfile(new SshProfile().withCount(2).withVmSize("Standard_D3_v2")) - .withSparkProfile(new SparkProfile()))) - .create(); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateSparkClusterWithInternalIngress.json - */ - /** - * Sample code: HDInsightSparkClusterPutWithInternalIngress. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightSparkClusterPutWithInternalIngress( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .define("cluster1") - .withRegion("West US 2") - .withExistingClusterpool("hiloResourcegroup", "clusterpool1") - .withProperties(new ClusterResourceProperties().withClusterType("spark") - .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") - .withFiles(Arrays.asList(new ClusterConfigFile().withFileName("spark-defaults.conf") - .withValues(mapOf("spark.eventLog.enabled", "true")))))), - new ClusterServiceConfigsProfile().withServiceName("yarn-service") - .withConfigs(Arrays.asList(new ClusterServiceConfig().withComponent("yarn-config") - .withFiles(Arrays.asList( - new ClusterConfigFile().withFileName("core-site.xml") - .withValues(mapOf("fs.defaultFS", - "wasb://testcontainer@teststorage.dfs.core.windows.net/", - "storage.container", "testcontainer", "storage.key", "fakeTokenPlaceholder", - "storage.name", "teststorage", "storage.protocol", "wasb")), - new ClusterConfigFile().withFileName("yarn-site.xml") - .withValues(mapOf("yarn.webapp.ui2.enable", "false")))))))) - .withClusterAccessProfile(new ClusterAccessProfile().withEnableInternalIngress(true)) - .withSshProfile(new SshProfile().withCount(2).withVmSize("Standard_D3_v2")) - .withSparkProfile(new SparkProfile()))) - .create(); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateAutoscaleCluster.json - */ - /** - * Sample code: HDInsightClusterPut. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .define("cluster1") - .withRegion("West US 2") - .withExistingClusterpool("hiloResourcegroup", "clusterpool1") - .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))) - .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).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/2024-05-01-preview/examples/ - * CreateRangerCluster.json - */ - /** - * Sample code: HDInsightRangerClusterPut. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightRangerClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .define("cluster1") - .withRegion("West US 2") - .withExistingClusterpool("hiloResourcegroup", "clusterpool1") - .withProperties(new ClusterResourceProperties().withClusterType("ranger") - .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"))) - .withRangerAudit(new RangerAuditSpec() - .withStorageAccount("https://teststorage.blob.core.windows.net/testblob")) - .withRangerUsersync(new RangerUsersyncSpec().withEnabled(true) - .withGroups(Arrays.asList("0a53828f-36c9-44c3-be3d-99a7fce977ad", - "13be6971-79db-4f33-9d41-b25589ca25ac")) - .withMode(RangerUsersyncMode.AUTOMATIC) - .withUsers(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")))))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteSamples.java deleted file mode 100644 index 6d7757fa3a04..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for Clusters Delete. - */ -public final class ClustersDeleteSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * DeleteCluster.json - */ - /** - * Sample code: HDInsightClustersDelete. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClustersDelete(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters().delete("rg1", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewSamples.java deleted file mode 100644 index d2391a16c400..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for Clusters GetInstanceView. - */ -public final class ClustersGetInstanceViewSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * GetClusterInstanceView.json - */ - /** - * Sample code: HDInsightClusterGetInstanceView. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClusterGetInstanceView( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .getInstanceViewWithResponse("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetSamples.java deleted file mode 100644 index 2965d2c9931e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for Clusters Get. - */ -public final class ClustersGetSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * GetCluster.json - */ - /** - * Sample code: HDInsightClusterGet. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClusterGet(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListByClusterPoolNameSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListByClusterPoolNameSamples.java deleted file mode 100644 index 5ec2ca6da7c5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListByClusterPoolNameSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for Clusters ListByClusterPoolName. - */ -public final class ClustersListByClusterPoolNameSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClustersByClusterPoolName.json - */ - /** - * Sample code: HDInsightClustersListByClusterPoolName. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClustersListByClusterPoolName( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters().listByClusterPoolName("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsSamples.java deleted file mode 100644 index 875a721e9f09..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for Clusters ListInstanceViews. - */ -public final class ClustersListInstanceViewsSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterInstanceViews.json - */ - /** - * Sample code: HDInsightClusterGetInstanceViews. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClusterGetInstanceViews( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters().listInstanceViews("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListServiceConfigsSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListServiceConfigsSamples.java deleted file mode 100644 index 6ef3a74ffccc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListServiceConfigsSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for Clusters ListServiceConfigs. - */ -public final class ClustersListServiceConfigsSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterServiceConfigs.json - */ - /** - * Sample code: HDInsightClusterGetServiceConfigs. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClusterGetServiceConfigs( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters().listServiceConfigs("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersResizeSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersResizeSamples.java deleted file mode 100644 index 24afa34a6c98..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersResizeSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeProperties; - -/** - * Samples for Clusters Resize. - */ -public final class ClustersResizeSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ResizeCluster.json - */ - /** - * Sample code: HDInsightClusterResize. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClusterResize(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .resize("hiloResourcegroup", "clusterpool1", "cluster1", - new ClusterResizeData().withLocation("West US 2") - .withProperties(new ClusterResizeProperties().withTargetWorkerNodeCount(5)), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpdateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpdateSamples.java deleted file mode 100644 index ecf1add48a82..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpdateSamples.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleType; -import com.azure.resourcemanager.hdinsight.containers.models.Cluster; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsApplicationLogs; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatchProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfigsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpec; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpecDatabase; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec; -import com.azure.resourcemanager.hdinsight.containers.models.RangerProfile; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import com.azure.resourcemanager.hdinsight.containers.models.SshProfile; -import com.azure.resourcemanager.hdinsight.containers.models.UpdatableClusterProfile; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Clusters Update. - */ -public final class ClustersUpdateSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * PatchRangerCluster.json - */ - /** - * Sample code: HDInsightRangerClusterPatchTags. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightRangerClusterPatchTags( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - Cluster resource = manager.clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new ClusterPatchProperties() - .withClusterProfile(new UpdatableClusterProfile().withRangerProfile(new RangerProfile() - .withRangerAdmin(new RangerAdminSpec() - .withAdmins(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")) - .withDatabase(new RangerAdminSpecDatabase().withHost("testsqlserver.database.windows.net") - .withName("testdb") - .withPasswordSecretRef("fakeTokenPlaceholder") - .withUsername("admin"))) - .withRangerAudit( - new RangerAuditSpec().withStorageAccount("https://teststorage.blob.core.windows.net/testblob")) - .withRangerUsersync(new RangerUsersyncSpec().withEnabled(true) - .withGroups(Arrays.asList("0a53828f-36c9-44c3-be3d-99a7fce977ad", - "13be6971-79db-4f33-9d41-b25589ca25ac")) - .withMode(RangerUsersyncMode.AUTOMATIC) - .withUsers(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")))))) - .apply(); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * PatchCluster.json - */ - /** - * Sample code: HDInsightClustersPatchTags. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClustersPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - Cluster resource = manager.clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties( - new ClusterPatchProperties() - .withClusterProfile( - new UpdatableClusterProfile() - .withServiceConfigsProfiles( - Arrays - .asList( - new ClusterServiceConfigsProfile().withServiceName("TestService1") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig().withComponent("TestComp1") - .withFiles( - Arrays.asList( - new ClusterConfigFile().withFileName("TestFile1") - .withValues(mapOf("Test.config.1", "1", - "Test.config.2", "2")), - new ClusterConfigFile().withFileName("TestFile2") - .withValues(mapOf("Test.config.3", "3", - "Test.config.4", "4")))), - new ClusterServiceConfig().withComponent("TestComp2") - .withFiles(Arrays - .asList( - new ClusterConfigFile().withFileName("TestFile3") - .withContent("TestContent") - .withPath("TestPath"), - new ClusterConfigFile() - .withFileName("TestFile4") - .withValues(mapOf("Test.config.7", "7", - "Test.config.8", "8")))))), - new ClusterServiceConfigsProfile().withServiceName("TestService2") - .withConfigs( - Arrays - .asList(new ClusterServiceConfig().withComponent("TestComp3") - .withFiles(Arrays - .asList(new ClusterConfigFile().withFileName("TestFile5") - .withValues(mapOf("Test.config.9", "9")))))))) - .withSshProfile(new SshProfile().withCount(2)) - .withAutoscaleProfile( - new AutoscaleProfile().withEnabled(true) - .withGracefulDecommissionTimeout(-1) - .withAutoscaleType(AutoscaleType.SCHEDULE_BASED) - .withScheduleBasedConfig(new ScheduleBasedConfig() - .withTimeZone("Cen. Australia Standard Time") - .withDefaultCount(3) - .withSchedules(Arrays.asList( - new Schedule().withStartTime("00:00") - .withEndTime("12:00") - .withCount(3) - .withDays(Arrays - .asList(ScheduleDay.fromString("Monday, Tuesday, Wednesday"))), - new Schedule().withStartTime("00:00") - .withEndTime("12:00") - .withCount(3) - .withDays(Arrays.asList(ScheduleDay.SUNDAY)))))) - .withAuthorizationProfile( - new AuthorizationProfile().withUserIds(Arrays.asList("Testuser1", "Testuser2"))) - .withLogAnalyticsProfile(new ClusterLogAnalyticsProfile().withEnabled(true) - .withApplicationLogs(new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(true) - .withStdErrorEnabled(true)) - .withMetricsEnabled(true)))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpgradeManualRollbackSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpgradeManualRollbackSamples.java deleted file mode 100644 index 15333e1cf9b2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpgradeManualRollbackSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.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); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpgradeSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpgradeSamples.java deleted file mode 100644 index a25200d31de3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpgradeSamples.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAksPatchVersionUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; - -/** - * Samples for Clusters Upgrade. - */ -public final class ClustersUpgradeSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UpgradeAKSPatchVersionForCluster.json - */ - /** - * Sample code: ClustersUpgradeAKSPatchVersion. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clustersUpgradeAKSPatchVersion( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .upgrade("hiloResourcegroup", "clusterpool1", "cluster1", - new ClusterUpgrade().withProperties(new ClusterAksPatchVersionUpgradeProperties()), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UpgradeHotfixForCluster.json - */ - /** - * Sample code: ClustersUpgradeHotfix. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clustersUpgradeHotfix(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .upgrade("hiloResourcegroup", "clusterpool1", "cluster1", - new ClusterUpgrade().withProperties(new ClusterHotfixUpgradeProperties().withTargetOssVersion("1.16.0") - .withTargetClusterVersion("1.0.6") - .withTargetBuildNumber("3") - .withComponentName("historyserver")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilitySamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilitySamples.java deleted file mode 100644 index 36d6e4d0aace..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilitySamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; - -/** - * Samples for Locations CheckNameAvailability. - */ -public final class LocationsCheckNameAvailabilitySamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * LocationsNameAvailability.json - */ - /** - * Sample code: LocationsNameAvailability. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - locationsNameAvailability(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.locations() - .checkNameAvailabilityWithResponse("southeastasia", - new NameAvailabilityParameters().withName("contosemember1") - .withType("Microsoft.HDInsight/clusterPools/clusters"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListSamples.java deleted file mode 100644 index dc70d688ca98..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * GetOperations.json - */ - /** - * Sample code: ListOperations. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - listOperations(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileAksClusterAgentPoolIdentityProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileAksClusterAgentPoolIdentityProfileTests.java deleted file mode 100644 index d59d962a8dde..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileAksClusterAgentPoolIdentityProfileTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfileAksClusterAgentPoolIdentityProfile; -import org.junit.jupiter.api.Assertions; - -public final class AksClusterProfileAksClusterAgentPoolIdentityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AksClusterProfileAksClusterAgentPoolIdentityProfile model - = BinaryData.fromString("{\"msiResourceId\":\"jfm\",\"msiClientId\":\"pee\",\"msiObjectId\":\"vmgxsab\"}") - .toObject(AksClusterProfileAksClusterAgentPoolIdentityProfile.class); - Assertions.assertEquals("jfm", model.msiResourceId()); - Assertions.assertEquals("pee", model.msiClientId()); - Assertions.assertEquals("vmgxsab", model.msiObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AksClusterProfileAksClusterAgentPoolIdentityProfile model - = new AksClusterProfileAksClusterAgentPoolIdentityProfile().withMsiResourceId("jfm") - .withMsiClientId("pee") - .withMsiObjectId("vmgxsab"); - model = BinaryData.fromObject(model).toObject(AksClusterProfileAksClusterAgentPoolIdentityProfile.class); - Assertions.assertEquals("jfm", model.msiResourceId()); - Assertions.assertEquals("pee", model.msiClientId()); - Assertions.assertEquals("vmgxsab", model.msiObjectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileTests.java deleted file mode 100644 index f33376ce009a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfileAksClusterAgentPoolIdentityProfile; -import org.junit.jupiter.api.Assertions; - -public final class AksClusterProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AksClusterProfile model = BinaryData.fromString( - "{\"aksClusterResourceId\":\"lxxwrljdouskc\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"kocrcjdkwtnhx\",\"msiClientId\":\"njbiksqrglssain\",\"msiObjectId\":\"p\"},\"aksVersion\":\"nzl\"}") - .toObject(AksClusterProfile.class); - Assertions.assertEquals("lxxwrljdouskc", model.aksClusterResourceId()); - Assertions.assertEquals("kocrcjdkwtnhx", model.aksClusterAgentPoolIdentityProfile().msiResourceId()); - Assertions.assertEquals("njbiksqrglssain", model.aksClusterAgentPoolIdentityProfile().msiClientId()); - Assertions.assertEquals("p", model.aksClusterAgentPoolIdentityProfile().msiObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AksClusterProfile model = new AksClusterProfile().withAksClusterResourceId("lxxwrljdouskc") - .withAksClusterAgentPoolIdentityProfile( - new AksClusterProfileAksClusterAgentPoolIdentityProfile().withMsiResourceId("kocrcjdkwtnhx") - .withMsiClientId("njbiksqrglssain") - .withMsiObjectId("p")); - model = BinaryData.fromObject(model).toObject(AksClusterProfile.class); - Assertions.assertEquals("lxxwrljdouskc", model.aksClusterResourceId()); - Assertions.assertEquals("kocrcjdkwtnhx", model.aksClusterAgentPoolIdentityProfile().msiResourceId()); - Assertions.assertEquals("njbiksqrglssain", model.aksClusterAgentPoolIdentityProfile().msiClientId()); - Assertions.assertEquals("p", model.aksClusterAgentPoolIdentityProfile().msiObjectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AuthorizationProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AuthorizationProfileTests.java deleted file mode 100644 index edbc4d7efe56..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AuthorizationProfileTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AuthorizationProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthorizationProfile model = BinaryData - .fromString( - "{\"userIds\":[\"clha\",\"xdbabphlwr\",\"lfktsths\",\"cocmnyyaztt\"],\"groupIds\":[\"wrqpue\"]}") - .toObject(AuthorizationProfile.class); - Assertions.assertEquals("clha", model.userIds().get(0)); - Assertions.assertEquals("wrqpue", model.groupIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthorizationProfile model - = new AuthorizationProfile().withUserIds(Arrays.asList("clha", "xdbabphlwr", "lfktsths", "cocmnyyaztt")) - .withGroupIds(Arrays.asList("wrqpue")); - model = BinaryData.fromObject(model).toObject(AuthorizationProfile.class); - Assertions.assertEquals("clha", model.userIds().get(0)); - Assertions.assertEquals("wrqpue", model.groupIds().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AutoscaleProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AutoscaleProfileTests.java deleted file mode 100644 index 211544a46c1a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AutoscaleProfileTests.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleType; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule; -import com.azure.resourcemanager.hdinsight.containers.models.LoadBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; -import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AutoscaleProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoscaleProfile model = BinaryData.fromString( - "{\"enabled\":false,\"gracefulDecommissionTimeout\":855265021,\"autoscaleType\":\"LoadBased\",\"scheduleBasedConfig\":{\"timeZone\":\"zvszj\",\"defaultCount\":928593835,\"schedules\":[{\"startTime\":\"vjfdx\",\"endTime\":\"ivetvtcq\",\"count\":928990245,\"days\":[\"Friday\"]},{\"startTime\":\"oqmcbxvwvxyslq\",\"endTime\":\"hsfxoblytkb\",\"count\":857226054,\"days\":[\"Monday\"]},{\"startTime\":\"wwwfbkr\",\"endTime\":\"rn\",\"count\":309197108,\"days\":[\"Saturday\",\"Wednesday\",\"Tuesday\"]}]},\"loadBasedConfig\":{\"minNodes\":925506689,\"maxNodes\":475216783,\"pollInterval\":1216343785,\"cooldownPeriod\":1861824237,\"scalingRules\":[{\"actionType\":\"scaledown\",\"evaluationCount\":249445305,\"scalingMetric\":\"asrru\",\"comparisonRule\":{\"operator\":\"lessThan\",\"threshold\":94.09205}},{\"actionType\":\"scaledown\",\"evaluationCount\":1393923794,\"scalingMetric\":\"qfsubcgjbirx\",\"comparisonRule\":{\"operator\":\"lessThan\",\"threshold\":79.85491}}]}}") - .toObject(AutoscaleProfile.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(855265021, model.gracefulDecommissionTimeout()); - Assertions.assertEquals(AutoscaleType.LOAD_BASED, model.autoscaleType()); - Assertions.assertEquals("zvszj", model.scheduleBasedConfig().timeZone()); - Assertions.assertEquals(928593835, model.scheduleBasedConfig().defaultCount()); - Assertions.assertEquals("vjfdx", model.scheduleBasedConfig().schedules().get(0).startTime()); - Assertions.assertEquals("ivetvtcq", model.scheduleBasedConfig().schedules().get(0).endTime()); - Assertions.assertEquals(928990245, model.scheduleBasedConfig().schedules().get(0).count()); - Assertions.assertEquals(ScheduleDay.FRIDAY, model.scheduleBasedConfig().schedules().get(0).days().get(0)); - Assertions.assertEquals(925506689, model.loadBasedConfig().minNodes()); - Assertions.assertEquals(475216783, model.loadBasedConfig().maxNodes()); - Assertions.assertEquals(1216343785, model.loadBasedConfig().pollInterval()); - Assertions.assertEquals(1861824237, model.loadBasedConfig().cooldownPeriod()); - Assertions.assertEquals(ScaleActionType.SCALEDOWN, model.loadBasedConfig().scalingRules().get(0).actionType()); - Assertions.assertEquals(249445305, model.loadBasedConfig().scalingRules().get(0).evaluationCount()); - Assertions.assertEquals("asrru", model.loadBasedConfig().scalingRules().get(0).scalingMetric()); - Assertions.assertEquals(ComparisonOperator.LESS_THAN, - model.loadBasedConfig().scalingRules().get(0).comparisonRule().operator()); - Assertions.assertEquals(94.09205f, model.loadBasedConfig().scalingRules().get(0).comparisonRule().threshold()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoscaleProfile model = new AutoscaleProfile().withEnabled(false) - .withGracefulDecommissionTimeout(855265021) - .withAutoscaleType(AutoscaleType.LOAD_BASED) - .withScheduleBasedConfig(new ScheduleBasedConfig().withTimeZone("zvszj") - .withDefaultCount(928593835) - .withSchedules(Arrays.asList( - new Schedule().withStartTime("vjfdx") - .withEndTime("ivetvtcq") - .withCount(928990245) - .withDays(Arrays.asList(ScheduleDay.FRIDAY)), - new Schedule().withStartTime("oqmcbxvwvxyslq") - .withEndTime("hsfxoblytkb") - .withCount(857226054) - .withDays(Arrays.asList(ScheduleDay.MONDAY)), - new Schedule().withStartTime("wwwfbkr") - .withEndTime("rn") - .withCount(309197108) - .withDays(Arrays.asList(ScheduleDay.SATURDAY, ScheduleDay.WEDNESDAY, ScheduleDay.TUESDAY))))) - .withLoadBasedConfig( - new LoadBasedConfig().withMinNodes(925506689) - .withMaxNodes(475216783) - .withPollInterval(1216343785) - .withCooldownPeriod(1861824237) - .withScalingRules(Arrays.asList( - new ScalingRule().withActionType(ScaleActionType.SCALEDOWN) - .withEvaluationCount(249445305) - .withScalingMetric("asrru") - .withComparisonRule(new ComparisonRule().withOperator(ComparisonOperator.LESS_THAN) - .withThreshold(94.09205f)), - new ScalingRule().withActionType(ScaleActionType.SCALEDOWN) - .withEvaluationCount(1393923794) - .withScalingMetric("qfsubcgjbirx") - .withComparisonRule(new ComparisonRule().withOperator(ComparisonOperator.LESS_THAN) - .withThreshold(79.85491f))))); - model = BinaryData.fromObject(model).toObject(AutoscaleProfile.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(855265021, model.gracefulDecommissionTimeout()); - Assertions.assertEquals(AutoscaleType.LOAD_BASED, model.autoscaleType()); - Assertions.assertEquals("zvszj", model.scheduleBasedConfig().timeZone()); - Assertions.assertEquals(928593835, model.scheduleBasedConfig().defaultCount()); - Assertions.assertEquals("vjfdx", model.scheduleBasedConfig().schedules().get(0).startTime()); - Assertions.assertEquals("ivetvtcq", model.scheduleBasedConfig().schedules().get(0).endTime()); - Assertions.assertEquals(928990245, model.scheduleBasedConfig().schedules().get(0).count()); - Assertions.assertEquals(ScheduleDay.FRIDAY, model.scheduleBasedConfig().schedules().get(0).days().get(0)); - Assertions.assertEquals(925506689, model.loadBasedConfig().minNodes()); - Assertions.assertEquals(475216783, model.loadBasedConfig().maxNodes()); - Assertions.assertEquals(1216343785, model.loadBasedConfig().pollInterval()); - Assertions.assertEquals(1861824237, model.loadBasedConfig().cooldownPeriod()); - Assertions.assertEquals(ScaleActionType.SCALEDOWN, model.loadBasedConfig().scalingRules().get(0).actionType()); - Assertions.assertEquals(249445305, model.loadBasedConfig().scalingRules().get(0).evaluationCount()); - Assertions.assertEquals("asrru", model.loadBasedConfig().scalingRules().get(0).scalingMetric()); - Assertions.assertEquals(ComparisonOperator.LESS_THAN, - model.loadBasedConfig().scalingRules().get(0).comparisonRule().operator()); - Assertions.assertEquals(94.09205f, model.loadBasedConfig().scalingRules().get(0).comparisonRule().threshold()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationMockTests.java deleted file mode 100644 index 880f91222f78..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AvailableClusterPoolVersionsListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"clusterPoolVersion\":\"hxkumasjcaacfdmm\",\"aksVersion\":\"ugmehqepvufhbze\",\"isPreview\":true},\"id\":\"oqhnlb\",\"name\":\"nbldxeaclgschori\",\"type\":\"krsrrmoucs\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.availableClusterPoolVersions().listByLocation("fppdbwnu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hxkumasjcaacfdmm", response.iterator().next().properties().clusterPoolVersion()); - Assertions.assertEquals("ugmehqepvufhbze", response.iterator().next().properties().aksVersion()); - Assertions.assertEquals(true, response.iterator().next().properties().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationMockTests.java deleted file mode 100644 index e85acbb03545..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AvailableClusterVersionsListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"clusterType\":\"eolhbhlvbmx\",\"clusterVersion\":\"ibsxtkcud\",\"ossVersion\":\"sfar\",\"clusterPoolVersion\":\"iowl\",\"isPreview\":false,\"components\":[{\"name\":\"vwgf\",\"version\":\"mhqykizmdksa\"},{\"name\":\"fcluqvo\",\"version\":\"ycjimryvwgcwwpbm\"}]},\"id\":\"w\",\"name\":\"sydsxwefohe\",\"type\":\"bvopwndyqle\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.availableClusterVersions().listByLocation("fldpuviyfc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("eolhbhlvbmx", response.iterator().next().properties().clusterType()); - Assertions.assertEquals("ibsxtkcud", response.iterator().next().properties().clusterVersion()); - Assertions.assertEquals("sfar", response.iterator().next().properties().ossVersion()); - Assertions.assertEquals("iowl", response.iterator().next().properties().clusterPoolVersion()); - Assertions.assertEquals(false, response.iterator().next().properties().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAccessProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAccessProfileTests.java deleted file mode 100644 index 077c488fc9e7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAccessProfileTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAccessProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAccessProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAccessProfile model - = BinaryData.fromString("{\"enableInternalIngress\":true,\"privateLinkServiceId\":\"bkdmo\"}") - .toObject(ClusterAccessProfile.class); - Assertions.assertEquals(true, model.enableInternalIngress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAccessProfile model = new ClusterAccessProfile().withEnableInternalIngress(true); - model = BinaryData.fromObject(model).toObject(ClusterAccessProfile.class); - Assertions.assertEquals(true, model.enableInternalIngress()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAksPatchUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAksPatchUpgradeHistoryPropertiesTests.java deleted file mode 100644 index 57eadb2e347b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAksPatchUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAksPatchUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAksPatchUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAksPatchUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"AKSPatchUpgrade\",\"originalVersion\":\"wnpjhlfzswpchwa\",\"newVersion\":\"bousn\",\"utcTime\":\"epgfew\",\"upgradeResult\":\"Succeed\"}") - .toObject(ClusterAksPatchUpgradeHistoryProperties.class); - Assertions.assertEquals("epgfew", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals("wnpjhlfzswpchwa", model.originalVersion()); - Assertions.assertEquals("bousn", model.newVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAksPatchUpgradeHistoryProperties model - = new ClusterAksPatchUpgradeHistoryProperties().withUtcTime("epgfew") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.SUCCEED) - .withOriginalVersion("wnpjhlfzswpchwa") - .withNewVersion("bousn"); - model = BinaryData.fromObject(model).toObject(ClusterAksPatchUpgradeHistoryProperties.class); - Assertions.assertEquals("epgfew", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals("wnpjhlfzswpchwa", model.originalVersion()); - Assertions.assertEquals("bousn", model.newVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAksPatchVersionUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAksPatchVersionUpgradePropertiesTests.java deleted file mode 100644 index ecd08c9bd96b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAksPatchVersionUpgradePropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAksPatchVersionUpgradeProperties; - -public final class ClusterAksPatchVersionUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAksPatchVersionUpgradeProperties model = BinaryData.fromString("{\"upgradeType\":\"AKSPatchUpgrade\"}") - .toObject(ClusterAksPatchVersionUpgradeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAksPatchVersionUpgradeProperties model = new ClusterAksPatchVersionUpgradeProperties(); - model = BinaryData.fromObject(model).toObject(ClusterAksPatchVersionUpgradeProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableInPlaceUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableInPlaceUpgradePropertiesTests.java deleted file mode 100644 index 9382ee631b12..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableInPlaceUpgradePropertiesTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableInPlaceUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.Severity; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAvailableInPlaceUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableInPlaceUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"ClusterAvailableInPlaceUpgradeProperties\",\"description\":\"z\",\"sourceOssVersion\":\"rjvpglydzgkrvqee\",\"sourceClusterVersion\":\"oepry\",\"sourceBuildNumber\":\"nwy\",\"targetOssVersion\":\"zdmovzv\",\"targetClusterVersion\":\"aawzqadfl\",\"targetBuildNumber\":\"ur\",\"componentName\":\"laecxndticok\",\"severity\":\"high\",\"extendedProperties\":\"lqtmldgxob\",\"createdTime\":\"2021-09-19T17:45:42Z\"}") - .toObject(ClusterAvailableInPlaceUpgradeProperties.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("rjvpglydzgkrvqee", model.sourceOssVersion()); - Assertions.assertEquals("oepry", model.sourceClusterVersion()); - Assertions.assertEquals("nwy", model.sourceBuildNumber()); - Assertions.assertEquals("zdmovzv", model.targetOssVersion()); - Assertions.assertEquals("aawzqadfl", model.targetClusterVersion()); - Assertions.assertEquals("ur", model.targetBuildNumber()); - Assertions.assertEquals("laecxndticok", model.componentName()); - Assertions.assertEquals(Severity.HIGH, model.severity()); - Assertions.assertEquals("lqtmldgxob", model.extendedProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-19T17:45:42Z"), model.createdTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableInPlaceUpgradeProperties model - = new ClusterAvailableInPlaceUpgradeProperties().withDescription("z") - .withSourceOssVersion("rjvpglydzgkrvqee") - .withSourceClusterVersion("oepry") - .withSourceBuildNumber("nwy") - .withTargetOssVersion("zdmovzv") - .withTargetClusterVersion("aawzqadfl") - .withTargetBuildNumber("ur") - .withComponentName("laecxndticok") - .withSeverity(Severity.HIGH) - .withExtendedProperties("lqtmldgxob") - .withCreatedTime(OffsetDateTime.parse("2021-09-19T17:45:42Z")); - model = BinaryData.fromObject(model).toObject(ClusterAvailableInPlaceUpgradeProperties.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("rjvpglydzgkrvqee", model.sourceOssVersion()); - Assertions.assertEquals("oepry", model.sourceClusterVersion()); - Assertions.assertEquals("nwy", model.sourceBuildNumber()); - Assertions.assertEquals("zdmovzv", model.targetOssVersion()); - Assertions.assertEquals("aawzqadfl", model.targetClusterVersion()); - Assertions.assertEquals("ur", model.targetBuildNumber()); - Assertions.assertEquals("laecxndticok", model.componentName()); - Assertions.assertEquals(Severity.HIGH, model.severity()); - Assertions.assertEquals("lqtmldgxob", model.extendedProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-19T17:45:42Z"), model.createdTime()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeAksPatchUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeAksPatchUpgradePropertiesTests.java deleted file mode 100644 index 7410ca871b43..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeAksPatchUpgradePropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeAksPatchUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.CurrentClusterAksVersionStatus; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAvailableUpgradeAksPatchUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableUpgradeAksPatchUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"AKSPatchUpgrade\",\"currentVersion\":\"slevufuztc\",\"currentVersionStatus\":\"Supported\",\"latestVersion\":\"jtqedcgzulwmm\"}") - .toObject(ClusterAvailableUpgradeAksPatchUpgradeProperties.class); - Assertions.assertEquals("slevufuztc", model.currentVersion()); - Assertions.assertEquals(CurrentClusterAksVersionStatus.SUPPORTED, model.currentVersionStatus()); - Assertions.assertEquals("jtqedcgzulwmm", model.latestVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradeAksPatchUpgradeProperties model - = new ClusterAvailableUpgradeAksPatchUpgradeProperties().withCurrentVersion("slevufuztc") - .withCurrentVersionStatus(CurrentClusterAksVersionStatus.SUPPORTED) - .withLatestVersion("jtqedcgzulwmm"); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradeAksPatchUpgradeProperties.class); - Assertions.assertEquals("slevufuztc", model.currentVersion()); - Assertions.assertEquals(CurrentClusterAksVersionStatus.SUPPORTED, model.currentVersionStatus()); - Assertions.assertEquals("jtqedcgzulwmm", model.latestVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeHotfixUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeHotfixUpgradePropertiesTests.java deleted file mode 100644 index 2e506fa14a0f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeHotfixUpgradePropertiesTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeHotfixUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.Severity; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAvailableUpgradeHotfixUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableUpgradeHotfixUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"HotfixUpgrade\",\"description\":\"lnpkciay\",\"sourceOssVersion\":\"iykhy\",\"sourceClusterVersion\":\"fvjlboxqvkjlmx\",\"sourceBuildNumber\":\"mdy\",\"targetOssVersion\":\"dwdigumb\",\"targetClusterVersion\":\"aauzzptjazysd\",\"targetBuildNumber\":\"ezwwv\",\"componentName\":\"qyuvvfonkp\",\"severity\":\"medium\",\"extendedProperties\":\"ikvylauya\",\"createdTime\":\"2021-08-12T09:12:49Z\"}") - .toObject(ClusterAvailableUpgradeHotfixUpgradeProperties.class); - Assertions.assertEquals("lnpkciay", model.description()); - Assertions.assertEquals("iykhy", model.sourceOssVersion()); - Assertions.assertEquals("fvjlboxqvkjlmx", model.sourceClusterVersion()); - Assertions.assertEquals("mdy", model.sourceBuildNumber()); - Assertions.assertEquals("dwdigumb", model.targetOssVersion()); - Assertions.assertEquals("aauzzptjazysd", model.targetClusterVersion()); - Assertions.assertEquals("ezwwv", model.targetBuildNumber()); - Assertions.assertEquals("qyuvvfonkp", model.componentName()); - Assertions.assertEquals(Severity.MEDIUM, model.severity()); - Assertions.assertEquals("ikvylauya", model.extendedProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T09:12:49Z"), model.createdTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradeHotfixUpgradeProperties model - = new ClusterAvailableUpgradeHotfixUpgradeProperties().withDescription("lnpkciay") - .withSourceOssVersion("iykhy") - .withSourceClusterVersion("fvjlboxqvkjlmx") - .withSourceBuildNumber("mdy") - .withTargetOssVersion("dwdigumb") - .withTargetClusterVersion("aauzzptjazysd") - .withTargetBuildNumber("ezwwv") - .withComponentName("qyuvvfonkp") - .withSeverity(Severity.MEDIUM) - .withExtendedProperties("ikvylauya") - .withCreatedTime(OffsetDateTime.parse("2021-08-12T09:12:49Z")); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradeHotfixUpgradeProperties.class); - Assertions.assertEquals("lnpkciay", model.description()); - Assertions.assertEquals("iykhy", model.sourceOssVersion()); - Assertions.assertEquals("fvjlboxqvkjlmx", model.sourceClusterVersion()); - Assertions.assertEquals("mdy", model.sourceBuildNumber()); - Assertions.assertEquals("dwdigumb", model.targetOssVersion()); - Assertions.assertEquals("aauzzptjazysd", model.targetClusterVersion()); - Assertions.assertEquals("ezwwv", model.targetBuildNumber()); - Assertions.assertEquals("qyuvvfonkp", model.componentName()); - Assertions.assertEquals(Severity.MEDIUM, model.severity()); - Assertions.assertEquals("ikvylauya", model.extendedProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T09:12:49Z"), model.createdTime()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeInnerTests.java deleted file mode 100644 index 817c2bfa86bf..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeProperties; - -public final class ClusterAvailableUpgradeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableUpgradeInner model = BinaryData.fromString( - "{\"properties\":{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"},\"id\":\"lqiyntorzihl\",\"name\":\"osjswsr\",\"type\":\"slyzrpzbchckqq\"}") - .toObject(ClusterAvailableUpgradeInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradeInner model - = new ClusterAvailableUpgradeInner().withProperties(new ClusterAvailableUpgradeProperties()); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradeInner.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeListTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeListTests.java deleted file mode 100644 index af3abdd45380..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeListTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeList; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAvailableUpgradeListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableUpgradeList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"},\"id\":\"dyh\",\"name\":\"pkkpw\",\"type\":\"reqnovvqfov\"},{\"properties\":{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"},\"id\":\"ywsuwsy\",\"name\":\"s\",\"type\":\"dsytgadgvr\"},{\"properties\":{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"},\"id\":\"en\",\"name\":\"qnzarrwl\",\"type\":\"uu\"},{\"properties\":{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"},\"id\":\"qkacewii\",\"name\":\"fpubjibwwi\",\"type\":\"tohqkvpuvksgp\"}],\"nextLink\":\"aknynfsynljphuop\"}") - .toObject(ClusterAvailableUpgradeList.class); - Assertions.assertEquals("aknynfsynljphuop", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradeList model = new ClusterAvailableUpgradeList() - .withValue(Arrays.asList( - new ClusterAvailableUpgradeInner().withProperties(new ClusterAvailableUpgradeProperties()), - new ClusterAvailableUpgradeInner().withProperties(new ClusterAvailableUpgradeProperties()), - new ClusterAvailableUpgradeInner().withProperties(new ClusterAvailableUpgradeProperties()), - new ClusterAvailableUpgradeInner().withProperties(new ClusterAvailableUpgradeProperties()))) - .withNextLink("aknynfsynljphuop"); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradeList.class); - Assertions.assertEquals("aknynfsynljphuop", model.nextLink()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradePatchVersionUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradePatchVersionUpgradePropertiesTests.java deleted file mode 100644 index 3039ba221929..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradePatchVersionUpgradePropertiesTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradePatchVersionUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.Severity; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAvailableUpgradePatchVersionUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableUpgradePatchVersionUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"PatchVersionUpgrade\",\"description\":\"mncsttijfybvp\",\"sourceOssVersion\":\"krsgsgb\",\"sourceClusterVersion\":\"uzqgnjdgkynsc\",\"sourceBuildNumber\":\"qhzvhxnkomt\",\"targetOssVersion\":\"bo\",\"targetClusterVersion\":\"pnvdxz\",\"targetBuildNumber\":\"ihfrbbcevqa\",\"componentName\":\"ltd\",\"severity\":\"medium\",\"extendedProperties\":\"qojpy\",\"createdTime\":\"2021-02-26T15:30:37Z\"}") - .toObject(ClusterAvailableUpgradePatchVersionUpgradeProperties.class); - Assertions.assertEquals("mncsttijfybvp", model.description()); - Assertions.assertEquals("krsgsgb", model.sourceOssVersion()); - Assertions.assertEquals("uzqgnjdgkynsc", model.sourceClusterVersion()); - Assertions.assertEquals("qhzvhxnkomt", model.sourceBuildNumber()); - Assertions.assertEquals("bo", model.targetOssVersion()); - Assertions.assertEquals("pnvdxz", model.targetClusterVersion()); - Assertions.assertEquals("ihfrbbcevqa", model.targetBuildNumber()); - Assertions.assertEquals("ltd", model.componentName()); - Assertions.assertEquals(Severity.MEDIUM, model.severity()); - Assertions.assertEquals("qojpy", model.extendedProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-26T15:30:37Z"), model.createdTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradePatchVersionUpgradeProperties model - = new ClusterAvailableUpgradePatchVersionUpgradeProperties().withDescription("mncsttijfybvp") - .withSourceOssVersion("krsgsgb") - .withSourceClusterVersion("uzqgnjdgkynsc") - .withSourceBuildNumber("qhzvhxnkomt") - .withTargetOssVersion("bo") - .withTargetClusterVersion("pnvdxz") - .withTargetBuildNumber("ihfrbbcevqa") - .withComponentName("ltd") - .withSeverity(Severity.MEDIUM) - .withExtendedProperties("qojpy") - .withCreatedTime(OffsetDateTime.parse("2021-02-26T15:30:37Z")); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradePatchVersionUpgradeProperties.class); - Assertions.assertEquals("mncsttijfybvp", model.description()); - Assertions.assertEquals("krsgsgb", model.sourceOssVersion()); - Assertions.assertEquals("uzqgnjdgkynsc", model.sourceClusterVersion()); - Assertions.assertEquals("qhzvhxnkomt", model.sourceBuildNumber()); - Assertions.assertEquals("bo", model.targetOssVersion()); - Assertions.assertEquals("pnvdxz", model.targetClusterVersion()); - Assertions.assertEquals("ihfrbbcevqa", model.targetBuildNumber()); - Assertions.assertEquals("ltd", model.componentName()); - Assertions.assertEquals(Severity.MEDIUM, model.severity()); - Assertions.assertEquals("qojpy", model.extendedProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-26T15:30:37Z"), model.createdTime()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradePropertiesTests.java deleted file mode 100644 index 2ee156a7e2e1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradePropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeProperties; - -public final class ClusterAvailableUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableUpgradeProperties model - = BinaryData.fromString("{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"}") - .toObject(ClusterAvailableUpgradeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradeProperties model = new ClusterAvailableUpgradeProperties(); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradeProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListMockTests.java deleted file mode 100644 index 2d8b8b746462..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgrade; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterAvailableUpgradesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"},\"id\":\"dbhfhp\",\"name\":\"paz\",\"type\":\"zoyw\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.clusterAvailableUpgrades().list("zjcpeogk", "nmg", "ro", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterComponentsItemTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterComponentsItemTests.java deleted file mode 100644 index bdd7c30b2088..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterComponentsItemTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterComponentsItem; -import org.junit.jupiter.api.Assertions; - -public final class ClusterComponentsItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterComponentsItem model = BinaryData.fromString("{\"name\":\"ispnqzahmgkbrp\",\"version\":\"dhibnuq\"}") - .toObject(ClusterComponentsItem.class); - Assertions.assertEquals("ispnqzahmgkbrp", model.name()); - Assertions.assertEquals("dhibnuq", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterComponentsItem model = new ClusterComponentsItem().withName("ispnqzahmgkbrp").withVersion("dhibnuq"); - model = BinaryData.fromObject(model).toObject(ClusterComponentsItem.class); - Assertions.assertEquals("ispnqzahmgkbrp", model.name()); - Assertions.assertEquals("dhibnuq", model.version()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterConfigFileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterConfigFileTests.java deleted file mode 100644 index ead287a6c7d1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterConfigFileTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ContentEncoding; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterConfigFileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterConfigFile model = BinaryData.fromString( - "{\"fileName\":\"ttouwaboekqvkel\",\"content\":\"mvb\",\"encoding\":\"None\",\"path\":\"sflhhca\",\"values\":{\"yjpkiidzyexz\":\"jixisxyawjoyaqcs\"}}") - .toObject(ClusterConfigFile.class); - Assertions.assertEquals("ttouwaboekqvkel", model.fileName()); - Assertions.assertEquals("mvb", model.content()); - Assertions.assertEquals(ContentEncoding.NONE, model.encoding()); - Assertions.assertEquals("sflhhca", model.path()); - Assertions.assertEquals("jixisxyawjoyaqcs", model.values().get("yjpkiidzyexz")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterConfigFile model = new ClusterConfigFile().withFileName("ttouwaboekqvkel") - .withContent("mvb") - .withEncoding(ContentEncoding.NONE) - .withPath("sflhhca") - .withValues(mapOf("yjpkiidzyexz", "jixisxyawjoyaqcs")); - model = BinaryData.fromObject(model).toObject(ClusterConfigFile.class); - Assertions.assertEquals("ttouwaboekqvkel", model.fileName()); - Assertions.assertEquals("mvb", model.content()); - Assertions.assertEquals(ContentEncoding.NONE, model.encoding()); - Assertions.assertEquals("sflhhca", model.path()); - Assertions.assertEquals("jixisxyawjoyaqcs", model.values().get("yjpkiidzyexz")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradeHistoryPropertiesTests.java deleted file mode 100644 index a0c59587749e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistorySeverityType; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterHotfixUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterHotfixUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"HotfixUpgrade\",\"sourceClusterVersion\":\"lhzdsqtzb\",\"sourceOssVersion\":\"gnowcjhfgmveca\",\"sourceBuildNumber\":\"xmwoteyowcluqo\",\"targetClusterVersion\":\"kqvgqouw\",\"targetOssVersion\":\"zmpjwyiv\",\"targetBuildNumber\":\"kfxcvhrfs\",\"componentName\":\"uagrttikteusqc\",\"severity\":\"medium\",\"utcTime\":\"yklxubyjaffmmfbl\",\"upgradeResult\":\"Failed\"}") - .toObject(ClusterHotfixUpgradeHistoryProperties.class); - Assertions.assertEquals("yklxubyjaffmmfbl", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("lhzdsqtzb", model.sourceClusterVersion()); - Assertions.assertEquals("gnowcjhfgmveca", model.sourceOssVersion()); - Assertions.assertEquals("xmwoteyowcluqo", model.sourceBuildNumber()); - Assertions.assertEquals("kqvgqouw", model.targetClusterVersion()); - Assertions.assertEquals("zmpjwyiv", model.targetOssVersion()); - Assertions.assertEquals("kfxcvhrfs", model.targetBuildNumber()); - Assertions.assertEquals("uagrttikteusqc", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.MEDIUM, model.severity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterHotfixUpgradeHistoryProperties model - = new ClusterHotfixUpgradeHistoryProperties().withUtcTime("yklxubyjaffmmfbl") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED) - .withSourceClusterVersion("lhzdsqtzb") - .withSourceOssVersion("gnowcjhfgmveca") - .withSourceBuildNumber("xmwoteyowcluqo") - .withTargetClusterVersion("kqvgqouw") - .withTargetOssVersion("zmpjwyiv") - .withTargetBuildNumber("kfxcvhrfs") - .withComponentName("uagrttikteusqc") - .withSeverity(ClusterUpgradeHistorySeverityType.MEDIUM); - model = BinaryData.fromObject(model).toObject(ClusterHotfixUpgradeHistoryProperties.class); - Assertions.assertEquals("yklxubyjaffmmfbl", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("lhzdsqtzb", model.sourceClusterVersion()); - Assertions.assertEquals("gnowcjhfgmveca", model.sourceOssVersion()); - Assertions.assertEquals("xmwoteyowcluqo", model.sourceBuildNumber()); - Assertions.assertEquals("kqvgqouw", model.targetClusterVersion()); - Assertions.assertEquals("zmpjwyiv", model.targetOssVersion()); - Assertions.assertEquals("kfxcvhrfs", model.targetBuildNumber()); - Assertions.assertEquals("uagrttikteusqc", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.MEDIUM, model.severity()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradePropertiesTests.java deleted file mode 100644 index 6ff6c52de13a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradePropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterHotfixUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterHotfixUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"HotfixUpgrade\",\"targetOssVersion\":\"ydvfvfcjnae\",\"targetClusterVersion\":\"srvhmgorffuki\",\"targetBuildNumber\":\"vwmzhwplefaxvxil\",\"componentName\":\"tg\"}") - .toObject(ClusterHotfixUpgradeProperties.class); - Assertions.assertEquals("ydvfvfcjnae", model.targetOssVersion()); - Assertions.assertEquals("srvhmgorffuki", model.targetClusterVersion()); - Assertions.assertEquals("vwmzhwplefaxvxil", model.targetBuildNumber()); - Assertions.assertEquals("tg", model.componentName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterHotfixUpgradeProperties model = new ClusterHotfixUpgradeProperties().withTargetOssVersion("ydvfvfcjnae") - .withTargetClusterVersion("srvhmgorffuki") - .withTargetBuildNumber("vwmzhwplefaxvxil") - .withComponentName("tg"); - model = BinaryData.fromObject(model).toObject(ClusterHotfixUpgradeProperties.class); - Assertions.assertEquals("ydvfvfcjnae", model.targetOssVersion()); - Assertions.assertEquals("srvhmgorffuki", model.targetClusterVersion()); - Assertions.assertEquals("vwmzhwplefaxvxil", model.targetBuildNumber()); - Assertions.assertEquals("tg", model.componentName()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradeRollbackHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradeRollbackHistoryPropertiesTests.java deleted file mode 100644 index ebb8a61077ac..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradeRollbackHistoryPropertiesTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeRollbackHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistorySeverityType; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterHotfixUpgradeRollbackHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterHotfixUpgradeRollbackHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"HotfixUpgradeRollback\",\"sourceClusterVersion\":\"u\",\"sourceOssVersion\":\"gqibrtalmetttw\",\"sourceBuildNumber\":\"slqxi\",\"targetClusterVersion\":\"rmooizqse\",\"targetOssVersion\":\"xiutcx\",\"targetBuildNumber\":\"zhyrpeto\",\"componentName\":\"bjoxs\",\"severity\":\"low\",\"utcTime\":\"nhl\",\"upgradeResult\":\"Failed\"}") - .toObject(ClusterHotfixUpgradeRollbackHistoryProperties.class); - Assertions.assertEquals("nhl", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("u", model.sourceClusterVersion()); - Assertions.assertEquals("gqibrtalmetttw", model.sourceOssVersion()); - Assertions.assertEquals("slqxi", model.sourceBuildNumber()); - Assertions.assertEquals("rmooizqse", model.targetClusterVersion()); - Assertions.assertEquals("xiutcx", model.targetOssVersion()); - Assertions.assertEquals("zhyrpeto", model.targetBuildNumber()); - Assertions.assertEquals("bjoxs", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.LOW, model.severity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterHotfixUpgradeRollbackHistoryProperties model - = new ClusterHotfixUpgradeRollbackHistoryProperties().withUtcTime("nhl") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED) - .withSourceClusterVersion("u") - .withSourceOssVersion("gqibrtalmetttw") - .withSourceBuildNumber("slqxi") - .withTargetClusterVersion("rmooizqse") - .withTargetOssVersion("xiutcx") - .withTargetBuildNumber("zhyrpeto") - .withComponentName("bjoxs") - .withSeverity(ClusterUpgradeHistorySeverityType.LOW); - model = BinaryData.fromObject(model).toObject(ClusterHotfixUpgradeRollbackHistoryProperties.class); - Assertions.assertEquals("nhl", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("u", model.sourceClusterVersion()); - Assertions.assertEquals("gqibrtalmetttw", model.sourceOssVersion()); - Assertions.assertEquals("slqxi", model.sourceBuildNumber()); - Assertions.assertEquals("rmooizqse", model.targetClusterVersion()); - Assertions.assertEquals("xiutcx", model.targetOssVersion()); - Assertions.assertEquals("zhyrpeto", model.targetBuildNumber()); - Assertions.assertEquals("bjoxs", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.LOW, model.severity()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInPlaceUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInPlaceUpgradeHistoryPropertiesTests.java deleted file mode 100644 index 59f8f423c503..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInPlaceUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInPlaceUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistorySeverityType; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInPlaceUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInPlaceUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"ClusterInPlaceUpgradeHistoryProperties\",\"sourceClusterVersion\":\"ydwqfbylyrf\",\"sourceOssVersion\":\"agt\",\"sourceBuildNumber\":\"jocqwogfnzjvusf\",\"targetClusterVersion\":\"dmozu\",\"targetOssVersion\":\"lfsbtkadpysow\",\"targetBuildNumber\":\"tgkbugrjqctojc\",\"componentName\":\"sofieypefojyqd\",\"severity\":\"low\",\"utcTime\":\"plcplcwkhi\",\"upgradeResult\":\"Failed\"}") - .toObject(ClusterInPlaceUpgradeHistoryProperties.class); - Assertions.assertEquals("plcplcwkhi", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("ydwqfbylyrf", model.sourceClusterVersion()); - Assertions.assertEquals("agt", model.sourceOssVersion()); - Assertions.assertEquals("jocqwogfnzjvusf", model.sourceBuildNumber()); - Assertions.assertEquals("dmozu", model.targetClusterVersion()); - Assertions.assertEquals("lfsbtkadpysow", model.targetOssVersion()); - Assertions.assertEquals("tgkbugrjqctojc", model.targetBuildNumber()); - Assertions.assertEquals("sofieypefojyqd", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.LOW, model.severity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInPlaceUpgradeHistoryProperties model - = new ClusterInPlaceUpgradeHistoryProperties().withUtcTime("plcplcwkhi") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED) - .withSourceClusterVersion("ydwqfbylyrf") - .withSourceOssVersion("agt") - .withSourceBuildNumber("jocqwogfnzjvusf") - .withTargetClusterVersion("dmozu") - .withTargetOssVersion("lfsbtkadpysow") - .withTargetBuildNumber("tgkbugrjqctojc") - .withComponentName("sofieypefojyqd") - .withSeverity(ClusterUpgradeHistorySeverityType.LOW); - model = BinaryData.fromObject(model).toObject(ClusterInPlaceUpgradeHistoryProperties.class); - Assertions.assertEquals("plcplcwkhi", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("ydwqfbylyrf", model.sourceClusterVersion()); - Assertions.assertEquals("agt", model.sourceOssVersion()); - Assertions.assertEquals("jocqwogfnzjvusf", model.sourceBuildNumber()); - Assertions.assertEquals("dmozu", model.targetClusterVersion()); - Assertions.assertEquals("lfsbtkadpysow", model.targetOssVersion()); - Assertions.assertEquals("tgkbugrjqctojc", model.targetBuildNumber()); - Assertions.assertEquals("sofieypefojyqd", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.LOW, model.severity()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInPlaceUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInPlaceUpgradePropertiesTests.java deleted file mode 100644 index be393a0449fd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInPlaceUpgradePropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInPlaceUpgradeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInPlaceUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInPlaceUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"ClusterInPlaceUpgradeProperties\",\"targetOssVersion\":\"unzo\",\"targetClusterVersion\":\"dhcxgkmoy\",\"targetBuildNumber\":\"dyuib\",\"componentName\":\"fdn\"}") - .toObject(ClusterInPlaceUpgradeProperties.class); - Assertions.assertEquals("unzo", model.targetOssVersion()); - Assertions.assertEquals("dhcxgkmoy", model.targetClusterVersion()); - Assertions.assertEquals("dyuib", model.targetBuildNumber()); - Assertions.assertEquals("fdn", model.componentName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInPlaceUpgradeProperties model = new ClusterInPlaceUpgradeProperties().withTargetOssVersion("unzo") - .withTargetClusterVersion("dhcxgkmoy") - .withTargetBuildNumber("dyuib") - .withComponentName("fdn"); - model = BinaryData.fromObject(model).toObject(ClusterInPlaceUpgradeProperties.class); - Assertions.assertEquals("unzo", model.targetOssVersion()); - Assertions.assertEquals("dhcxgkmoy", model.targetClusterVersion()); - Assertions.assertEquals("dyuib", model.targetBuildNumber()); - Assertions.assertEquals("fdn", model.componentName()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesStatusTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesStatusTests.java deleted file mode 100644 index b88253197528..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesStatusTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewPropertiesStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewPropertiesStatus model - = BinaryData.fromString("{\"ready\":\"thrrgh\",\"reason\":\"bdhqxvcxgf\",\"message\":\"dsofbshrns\"}") - .toObject(ClusterInstanceViewPropertiesStatus.class); - Assertions.assertEquals("thrrgh", model.ready()); - Assertions.assertEquals("bdhqxvcxgf", model.reason()); - Assertions.assertEquals("dsofbshrns", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewPropertiesStatus model = new ClusterInstanceViewPropertiesStatus().withReady("thrrgh") - .withReason("bdhqxvcxgf") - .withMessage("dsofbshrns"); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewPropertiesStatus.class); - Assertions.assertEquals("thrrgh", model.ready()); - Assertions.assertEquals("bdhqxvcxgf", model.reason()); - Assertions.assertEquals("dsofbshrns", model.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesTests.java deleted file mode 100644 index 3b3b3c594920..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewProperties model = BinaryData.fromString( - "{\"status\":{\"ready\":\"pij\",\"reason\":\"rxfrddhc\",\"message\":\"tizzronasxif\"},\"serviceStatuses\":[{\"kind\":\"zq\",\"ready\":\"zh\",\"message\":\"wesgogczh\"},{\"kind\":\"nnxk\",\"ready\":\"lgnyhmo\",\"message\":\"xkk\"}]}") - .toObject(ClusterInstanceViewProperties.class); - Assertions.assertEquals("pij", model.status().ready()); - Assertions.assertEquals("rxfrddhc", model.status().reason()); - Assertions.assertEquals("tizzronasxif", model.status().message()); - Assertions.assertEquals("zq", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("zh", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("wesgogczh", model.serviceStatuses().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewProperties model = new ClusterInstanceViewProperties() - .withStatus(new ClusterInstanceViewPropertiesStatus().withReady("pij") - .withReason("rxfrddhc") - .withMessage("tizzronasxif")) - .withServiceStatuses( - Arrays.asList(new ServiceStatus().withKind("zq").withReady("zh").withMessage("wesgogczh"), - new ServiceStatus().withKind("nnxk").withReady("lgnyhmo").withMessage("xkk"))); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewProperties.class); - Assertions.assertEquals("pij", model.status().ready()); - Assertions.assertEquals("rxfrddhc", model.status().reason()); - Assertions.assertEquals("tizzronasxif", model.status().message()); - Assertions.assertEquals("zq", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("zh", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("wesgogczh", model.serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultInnerTests.java deleted file mode 100644 index 6b4eb2d005db..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResultProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewResultInner model = BinaryData.fromString( - "{\"name\":\"gzxnfaazpxdtnk\",\"properties\":{\"status\":{\"ready\":\"mkqjj\",\"reason\":\"uenvrkp\",\"message\":\"uaibrebqaaysj\"},\"serviceStatuses\":[{\"kind\":\"xqtnq\",\"ready\":\"tezlwff\",\"message\":\"akpjpqqmtedlt\"},{\"kind\":\"mjihyeozphv\",\"ready\":\"auyqncygupkv\",\"message\":\"mdscwxqupev\"}]}}") - .toObject(ClusterInstanceViewResultInner.class); - Assertions.assertEquals("gzxnfaazpxdtnk", model.name()); - Assertions.assertEquals("mkqjj", model.properties().status().ready()); - Assertions.assertEquals("uenvrkp", model.properties().status().reason()); - Assertions.assertEquals("uaibrebqaaysj", model.properties().status().message()); - Assertions.assertEquals("xqtnq", model.properties().serviceStatuses().get(0).kind()); - Assertions.assertEquals("tezlwff", model.properties().serviceStatuses().get(0).ready()); - Assertions.assertEquals("akpjpqqmtedlt", model.properties().serviceStatuses().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewResultInner model = new ClusterInstanceViewResultInner().withName("gzxnfaazpxdtnk") - .withProperties(new ClusterInstanceViewResultProperties() - .withStatus(new ClusterInstanceViewPropertiesStatus().withReady("mkqjj") - .withReason("uenvrkp") - .withMessage("uaibrebqaaysj")) - .withServiceStatuses(Arrays.asList( - new ServiceStatus().withKind("xqtnq").withReady("tezlwff").withMessage("akpjpqqmtedlt"), - new ServiceStatus().withKind("mjihyeozphv").withReady("auyqncygupkv").withMessage("mdscwxqupev")))); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewResultInner.class); - Assertions.assertEquals("gzxnfaazpxdtnk", model.name()); - Assertions.assertEquals("mkqjj", model.properties().status().ready()); - Assertions.assertEquals("uenvrkp", model.properties().status().reason()); - Assertions.assertEquals("uaibrebqaaysj", model.properties().status().message()); - Assertions.assertEquals("xqtnq", model.properties().serviceStatuses().get(0).kind()); - Assertions.assertEquals("tezlwff", model.properties().serviceStatuses().get(0).ready()); - Assertions.assertEquals("akpjpqqmtedlt", model.properties().serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultPropertiesTests.java deleted file mode 100644 index 5ec55211f307..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultPropertiesTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResultProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewResultPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewResultProperties model = BinaryData.fromString( - "{\"status\":{\"ready\":\"hfstotxhojujbyp\",\"reason\":\"mc\",\"message\":\"hixbjxyfwnyl\"},\"serviceStatuses\":[{\"kind\":\"ool\",\"ready\":\"ttpkiwkkbnujrywv\",\"message\":\"lbfpncurd\"},{\"kind\":\"iwii\",\"ready\":\"htywubxcbihwq\",\"message\":\"fdntwjchrdgoih\"},{\"kind\":\"umwctondz\",\"ready\":\"luudfdlwggytsb\",\"message\":\"ovvtgseinqfiu\"},{\"kind\":\"x\",\"ready\":\"knpirgnepttwq\",\"message\":\"niffcdmqnroj\"}]}") - .toObject(ClusterInstanceViewResultProperties.class); - Assertions.assertEquals("hfstotxhojujbyp", model.status().ready()); - Assertions.assertEquals("mc", model.status().reason()); - Assertions.assertEquals("hixbjxyfwnyl", model.status().message()); - Assertions.assertEquals("ool", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("ttpkiwkkbnujrywv", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("lbfpncurd", model.serviceStatuses().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewResultProperties model = new ClusterInstanceViewResultProperties() - .withStatus(new ClusterInstanceViewPropertiesStatus().withReady("hfstotxhojujbyp") - .withReason("mc") - .withMessage("hixbjxyfwnyl")) - .withServiceStatuses(Arrays.asList( - new ServiceStatus().withKind("ool").withReady("ttpkiwkkbnujrywv").withMessage("lbfpncurd"), - new ServiceStatus().withKind("iwii").withReady("htywubxcbihwq").withMessage("fdntwjchrdgoih"), - new ServiceStatus().withKind("umwctondz").withReady("luudfdlwggytsb").withMessage("ovvtgseinqfiu"), - new ServiceStatus().withKind("x").withReady("knpirgnepttwq").withMessage("niffcdmqnroj"))); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewResultProperties.class); - Assertions.assertEquals("hfstotxhojujbyp", model.status().ready()); - Assertions.assertEquals("mc", model.status().reason()); - Assertions.assertEquals("hixbjxyfwnyl", model.status().message()); - Assertions.assertEquals("ool", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("ttpkiwkkbnujrywv", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("lbfpncurd", model.serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewStatusTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewStatusTests.java deleted file mode 100644 index be3ed61ecdc2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewStatusTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewStatus; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewStatus model - = BinaryData.fromString("{\"ready\":\"buswdvzyy\",\"reason\":\"cnunvjsr\",\"message\":\"f\"}") - .toObject(ClusterInstanceViewStatus.class); - Assertions.assertEquals("buswdvzyy", model.ready()); - Assertions.assertEquals("cnunvjsr", model.reason()); - Assertions.assertEquals("f", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewStatus model - = new ClusterInstanceViewStatus().withReady("buswdvzyy").withReason("cnunvjsr").withMessage("f"); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewStatus.class); - Assertions.assertEquals("buswdvzyy", model.ready()); - Assertions.assertEquals("cnunvjsr", model.reason()); - Assertions.assertEquals("f", model.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewsResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewsResultTests.java deleted file mode 100644 index a3f5153e0357..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewsResultTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResultProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewsResult; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewsResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewsResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"rmuhapfcq\",\"properties\":{\"status\":{\"ready\":\"psqxq\",\"reason\":\"svuo\",\"message\":\"gc\"},\"serviceStatuses\":[{\"kind\":\"lvez\",\"ready\":\"ypql\",\"message\":\"eokerqwkyhkobopg\"},{\"kind\":\"edkowepbqpcrfk\",\"ready\":\"wccsnjvcdwxlpqek\",\"message\":\"nkhtjsyingw\"},{\"kind\":\"qatmtdhtmdvy\",\"ready\":\"gikdgsz\",\"message\":\"kbir\"}]}},{\"name\":\"yuzhlhkjoqrvq\",\"properties\":{\"status\":{\"ready\":\"aatjinrvgoupmfi\",\"reason\":\"fggjioolvr\",\"message\":\"kvtkkg\"},\"serviceStatuses\":[{\"kind\":\"qwjygvja\",\"ready\":\"vblm\",\"message\":\"k\"},{\"kind\":\"uhbxvvy\",\"ready\":\"gsopbyrqufegxu\",\"message\":\"zfbn\"},{\"kind\":\"lmctlpd\",\"ready\":\"gitvg\",\"message\":\"hrixkwmy\"},{\"kind\":\"jejveg\",\"ready\":\"hbpnaixexccbd\",\"message\":\"ax\"}]}},{\"name\":\"cexdrrvqa\",\"properties\":{\"status\":{\"ready\":\"qkghtpwijnhy\",\"reason\":\"vfycxzb\",\"message\":\"oowvrv\"},\"serviceStatuses\":[{\"kind\":\"gjqppy\",\"ready\":\"s\",\"message\":\"on\"}]}},{\"name\":\"myhgfipnsxkmc\",\"properties\":{\"status\":{\"ready\":\"a\",\"reason\":\"rrjreafxtsgu\",\"message\":\"jglikkxwslolb\"},\"serviceStatuses\":[{\"kind\":\"vuzlm\",\"ready\":\"felfktg\",\"message\":\"crpw\"},{\"kind\":\"xeznoi\",\"ready\":\"brnjwmw\",\"message\":\"nbsazejjoqkag\"}]}}],\"nextLink\":\"sxtta\"}") - .toObject(ClusterInstanceViewsResult.class); - Assertions.assertEquals("rmuhapfcq", model.value().get(0).name()); - Assertions.assertEquals("psqxq", model.value().get(0).properties().status().ready()); - Assertions.assertEquals("svuo", model.value().get(0).properties().status().reason()); - Assertions.assertEquals("gc", model.value().get(0).properties().status().message()); - Assertions.assertEquals("lvez", model.value().get(0).properties().serviceStatuses().get(0).kind()); - Assertions.assertEquals("ypql", model.value().get(0).properties().serviceStatuses().get(0).ready()); - Assertions.assertEquals("eokerqwkyhkobopg", - model.value().get(0).properties().serviceStatuses().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewsResult model = new ClusterInstanceViewsResult().withValue(Arrays.asList( - new ClusterInstanceViewResultInner().withName("rmuhapfcq") - .withProperties(new ClusterInstanceViewResultProperties().withStatus( - new ClusterInstanceViewPropertiesStatus().withReady("psqxq").withReason("svuo").withMessage("gc")) - .withServiceStatuses(Arrays.asList( - new ServiceStatus().withKind("lvez").withReady("ypql").withMessage("eokerqwkyhkobopg"), - new ServiceStatus().withKind("edkowepbqpcrfk") - .withReady("wccsnjvcdwxlpqek") - .withMessage("nkhtjsyingw"), - new ServiceStatus().withKind("qatmtdhtmdvy").withReady("gikdgsz").withMessage("kbir")))), - new ClusterInstanceViewResultInner().withName("yuzhlhkjoqrvq") - .withProperties(new ClusterInstanceViewResultProperties() - .withStatus(new ClusterInstanceViewPropertiesStatus().withReady("aatjinrvgoupmfi") - .withReason("fggjioolvr") - .withMessage("kvtkkg")) - .withServiceStatuses( - Arrays.asList(new ServiceStatus().withKind("qwjygvja").withReady("vblm").withMessage("k"), - new ServiceStatus().withKind("uhbxvvy").withReady("gsopbyrqufegxu").withMessage("zfbn"), - new ServiceStatus().withKind("lmctlpd").withReady("gitvg").withMessage("hrixkwmy"), - new ServiceStatus().withKind("jejveg").withReady("hbpnaixexccbd").withMessage("ax")))), - new ClusterInstanceViewResultInner().withName("cexdrrvqa") - .withProperties(new ClusterInstanceViewResultProperties() - .withStatus(new ClusterInstanceViewPropertiesStatus().withReady("qkghtpwijnhy") - .withReason("vfycxzb") - .withMessage("oowvrv")) - .withServiceStatuses( - Arrays.asList(new ServiceStatus().withKind("gjqppy").withReady("s").withMessage("on")))), - new ClusterInstanceViewResultInner().withName("myhgfipnsxkmc") - .withProperties(new ClusterInstanceViewResultProperties() - .withStatus(new ClusterInstanceViewPropertiesStatus().withReady("a") - .withReason("rrjreafxtsgu") - .withMessage("jglikkxwslolb")) - .withServiceStatuses(Arrays.asList( - new ServiceStatus().withKind("vuzlm").withReady("felfktg").withMessage("crpw"), - new ServiceStatus().withKind("xeznoi").withReady("brnjwmw").withMessage("nbsazejjoqkag")))))); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewsResult.class); - Assertions.assertEquals("rmuhapfcq", model.value().get(0).name()); - Assertions.assertEquals("psqxq", model.value().get(0).properties().status().ready()); - Assertions.assertEquals("svuo", model.value().get(0).properties().status().reason()); - Assertions.assertEquals("gc", model.value().get(0).properties().status().message()); - Assertions.assertEquals("lvez", model.value().get(0).properties().serviceStatuses().get(0).kind()); - Assertions.assertEquals("ypql", model.value().get(0).properties().serviceStatuses().get(0).ready()); - Assertions.assertEquals("eokerqwkyhkobopg", - model.value().get(0).properties().serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobInnerTests.java deleted file mode 100644 index 0d34cf65674e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; - -public final class ClusterJobInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterJobInner model = BinaryData.fromString( - "{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"wib\",\"name\":\"rcdlbhshfwpr\",\"type\":\"cstwity\"}") - .toObject(ClusterJobInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterJobInner model = new ClusterJobInner().withProperties(new ClusterJobProperties()); - model = BinaryData.fromObject(model).toObject(ClusterJobInner.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobListTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobListTests.java deleted file mode 100644 index 242b1c46573d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobListTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobList; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterJobListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterJobList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"vxccedcp\",\"name\":\"md\",\"type\":\"odn\"},{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"xltjcvnhltiu\",\"name\":\"cxnavv\",\"type\":\"xqi\"}],\"nextLink\":\"qunyowxwlmdjr\"}") - .toObject(ClusterJobList.class); - Assertions.assertEquals("qunyowxwlmdjr", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterJobList model = new ClusterJobList() - .withValue(Arrays.asList(new ClusterJobInner().withProperties(new ClusterJobProperties()), - new ClusterJobInner().withProperties(new ClusterJobProperties()))) - .withNextLink("qunyowxwlmdjr"); - model = BinaryData.fromObject(model).toObject(ClusterJobList.class); - Assertions.assertEquals("qunyowxwlmdjr", model.nextLink()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobPropertiesTests.java deleted file mode 100644 index 99b4b80a34c6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; - -public final class ClusterJobPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterJobProperties model - = BinaryData.fromString("{\"jobType\":\"ClusterJobProperties\"}").toObject(ClusterJobProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterJobProperties model = new ClusterJobProperties(); - model = BinaryData.fromObject(model).toObject(ClusterJobProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListMockTests.java deleted file mode 100644 index 8e0b9737617e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJob; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterJobsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"rrouuxvnsasbcry\",\"name\":\"o\",\"type\":\"izrxklob\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusterJobs() - .list("zna", "xbannovvoxc", "ytprwnwvroev", "tlyo", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobMockTests.java deleted file mode 100644 index 90601d3c46c8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJob; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterJobsRunJobMockTests { - @Test - public void testRunJob() throws Exception { - String responseStr - = "{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"dtvqe\",\"name\":\"rqctmxxdtdd\",\"type\":\"flhuytxzv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterJob response = manager.clusterJobs() - .runJob("lcqxypokk", "minqcym", "zng", new ClusterJobInner().withProperties(new ClusterJobProperties()), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibrariesListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibrariesListMockTests.java deleted file mode 100644 index 5accf317ccf0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibrariesListMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.Category; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibrary; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterLibrariesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"yych\",\"timestamp\":\"2021-07-13T04:48:49Z\",\"status\":\"UNINSTALLING\",\"message\":\"jrtwsz\"},\"id\":\"vuicp\",\"name\":\"vtrrmhwrbfdpyflu\",\"type\":\"hvj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusterLibraries() - .list("llklmtk", "lowkxxpvb", "dfjmzsyzfhotlh", Category.CUSTOM, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("yych", response.iterator().next().properties().remarks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryInnerTests.java deleted file mode 100644 index 6e7cf3f3a10d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLibraryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLibraryInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"wlvwlyoupf\",\"timestamp\":\"2021-07-15T15:51:01Z\",\"status\":\"INSTALLING\",\"message\":\"bdyhgkfminsgowz\"},\"id\":\"tsttktlahbq\",\"name\":\"ctxtgzukxi\",\"type\":\"mmqtgqqqxhr\"}") - .toObject(ClusterLibraryInner.class); - Assertions.assertEquals("wlvwlyoupf", model.properties().remarks()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLibraryInner model - = new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("wlvwlyoupf")); - model = BinaryData.fromObject(model).toObject(ClusterLibraryInner.class); - Assertions.assertEquals("wlvwlyoupf", model.properties().remarks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryListTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryListTests.java deleted file mode 100644 index 62abc8a59fe6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryListTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryList; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLibraryListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLibraryList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"crxgibb\",\"timestamp\":\"2020-12-25T20:16:58Z\",\"status\":\"UNINSTALL_FAILED\",\"message\":\"fozauorsuk\"},\"id\":\"wbqpl\",\"name\":\"lvnuuepzlrph\",\"type\":\"zsoldwey\"},{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"dunvmnnrwrbiorkt\",\"timestamp\":\"2021-08-10T02:45:15Z\",\"status\":\"INSTALLED\",\"message\":\"hgdnhxmsivfo\"},\"id\":\"loxggdufiqn\",\"name\":\"ieuzaofjchvcyyy\",\"type\":\"fgdo\"},{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"ubiipuipwoqonma\",\"timestamp\":\"2021-10-21T10:35:29Z\",\"status\":\"UNINSTALL_FAILED\",\"message\":\"zshq\"},\"id\":\"impevf\",\"name\":\"mblrrilbywd\",\"type\":\"smiccwrwfscj\"},{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"ynszquji\",\"timestamp\":\"2021-01-17T07:53:09Z\",\"status\":\"INSTALLED\",\"message\":\"tiby\"},\"id\":\"bblgyavut\",\"name\":\"thjoxoism\",\"type\":\"ksbpimlqoljx\"}],\"nextLink\":\"gxxlxsffgcvizq\"}") - .toObject(ClusterLibraryList.class); - Assertions.assertEquals("crxgibb", model.value().get(0).properties().remarks()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLibraryList model = new ClusterLibraryList().withValue(Arrays.asList( - new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("crxgibb")), - new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("dunvmnnrwrbiorkt")), - new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("ubiipuipwoqonma")), - new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("ynszquji")))); - model = BinaryData.fromObject(model).toObject(ClusterLibraryList.class); - Assertions.assertEquals("crxgibb", model.value().get(0).properties().remarks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryManagementOperationPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryManagementOperationPropertiesTests.java deleted file mode 100644 index 4016808c2420..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryManagementOperationPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperationProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.LibraryManagementAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLibraryManagementOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLibraryManagementOperationProperties model = BinaryData.fromString( - "{\"action\":\"Uninstall\",\"libraries\":[{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"iogsjkmnwq\",\"timestamp\":\"2021-09-21T11:57:43Z\",\"status\":\"UNINSTALLING\",\"message\":\"yhddvia\"},\"id\":\"gfnmntfpmvmemfnc\",\"name\":\"dwvvba\",\"type\":\"xlllchp\"}]}") - .toObject(ClusterLibraryManagementOperationProperties.class); - Assertions.assertEquals(LibraryManagementAction.UNINSTALL, model.action()); - Assertions.assertEquals("iogsjkmnwq", model.libraries().get(0).properties().remarks()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLibraryManagementOperationProperties model = new ClusterLibraryManagementOperationProperties() - .withAction(LibraryManagementAction.UNINSTALL) - .withLibraries(Arrays.asList( - new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("iogsjkmnwq")))); - model = BinaryData.fromObject(model).toObject(ClusterLibraryManagementOperationProperties.class); - Assertions.assertEquals(LibraryManagementAction.UNINSTALL, model.action()); - Assertions.assertEquals("iogsjkmnwq", model.libraries().get(0).properties().remarks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryManagementOperationTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryManagementOperationTests.java deleted file mode 100644 index 27892e5af577..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryManagementOperationTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperation; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperationProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.LibraryManagementAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLibraryManagementOperationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLibraryManagementOperation model = BinaryData.fromString( - "{\"properties\":{\"action\":\"Uninstall\",\"libraries\":[{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"wxyiopidkqq\",\"timestamp\":\"2021-05-28T06:42:38Z\",\"status\":\"INSTALLING\",\"message\":\"xkdmligo\"},\"id\":\"brxk\",\"name\":\"mloazuru\",\"type\":\"cbgoor\"},{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"eoybfhjxakvvjgs\",\"timestamp\":\"2021-07-21T11:06:32Z\",\"status\":\"UNINSTALL_FAILED\",\"message\":\"mywwtkgkxnyed\"},\"id\":\"gyvudtjuewbc\",\"name\":\"hxuuwhcjyxccybvp\",\"type\":\"yakk\"}]},\"id\":\"zp\",\"name\":\"gwjplmag\",\"type\":\"tcyohpfkyrk\"}") - .toObject(ClusterLibraryManagementOperation.class); - Assertions.assertEquals(LibraryManagementAction.UNINSTALL, model.properties().action()); - Assertions.assertEquals("wxyiopidkqq", model.properties().libraries().get(0).properties().remarks()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLibraryManagementOperation model = new ClusterLibraryManagementOperation().withProperties( - new ClusterLibraryManagementOperationProperties().withAction(LibraryManagementAction.UNINSTALL) - .withLibraries(Arrays.asList( - new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("wxyiopidkqq")), - new ClusterLibraryInner() - .withProperties(new ClusterLibraryProperties().withRemarks("eoybfhjxakvvjgs"))))); - model = BinaryData.fromObject(model).toObject(ClusterLibraryManagementOperation.class); - Assertions.assertEquals(LibraryManagementAction.UNINSTALL, model.properties().action()); - Assertions.assertEquals("wxyiopidkqq", model.properties().libraries().get(0).properties().remarks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryPropertiesTests.java deleted file mode 100644 index 5b825e99a3f3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLibraryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLibraryProperties model = BinaryData.fromString( - "{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"rxcpjuisavo\",\"timestamp\":\"2021-01-28T07:43:14Z\",\"status\":\"UNINSTALLING\",\"message\":\"azivjlfrqttbajl\"}") - .toObject(ClusterLibraryProperties.class); - Assertions.assertEquals("rxcpjuisavo", model.remarks()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLibraryProperties model = new ClusterLibraryProperties().withRemarks("rxcpjuisavo"); - model = BinaryData.fromObject(model).toObject(ClusterLibraryProperties.class); - Assertions.assertEquals("rxcpjuisavo", model.remarks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsApplicationLogsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsApplicationLogsTests.java deleted file mode 100644 index 5c8fc22c03cc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsApplicationLogsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsApplicationLogs; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLogAnalyticsApplicationLogsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLogAnalyticsApplicationLogs model - = BinaryData.fromString("{\"stdOutEnabled\":true,\"stdErrorEnabled\":true}") - .toObject(ClusterLogAnalyticsApplicationLogs.class); - Assertions.assertEquals(true, model.stdOutEnabled()); - Assertions.assertEquals(true, model.stdErrorEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLogAnalyticsApplicationLogs model - = new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(true).withStdErrorEnabled(true); - model = BinaryData.fromObject(model).toObject(ClusterLogAnalyticsApplicationLogs.class); - Assertions.assertEquals(true, model.stdOutEnabled()); - Assertions.assertEquals(true, model.stdErrorEnabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsProfileTests.java deleted file mode 100644 index f2367d859508..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsProfileTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsApplicationLogs; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLogAnalyticsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLogAnalyticsProfile model = BinaryData.fromString( - "{\"enabled\":true,\"applicationLogs\":{\"stdOutEnabled\":true,\"stdErrorEnabled\":false},\"metricsEnabled\":false}") - .toObject(ClusterLogAnalyticsProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(true, model.applicationLogs().stdOutEnabled()); - Assertions.assertEquals(false, model.applicationLogs().stdErrorEnabled()); - Assertions.assertEquals(false, model.metricsEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLogAnalyticsProfile model = new ClusterLogAnalyticsProfile().withEnabled(true) - .withApplicationLogs( - new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(true).withStdErrorEnabled(false)) - .withMetricsEnabled(false); - model = BinaryData.fromObject(model).toObject(ClusterLogAnalyticsProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(true, model.applicationLogs().stdOutEnabled()); - Assertions.assertEquals(false, model.applicationLogs().stdErrorEnabled()); - Assertions.assertEquals(false, model.metricsEnabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradeHistoryPropertiesTests.java deleted file mode 100644 index 4027bdf4975c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatchVersionUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistorySeverityType; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPatchVersionUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPatchVersionUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"PatchVersionUpgrade\",\"sourceClusterVersion\":\"q\",\"sourceOssVersion\":\"kzjcjbtrgae\",\"sourceBuildNumber\":\"vibr\",\"targetClusterVersion\":\"jsto\",\"targetOssVersion\":\"eitpkxztmo\",\"targetBuildNumber\":\"klf\",\"componentName\":\"dgfcwqmp\",\"severity\":\"high\",\"utcTime\":\"qxzhem\",\"upgradeResult\":\"Failed\"}") - .toObject(ClusterPatchVersionUpgradeHistoryProperties.class); - Assertions.assertEquals("qxzhem", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("q", model.sourceClusterVersion()); - Assertions.assertEquals("kzjcjbtrgae", model.sourceOssVersion()); - Assertions.assertEquals("vibr", model.sourceBuildNumber()); - Assertions.assertEquals("jsto", model.targetClusterVersion()); - Assertions.assertEquals("eitpkxztmo", model.targetOssVersion()); - Assertions.assertEquals("klf", model.targetBuildNumber()); - Assertions.assertEquals("dgfcwqmp", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.HIGH, model.severity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPatchVersionUpgradeHistoryProperties model - = new ClusterPatchVersionUpgradeHistoryProperties().withUtcTime("qxzhem") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED) - .withSourceClusterVersion("q") - .withSourceOssVersion("kzjcjbtrgae") - .withSourceBuildNumber("vibr") - .withTargetClusterVersion("jsto") - .withTargetOssVersion("eitpkxztmo") - .withTargetBuildNumber("klf") - .withComponentName("dgfcwqmp") - .withSeverity(ClusterUpgradeHistorySeverityType.HIGH); - model = BinaryData.fromObject(model).toObject(ClusterPatchVersionUpgradeHistoryProperties.class); - Assertions.assertEquals("qxzhem", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("q", model.sourceClusterVersion()); - Assertions.assertEquals("kzjcjbtrgae", model.sourceOssVersion()); - Assertions.assertEquals("vibr", model.sourceBuildNumber()); - Assertions.assertEquals("jsto", model.targetClusterVersion()); - Assertions.assertEquals("eitpkxztmo", model.targetOssVersion()); - Assertions.assertEquals("klf", model.targetBuildNumber()); - Assertions.assertEquals("dgfcwqmp", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.HIGH, model.severity()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradePropertiesTests.java deleted file mode 100644 index 56032ae3d344..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradePropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatchVersionUpgradeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPatchVersionUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPatchVersionUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"PatchVersionUpgrade\",\"targetOssVersion\":\"nzeyqxtjj\",\"targetClusterVersion\":\"qlqhycavodg\",\"targetBuildNumber\":\"dbeesmie\",\"componentName\":\"lrariaawiu\"}") - .toObject(ClusterPatchVersionUpgradeProperties.class); - Assertions.assertEquals("nzeyqxtjj", model.targetOssVersion()); - Assertions.assertEquals("qlqhycavodg", model.targetClusterVersion()); - Assertions.assertEquals("dbeesmie", model.targetBuildNumber()); - Assertions.assertEquals("lrariaawiu", model.componentName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPatchVersionUpgradeProperties model - = new ClusterPatchVersionUpgradeProperties().withTargetOssVersion("nzeyqxtjj") - .withTargetClusterVersion("qlqhycavodg") - .withTargetBuildNumber("dbeesmie") - .withComponentName("lrariaawiu"); - model = BinaryData.fromObject(model).toObject(ClusterPatchVersionUpgradeProperties.class); - Assertions.assertEquals("nzeyqxtjj", model.targetOssVersion()); - Assertions.assertEquals("qlqhycavodg", model.targetClusterVersion()); - Assertions.assertEquals("dbeesmie", model.targetBuildNumber()); - Assertions.assertEquals("lrariaawiu", model.componentName()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradeRollbackHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradeRollbackHistoryPropertiesTests.java deleted file mode 100644 index f18a1ecea791..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradeRollbackHistoryPropertiesTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatchVersionUpgradeRollbackHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistorySeverityType; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPatchVersionUpgradeRollbackHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPatchVersionUpgradeRollbackHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"PatchVersionUpgradeRollback\",\"sourceClusterVersion\":\"ohu\",\"sourceOssVersion\":\"wtwko\",\"sourceBuildNumber\":\"wculkbaw\",\"targetClusterVersion\":\"ajnjwltlwtjj\",\"targetOssVersion\":\"ktalhsnvkcdmxz\",\"targetBuildNumber\":\"oaimlnw\",\"componentName\":\"aomylwea\",\"severity\":\"high\",\"utcTime\":\"cse\",\"upgradeResult\":\"Succeed\"}") - .toObject(ClusterPatchVersionUpgradeRollbackHistoryProperties.class); - Assertions.assertEquals("cse", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals("ohu", model.sourceClusterVersion()); - Assertions.assertEquals("wtwko", model.sourceOssVersion()); - Assertions.assertEquals("wculkbaw", model.sourceBuildNumber()); - Assertions.assertEquals("ajnjwltlwtjj", model.targetClusterVersion()); - Assertions.assertEquals("ktalhsnvkcdmxz", model.targetOssVersion()); - Assertions.assertEquals("oaimlnw", model.targetBuildNumber()); - Assertions.assertEquals("aomylwea", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.HIGH, model.severity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPatchVersionUpgradeRollbackHistoryProperties model - = new ClusterPatchVersionUpgradeRollbackHistoryProperties().withUtcTime("cse") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.SUCCEED) - .withSourceClusterVersion("ohu") - .withSourceOssVersion("wtwko") - .withSourceBuildNumber("wculkbaw") - .withTargetClusterVersion("ajnjwltlwtjj") - .withTargetOssVersion("ktalhsnvkcdmxz") - .withTargetBuildNumber("oaimlnw") - .withComponentName("aomylwea") - .withSeverity(ClusterUpgradeHistorySeverityType.HIGH); - model = BinaryData.fromObject(model).toObject(ClusterPatchVersionUpgradeRollbackHistoryProperties.class); - Assertions.assertEquals("cse", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals("ohu", model.sourceClusterVersion()); - Assertions.assertEquals("wtwko", model.sourceOssVersion()); - Assertions.assertEquals("wculkbaw", model.sourceBuildNumber()); - Assertions.assertEquals("ajnjwltlwtjj", model.targetClusterVersion()); - Assertions.assertEquals("ktalhsnvkcdmxz", model.targetOssVersion()); - Assertions.assertEquals("oaimlnw", model.targetBuildNumber()); - Assertions.assertEquals("aomylwea", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.HIGH, model.severity()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAksPatchUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAksPatchUpgradeHistoryPropertiesTests.java deleted file mode 100644 index 788f07110867..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAksPatchUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAksPatchUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolAksPatchUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAksPatchUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"AKSPatchUpgrade\",\"upgradeClusterPool\":true,\"upgradeAllClusterNodes\":true,\"originalVersion\":\"xvd\",\"newVersion\":\"fwafqrouda\",\"utcTime\":\"pavehhr\",\"upgradeResult\":\"Succeed\"}") - .toObject(ClusterPoolAksPatchUpgradeHistoryProperties.class); - Assertions.assertEquals("pavehhr", model.utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals(true, model.upgradeClusterPool()); - Assertions.assertEquals(true, model.upgradeAllClusterNodes()); - Assertions.assertEquals("xvd", model.originalVersion()); - Assertions.assertEquals("fwafqrouda", model.newVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAksPatchUpgradeHistoryProperties model - = new ClusterPoolAksPatchUpgradeHistoryProperties().withUtcTime("pavehhr") - .withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED) - .withUpgradeClusterPool(true) - .withUpgradeAllClusterNodes(true) - .withOriginalVersion("xvd") - .withNewVersion("fwafqrouda"); - model = BinaryData.fromObject(model).toObject(ClusterPoolAksPatchUpgradeHistoryProperties.class); - Assertions.assertEquals("pavehhr", model.utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals(true, model.upgradeClusterPool()); - Assertions.assertEquals(true, model.upgradeAllClusterNodes()); - Assertions.assertEquals("xvd", model.originalVersion()); - Assertions.assertEquals("fwafqrouda", model.newVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAksPatchVersionUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAksPatchVersionUpgradePropertiesTests.java deleted file mode 100644 index 31122d0a97d4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAksPatchVersionUpgradePropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAksPatchVersionUpgradeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolAksPatchVersionUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAksPatchVersionUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"AKSPatchUpgrade\",\"upgradeClusterPool\":true,\"upgradeAllClusterNodes\":false,\"targetAksVersion\":\"ifmzzsd\"}") - .toObject(ClusterPoolAksPatchVersionUpgradeProperties.class); - Assertions.assertEquals(true, model.upgradeClusterPool()); - Assertions.assertEquals(false, model.upgradeAllClusterNodes()); - Assertions.assertEquals("ifmzzsd", model.targetAksVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAksPatchVersionUpgradeProperties model - = new ClusterPoolAksPatchVersionUpgradeProperties().withUpgradeClusterPool(true) - .withUpgradeAllClusterNodes(false) - .withTargetAksVersion("ifmzzsd"); - model = BinaryData.fromObject(model).toObject(ClusterPoolAksPatchVersionUpgradeProperties.class); - Assertions.assertEquals(true, model.upgradeClusterPool()); - Assertions.assertEquals(false, model.upgradeAllClusterNodes()); - Assertions.assertEquals("ifmzzsd", model.targetAksVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeAksPatchUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeAksPatchUpgradePropertiesTests.java deleted file mode 100644 index 34a62e752fc7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeAksPatchUpgradePropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeAksPatchUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.CurrentClusterPoolAksVersionStatus; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolAvailableUpgradeAksPatchUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAvailableUpgradeAksPatchUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"AKSPatchUpgrade\",\"currentVersion\":\"kkdmfl\",\"currentVersionStatus\":\"Supported\",\"latestVersion\":\"mjlxrrilozapeewc\"}") - .toObject(ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.class); - Assertions.assertEquals("kkdmfl", model.currentVersion()); - Assertions.assertEquals(CurrentClusterPoolAksVersionStatus.SUPPORTED, model.currentVersionStatus()); - Assertions.assertEquals("mjlxrrilozapeewc", model.latestVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAvailableUpgradeAksPatchUpgradeProperties model - = new ClusterPoolAvailableUpgradeAksPatchUpgradeProperties().withCurrentVersion("kkdmfl") - .withCurrentVersionStatus(CurrentClusterPoolAksVersionStatus.SUPPORTED) - .withLatestVersion("mjlxrrilozapeewc"); - model = BinaryData.fromObject(model).toObject(ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.class); - Assertions.assertEquals("kkdmfl", model.currentVersion()); - Assertions.assertEquals(CurrentClusterPoolAksVersionStatus.SUPPORTED, model.currentVersionStatus()); - Assertions.assertEquals("mjlxrrilozapeewc", model.latestVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeInnerTests.java deleted file mode 100644 index c52edb2e928a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeProperties; - -public final class ClusterPoolAvailableUpgradeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAvailableUpgradeInner model = BinaryData.fromString( - "{\"properties\":{\"upgradeType\":\"ClusterPoolAvailableUpgradeProperties\"},\"id\":\"nb\",\"name\":\"xqabnmocpcysh\",\"type\":\"rzafbljjgpbtoqcj\"}") - .toObject(ClusterPoolAvailableUpgradeInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAvailableUpgradeInner model - = new ClusterPoolAvailableUpgradeInner().withProperties(new ClusterPoolAvailableUpgradeProperties()); - model = BinaryData.fromObject(model).toObject(ClusterPoolAvailableUpgradeInner.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeListTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeListTests.java deleted file mode 100644 index 0d5f95b79c4e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeListTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeList; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolAvailableUpgradeListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAvailableUpgradeList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterPoolAvailableUpgradeProperties\"},\"id\":\"ac\",\"name\":\"boo\",\"type\":\"flnrosfqpteehzz\"},{\"properties\":{\"upgradeType\":\"ClusterPoolAvailableUpgradeProperties\"},\"id\":\"yqrimzin\",\"name\":\"vswjdk\",\"type\":\"rsoodqxhcrmnoh\"},{\"properties\":{\"upgradeType\":\"ClusterPoolAvailableUpgradeProperties\"},\"id\":\"kwh\",\"name\":\"soifiyipjxsqw\",\"type\":\"gr\"}],\"nextLink\":\"znorcj\"}") - .toObject(ClusterPoolAvailableUpgradeList.class); - Assertions.assertEquals("znorcj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAvailableUpgradeList model = new ClusterPoolAvailableUpgradeList() - .withValue(Arrays.asList( - new ClusterPoolAvailableUpgradeInner().withProperties(new ClusterPoolAvailableUpgradeProperties()), - new ClusterPoolAvailableUpgradeInner().withProperties(new ClusterPoolAvailableUpgradeProperties()), - new ClusterPoolAvailableUpgradeInner().withProperties(new ClusterPoolAvailableUpgradeProperties()))) - .withNextLink("znorcj"); - model = BinaryData.fromObject(model).toObject(ClusterPoolAvailableUpgradeList.class); - Assertions.assertEquals("znorcj", model.nextLink()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeNodeOsUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeNodeOsUpgradePropertiesTests.java deleted file mode 100644 index aa7b8cf1f5dc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeNodeOsUpgradePropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeNodeOsUpgradeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolAvailableUpgradeNodeOsUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAvailableUpgradeNodeOsUpgradeProperties model - = BinaryData.fromString("{\"upgradeType\":\"NodeOsUpgrade\",\"latestVersion\":\"xlktwkuzi\"}") - .toObject(ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.class); - Assertions.assertEquals("xlktwkuzi", model.latestVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAvailableUpgradeNodeOsUpgradeProperties model - = new ClusterPoolAvailableUpgradeNodeOsUpgradeProperties().withLatestVersion("xlktwkuzi"); - model = BinaryData.fromObject(model).toObject(ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.class); - Assertions.assertEquals("xlktwkuzi", model.latestVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradePropertiesTests.java deleted file mode 100644 index a0c94040e6bf..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradePropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeProperties; - -public final class ClusterPoolAvailableUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAvailableUpgradeProperties model - = BinaryData.fromString("{\"upgradeType\":\"ClusterPoolAvailableUpgradeProperties\"}") - .toObject(ClusterPoolAvailableUpgradeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAvailableUpgradeProperties model = new ClusterPoolAvailableUpgradeProperties(); - model = BinaryData.fromObject(model).toObject(ClusterPoolAvailableUpgradeProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListMockTests.java deleted file mode 100644 index 59c9d251723b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrade; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterPoolAvailableUpgradesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterPoolAvailableUpgradeProperties\"},\"id\":\"hdxbzlm\",\"name\":\"muapcvhdbevw\",\"type\":\"qxeysko\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.clusterPoolAvailableUpgrades().list("gqcwdhohsdtmc", "zsu", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolComputeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolComputeProfileTests.java deleted file mode 100644 index 363a53ec8fe2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolComputeProfileTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolComputeProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolComputeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolComputeProfile model = BinaryData.fromString( - "{\"vmSize\":\"ooginuvamih\",\"count\":774982264,\"availabilityZones\":[\"rxzxtheo\",\"usivye\",\"cciqihnhungbwjz\"]}") - .toObject(ClusterPoolComputeProfile.class); - Assertions.assertEquals("ooginuvamih", model.vmSize()); - Assertions.assertEquals("rxzxtheo", model.availabilityZones().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolComputeProfile model = new ClusterPoolComputeProfile().withVmSize("ooginuvamih") - .withAvailabilityZones(Arrays.asList("rxzxtheo", "usivye", "cciqihnhungbwjz")); - model = BinaryData.fromObject(model).toObject(ClusterPoolComputeProfile.class); - Assertions.assertEquals("ooginuvamih", model.vmSize()); - Assertions.assertEquals("rxzxtheo", model.availabilityZones().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolInnerTests.java deleted file mode 100644 index bf198fd78f48..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolInnerTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Accepted\",\"deploymentId\":\"uv\",\"managedResourceGroupName\":\"xpyb\",\"aksManagedResourceGroupName\":\"m\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"mtz\",\"publicIpTag\":{\"ipTagType\":\"bsphrupidgsybbe\",\"tag\":\"hphoycm\"}},\"computeProfile\":{\"vmSize\":\"xaobhdxbmtqioqjz\",\"count\":1801213143,\"availabilityZones\":[\"ufpo\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"izhwlrxy\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"soqijg\",\"msiClientId\":\"dmbpazlobcufpdz\",\"msiObjectId\":\"rbt\"},\"aksVersion\":\"qjnqglhqgnufoooj\"},\"networkProfile\":{\"subnetId\":\"ifsqesaagdfmg\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":false,\"apiServerAuthorizedIpRanges\":[\"ifkwmrvktsizntoc\",\"pa\"]},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"psqucmpoyf\"},\"status\":\"fogknygjofjdde\"},\"location\":\"rd\",\"tags\":{\"sarhmofc\":\"ewnwreitjzyfl\",\"yurkdtmlxhekuksj\":\"hs\"},\"id\":\"xukcdmpar\",\"name\":\"ryuanzwuxzdxtay\",\"type\":\"lhmwhfpmrqobm\"}") - .toObject(ClusterPoolInner.class); - Assertions.assertEquals("rd", model.location()); - Assertions.assertEquals("ewnwreitjzyfl", model.tags().get("sarhmofc")); - Assertions.assertEquals("xpyb", model.properties().managedResourceGroupName()); - Assertions.assertEquals("mtz", model.properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("bsphrupidgsybbe", model.properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("hphoycm", model.properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("xaobhdxbmtqioqjz", model.properties().computeProfile().vmSize()); - Assertions.assertEquals("ufpo", model.properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("ifsqesaagdfmg", model.properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, model.properties().networkProfile().outboundType()); - Assertions.assertEquals(false, model.properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("ifkwmrvktsizntoc", - model.properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, model.properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("psqucmpoyf", model.properties().logAnalyticsProfile().workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolInner model = new ClusterPoolInner().withLocation("rd") - .withTags(mapOf("sarhmofc", "ewnwreitjzyfl", "yurkdtmlxhekuksj", "hs")) - .withProperties(new ClusterPoolResourceProperties().withManagedResourceGroupName("xpyb") - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("mtz") - .withPublicIpTag(new IpTag().withIpTagType("bsphrupidgsybbe").withTag("hphoycm"))) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("xaobhdxbmtqioqjz") - .withAvailabilityZones(Arrays.asList("ufpo"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("ifsqesaagdfmg") - .withOutboundType(OutboundType.LOAD_BALANCER) - .withEnablePrivateApiServer(false) - .withApiServerAuthorizedIpRanges(Arrays.asList("ifkwmrvktsizntoc", "pa"))) - .withLogAnalyticsProfile(new ClusterPoolResourcePropertiesLogAnalyticsProfile().withEnabled(false) - .withWorkspaceId("psqucmpoyf"))); - model = BinaryData.fromObject(model).toObject(ClusterPoolInner.class); - Assertions.assertEquals("rd", model.location()); - Assertions.assertEquals("ewnwreitjzyfl", model.tags().get("sarhmofc")); - Assertions.assertEquals("xpyb", model.properties().managedResourceGroupName()); - Assertions.assertEquals("mtz", model.properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("bsphrupidgsybbe", model.properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("hphoycm", model.properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("xaobhdxbmtqioqjz", model.properties().computeProfile().vmSize()); - Assertions.assertEquals("ufpo", model.properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("ifsqesaagdfmg", model.properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, model.properties().networkProfile().outboundType()); - Assertions.assertEquals(false, model.properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("ifkwmrvktsizntoc", - model.properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, model.properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("psqucmpoyf", model.properties().logAnalyticsProfile().workspaceId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolListResultTests.java deleted file mode 100644 index 66b8a738a494..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolListResultTests.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolListResult; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"deploymentId\":\"zqqedq\",\"managedResourceGroupName\":\"bciqfouflm\",\"aksManagedResourceGroupName\":\"kzsmodm\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"ougpbkwt\",\"publicIpTag\":{\"ipTagType\":\"tduqktapspwgcuer\",\"tag\":\"umkdosvqwhbmd\"}},\"computeProfile\":{\"vmSize\":\"bbjfddgmbmbexp\",\"count\":72940743,\"availabilityZones\":[\"qrolfpf\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"lgbquxig\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"jgzjaoyfhrtx\",\"msiClientId\":\"lnerkujysvleju\",\"msiObjectId\":\"fqawrlyxw\"},\"aksVersion\":\"cpr\"},\"networkProfile\":{\"subnetId\":\"wbxgjvt\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":false,\"apiServerAuthorizedIpRanges\":[\"dnrujqguhmuouqfp\"]},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"bngui\"},\"status\":\"wu\"},\"location\":\"gazxuf\",\"tags\":{\"fidfvzw\":\"ckyfih\",\"nteiwaopv\":\"zuhtymwisdkfthwx\"},\"id\":\"mijcmmxdcufufs\",\"name\":\"pymzidnsezcxtbzs\",\"type\":\"fycc\"}],\"nextLink\":\"ewmdw\"}") - .toObject(ClusterPoolListResult.class); - Assertions.assertEquals("gazxuf", model.value().get(0).location()); - Assertions.assertEquals("ckyfih", model.value().get(0).tags().get("fidfvzw")); - Assertions.assertEquals("bciqfouflm", model.value().get(0).properties().managedResourceGroupName()); - Assertions.assertEquals("ougpbkwt", - model.value().get(0).properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("tduqktapspwgcuer", - model.value().get(0).properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("umkdosvqwhbmd", - model.value().get(0).properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("bbjfddgmbmbexp", model.value().get(0).properties().computeProfile().vmSize()); - Assertions.assertEquals("qrolfpf", - model.value().get(0).properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("wbxgjvt", model.value().get(0).properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, - model.value().get(0).properties().networkProfile().outboundType()); - Assertions.assertEquals(false, model.value().get(0).properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("dnrujqguhmuouqfp", - model.value().get(0).properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, model.value().get(0).properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("bngui", model.value().get(0).properties().logAnalyticsProfile().workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolListResult model - = new ClusterPoolListResult().withValue(Arrays.asList(new ClusterPoolInner().withLocation("gazxuf") - .withTags(mapOf("fidfvzw", "ckyfih", "nteiwaopv", "zuhtymwisdkfthwx")) - .withProperties(new ClusterPoolResourceProperties().withManagedResourceGroupName("bciqfouflm") - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("ougpbkwt") - .withPublicIpTag(new IpTag().withIpTagType("tduqktapspwgcuer").withTag("umkdosvqwhbmd"))) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("bbjfddgmbmbexp") - .withAvailabilityZones(Arrays.asList("qrolfpf"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("wbxgjvt") - .withOutboundType(OutboundType.LOAD_BALANCER) - .withEnablePrivateApiServer(false) - .withApiServerAuthorizedIpRanges(Arrays.asList("dnrujqguhmuouqfp"))) - .withLogAnalyticsProfile(new ClusterPoolResourcePropertiesLogAnalyticsProfile().withEnabled(false) - .withWorkspaceId("bngui"))))); - model = BinaryData.fromObject(model).toObject(ClusterPoolListResult.class); - Assertions.assertEquals("gazxuf", model.value().get(0).location()); - Assertions.assertEquals("ckyfih", model.value().get(0).tags().get("fidfvzw")); - Assertions.assertEquals("bciqfouflm", model.value().get(0).properties().managedResourceGroupName()); - Assertions.assertEquals("ougpbkwt", - model.value().get(0).properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("tduqktapspwgcuer", - model.value().get(0).properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("umkdosvqwhbmd", - model.value().get(0).properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("bbjfddgmbmbexp", model.value().get(0).properties().computeProfile().vmSize()); - Assertions.assertEquals("qrolfpf", - model.value().get(0).properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("wbxgjvt", model.value().get(0).properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, - model.value().get(0).properties().networkProfile().outboundType()); - Assertions.assertEquals(false, model.value().get(0).properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("dnrujqguhmuouqfp", - model.value().get(0).properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, model.value().get(0).properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("bngui", model.value().get(0).properties().logAnalyticsProfile().workspaceId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolLogAnalyticsProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolLogAnalyticsProfileTests.java deleted file mode 100644 index 678fb59a9a31..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolLogAnalyticsProfileTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolLogAnalyticsProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolLogAnalyticsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolLogAnalyticsProfile model = BinaryData.fromString("{\"enabled\":true,\"workspaceId\":\"jkot\"}") - .toObject(ClusterPoolLogAnalyticsProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("jkot", model.workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolLogAnalyticsProfile model - = new ClusterPoolLogAnalyticsProfile().withEnabled(true).withWorkspaceId("jkot"); - model = BinaryData.fromObject(model).toObject(ClusterPoolLogAnalyticsProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("jkot", model.workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNetworkProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNetworkProfileTests.java deleted file mode 100644 index e49d8f8af465..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNetworkProfileTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolNetworkProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolNetworkProfile model = BinaryData.fromString( - "{\"subnetId\":\"k\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":true,\"apiServerAuthorizedIpRanges\":[\"iwpwcuk\",\"fkgiawxk\",\"ryplwckbasyypn\"]}") - .toObject(ClusterPoolNetworkProfile.class); - Assertions.assertEquals("k", model.subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, model.outboundType()); - Assertions.assertEquals(true, model.enablePrivateApiServer()); - Assertions.assertEquals("iwpwcuk", model.apiServerAuthorizedIpRanges().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolNetworkProfile model = new ClusterPoolNetworkProfile().withSubnetId("k") - .withOutboundType(OutboundType.LOAD_BALANCER) - .withEnablePrivateApiServer(true) - .withApiServerAuthorizedIpRanges(Arrays.asList("iwpwcuk", "fkgiawxk", "ryplwckbasyypn")); - model = BinaryData.fromObject(model).toObject(ClusterPoolNetworkProfile.class); - Assertions.assertEquals("k", model.subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, model.outboundType()); - Assertions.assertEquals(true, model.enablePrivateApiServer()); - Assertions.assertEquals("iwpwcuk", model.apiServerAuthorizedIpRanges().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNodeOsImageUpdatePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNodeOsImageUpdatePropertiesTests.java deleted file mode 100644 index 9d996257023d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNodeOsImageUpdatePropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNodeOsImageUpdateProperties; - -public final class ClusterPoolNodeOsImageUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolNodeOsImageUpdateProperties model = BinaryData.fromString("{\"upgradeType\":\"NodeOsUpgrade\"}") - .toObject(ClusterPoolNodeOsImageUpdateProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolNodeOsImageUpdateProperties model = new ClusterPoolNodeOsImageUpdateProperties(); - model = BinaryData.fromObject(model).toObject(ClusterPoolNodeOsImageUpdateProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNodeOsUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNodeOsUpgradeHistoryPropertiesTests.java deleted file mode 100644 index fe377afa57ca..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNodeOsUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNodeOsUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolNodeOsUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolNodeOsUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"NodeOsUpgrade\",\"newNodeOs\":\"brn\",\"utcTime\":\"suxmpraf\",\"upgradeResult\":\"Succeed\"}") - .toObject(ClusterPoolNodeOsUpgradeHistoryProperties.class); - Assertions.assertEquals("suxmpraf", model.utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals("brn", model.newNodeOs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolNodeOsUpgradeHistoryProperties model - = new ClusterPoolNodeOsUpgradeHistoryProperties().withUtcTime("suxmpraf") - .withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED) - .withNewNodeOs("brn"); - model = BinaryData.fromObject(model).toObject(ClusterPoolNodeOsUpgradeHistoryProperties.class); - Assertions.assertEquals("suxmpraf", model.utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals("brn", model.newNodeOs()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolProfileTests.java deleted file mode 100644 index f2880606ce14..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolProfileTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolProfile model = BinaryData.fromString( - "{\"clusterPoolVersion\":\"vdphlxaolthqtr\",\"publicIpTag\":{\"ipTagType\":\"jbp\",\"tag\":\"zfsinzgvf\"}}") - .toObject(ClusterPoolProfile.class); - Assertions.assertEquals("vdphlxaolthqtr", model.clusterPoolVersion()); - Assertions.assertEquals("jbp", model.publicIpTag().ipTagType()); - Assertions.assertEquals("zfsinzgvf", model.publicIpTag().tag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolProfile model = new ClusterPoolProfile().withClusterPoolVersion("vdphlxaolthqtr") - .withPublicIpTag(new IpTag().withIpTagType("jbp").withTag("zfsinzgvf")); - model = BinaryData.fromObject(model).toObject(ClusterPoolProfile.class); - Assertions.assertEquals("vdphlxaolthqtr", model.clusterPoolVersion()); - Assertions.assertEquals("jbp", model.publicIpTag().ipTagType()); - Assertions.assertEquals("zfsinzgvf", model.publicIpTag().tag()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesAksClusterProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesAksClusterProfileTests.java deleted file mode 100644 index f45337da1de9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesAksClusterProfileTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfileAksClusterAgentPoolIdentityProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesAksClusterProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesAksClusterProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesAksClusterProfile model = BinaryData.fromString( - "{\"aksClusterResourceId\":\"fygxgispemvtzfk\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"ubljofxqe\",\"msiClientId\":\"fjaeq\",\"msiObjectId\":\"hqjbasvmsmj\"},\"aksVersion\":\"lngsntnbybkzgcwr\"}") - .toObject(ClusterPoolResourcePropertiesAksClusterProfile.class); - Assertions.assertEquals("fygxgispemvtzfk", model.aksClusterResourceId()); - Assertions.assertEquals("ubljofxqe", model.aksClusterAgentPoolIdentityProfile().msiResourceId()); - Assertions.assertEquals("fjaeq", model.aksClusterAgentPoolIdentityProfile().msiClientId()); - Assertions.assertEquals("hqjbasvmsmj", model.aksClusterAgentPoolIdentityProfile().msiObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesAksClusterProfile model - = new ClusterPoolResourcePropertiesAksClusterProfile().withAksClusterResourceId("fygxgispemvtzfk") - .withAksClusterAgentPoolIdentityProfile( - new AksClusterProfileAksClusterAgentPoolIdentityProfile().withMsiResourceId("ubljofxqe") - .withMsiClientId("fjaeq") - .withMsiObjectId("hqjbasvmsmj")); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesAksClusterProfile.class); - Assertions.assertEquals("fygxgispemvtzfk", model.aksClusterResourceId()); - Assertions.assertEquals("ubljofxqe", model.aksClusterAgentPoolIdentityProfile().msiResourceId()); - Assertions.assertEquals("fjaeq", model.aksClusterAgentPoolIdentityProfile().msiClientId()); - Assertions.assertEquals("hqjbasvmsmj", model.aksClusterAgentPoolIdentityProfile().msiObjectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesClusterPoolProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesClusterPoolProfileTests.java deleted file mode 100644 index 0dc8013d7e2f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesClusterPoolProfileTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesClusterPoolProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesClusterPoolProfile model = BinaryData.fromString( - "{\"clusterPoolVersion\":\"bcryffdfd\",\"publicIpTag\":{\"ipTagType\":\"ygexpaojakhmsb\",\"tag\":\"jhcrz\"}}") - .toObject(ClusterPoolResourcePropertiesClusterPoolProfile.class); - Assertions.assertEquals("bcryffdfd", model.clusterPoolVersion()); - Assertions.assertEquals("ygexpaojakhmsb", model.publicIpTag().ipTagType()); - Assertions.assertEquals("jhcrz", model.publicIpTag().tag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesClusterPoolProfile model - = new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("bcryffdfd") - .withPublicIpTag(new IpTag().withIpTagType("ygexpaojakhmsb").withTag("jhcrz")); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesClusterPoolProfile.class); - Assertions.assertEquals("bcryffdfd", model.clusterPoolVersion()); - Assertions.assertEquals("ygexpaojakhmsb", model.publicIpTag().ipTagType()); - Assertions.assertEquals("jhcrz", model.publicIpTag().tag()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesComputeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesComputeProfileTests.java deleted file mode 100644 index 2597f941efae..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesComputeProfileTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesComputeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesComputeProfile model = BinaryData.fromString( - "{\"vmSize\":\"felluwfzitonpe\",\"count\":794210755,\"availabilityZones\":[\"jlxofpdvhpfxxyp\",\"ninmayhuyb\",\"kpode\"]}") - .toObject(ClusterPoolResourcePropertiesComputeProfile.class); - Assertions.assertEquals("felluwfzitonpe", model.vmSize()); - Assertions.assertEquals("jlxofpdvhpfxxyp", model.availabilityZones().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesComputeProfile model - = new ClusterPoolResourcePropertiesComputeProfile().withVmSize("felluwfzitonpe") - .withAvailabilityZones(Arrays.asList("jlxofpdvhpfxxyp", "ninmayhuyb", "kpode")); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesComputeProfile.class); - Assertions.assertEquals("felluwfzitonpe", model.vmSize()); - Assertions.assertEquals("jlxofpdvhpfxxyp", model.availabilityZones().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesLogAnalyticsProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesLogAnalyticsProfileTests.java deleted file mode 100644 index 8637e8b250ae..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesLogAnalyticsProfileTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesLogAnalyticsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesLogAnalyticsProfile model - = BinaryData.fromString("{\"enabled\":false,\"workspaceId\":\"sgcbac\"}") - .toObject(ClusterPoolResourcePropertiesLogAnalyticsProfile.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("sgcbac", model.workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesLogAnalyticsProfile model - = new ClusterPoolResourcePropertiesLogAnalyticsProfile().withEnabled(false).withWorkspaceId("sgcbac"); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesLogAnalyticsProfile.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("sgcbac", model.workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesNetworkProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesNetworkProfileTests.java deleted file mode 100644 index 676b75fa07fd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesNetworkProfileTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesNetworkProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesNetworkProfile model = BinaryData.fromString( - "{\"subnetId\":\"feusnhut\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":false,\"apiServerAuthorizedIpRanges\":[\"dhugjzzdatqxhocd\",\"eablg\",\"huticndvkao\",\"wyiftyhxhur\"]}") - .toObject(ClusterPoolResourcePropertiesNetworkProfile.class); - Assertions.assertEquals("feusnhut", model.subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, model.outboundType()); - Assertions.assertEquals(false, model.enablePrivateApiServer()); - Assertions.assertEquals("dhugjzzdatqxhocd", model.apiServerAuthorizedIpRanges().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesNetworkProfile model = new ClusterPoolResourcePropertiesNetworkProfile() - .withSubnetId("feusnhut") - .withOutboundType(OutboundType.LOAD_BALANCER) - .withEnablePrivateApiServer(false) - .withApiServerAuthorizedIpRanges(Arrays.asList("dhugjzzdatqxhocd", "eablg", "huticndvkao", "wyiftyhxhur")); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesNetworkProfile.class); - Assertions.assertEquals("feusnhut", model.subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, model.outboundType()); - Assertions.assertEquals(false, model.enablePrivateApiServer()); - Assertions.assertEquals("dhugjzzdatqxhocd", model.apiServerAuthorizedIpRanges().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesTests.java deleted file mode 100644 index a12cec0696cf..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourceProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Canceled\",\"deploymentId\":\"nryrtihf\",\"managedResourceGroupName\":\"ijbpzvgnwzsymgl\",\"aksManagedResourceGroupName\":\"fcyzkohdbihanufh\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"bj\",\"publicIpTag\":{\"ipTagType\":\"a\",\"tag\":\"ithxqhabifpi\"}},\"computeProfile\":{\"vmSize\":\"xwczbyscnp\",\"count\":219984358,\"availabilityZones\":[\"vyq\",\"iwbybrkxvdumjg\",\"tfwvukxgaudc\",\"snhsjcnyejhkryh\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"pczwlo\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"yemkkvnip\",\"msiClientId\":\"oxzjnchgejspod\",\"msiObjectId\":\"ailzydehojwyahu\"},\"aksVersion\":\"npmqnjaqwixjspro\"},\"networkProfile\":{\"subnetId\":\"cputegjvwmfdats\",\"outboundType\":\"userDefinedRouting\",\"enablePrivateApiServer\":true,\"apiServerAuthorizedIpRanges\":[\"u\",\"suuv\",\"kjozkrwfnd\",\"odjpslwejd\"]},\"logAnalyticsProfile\":{\"enabled\":true,\"workspaceId\":\"yoqpsoaccta\"},\"status\":\"kljla\"}") - .toObject(ClusterPoolResourceProperties.class); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.managedResourceGroupName()); - Assertions.assertEquals("bj", model.clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("a", model.clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("ithxqhabifpi", model.clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("xwczbyscnp", model.computeProfile().vmSize()); - Assertions.assertEquals("vyq", model.computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("cputegjvwmfdats", model.networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.USER_DEFINED_ROUTING, model.networkProfile().outboundType()); - Assertions.assertEquals(true, model.networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("u", model.networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(true, model.logAnalyticsProfile().enabled()); - Assertions.assertEquals("yoqpsoaccta", model.logAnalyticsProfile().workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourceProperties model = new ClusterPoolResourceProperties() - .withManagedResourceGroupName("ijbpzvgnwzsymgl") - .withClusterPoolProfile(new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("bj") - .withPublicIpTag(new IpTag().withIpTagType("a").withTag("ithxqhabifpi"))) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("xwczbyscnp") - .withAvailabilityZones(Arrays.asList("vyq", "iwbybrkxvdumjg", "tfwvukxgaudc", "snhsjcnyejhkryh"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("cputegjvwmfdats") - .withOutboundType(OutboundType.USER_DEFINED_ROUTING) - .withEnablePrivateApiServer(true) - .withApiServerAuthorizedIpRanges(Arrays.asList("u", "suuv", "kjozkrwfnd", "odjpslwejd"))) - .withLogAnalyticsProfile(new ClusterPoolResourcePropertiesLogAnalyticsProfile().withEnabled(true) - .withWorkspaceId("yoqpsoaccta")); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourceProperties.class); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.managedResourceGroupName()); - Assertions.assertEquals("bj", model.clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("a", model.clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("ithxqhabifpi", model.clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("xwczbyscnp", model.computeProfile().vmSize()); - Assertions.assertEquals("vyq", model.computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("cputegjvwmfdats", model.networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.USER_DEFINED_ROUTING, model.networkProfile().outboundType()); - Assertions.assertEquals(true, model.networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("u", model.networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(true, model.logAnalyticsProfile().enabled()); - Assertions.assertEquals("yoqpsoaccta", model.logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoriesListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoriesListMockTests.java deleted file mode 100644 index 64987300519a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoriesListMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistory; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryUpgradeResultType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterPoolUpgradeHistoriesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterPoolUpgradeHistoryProperties\",\"utcTime\":\"owxeqocljmy\",\"upgradeResult\":\"Succeed\"},\"id\":\"zqkjjeokbzefe\",\"name\":\"rx\",\"type\":\"czurtlei\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.clusterPoolUpgradeHistories().list("qzinkfkbg", "z", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("owxeqocljmy", response.iterator().next().properties().utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, - response.iterator().next().properties().upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryInnerTests.java deleted file mode 100644 index 0fb4ecc54809..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryInnerTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolUpgradeHistoryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolUpgradeHistoryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolUpgradeHistoryInner model = BinaryData.fromString( - "{\"properties\":{\"upgradeType\":\"ClusterPoolUpgradeHistoryProperties\",\"utcTime\":\"scpai\",\"upgradeResult\":\"Succeed\"},\"id\":\"hbcsgl\",\"name\":\"mmajtjaodx\",\"type\":\"bnbdxkqpxokajion\"}") - .toObject(ClusterPoolUpgradeHistoryInner.class); - Assertions.assertEquals("scpai", model.properties().utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, model.properties().upgradeResult()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolUpgradeHistoryInner model = new ClusterPoolUpgradeHistoryInner() - .withProperties(new ClusterPoolUpgradeHistoryProperties().withUtcTime("scpai") - .withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED)); - model = BinaryData.fromObject(model).toObject(ClusterPoolUpgradeHistoryInner.class); - Assertions.assertEquals("scpai", model.properties().utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, model.properties().upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryListResultTests.java deleted file mode 100644 index 0b6c6a7db004..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryListResultTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolUpgradeHistoryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryListResult; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryUpgradeResultType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolUpgradeHistoryListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolUpgradeHistoryListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterPoolUpgradeHistoryProperties\",\"utcTime\":\"ljavbqid\",\"upgradeResult\":\"Failed\"},\"id\":\"jzyulpk\",\"name\":\"dj\",\"type\":\"rlkhbzhfepgzgq\"}],\"nextLink\":\"zloc\"}") - .toObject(ClusterPoolUpgradeHistoryListResult.class); - Assertions.assertEquals("ljavbqid", model.value().get(0).properties().utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.FAILED, - model.value().get(0).properties().upgradeResult()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolUpgradeHistoryListResult model - = new ClusterPoolUpgradeHistoryListResult().withValue(Arrays.asList(new ClusterPoolUpgradeHistoryInner() - .withProperties(new ClusterPoolUpgradeHistoryProperties().withUtcTime("ljavbqid") - .withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType.FAILED)))); - model = BinaryData.fromObject(model).toObject(ClusterPoolUpgradeHistoryListResult.class); - Assertions.assertEquals("ljavbqid", model.value().get(0).properties().utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.FAILED, - model.value().get(0).properties().upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryPropertiesTests.java deleted file mode 100644 index 1a1080dd686b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"ClusterPoolUpgradeHistoryProperties\",\"utcTime\":\"imexgstxgcpodgma\",\"upgradeResult\":\"Failed\"}") - .toObject(ClusterPoolUpgradeHistoryProperties.class); - Assertions.assertEquals("imexgstxgcpodgma", model.utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolUpgradeHistoryProperties model - = new ClusterPoolUpgradeHistoryProperties().withUtcTime("imexgstxgcpodgma") - .withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType.FAILED); - model = BinaryData.fromObject(model).toObject(ClusterPoolUpgradeHistoryProperties.class); - Assertions.assertEquals("imexgstxgcpodgma", model.utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradePropertiesTests.java deleted file mode 100644 index 2b4f008f3638..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradePropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeProperties; - -public final class ClusterPoolUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolUpgradeProperties model = BinaryData.fromString("{\"upgradeType\":\"ClusterPoolUpgradeProperties\"}") - .toObject(ClusterPoolUpgradeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolUpgradeProperties model = new ClusterPoolUpgradeProperties(); - model = BinaryData.fromObject(model).toObject(ClusterPoolUpgradeProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeTests.java deleted file mode 100644 index 8f22dc52e7ea..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeProperties; - -public final class ClusterPoolUpgradeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolUpgrade model - = BinaryData.fromString("{\"properties\":{\"upgradeType\":\"ClusterPoolUpgradeProperties\"}}") - .toObject(ClusterPoolUpgrade.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolUpgrade model = new ClusterPoolUpgrade().withProperties(new ClusterPoolUpgradeProperties()); - model = BinaryData.fromObject(model).toObject(ClusterPoolUpgrade.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionInnerTests.java deleted file mode 100644 index 4a546cfa46ea..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionInnerTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolVersionInner model = BinaryData.fromString( - "{\"properties\":{\"clusterPoolVersion\":\"jgcyztsfmznba\",\"aksVersion\":\"ph\",\"isPreview\":true},\"id\":\"rn\",\"name\":\"pxehuwrykqga\",\"type\":\"fmviklby\"}") - .toObject(ClusterPoolVersionInner.class); - Assertions.assertEquals("jgcyztsfmznba", model.properties().clusterPoolVersion()); - Assertions.assertEquals("ph", model.properties().aksVersion()); - Assertions.assertEquals(true, model.properties().isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolVersionInner model = new ClusterPoolVersionInner() - .withProperties(new ClusterPoolVersionProperties().withClusterPoolVersion("jgcyztsfmznba") - .withAksVersion("ph") - .withIsPreview(true)); - model = BinaryData.fromObject(model).toObject(ClusterPoolVersionInner.class); - Assertions.assertEquals("jgcyztsfmznba", model.properties().clusterPoolVersion()); - Assertions.assertEquals("ph", model.properties().aksVersion()); - Assertions.assertEquals(true, model.properties().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionPropertiesTests.java deleted file mode 100644 index fa54bbe4ee75..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolVersionProperties model = BinaryData - .fromString("{\"clusterPoolVersion\":\"khbejdznxc\",\"aksVersion\":\"srhnjivo\",\"isPreview\":true}") - .toObject(ClusterPoolVersionProperties.class); - Assertions.assertEquals("khbejdznxc", model.clusterPoolVersion()); - Assertions.assertEquals("srhnjivo", model.aksVersion()); - Assertions.assertEquals(true, model.isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolVersionProperties model = new ClusterPoolVersionProperties().withClusterPoolVersion("khbejdznxc") - .withAksVersion("srhnjivo") - .withIsPreview(true); - model = BinaryData.fromObject(model).toObject(ClusterPoolVersionProperties.class); - Assertions.assertEquals("khbejdznxc", model.clusterPoolVersion()); - Assertions.assertEquals("srhnjivo", model.aksVersion()); - Assertions.assertEquals(true, model.isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionsListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionsListResultTests.java deleted file mode 100644 index 85c2944fd50b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionsListResultTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionsListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolVersionsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolVersionsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"clusterPoolVersion\":\"jzgxmrhublwp\",\"aksVersion\":\"sutrgjup\",\"isPreview\":true},\"id\":\"p\",\"name\":\"oqh\",\"type\":\"hej\"},{\"properties\":{\"clusterPoolVersion\":\"zpnfqntcypsxj\",\"aksVersion\":\"oimwkslirc\",\"isPreview\":false},\"id\":\"vydfceacvlhvygdy\",\"name\":\"t\",\"type\":\"mrtwna\"}],\"nextLink\":\"slbi\"}") - .toObject(ClusterPoolVersionsListResult.class); - Assertions.assertEquals("jzgxmrhublwp", model.value().get(0).properties().clusterPoolVersion()); - Assertions.assertEquals("sutrgjup", model.value().get(0).properties().aksVersion()); - Assertions.assertEquals(true, model.value().get(0).properties().isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolVersionsListResult model = new ClusterPoolVersionsListResult().withValue(Arrays.asList( - new ClusterPoolVersionInner() - .withProperties(new ClusterPoolVersionProperties().withClusterPoolVersion("jzgxmrhublwp") - .withAksVersion("sutrgjup") - .withIsPreview(true)), - new ClusterPoolVersionInner() - .withProperties(new ClusterPoolVersionProperties().withClusterPoolVersion("zpnfqntcypsxj") - .withAksVersion("oimwkslirc") - .withIsPreview(false)))); - model = BinaryData.fromObject(model).toObject(ClusterPoolVersionsListResult.class); - Assertions.assertEquals("jzgxmrhublwp", model.value().get(0).properties().clusterPoolVersion()); - Assertions.assertEquals("sutrgjup", model.value().get(0).properties().aksVersion()); - Assertions.assertEquals(true, model.value().get(0).properties().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateMockTests.java deleted file mode 100644 index 30e96ffd935a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterPoolsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentId\":\"geyzihgrkyuiz\",\"managedResourceGroupName\":\"snmfpphojeevy\",\"aksManagedResourceGroupName\":\"hsgz\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"zbgomfgbeg\",\"publicIpTag\":{\"ipTagType\":\"gleohi\",\"tag\":\"etnluankrrfx\"}},\"computeProfile\":{\"vmSize\":\"eebtijvacvb\",\"count\":192666481,\"availabilityZones\":[\"q\",\"lajrnwxacevehj\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"xoafgaoqltfae\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"inmfgvxirp\",\"msiClientId\":\"hriypoqeyhlqhy\",\"msiObjectId\":\"prlpy\"},\"aksVersion\":\"uciqdsme\"},\"networkProfile\":{\"subnetId\":\"itdfuxtyasiib\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":false,\"apiServerAuthorizedIpRanges\":[\"stgnl\",\"hnmgixhcm\",\"vmqfoud\",\"rhc\"]},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"rotwypundmbxhugc\"},\"status\":\"k\"},\"location\":\"lgorb\",\"tags\":{\"jltfvnzcyjtotpv\":\"pmdtz\"},\"id\":\"pvpbdbzqgqqiheds\",\"name\":\"qwthmky\",\"type\":\"bcysih\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterPool response - = manager.clusterPools() - .define("boldforobwj") - .withRegion("qoli") - .withExistingResourceGroup("chxgs") - .withTags(mapOf("oq", "aiouaubrjt", "rzpasccbiuimzdly", "fuojrngif", "fdvruz", "dfqwmkyoq")) - .withProperties( - new ClusterPoolResourceProperties().withManagedResourceGroupName("qpbtuodxes") - .withClusterPoolProfile(new ClusterPoolResourcePropertiesClusterPoolProfile() - .withClusterPoolVersion("rwoycqucwyh") - .withPublicIpTag(new IpTag().withIpTagType("nomdrkywuhpsv").withTag("uurutlwexxwlalni"))) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("xzsrzpge") - .withAvailabilityZones(Arrays.asList("bwwpgdakchzy"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("ufmhrunc") - .withOutboundType(OutboundType.USER_DEFINED_ROUTING) - .withEnablePrivateApiServer(false) - .withApiServerAuthorizedIpRanges(Arrays.asList("cdqzhlctddu", "qn", "yfp"))) - .withLogAnalyticsProfile( - new ClusterPoolResourcePropertiesLogAnalyticsProfile().withEnabled(false) - .withWorkspaceId("bnjj"))) - .create(); - - Assertions.assertEquals("lgorb", response.location()); - Assertions.assertEquals("pmdtz", response.tags().get("jltfvnzcyjtotpv")); - Assertions.assertEquals("snmfpphojeevy", response.properties().managedResourceGroupName()); - Assertions.assertEquals("zbgomfgbeg", response.properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("gleohi", response.properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("etnluankrrfx", response.properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("eebtijvacvb", response.properties().computeProfile().vmSize()); - Assertions.assertEquals("q", response.properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("itdfuxtyasiib", response.properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, response.properties().networkProfile().outboundType()); - Assertions.assertEquals(false, response.properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("stgnl", response.properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, response.properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("rotwypundmbxhugc", response.properties().logAnalyticsProfile().workspaceId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteMockTests.java deleted file mode 100644 index 4fb40998ed1b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterPoolsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusterPools().delete("juwasqvdaeyyguxa", "jsqzhzbezk", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index d67689d5d0d3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterPoolsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentId\":\"fgzdjtxvz\",\"managedResourceGroupName\":\"bqvgaqv\",\"aksManagedResourceGroupName\":\"a\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"qusrdvetnws\",\"publicIpTag\":{\"ipTagType\":\"utnw\",\"tag\":\"duy\"}},\"computeProfile\":{\"vmSize\":\"vuzhyr\",\"count\":680405996,\"availabilityZones\":[\"mvekdxukuqgsjj\",\"undxgketw\",\"hhzjhfj\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"vmuvgpmu\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"qsxvmhf\",\"msiClientId\":\"uzjyihsasbhudypo\",\"msiObjectId\":\"yue\"},\"aksVersion\":\"lynsqyrpf\"},\"networkProfile\":{\"subnetId\":\"brlttymsjnygq\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":false,\"apiServerAuthorizedIpRanges\":[\"zgtila\",\"hnfhqlyvijouwi\"]},\"logAnalyticsProfile\":{\"enabled\":true,\"workspaceId\":\"yzunbixxrtikv\"},\"status\":\"wpgclrcivt\"},\"location\":\"xfrk\",\"tags\":{\"ka\":\"pmyyefrpmpdnqq\",\"vmm\":\"ao\",\"itgvkx\":\"npqfrtqlkzmeg\",\"hcans\":\"zyqdrfegcealzx\"},\"id\":\"moy\",\"name\":\"hlwigdivbkbxg\",\"type\":\"mf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterPool response = manager.clusterPools() - .getByResourceGroupWithResponse("vyi", "zqodfvpgshox", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xfrk", response.location()); - Assertions.assertEquals("pmyyefrpmpdnqq", response.tags().get("ka")); - Assertions.assertEquals("bqvgaqv", response.properties().managedResourceGroupName()); - Assertions.assertEquals("qusrdvetnws", response.properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("utnw", response.properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("duy", response.properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("vuzhyr", response.properties().computeProfile().vmSize()); - Assertions.assertEquals("mvekdxukuqgsjj", response.properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("brlttymsjnygq", response.properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, response.properties().networkProfile().outboundType()); - Assertions.assertEquals(false, response.properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("zgtila", response.properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(true, response.properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("yzunbixxrtikv", response.properties().logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupMockTests.java deleted file mode 100644 index 35d26fc3f907..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupMockTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterPoolsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"deploymentId\":\"ytnrzvuljraae\",\"managedResourceGroupName\":\"nok\",\"aksManagedResourceGroupName\":\"ukkjqnvbroyla\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"ulcdisdosf\",\"publicIpTag\":{\"ipTagType\":\"jsvg\",\"tag\":\"rwhryvycytd\"}},\"computeProfile\":{\"vmSize\":\"lxgccknfnwmbtm\",\"count\":166285139,\"availabilityZones\":[\"dhttzaefedxihchr\",\"hk\",\"crjdqnsdfzpbgtg\",\"ylkdghrje\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"lwxezwzhokvbwnh\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"qlgehg\",\"msiClientId\":\"pipifh\",\"msiObjectId\":\"f\"},\"aksVersion\":\"ajvgcxtxjcsheafi\"},\"networkProfile\":{\"subnetId\":\"tugsresmkssjh\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":true,\"apiServerAuthorizedIpRanges\":[\"fwegprhptillu\",\"biqtgdq\",\"hm\",\"wsldrizetpwbr\"]},\"logAnalyticsProfile\":{\"enabled\":true,\"workspaceId\":\"ibph\"},\"status\":\"zmizakakan\"},\"location\":\"p\",\"tags\":{\"xprimrsop\":\"zhajoylhjlmuo\",\"stvasylwxdzaumw\":\"eecjmeis\"},\"id\":\"oohgu\",\"name\":\"fuzboyjathwtzolb\",\"type\":\"emwmdxmebwjs\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.clusterPools().listByResourceGroup("knh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("p", response.iterator().next().location()); - Assertions.assertEquals("zhajoylhjlmuo", response.iterator().next().tags().get("xprimrsop")); - Assertions.assertEquals("nok", response.iterator().next().properties().managedResourceGroupName()); - Assertions.assertEquals("ulcdisdosf", - response.iterator().next().properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("jsvg", - response.iterator().next().properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("rwhryvycytd", - response.iterator().next().properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("lxgccknfnwmbtm", response.iterator().next().properties().computeProfile().vmSize()); - Assertions.assertEquals("dhttzaefedxihchr", - response.iterator().next().properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("tugsresmkssjh", response.iterator().next().properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, - response.iterator().next().properties().networkProfile().outboundType()); - Assertions.assertEquals(true, - response.iterator().next().properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("fwegprhptillu", - response.iterator().next().properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(true, response.iterator().next().properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("ibph", response.iterator().next().properties().logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListMockTests.java deleted file mode 100644 index fb284378c06f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterPoolsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"deploymentId\":\"dxasicddyvv\",\"managedResourceGroupName\":\"kgfmocwahpq\",\"aksManagedResourceGroupName\":\"tjeaahhvjhh\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"kzyb\",\"publicIpTag\":{\"ipTagType\":\"jid\",\"tag\":\"ksyxkyxvxevblbje\"}},\"computeProfile\":{\"vmSize\":\"nljlageuaulx\",\"count\":783935050,\"availabilityZones\":[\"bn\",\"ppxynenls\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"izzgwkln\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"mffeycxcktpi\",\"msiClientId\":\"merteeammxqiek\",\"msiObjectId\":\"kzddrtkgdojbmxva\"},\"aksVersion\":\"efdeesve\"},\"networkProfile\":{\"subnetId\":\"ijpxtx\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":true,\"apiServerAuthorizedIpRanges\":[\"jwsawddjibab\",\"vit\",\"tvtzeexavoxtfg\",\"ecdmdqbwpy\"]},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"sfj\"},\"status\":\"b\"},\"location\":\"hhxud\",\"tags\":{\"es\":\"odhtnsirudhzm\",\"zrcxfailcfxwmdbo\":\"kdlpa\"},\"id\":\"dfgsftufqobrj\",\"name\":\"nac\",\"type\":\"cc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusterPools().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hhxud", response.iterator().next().location()); - Assertions.assertEquals("odhtnsirudhzm", response.iterator().next().tags().get("es")); - Assertions.assertEquals("kgfmocwahpq", response.iterator().next().properties().managedResourceGroupName()); - Assertions.assertEquals("kzyb", - response.iterator().next().properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("jid", - response.iterator().next().properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("ksyxkyxvxevblbje", - response.iterator().next().properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("nljlageuaulx", response.iterator().next().properties().computeProfile().vmSize()); - Assertions.assertEquals("bn", - response.iterator().next().properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("ijpxtx", response.iterator().next().properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, - response.iterator().next().properties().networkProfile().outboundType()); - Assertions.assertEquals(true, - response.iterator().next().properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("jwsawddjibab", - response.iterator().next().properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, response.iterator().next().properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("sfj", response.iterator().next().properties().logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeMockTests.java deleted file mode 100644 index bb979223a543..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeMockTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterPoolsUpgradeMockTests { - @Test - public void testUpgrade() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentId\":\"mqt\",\"managedResourceGroupName\":\"xyi\",\"aksManagedResourceGroupName\":\"dt\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"cttadi\",\"publicIpTag\":{\"ipTagType\":\"eukmr\",\"tag\":\"ieekpndzaa\"}},\"computeProfile\":{\"vmSize\":\"mudqmeq\",\"count\":334028568,\"availabilityZones\":[\"bu\",\"qwyxebeybpm\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"rtffyaqitmh\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"ioqaqhvs\",\"msiClientId\":\"ufuqyrx\",\"msiObjectId\":\"dlcgqlsismjqfr\"},\"aksVersion\":\"gamquhiosrsjui\"},\"networkProfile\":{\"subnetId\":\"cdisyir\",\"outboundType\":\"userDefinedRouting\",\"enablePrivateApiServer\":true,\"apiServerAuthorizedIpRanges\":[\"xrxzbujrtr\",\"qvwre\",\"khgn\",\"nzonzl\"]},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"yw\"},\"status\":\"vjtszcofize\"},\"location\":\"dhgbjkvre\",\"tags\":{\"shcxlpmjerbdk\":\"amurvzmlovuan\",\"bccxjmonfdgn\":\"lvidizozs\",\"ypuuwwltvuqjctze\":\"n\"},\"id\":\"keifzzhmkdasv\",\"name\":\"lyhb\",\"type\":\"cu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterPool response = manager.clusterPools() - .upgrade("jpahlxvea", "f", new ClusterPoolUpgrade().withProperties(new ClusterPoolUpgradeProperties()), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dhgbjkvre", response.location()); - Assertions.assertEquals("amurvzmlovuan", response.tags().get("shcxlpmjerbdk")); - Assertions.assertEquals("xyi", response.properties().managedResourceGroupName()); - Assertions.assertEquals("cttadi", response.properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("eukmr", response.properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("ieekpndzaa", response.properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("mudqmeq", response.properties().computeProfile().vmSize()); - Assertions.assertEquals("bu", response.properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("cdisyir", response.properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.USER_DEFINED_ROUTING, - response.properties().networkProfile().outboundType()); - Assertions.assertEquals(true, response.properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("xrxzbujrtr", - response.properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, response.properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("yw", response.properties().logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPrometheusProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPrometheusProfileTests.java deleted file mode 100644 index 4bcad045bce9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPrometheusProfileTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPrometheusProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPrometheusProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPrometheusProfile model - = BinaryData.fromString("{\"enabled\":true}").toObject(ClusterPrometheusProfile.class); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPrometheusProfile model = new ClusterPrometheusProfile().withEnabled(true); - model = BinaryData.fromObject(model).toObject(ClusterPrometheusProfile.class); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterRangerPluginProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterRangerPluginProfileTests.java deleted file mode 100644 index b8a41d0abaf3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterRangerPluginProfileTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterRangerPluginProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterRangerPluginProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterRangerPluginProfile model - = BinaryData.fromString("{\"enabled\":true}").toObject(ClusterRangerPluginProfile.class); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterRangerPluginProfile model = new ClusterRangerPluginProfile().withEnabled(true); - model = BinaryData.fromObject(model).toObject(ClusterRangerPluginProfile.class); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizeDataTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizeDataTests.java deleted file mode 100644 index 75986403159b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizeDataTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterResizeDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterResizeData model = BinaryData.fromString( - "{\"properties\":{\"targetWorkerNodeCount\":1929078891},\"location\":\"gvvcnayrhyr\",\"tags\":{\"qqtch\":\"mueedndrdvstk\",\"mtdaa\":\"alm\"},\"id\":\"gdv\",\"name\":\"vgpiohgwxrt\",\"type\":\"udxepxgyqagv\"}") - .toObject(ClusterResizeData.class); - Assertions.assertEquals("gvvcnayrhyr", model.location()); - Assertions.assertEquals("mueedndrdvstk", model.tags().get("qqtch")); - Assertions.assertEquals(1929078891, model.properties().targetWorkerNodeCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterResizeData model = new ClusterResizeData().withLocation("gvvcnayrhyr") - .withTags(mapOf("qqtch", "mueedndrdvstk", "mtdaa", "alm")) - .withProperties(new ClusterResizeProperties().withTargetWorkerNodeCount(1929078891)); - model = BinaryData.fromObject(model).toObject(ClusterResizeData.class); - Assertions.assertEquals("gvvcnayrhyr", model.location()); - Assertions.assertEquals("mueedndrdvstk", model.tags().get("qqtch")); - Assertions.assertEquals(1929078891, model.properties().targetWorkerNodeCount()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizePropertiesTests.java deleted file mode 100644 index a57be129517a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizePropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterResizePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterResizeProperties model - = BinaryData.fromString("{\"targetWorkerNodeCount\":1825902686}").toObject(ClusterResizeProperties.class); - Assertions.assertEquals(1825902686, model.targetWorkerNodeCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterResizeProperties model = new ClusterResizeProperties().withTargetWorkerNodeCount(1825902686); - model = BinaryData.fromObject(model).toObject(ClusterResizeProperties.class); - Assertions.assertEquals(1825902686, model.targetWorkerNodeCount()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigTests.java deleted file mode 100644 index c3d101338c7b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ContentEncoding; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterServiceConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterServiceConfig model = BinaryData.fromString( - "{\"component\":\"xobbcswsrt\",\"files\":[{\"fileName\":\"iplrbpbewtghfgb\",\"content\":\"gw\",\"encoding\":\"None\",\"path\":\"v\",\"values\":{\"mxiebw\":\"kbegibt\",\"gwyzm\":\"aloayqcgwrtzju\",\"mtsavjcbpwxqp\":\"txon\",\"yvxqtayriwwroy\":\"rknftguvriuhprwm\"}},{\"fileName\":\"bexrmcq\",\"content\":\"ycnojvknmefqsg\",\"encoding\":\"Base64\",\"path\":\"apj\",\"values\":{\"lxkvu\":\"pvgqzcjrvxdjzlm\",\"n\":\"fhzovawjvzunluth\"}},{\"fileName\":\"rnxipei\",\"content\":\"jzuaejxdultskzbb\",\"encoding\":\"None\",\"path\":\"mv\",\"values\":{\"zuhkfpbsjyof\":\"gpw\",\"us\":\"xl\"}}]}") - .toObject(ClusterServiceConfig.class); - Assertions.assertEquals("xobbcswsrt", model.component()); - Assertions.assertEquals("iplrbpbewtghfgb", model.files().get(0).fileName()); - Assertions.assertEquals("gw", model.files().get(0).content()); - Assertions.assertEquals(ContentEncoding.NONE, model.files().get(0).encoding()); - Assertions.assertEquals("v", model.files().get(0).path()); - Assertions.assertEquals("kbegibt", model.files().get(0).values().get("mxiebw")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterServiceConfig model = new ClusterServiceConfig().withComponent("xobbcswsrt") - .withFiles(Arrays.asList( - new ClusterConfigFile().withFileName("iplrbpbewtghfgb") - .withContent("gw") - .withEncoding(ContentEncoding.NONE) - .withPath("v") - .withValues(mapOf("mxiebw", "kbegibt", "gwyzm", "aloayqcgwrtzju", "mtsavjcbpwxqp", "txon", - "yvxqtayriwwroy", "rknftguvriuhprwm")), - new ClusterConfigFile().withFileName("bexrmcq") - .withContent("ycnojvknmefqsg") - .withEncoding(ContentEncoding.BASE64) - .withPath("apj") - .withValues(mapOf("lxkvu", "pvgqzcjrvxdjzlm", "n", "fhzovawjvzunluth")), - new ClusterConfigFile().withFileName("rnxipei") - .withContent("jzuaejxdultskzbb") - .withEncoding(ContentEncoding.NONE) - .withPath("mv") - .withValues(mapOf("zuhkfpbsjyof", "gpw", "us", "xl")))); - model = BinaryData.fromObject(model).toObject(ClusterServiceConfig.class); - Assertions.assertEquals("xobbcswsrt", model.component()); - Assertions.assertEquals("iplrbpbewtghfgb", model.files().get(0).fileName()); - Assertions.assertEquals("gw", model.files().get(0).content()); - Assertions.assertEquals(ContentEncoding.NONE, model.files().get(0).encoding()); - Assertions.assertEquals("v", model.files().get(0).path()); - Assertions.assertEquals("kbegibt", model.files().get(0).values().get("mxiebw")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigsProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigsProfileTests.java deleted file mode 100644 index 858b3a750de5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigsProfileTests.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfigsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ContentEncoding; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterServiceConfigsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterServiceConfigsProfile model = BinaryData.fromString( - "{\"serviceName\":\"d\",\"configs\":[{\"component\":\"avxbniwdjswztsdb\",\"files\":[{\"fileName\":\"nxytxh\",\"content\":\"xbzpfzab\",\"encoding\":\"Base64\",\"path\":\"hxw\",\"values\":{\"vgyuguos\":\"yqiklbbovplwzb\"}},{\"fileName\":\"mkfssxqukkfplgm\",\"content\":\"xnkjzkdesl\",\"encoding\":\"Base64\",\"path\":\"pwiyig\",\"values\":{\"upedeojnabckhs\":\"kdwzbaiuebbaumny\",\"ie\":\"txp\"}},{\"fileName\":\"tfhvpesapskrdqmh\",\"content\":\"dhtldwkyz\",\"encoding\":\"Base64\",\"path\":\"kn\",\"values\":{\"wrupqsxvnmicykvc\":\"cwsvlxotog\",\"eil\":\"o\"}}]},{\"component\":\"vnotyfjfcnj\",\"files\":[{\"fileName\":\"cn\",\"content\":\"hbttkphyw\",\"encoding\":\"None\",\"path\":\"t\",\"values\":{\"abgy\":\"ermclfplphoxuscr\",\"qugxywpmueefjzwf\":\"psbjta\"}}]},{\"component\":\"kqujidsuyono\",\"files\":[{\"fileName\":\"laocqxtccmg\",\"content\":\"dxyt\",\"encoding\":\"None\",\"path\":\"rxv\",\"values\":{\"zntxhdz\":\"dw\"}},{\"fileName\":\"lrqjbhckfr\",\"content\":\"rxsbkyvp\",\"encoding\":\"None\",\"path\":\"uzbpzkafku\",\"values\":{\"ehhseyvjusrts\":\"rnwb\",\"mx\":\"hspkdeemao\"}}]},{\"component\":\"gkvtmelmqkrhah\",\"files\":[{\"fileName\":\"juahaquhcdhmdual\",\"content\":\"xqpvfadmw\",\"encoding\":\"None\",\"path\":\"gvxp\",\"values\":{\"b\":\"mzlfmisgwb\",\"dawkzbali\":\"e\"}},{\"fileName\":\"urqhaka\",\"content\":\"ashsfwxos\",\"encoding\":\"Base64\",\"path\":\"cugicjoox\",\"values\":{\"euecivyhzceuoj\":\"bwpucwwfvovbv\",\"dytdxwitx\":\"jrwjueiotwm\",\"qwgxhniskx\":\"rjaw\"}},{\"fileName\":\"bkpyc\",\"content\":\"lwn\",\"encoding\":\"None\",\"path\":\"dauwhvylwzbtd\",\"values\":{\"pow\":\"jznb\",\"qlveualupjmkh\":\"wpr\"}}]}]}") - .toObject(ClusterServiceConfigsProfile.class); - Assertions.assertEquals("d", model.serviceName()); - Assertions.assertEquals("avxbniwdjswztsdb", model.configs().get(0).component()); - Assertions.assertEquals("nxytxh", model.configs().get(0).files().get(0).fileName()); - Assertions.assertEquals("xbzpfzab", model.configs().get(0).files().get(0).content()); - Assertions.assertEquals(ContentEncoding.BASE64, model.configs().get(0).files().get(0).encoding()); - Assertions.assertEquals("hxw", model.configs().get(0).files().get(0).path()); - Assertions.assertEquals("yqiklbbovplwzb", model.configs().get(0).files().get(0).values().get("vgyuguos")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterServiceConfigsProfile model - = new ClusterServiceConfigsProfile().withServiceName("d") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig().withComponent("avxbniwdjswztsdb") - .withFiles(Arrays.asList( - new ClusterConfigFile().withFileName("nxytxh") - .withContent("xbzpfzab") - .withEncoding(ContentEncoding.BASE64) - .withPath("hxw") - .withValues(mapOf("vgyuguos", "yqiklbbovplwzb")), - new ClusterConfigFile().withFileName("mkfssxqukkfplgm") - .withContent("xnkjzkdesl") - .withEncoding(ContentEncoding.BASE64) - .withPath("pwiyig") - .withValues(mapOf("upedeojnabckhs", "kdwzbaiuebbaumny", "ie", "txp")), - new ClusterConfigFile().withFileName("tfhvpesapskrdqmh") - .withContent("dhtldwkyz") - .withEncoding(ContentEncoding.BASE64) - .withPath("kn") - .withValues(mapOf("wrupqsxvnmicykvc", "cwsvlxotog", "eil", "o")))), - new ClusterServiceConfig().withComponent("vnotyfjfcnj") - .withFiles( - Arrays - .asList(new ClusterConfigFile().withFileName("cn") - .withContent("hbttkphyw") - .withEncoding(ContentEncoding.NONE) - .withPath("t") - .withValues(mapOf("abgy", "ermclfplphoxuscr", "qugxywpmueefjzwf", - "psbjta")))), - new ClusterServiceConfig().withComponent("kqujidsuyono") - .withFiles(Arrays.asList( - new ClusterConfigFile().withFileName("laocqxtccmg") - .withContent("dxyt") - .withEncoding(ContentEncoding.NONE) - .withPath("rxv") - .withValues(mapOf("zntxhdz", "dw")), - new ClusterConfigFile().withFileName("lrqjbhckfr") - .withContent("rxsbkyvp") - .withEncoding(ContentEncoding.NONE) - .withPath("uzbpzkafku") - .withValues(mapOf("ehhseyvjusrts", "rnwb", "mx", "hspkdeemao")))), - new ClusterServiceConfig().withComponent("gkvtmelmqkrhah") - .withFiles(Arrays.asList( - new ClusterConfigFile().withFileName("juahaquhcdhmdual") - .withContent("xqpvfadmw") - .withEncoding(ContentEncoding.NONE) - .withPath("gvxp") - .withValues(mapOf("b", "mzlfmisgwb", "dawkzbali", "e")), - new ClusterConfigFile().withFileName("urqhaka") - .withContent("ashsfwxos") - .withEncoding(ContentEncoding.BASE64) - .withPath("cugicjoox") - .withValues(mapOf("euecivyhzceuoj", "bwpucwwfvovbv", "dytdxwitx", "jrwjueiotwm", - "qwgxhniskx", "rjaw")), - new ClusterConfigFile().withFileName("bkpyc") - .withContent("lwn") - .withEncoding(ContentEncoding.NONE) - .withPath("dauwhvylwzbtd") - .withValues(mapOf("pow", "jznb", "qlveualupjmkh", "wpr")))))); - model = BinaryData.fromObject(model).toObject(ClusterServiceConfigsProfile.class); - Assertions.assertEquals("d", model.serviceName()); - Assertions.assertEquals("avxbniwdjswztsdb", model.configs().get(0).component()); - Assertions.assertEquals("nxytxh", model.configs().get(0).files().get(0).fileName()); - Assertions.assertEquals("xbzpfzab", model.configs().get(0).files().get(0).content()); - Assertions.assertEquals(ContentEncoding.BASE64, model.configs().get(0).files().get(0).encoding()); - Assertions.assertEquals("hxw", model.configs().get(0).files().get(0).path()); - Assertions.assertEquals("yqiklbbovplwzb", model.configs().get(0).files().get(0).values().get("vgyuguos")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoriesListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoriesListMockTests.java deleted file mode 100644 index efca1fa40935..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoriesListMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistory; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterUpgradeHistoriesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterUpgradeHistoryProperties\",\"utcTime\":\"reur\",\"upgradeResult\":\"Succeed\"},\"id\":\"fuarenlvhht\",\"name\":\"lnvnafvvkyfedev\",\"type\":\"bo\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusterUpgradeHistories() - .list("xhpdulontacnpqwt", "htuevrhrljy", "ogwxhnsduugwb", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("reur", response.iterator().next().properties().utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, - response.iterator().next().properties().upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryInnerTests.java deleted file mode 100644 index 2ab6d8cabcbc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryInnerTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterUpgradeHistoryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpgradeHistoryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgradeHistoryInner model = BinaryData.fromString( - "{\"properties\":{\"upgradeType\":\"ClusterUpgradeHistoryProperties\",\"utcTime\":\"tllxdyhgsyocogj\",\"upgradeResult\":\"Failed\"},\"id\":\"tbnnha\",\"name\":\"oocrkvcikhnv\",\"type\":\"amqgxqquezikyw\"}") - .toObject(ClusterUpgradeHistoryInner.class); - Assertions.assertEquals("tllxdyhgsyocogj", model.properties().utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.properties().upgradeResult()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgradeHistoryInner model = new ClusterUpgradeHistoryInner() - .withProperties(new ClusterUpgradeHistoryProperties().withUtcTime("tllxdyhgsyocogj") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED)); - model = BinaryData.fromObject(model).toObject(ClusterUpgradeHistoryInner.class); - Assertions.assertEquals("tllxdyhgsyocogj", model.properties().utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.properties().upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryListResultTests.java deleted file mode 100644 index 42e56f9d151d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryListResultTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterUpgradeHistoryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryListResult; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpgradeHistoryListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgradeHistoryListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterUpgradeHistoryProperties\",\"utcTime\":\"ioxiysuiizyn\",\"upgradeResult\":\"Failed\"},\"id\":\"yatrwy\",\"name\":\"q\",\"type\":\"ibzyhwitsmyp\"},{\"properties\":{\"upgradeType\":\"ClusterUpgradeHistoryProperties\",\"utcTime\":\"ynpcdpumnzgmwznm\",\"upgradeResult\":\"Failed\"},\"id\":\"knso\",\"name\":\"gj\",\"type\":\"xbldtlwwrlkdmtn\"}],\"nextLink\":\"ok\"}") - .toObject(ClusterUpgradeHistoryListResult.class); - Assertions.assertEquals("ioxiysuiizyn", model.value().get(0).properties().utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, - model.value().get(0).properties().upgradeResult()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgradeHistoryListResult model = new ClusterUpgradeHistoryListResult().withValue(Arrays.asList( - new ClusterUpgradeHistoryInner() - .withProperties(new ClusterUpgradeHistoryProperties().withUtcTime("ioxiysuiizyn") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED)), - new ClusterUpgradeHistoryInner() - .withProperties(new ClusterUpgradeHistoryProperties().withUtcTime("ynpcdpumnzgmwznm") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED)))); - model = BinaryData.fromObject(model).toObject(ClusterUpgradeHistoryListResult.class); - Assertions.assertEquals("ioxiysuiizyn", model.value().get(0).properties().utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, - model.value().get(0).properties().upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryPropertiesTests.java deleted file mode 100644 index 4ce08ad1223e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"ClusterUpgradeHistoryProperties\",\"utcTime\":\"gxk\",\"upgradeResult\":\"Succeed\"}") - .toObject(ClusterUpgradeHistoryProperties.class); - Assertions.assertEquals("gxk", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgradeHistoryProperties model = new ClusterUpgradeHistoryProperties().withUtcTime("gxk") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.SUCCEED); - model = BinaryData.fromObject(model).toObject(ClusterUpgradeHistoryProperties.class); - Assertions.assertEquals("gxk", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradePropertiesTests.java deleted file mode 100644 index bbd9add63013..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradePropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeProperties; - -public final class ClusterUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgradeProperties model = BinaryData.fromString("{\"upgradeType\":\"ClusterUpgradeProperties\"}") - .toObject(ClusterUpgradeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgradeProperties model = new ClusterUpgradeProperties(); - model = BinaryData.fromObject(model).toObject(ClusterUpgradeProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeRollbackPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeRollbackPropertiesTests.java deleted file mode 100644 index 7304373ff53c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeRollbackPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollbackProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpgradeRollbackPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgradeRollbackProperties model = BinaryData.fromString("{\"upgradeHistory\":\"melwuipiccjz\"}") - .toObject(ClusterUpgradeRollbackProperties.class); - Assertions.assertEquals("melwuipiccjz", model.upgradeHistory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgradeRollbackProperties model - = new ClusterUpgradeRollbackProperties().withUpgradeHistory("melwuipiccjz"); - model = BinaryData.fromObject(model).toObject(ClusterUpgradeRollbackProperties.class); - Assertions.assertEquals("melwuipiccjz", model.upgradeHistory()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeRollbackTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeRollbackTests.java deleted file mode 100644 index e4a55b4e133e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeRollbackTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollback; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollbackProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpgradeRollbackTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgradeRollback model = BinaryData.fromString("{\"properties\":{\"upgradeHistory\":\"la\"}}") - .toObject(ClusterUpgradeRollback.class); - Assertions.assertEquals("la", model.properties().upgradeHistory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgradeRollback model = new ClusterUpgradeRollback() - .withProperties(new ClusterUpgradeRollbackProperties().withUpgradeHistory("la")); - model = BinaryData.fromObject(model).toObject(ClusterUpgradeRollback.class); - Assertions.assertEquals("la", model.properties().upgradeHistory()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeTests.java deleted file mode 100644 index b87ccfcad860..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeProperties; - -public final class ClusterUpgradeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgrade model = BinaryData.fromString("{\"properties\":{\"upgradeType\":\"ClusterUpgradeProperties\"}}") - .toObject(ClusterUpgrade.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgrade model = new ClusterUpgrade().withProperties(new ClusterUpgradeProperties()); - model = BinaryData.fromObject(model).toObject(ClusterUpgrade.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionInnerTests.java deleted file mode 100644 index 25b49454f1f8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionInnerTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterVersionInner model = BinaryData.fromString( - "{\"properties\":{\"clusterType\":\"goo\",\"clusterVersion\":\"kqfqjbvl\",\"ossVersion\":\"rfmluiqtq\",\"clusterPoolVersion\":\"avyvnqqyba\",\"isPreview\":true,\"components\":[{\"name\":\"jkqa\",\"version\":\"gzslesjcbhernnti\"},{\"name\":\"djc\",\"version\":\"quwrbehwag\"}]},\"id\":\"buffkmrqemvvhm\",\"name\":\"tdrjfutacoebj\",\"type\":\"ewzcjznmwcp\"}") - .toObject(ClusterVersionInner.class); - Assertions.assertEquals("goo", model.properties().clusterType()); - Assertions.assertEquals("kqfqjbvl", model.properties().clusterVersion()); - Assertions.assertEquals("rfmluiqtq", model.properties().ossVersion()); - Assertions.assertEquals("avyvnqqyba", model.properties().clusterPoolVersion()); - Assertions.assertEquals(true, model.properties().isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterVersionInner model - = new ClusterVersionInner().withProperties(new ClusterVersionProperties().withClusterType("goo") - .withClusterVersion("kqfqjbvl") - .withOssVersion("rfmluiqtq") - .withClusterPoolVersion("avyvnqqyba") - .withIsPreview(true)); - model = BinaryData.fromObject(model).toObject(ClusterVersionInner.class); - Assertions.assertEquals("goo", model.properties().clusterType()); - Assertions.assertEquals("kqfqjbvl", model.properties().clusterVersion()); - Assertions.assertEquals("rfmluiqtq", model.properties().ossVersion()); - Assertions.assertEquals("avyvnqqyba", model.properties().clusterPoolVersion()); - Assertions.assertEquals(true, model.properties().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionPropertiesTests.java deleted file mode 100644 index 54b14d652968..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionPropertiesTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterVersionProperties model = BinaryData.fromString( - "{\"clusterType\":\"uaadraufactkahzo\",\"clusterVersion\":\"jjziuxxpsh\",\"ossVersion\":\"e\",\"clusterPoolVersion\":\"lfg\",\"isPreview\":false,\"components\":[{\"name\":\"wdlenrdsut\",\"version\":\"bazpjuohmi\"},{\"name\":\"flnorwmduvwp\",\"version\":\"vxwmygd\"},{\"name\":\"gpqch\",\"version\":\"zepn\"}]}") - .toObject(ClusterVersionProperties.class); - Assertions.assertEquals("uaadraufactkahzo", model.clusterType()); - Assertions.assertEquals("jjziuxxpsh", model.clusterVersion()); - Assertions.assertEquals("e", model.ossVersion()); - Assertions.assertEquals("lfg", model.clusterPoolVersion()); - Assertions.assertEquals(false, model.isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterVersionProperties model = new ClusterVersionProperties().withClusterType("uaadraufactkahzo") - .withClusterVersion("jjziuxxpsh") - .withOssVersion("e") - .withClusterPoolVersion("lfg") - .withIsPreview(false); - model = BinaryData.fromObject(model).toObject(ClusterVersionProperties.class); - Assertions.assertEquals("uaadraufactkahzo", model.clusterType()); - Assertions.assertEquals("jjziuxxpsh", model.clusterVersion()); - Assertions.assertEquals("e", model.ossVersion()); - Assertions.assertEquals("lfg", model.clusterPoolVersion()); - Assertions.assertEquals(false, model.isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionsListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionsListResultTests.java deleted file mode 100644 index 677dd123e186..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionsListResultTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionsListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterVersionsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterVersionsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"clusterType\":\"fzg\",\"clusterVersion\":\"jdftuljltd\",\"ossVersion\":\"eamtmcz\",\"clusterPoolVersion\":\"m\",\"isPreview\":false,\"components\":[{\"name\":\"qioknssxmojm\",\"version\":\"p\"}]},\"id\":\"prvkwcfzqljyxgtc\",\"name\":\"heyd\",\"type\":\"sdshmkxmaehvb\"},{\"properties\":{\"clusterType\":\"ripltf\",\"clusterVersion\":\"tbaxk\",\"ossVersion\":\"ywrckp\",\"clusterPoolVersion\":\"lyhpluodpvruud\",\"isPreview\":false,\"components\":[{\"name\":\"hostgktstvdxecl\",\"version\":\"dqbcvhzlhplod\"}]},\"id\":\"dlwwqfbumlkxt\",\"name\":\"qjfsmlmbtxhw\",\"type\":\"fwsrtawcoezbrhu\"}],\"nextLink\":\"kh\"}") - .toObject(ClusterVersionsListResult.class); - Assertions.assertEquals("fzg", model.value().get(0).properties().clusterType()); - Assertions.assertEquals("jdftuljltd", model.value().get(0).properties().clusterVersion()); - Assertions.assertEquals("eamtmcz", model.value().get(0).properties().ossVersion()); - Assertions.assertEquals("m", model.value().get(0).properties().clusterPoolVersion()); - Assertions.assertEquals(false, model.value().get(0).properties().isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterVersionsListResult model = new ClusterVersionsListResult().withValue(Arrays.asList( - new ClusterVersionInner().withProperties(new ClusterVersionProperties().withClusterType("fzg") - .withClusterVersion("jdftuljltd") - .withOssVersion("eamtmcz") - .withClusterPoolVersion("m") - .withIsPreview(false)), - new ClusterVersionInner().withProperties(new ClusterVersionProperties().withClusterType("ripltf") - .withClusterVersion("tbaxk") - .withOssVersion("ywrckp") - .withClusterPoolVersion("lyhpluodpvruud") - .withIsPreview(false)))); - model = BinaryData.fromObject(model).toObject(ClusterVersionsListResult.class); - Assertions.assertEquals("fzg", model.value().get(0).properties().clusterType()); - Assertions.assertEquals("jdftuljltd", model.value().get(0).properties().clusterVersion()); - Assertions.assertEquals("eamtmcz", model.value().get(0).properties().ossVersion()); - Assertions.assertEquals("m", model.value().get(0).properties().clusterPoolVersion()); - Assertions.assertEquals(false, model.value().get(0).properties().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteMockTests.java deleted file mode 100644 index 8bd1117a7b6c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusters().delete("jqlafcbahhpzp", "foiyjwpfilk", "kkholvdndvia", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewWithResponseMockTests.java deleted file mode 100644 index 92f9b68ac575..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewWithResponseMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersGetInstanceViewWithResponseMockTests { - @Test - public void testGetInstanceViewWithResponse() throws Exception { - String responseStr - = "{\"name\":\"tu\",\"properties\":{\"status\":{\"ready\":\"o\",\"reason\":\"e\",\"message\":\"ncnwfepbnwgf\"},\"serviceStatuses\":[{\"kind\":\"jgcgbjbgdlfgtdys\",\"ready\":\"aquflqbctqha\",\"message\":\"jrwdkqz\"}]}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterInstanceViewResult response = manager.clusters() - .getInstanceViewWithResponse("hwpusxj", "aqehg", "dohzjq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tu", response.name()); - Assertions.assertEquals("o", response.properties().status().ready()); - Assertions.assertEquals("e", response.properties().status().reason()); - Assertions.assertEquals("ncnwfepbnwgf", response.properties().status().message()); - Assertions.assertEquals("jgcgbjbgdlfgtdys", response.properties().serviceStatuses().get(0).kind()); - Assertions.assertEquals("aquflqbctqha", response.properties().serviceStatuses().get(0).ready()); - Assertions.assertEquals("jrwdkqz", response.properties().serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsMockTests.java deleted file mode 100644 index e0a9b7fedf1d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsMockTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersListInstanceViewsMockTests { - @Test - public void testListInstanceViews() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"ons\",\"properties\":{\"status\":{\"ready\":\"onwpnga\",\"reason\":\"n\",\"message\":\"xjawrt\"},\"serviceStatuses\":[{\"kind\":\"fjmyccxlzhco\",\"ready\":\"ovne\",\"message\":\"enlusfn\"},{\"kind\":\"dtjxtxrdcqt\",\"ready\":\"vidttgepuslvyjt\",\"message\":\"uwkasiz\"},{\"kind\":\"esfuught\",\"ready\":\"qfecjxeygtuhx\",\"message\":\"cbuewmrswnjlxuz\"}]}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusters() - .listInstanceViews("fjgtixrjvzuy", "urmlmuo", "olbauirop", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ons", response.iterator().next().name()); - Assertions.assertEquals("onwpnga", response.iterator().next().properties().status().ready()); - Assertions.assertEquals("n", response.iterator().next().properties().status().reason()); - Assertions.assertEquals("xjawrt", response.iterator().next().properties().status().message()); - Assertions.assertEquals("fjmyccxlzhco", - response.iterator().next().properties().serviceStatuses().get(0).kind()); - Assertions.assertEquals("ovne", response.iterator().next().properties().serviceStatuses().get(0).ready()); - Assertions.assertEquals("enlusfn", response.iterator().next().properties().serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComparisonRuleTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComparisonRuleTests.java deleted file mode 100644 index 97efd8e36675..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComparisonRuleTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule; -import org.junit.jupiter.api.Assertions; - -public final class ComparisonRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComparisonRule model = BinaryData.fromString("{\"operator\":\"lessThan\",\"threshold\":38.544758}") - .toObject(ComparisonRule.class); - Assertions.assertEquals(ComparisonOperator.LESS_THAN, model.operator()); - Assertions.assertEquals(38.544758f, model.threshold()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComparisonRule model - = new ComparisonRule().withOperator(ComparisonOperator.LESS_THAN).withThreshold(38.544758f); - model = BinaryData.fromObject(model).toObject(ComparisonRule.class); - Assertions.assertEquals(ComparisonOperator.LESS_THAN, model.operator()); - Assertions.assertEquals(38.544758f, model.threshold()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeProfileTests.java deleted file mode 100644 index eea3345a7fbc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeProfileTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.NodeProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ComputeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeProfile model = BinaryData.fromString( - "{\"nodes\":[{\"type\":\"dnfyhxdeoejzicwi\",\"vmSize\":\"sjttgzfbish\",\"count\":643021552},{\"type\":\"khaj\",\"vmSize\":\"eyeam\",\"count\":128550194},{\"type\":\"hagalpbuxwgipwh\",\"vmSize\":\"nowkgshw\",\"count\":248274393},{\"type\":\"kix\",\"vmSize\":\"bin\",\"count\":1868038426}],\"availabilityZones\":[\"ttmrywnuzoqf\",\"iyqzrnk\",\"qvyxlwhzlsicoho\",\"qnwvlrya\"]}") - .toObject(ComputeProfile.class); - Assertions.assertEquals("dnfyhxdeoejzicwi", model.nodes().get(0).type()); - Assertions.assertEquals("sjttgzfbish", model.nodes().get(0).vmSize()); - Assertions.assertEquals(643021552, model.nodes().get(0).count()); - Assertions.assertEquals("ttmrywnuzoqf", model.availabilityZones().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeProfile model = new ComputeProfile() - .withNodes(Arrays.asList( - new NodeProfile().withType("dnfyhxdeoejzicwi").withVmSize("sjttgzfbish").withCount(643021552), - new NodeProfile().withType("khaj").withVmSize("eyeam").withCount(128550194), - new NodeProfile().withType("hagalpbuxwgipwh").withVmSize("nowkgshw").withCount(248274393), - new NodeProfile().withType("kix").withVmSize("bin").withCount(1868038426))) - .withAvailabilityZones(Arrays.asList("ttmrywnuzoqf", "iyqzrnk", "qvyxlwhzlsicoho", "qnwvlrya")); - model = BinaryData.fromObject(model).toObject(ComputeProfile.class); - Assertions.assertEquals("dnfyhxdeoejzicwi", model.nodes().get(0).type()); - Assertions.assertEquals("sjttgzfbish", model.nodes().get(0).vmSize()); - Assertions.assertEquals(643021552, model.nodes().get(0).count()); - Assertions.assertEquals("ttmrywnuzoqf", model.availabilityZones().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeResourceDefinitionTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeResourceDefinitionTests.java deleted file mode 100644 index 37da6b3f388f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeResourceDefinitionTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComputeResourceDefinition; -import org.junit.jupiter.api.Assertions; - -public final class ComputeResourceDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeResourceDefinition model = BinaryData.fromString("{\"cpu\":97.30686,\"memory\":2120097512911222232}") - .toObject(ComputeResourceDefinition.class); - Assertions.assertEquals(97.30686f, model.cpu()); - Assertions.assertEquals(2120097512911222232L, model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeResourceDefinition model - = new ComputeResourceDefinition().withCpu(97.30686f).withMemory(2120097512911222232L); - model = BinaryData.fromObject(model).toObject(ComputeResourceDefinition.class); - Assertions.assertEquals(97.30686f, model.cpu()); - Assertions.assertEquals(2120097512911222232L, model.memory()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileTests.java deleted file mode 100644 index 976b2541de03..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ConnectivityProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ConnectivityProfileWeb; -import com.azure.resourcemanager.hdinsight.containers.models.SshConnectivityEndpoint; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ConnectivityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectivityProfile model = BinaryData.fromString( - "{\"web\":{\"fqdn\":\"eli\",\"privateFqdn\":\"nr\"},\"ssh\":[{\"endpoint\":\"o\",\"privateSshEndpoint\":\"bnxknalaulppg\"},{\"endpoint\":\"dtpnapnyiropuhp\",\"privateSshEndpoint\":\"vpgylgqgitxmed\"},{\"endpoint\":\"v\",\"privateSshEndpoint\":\"lynqwwncwzzh\"}]}") - .toObject(ConnectivityProfile.class); - Assertions.assertEquals("eli", model.web().fqdn()); - Assertions.assertEquals("nr", model.web().privateFqdn()); - Assertions.assertEquals("o", model.ssh().get(0).endpoint()); - Assertions.assertEquals("bnxknalaulppg", model.ssh().get(0).privateSshEndpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectivityProfile model - = new ConnectivityProfile().withWeb(new ConnectivityProfileWeb().withFqdn("eli").withPrivateFqdn("nr")) - .withSsh(Arrays.asList( - new SshConnectivityEndpoint().withEndpoint("o").withPrivateSshEndpoint("bnxknalaulppg"), - new SshConnectivityEndpoint().withEndpoint("dtpnapnyiropuhp") - .withPrivateSshEndpoint("vpgylgqgitxmed"), - new SshConnectivityEndpoint().withEndpoint("v").withPrivateSshEndpoint("lynqwwncwzzh"))); - model = BinaryData.fromObject(model).toObject(ConnectivityProfile.class); - Assertions.assertEquals("eli", model.web().fqdn()); - Assertions.assertEquals("nr", model.web().privateFqdn()); - Assertions.assertEquals("o", model.ssh().get(0).endpoint()); - Assertions.assertEquals("bnxknalaulppg", model.ssh().get(0).privateSshEndpoint()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileWebTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileWebTests.java deleted file mode 100644 index 934d0532bacf..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileWebTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ConnectivityProfileWeb; -import org.junit.jupiter.api.Assertions; - -public final class ConnectivityProfileWebTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectivityProfileWeb model - = BinaryData.fromString("{\"fqdn\":\"gktrmgucnapkte\",\"privateFqdn\":\"llwptfdy\"}") - .toObject(ConnectivityProfileWeb.class); - Assertions.assertEquals("gktrmgucnapkte", model.fqdn()); - Assertions.assertEquals("llwptfdy", model.privateFqdn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectivityProfileWeb model - = new ConnectivityProfileWeb().withFqdn("gktrmgucnapkte").withPrivateFqdn("llwptfdy"); - model = BinaryData.fromObject(model).toObject(ConnectivityProfileWeb.class); - Assertions.assertEquals("gktrmgucnapkte", model.fqdn()); - Assertions.assertEquals("llwptfdy", model.privateFqdn()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/DiskStorageProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/DiskStorageProfileTests.java deleted file mode 100644 index 7bd0ef749d5c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/DiskStorageProfileTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.DataDiskType; -import com.azure.resourcemanager.hdinsight.containers.models.DiskStorageProfile; -import org.junit.jupiter.api.Assertions; - -public final class DiskStorageProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskStorageProfile model - = BinaryData.fromString("{\"dataDiskSize\":220182660,\"dataDiskType\":\"Premium_SSD_LRS\"}") - .toObject(DiskStorageProfile.class); - Assertions.assertEquals(220182660, model.dataDiskSize()); - Assertions.assertEquals(DataDiskType.PREMIUM_SSD_LRS, model.dataDiskType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskStorageProfile model - = new DiskStorageProfile().withDataDiskSize(220182660).withDataDiskType(DataDiskType.PREMIUM_SSD_LRS); - model = BinaryData.fromObject(model).toObject(DiskStorageProfile.class); - Assertions.assertEquals(220182660, model.dataDiskSize()); - Assertions.assertEquals(DataDiskType.PREMIUM_SSD_LRS, model.dataDiskType()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobProfileTests.java deleted file mode 100644 index 3c672bca6318..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobProfileTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.FlinkJobProfile; -import com.azure.resourcemanager.hdinsight.containers.models.UpgradeMode; -import org.junit.jupiter.api.Assertions; - -public final class FlinkJobProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FlinkJobProfile model = BinaryData.fromString( - "{\"jobJarDirectory\":\"ohfwds\",\"jarName\":\"n\",\"entryClass\":\"ljuti\",\"args\":\"wacf\",\"savePointName\":\"dkzzewkfvhqcrail\",\"upgradeMode\":\"STATELESS_UPDATE\"}") - .toObject(FlinkJobProfile.class); - Assertions.assertEquals("ohfwds", model.jobJarDirectory()); - Assertions.assertEquals("n", model.jarName()); - Assertions.assertEquals("ljuti", model.entryClass()); - Assertions.assertEquals("wacf", model.args()); - Assertions.assertEquals("dkzzewkfvhqcrail", model.savePointName()); - Assertions.assertEquals(UpgradeMode.STATELESS_UPDATE, model.upgradeMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FlinkJobProfile model = new FlinkJobProfile().withJobJarDirectory("ohfwds") - .withJarName("n") - .withEntryClass("ljuti") - .withArgs("wacf") - .withSavePointName("dkzzewkfvhqcrail") - .withUpgradeMode(UpgradeMode.STATELESS_UPDATE); - model = BinaryData.fromObject(model).toObject(FlinkJobProfile.class); - Assertions.assertEquals("ohfwds", model.jobJarDirectory()); - Assertions.assertEquals("n", model.jarName()); - Assertions.assertEquals("ljuti", model.entryClass()); - Assertions.assertEquals("wacf", model.args()); - Assertions.assertEquals("dkzzewkfvhqcrail", model.savePointName()); - Assertions.assertEquals(UpgradeMode.STATELESS_UPDATE, model.upgradeMode()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobPropertiesTests.java deleted file mode 100644 index 11f736eeca8d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobPropertiesTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.Action; -import com.azure.resourcemanager.hdinsight.containers.models.FlinkJobProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FlinkJobPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FlinkJobProperties model = BinaryData.fromString( - "{\"jobType\":\"FlinkJob\",\"runId\":\"bzevwrd\",\"jobName\":\"fukuvsjcswsmystu\",\"jobJarDirectory\":\"qypfcv\",\"jarName\":\"rchpqbmfpjbabwid\",\"entryClass\":\"xsspuunnoxyhk\",\"args\":\"qddrihpfhoqcaae\",\"savePointName\":\"aomdjvlpjxx\",\"action\":\"START\",\"flinkConfiguration\":{\"zkdnc\":\"sgeivsiy\",\"wyrpgogtqxepnyl\":\"dxonbzoggculap\",\"tlvofq\":\"fuajly\"},\"jobId\":\"vfcibyfmowux\",\"status\":\"jpvd\",\"jobOutput\":\"fzwiivwzjbhyz\",\"actionResult\":\"jrkambtrnegvmnv\",\"lastSavePoint\":\"eqvldspast\"}") - .toObject(FlinkJobProperties.class); - Assertions.assertEquals("bzevwrd", model.runId()); - Assertions.assertEquals("fukuvsjcswsmystu", model.jobName()); - Assertions.assertEquals("qypfcv", model.jobJarDirectory()); - Assertions.assertEquals("rchpqbmfpjbabwid", model.jarName()); - Assertions.assertEquals("xsspuunnoxyhk", model.entryClass()); - Assertions.assertEquals("qddrihpfhoqcaae", model.args()); - Assertions.assertEquals("aomdjvlpjxx", model.savePointName()); - Assertions.assertEquals(Action.START, model.action()); - Assertions.assertEquals("sgeivsiy", model.flinkConfiguration().get("zkdnc")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FlinkJobProperties model = new FlinkJobProperties().withRunId("bzevwrd") - .withJobName("fukuvsjcswsmystu") - .withJobJarDirectory("qypfcv") - .withJarName("rchpqbmfpjbabwid") - .withEntryClass("xsspuunnoxyhk") - .withArgs("qddrihpfhoqcaae") - .withSavePointName("aomdjvlpjxx") - .withAction(Action.START) - .withFlinkConfiguration( - mapOf("zkdnc", "sgeivsiy", "wyrpgogtqxepnyl", "dxonbzoggculap", "tlvofq", "fuajly")); - model = BinaryData.fromObject(model).toObject(FlinkJobProperties.class); - Assertions.assertEquals("bzevwrd", model.runId()); - Assertions.assertEquals("fukuvsjcswsmystu", model.jobName()); - Assertions.assertEquals("qypfcv", model.jobJarDirectory()); - Assertions.assertEquals("rchpqbmfpjbabwid", model.jarName()); - Assertions.assertEquals("xsspuunnoxyhk", model.entryClass()); - Assertions.assertEquals("qddrihpfhoqcaae", model.args()); - Assertions.assertEquals("aomdjvlpjxx", model.savePointName()); - Assertions.assertEquals(Action.START, model.action()); - Assertions.assertEquals("sgeivsiy", model.flinkConfiguration().get("zkdnc")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IdentityProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IdentityProfileTests.java deleted file mode 100644 index cb15f57168ca..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IdentityProfileTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.IdentityProfile; -import org.junit.jupiter.api.Assertions; - -public final class IdentityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityProfile model = BinaryData - .fromString( - "{\"msiResourceId\":\"yqduujit\",\"msiClientId\":\"jczdzevndh\",\"msiObjectId\":\"rwpdappdsbdkvwrw\"}") - .toObject(IdentityProfile.class); - Assertions.assertEquals("yqduujit", model.msiResourceId()); - Assertions.assertEquals("jczdzevndh", model.msiClientId()); - Assertions.assertEquals("rwpdappdsbdkvwrw", model.msiObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityProfile model = new IdentityProfile().withMsiResourceId("yqduujit") - .withMsiClientId("jczdzevndh") - .withMsiObjectId("rwpdappdsbdkvwrw"); - model = BinaryData.fromObject(model).toObject(IdentityProfile.class); - Assertions.assertEquals("yqduujit", model.msiResourceId()); - Assertions.assertEquals("jczdzevndh", model.msiClientId()); - Assertions.assertEquals("rwpdappdsbdkvwrw", model.msiObjectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IpTagTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IpTagTests.java deleted file mode 100644 index 8f7a96ec0b5d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IpTagTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import org.junit.jupiter.api.Assertions; - -public final class IpTagTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpTag model = BinaryData.fromString("{\"ipTagType\":\"jrwzox\",\"tag\":\"j\"}").toObject(IpTag.class); - Assertions.assertEquals("jrwzox", model.ipTagType()); - Assertions.assertEquals("j", model.tag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpTag model = new IpTag().withIpTagType("jrwzox").withTag("j"); - model = BinaryData.fromObject(model).toObject(IpTag.class); - Assertions.assertEquals("jrwzox", model.ipTagType()); - Assertions.assertEquals("j", model.tag()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/KafkaConnectivityEndpointsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/KafkaConnectivityEndpointsTests.java deleted file mode 100644 index 67d675576515..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/KafkaConnectivityEndpointsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.KafkaConnectivityEndpoints; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class KafkaConnectivityEndpointsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KafkaConnectivityEndpoints model = BinaryData.fromString( - "{\"bootstrapServerEndpoint\":\"wyhzdx\",\"brokerEndpoints\":[\"dbzm\",\"vdfznudaodvxzb\",\"cblylpstdbhhxsr\",\"dzu\"]}") - .toObject(KafkaConnectivityEndpoints.class); - Assertions.assertEquals("wyhzdx", model.bootstrapServerEndpoint()); - Assertions.assertEquals("dbzm", model.brokerEndpoints().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KafkaConnectivityEndpoints model = new KafkaConnectivityEndpoints().withBootstrapServerEndpoint("wyhzdx") - .withBrokerEndpoints(Arrays.asList("dbzm", "vdfznudaodvxzb", "cblylpstdbhhxsr", "dzu")); - model = BinaryData.fromObject(model).toObject(KafkaConnectivityEndpoints.class); - Assertions.assertEquals("wyhzdx", model.bootstrapServerEndpoint()); - Assertions.assertEquals("dbzm", model.brokerEndpoints().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/KafkaProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/KafkaProfileTests.java deleted file mode 100644 index 09232310add0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/KafkaProfileTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.DataDiskType; -import com.azure.resourcemanager.hdinsight.containers.models.DiskStorageProfile; -import com.azure.resourcemanager.hdinsight.containers.models.KafkaProfile; -import org.junit.jupiter.api.Assertions; - -public final class KafkaProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KafkaProfile model = BinaryData.fromString( - "{\"enableKRaft\":true,\"enablePublicEndpoints\":false,\"remoteStorageUri\":\"kthumaqolbgycdui\",\"diskStorage\":{\"dataDiskSize\":178501813,\"dataDiskType\":\"Premium_SSD_LRS\"},\"connectivityEndpoints\":{\"bootstrapServerEndpoint\":\"cym\",\"brokerEndpoints\":[\"l\",\"ssl\",\"lfmmdnbbglzpswi\"]}}") - .toObject(KafkaProfile.class); - Assertions.assertEquals(true, model.enableKRaft()); - Assertions.assertEquals(false, model.enablePublicEndpoints()); - Assertions.assertEquals("kthumaqolbgycdui", model.remoteStorageUri()); - Assertions.assertEquals(178501813, model.diskStorage().dataDiskSize()); - Assertions.assertEquals(DataDiskType.PREMIUM_SSD_LRS, model.diskStorage().dataDiskType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KafkaProfile model = new KafkaProfile().withEnableKRaft(true) - .withEnablePublicEndpoints(false) - .withRemoteStorageUri("kthumaqolbgycdui") - .withDiskStorage( - new DiskStorageProfile().withDataDiskSize(178501813).withDataDiskType(DataDiskType.PREMIUM_SSD_LRS)); - model = BinaryData.fromObject(model).toObject(KafkaProfile.class); - Assertions.assertEquals(true, model.enableKRaft()); - Assertions.assertEquals(false, model.enablePublicEndpoints()); - Assertions.assertEquals("kthumaqolbgycdui", model.remoteStorageUri()); - Assertions.assertEquals(178501813, model.diskStorage().dataDiskSize()); - Assertions.assertEquals(DataDiskType.PREMIUM_SSD_LRS, model.diskStorage().dataDiskType()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LoadBasedConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LoadBasedConfigTests.java deleted file mode 100644 index 3c40af7c0a22..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LoadBasedConfigTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule; -import com.azure.resourcemanager.hdinsight.containers.models.LoadBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; -import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoadBasedConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoadBasedConfig model = BinaryData.fromString( - "{\"minNodes\":385457826,\"maxNodes\":395045632,\"pollInterval\":1463995661,\"cooldownPeriod\":2026519653,\"scalingRules\":[{\"actionType\":\"scaledown\",\"evaluationCount\":948183907,\"scalingMetric\":\"rvnaenqpeh\",\"comparisonRule\":{\"operator\":\"lessThanOrEqual\",\"threshold\":15.866309}},{\"actionType\":\"scaleup\",\"evaluationCount\":895776000,\"scalingMetric\":\"gmifthnzd\",\"comparisonRule\":{\"operator\":\"lessThanOrEqual\",\"threshold\":6.8623724}}]}") - .toObject(LoadBasedConfig.class); - Assertions.assertEquals(385457826, model.minNodes()); - Assertions.assertEquals(395045632, model.maxNodes()); - Assertions.assertEquals(1463995661, model.pollInterval()); - Assertions.assertEquals(2026519653, model.cooldownPeriod()); - Assertions.assertEquals(ScaleActionType.SCALEDOWN, model.scalingRules().get(0).actionType()); - Assertions.assertEquals(948183907, model.scalingRules().get(0).evaluationCount()); - Assertions.assertEquals("rvnaenqpeh", model.scalingRules().get(0).scalingMetric()); - Assertions.assertEquals(ComparisonOperator.LESS_THAN_OR_EQUAL, - model.scalingRules().get(0).comparisonRule().operator()); - Assertions.assertEquals(15.866309f, model.scalingRules().get(0).comparisonRule().threshold()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoadBasedConfig model = new LoadBasedConfig().withMinNodes(385457826) - .withMaxNodes(395045632) - .withPollInterval(1463995661) - .withCooldownPeriod(2026519653) - .withScalingRules(Arrays.asList( - new ScalingRule().withActionType(ScaleActionType.SCALEDOWN) - .withEvaluationCount(948183907) - .withScalingMetric("rvnaenqpeh") - .withComparisonRule(new ComparisonRule().withOperator(ComparisonOperator.LESS_THAN_OR_EQUAL) - .withThreshold(15.866309f)), - new ScalingRule().withActionType(ScaleActionType.SCALEUP) - .withEvaluationCount(895776000) - .withScalingMetric("gmifthnzd") - .withComparisonRule(new ComparisonRule().withOperator(ComparisonOperator.LESS_THAN_OR_EQUAL) - .withThreshold(6.8623724f)))); - model = BinaryData.fromObject(model).toObject(LoadBasedConfig.class); - Assertions.assertEquals(385457826, model.minNodes()); - Assertions.assertEquals(395045632, model.maxNodes()); - Assertions.assertEquals(1463995661, model.pollInterval()); - Assertions.assertEquals(2026519653, model.cooldownPeriod()); - Assertions.assertEquals(ScaleActionType.SCALEDOWN, model.scalingRules().get(0).actionType()); - Assertions.assertEquals(948183907, model.scalingRules().get(0).evaluationCount()); - Assertions.assertEquals("rvnaenqpeh", model.scalingRules().get(0).scalingMetric()); - Assertions.assertEquals(ComparisonOperator.LESS_THAN_OR_EQUAL, - model.scalingRules().get(0).comparisonRule().operator()); - Assertions.assertEquals(15.866309f, model.scalingRules().get(0).comparisonRule().threshold()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index f32832f3f26c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LocationsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":true,\"reason\":\"qbawpcbbnzqcykn\",\"message\":\"qofyuicdhzbdy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NameAvailabilityResult response = manager.locations() - .checkNameAvailabilityWithResponse("xnazpmkml", - new NameAvailabilityParameters().withName("evfxzopjhbzxlioh").withType("dd"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("qbawpcbbnzqcykn", response.reason()); - Assertions.assertEquals("qofyuicdhzbdy", response.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ManagedIdentityProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ManagedIdentityProfileTests.java deleted file mode 100644 index 30bcabec0ffc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ManagedIdentityProfileTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ManagedIdentityProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ManagedIdentitySpec; -import com.azure.resourcemanager.hdinsight.containers.models.ManagedIdentityType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentityProfile model = BinaryData.fromString( - "{\"identityList\":[{\"type\":\"user\",\"resourceId\":\"ik\",\"clientId\":\"drgvtqagn\",\"objectId\":\"uynhijg\"},{\"type\":\"user\",\"resourceId\":\"ebf\",\"clientId\":\"iarbutrcvpna\",\"objectId\":\"zmhjrunmp\"},{\"type\":\"user\",\"resourceId\":\"tdbhrbnla\",\"clientId\":\"kx\",\"objectId\":\"yskpbhen\"}]}") - .toObject(ManagedIdentityProfile.class); - Assertions.assertEquals(ManagedIdentityType.USER, model.identityList().get(0).type()); - Assertions.assertEquals("ik", model.identityList().get(0).resourceId()); - Assertions.assertEquals("drgvtqagn", model.identityList().get(0).clientId()); - Assertions.assertEquals("uynhijg", model.identityList().get(0).objectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentityProfile model = new ManagedIdentityProfile().withIdentityList(Arrays.asList( - new ManagedIdentitySpec().withType(ManagedIdentityType.USER) - .withResourceId("ik") - .withClientId("drgvtqagn") - .withObjectId("uynhijg"), - new ManagedIdentitySpec().withType(ManagedIdentityType.USER) - .withResourceId("ebf") - .withClientId("iarbutrcvpna") - .withObjectId("zmhjrunmp"), - new ManagedIdentitySpec().withType(ManagedIdentityType.USER) - .withResourceId("tdbhrbnla") - .withClientId("kx") - .withObjectId("yskpbhen"))); - model = BinaryData.fromObject(model).toObject(ManagedIdentityProfile.class); - Assertions.assertEquals(ManagedIdentityType.USER, model.identityList().get(0).type()); - Assertions.assertEquals("ik", model.identityList().get(0).resourceId()); - Assertions.assertEquals("drgvtqagn", model.identityList().get(0).clientId()); - Assertions.assertEquals("uynhijg", model.identityList().get(0).objectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ManagedIdentitySpecTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ManagedIdentitySpecTests.java deleted file mode 100644 index b5ed9c8db347..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ManagedIdentitySpecTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ManagedIdentitySpec; -import com.azure.resourcemanager.hdinsight.containers.models.ManagedIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentitySpecTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentitySpec model = BinaryData - .fromString( - "{\"type\":\"internal\",\"resourceId\":\"kcxywnyt\",\"clientId\":\"rsyn\",\"objectId\":\"qidybyx\"}") - .toObject(ManagedIdentitySpec.class); - Assertions.assertEquals(ManagedIdentityType.INTERNAL, model.type()); - Assertions.assertEquals("kcxywnyt", model.resourceId()); - Assertions.assertEquals("rsyn", model.clientId()); - Assertions.assertEquals("qidybyx", model.objectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentitySpec model = new ManagedIdentitySpec().withType(ManagedIdentityType.INTERNAL) - .withResourceId("kcxywnyt") - .withClientId("rsyn") - .withObjectId("qidybyx"); - model = BinaryData.fromObject(model).toObject(ManagedIdentitySpec.class); - Assertions.assertEquals(ManagedIdentityType.INTERNAL, model.type()); - Assertions.assertEquals("kcxywnyt", model.resourceId()); - Assertions.assertEquals("rsyn", model.clientId()); - Assertions.assertEquals("qidybyx", model.objectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/MavenLibraryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/MavenLibraryPropertiesTests.java deleted file mode 100644 index cf66e9bd7914..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/MavenLibraryPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.MavenLibraryProperties; -import org.junit.jupiter.api.Assertions; - -public final class MavenLibraryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MavenLibraryProperties model = BinaryData.fromString( - "{\"type\":\"maven\",\"groupId\":\"izxfpxt\",\"name\":\"qscjavftjuh\",\"version\":\"azkmtgguwp\",\"remarks\":\"r\",\"timestamp\":\"2021-11-12T08:33:33Z\",\"status\":\"INSTALLED\",\"message\":\"mghfcfiwrxgkne\"}") - .toObject(MavenLibraryProperties.class); - Assertions.assertEquals("r", model.remarks()); - Assertions.assertEquals("izxfpxt", model.groupId()); - Assertions.assertEquals("qscjavftjuh", model.name()); - Assertions.assertEquals("azkmtgguwp", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MavenLibraryProperties model = new MavenLibraryProperties().withRemarks("r") - .withGroupId("izxfpxt") - .withName("qscjavftjuh") - .withVersion("azkmtgguwp"); - model = BinaryData.fromObject(model).toObject(MavenLibraryProperties.class); - Assertions.assertEquals("r", model.remarks()); - Assertions.assertEquals("izxfpxt", model.groupId()); - Assertions.assertEquals("qscjavftjuh", model.name()); - Assertions.assertEquals("azkmtgguwp", model.version()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityParametersTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityParametersTests.java deleted file mode 100644 index dce6426513a8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityParametersTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; -import org.junit.jupiter.api.Assertions; - -public final class NameAvailabilityParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityParameters model = BinaryData.fromString("{\"name\":\"tkzwpcnpwzc\",\"type\":\"esgvvsccyaj\"}") - .toObject(NameAvailabilityParameters.class); - Assertions.assertEquals("tkzwpcnpwzc", model.name()); - Assertions.assertEquals("esgvvsccyaj", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityParameters model - = new NameAvailabilityParameters().withName("tkzwpcnpwzc").withType("esgvvsccyaj"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityParameters.class); - Assertions.assertEquals("tkzwpcnpwzc", model.name()); - Assertions.assertEquals("esgvvsccyaj", model.type()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityResultInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityResultInnerTests.java deleted file mode 100644 index 64ffc670b3e3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityResultInnerTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner; -import org.junit.jupiter.api.Assertions; - -public final class NameAvailabilityResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityResultInner model - = BinaryData.fromString("{\"nameAvailable\":false,\"reason\":\"hwyg\",\"message\":\"vdnkfxusem\"}") - .toObject(NameAvailabilityResultInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("hwyg", model.reason()); - Assertions.assertEquals("vdnkfxusem", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityResultInner model - = new NameAvailabilityResultInner().withNameAvailable(false).withReason("hwyg").withMessage("vdnkfxusem"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityResultInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("hwyg", model.reason()); - Assertions.assertEquals("vdnkfxusem", model.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NodeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NodeProfileTests.java deleted file mode 100644 index b357d68c5c52..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NodeProfileTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.NodeProfile; -import org.junit.jupiter.api.Assertions; - -public final class NodeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeProfile model = BinaryData.fromString("{\"type\":\"w\",\"vmSize\":\"heun\",\"count\":1346564492}") - .toObject(NodeProfile.class); - Assertions.assertEquals("w", model.type()); - Assertions.assertEquals("heun", model.vmSize()); - Assertions.assertEquals(1346564492, model.count()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeProfile model = new NodeProfile().withType("w").withVmSize("heun").withCount(1346564492); - model = BinaryData.fromObject(model).toObject(NodeProfile.class); - Assertions.assertEquals("w", model.type()); - Assertions.assertEquals("heun", model.vmSize()); - Assertions.assertEquals(1346564492, model.count()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationDisplayTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationDisplayTests.java deleted file mode 100644 index a071ba3b79f6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationDisplayTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"jlihhyus\",\"resource\":\"kasdvlm\",\"operation\":\"dgzxulucvpamrsr\",\"description\":\"zvxurisjnhny\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationInnerTests.java deleted file mode 100644 index 7d40dfdaba33..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.OperationInner; -import com.azure.resourcemanager.hdinsight.containers.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"mvzzbtdcqvp\",\"isDataAction\":true,\"display\":{\"provider\":\"viylwdshfssnrbgy\",\"resource\":\"rymsgaojfmw\",\"operation\":\"otmrfhir\",\"description\":\"ymoxoftpipiwyczu\"},\"origin\":\"user\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationListResultTests.java deleted file mode 100644 index 499f684dc881..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationListResultTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"ydxtqm\",\"isDataAction\":false,\"display\":{\"provider\":\"rgguf\",\"resource\":\"aomtbghhavgrvkff\",\"operation\":\"jzhpjbibgjmfx\",\"description\":\"vfcluyovwxnbkfe\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"hwzdgirujbz\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListMockTests.java deleted file mode 100644 index 40a430991e20..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"wgbdvibidmhmwffp\",\"isDataAction\":false,\"display\":{\"provider\":\"apckccrrvw\",\"resource\":\"oxoyyukp\",\"operation\":\"immoiroqboshbrag\",\"description\":\"yyrmfsvbp\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/PyPiLibraryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/PyPiLibraryPropertiesTests.java deleted file mode 100644 index 55560c9128ab..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/PyPiLibraryPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.PyPiLibraryProperties; -import org.junit.jupiter.api.Assertions; - -public final class PyPiLibraryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PyPiLibraryProperties model = BinaryData.fromString( - "{\"type\":\"pypi\",\"name\":\"wlyxgncxyk\",\"version\":\"djhlimm\",\"remarks\":\"x\",\"timestamp\":\"2021-11-18T02:45:39Z\",\"status\":\"UNINSTALL_FAILED\",\"message\":\"rxvxcjzh\"}") - .toObject(PyPiLibraryProperties.class); - Assertions.assertEquals("x", model.remarks()); - Assertions.assertEquals("wlyxgncxyk", model.name()); - Assertions.assertEquals("djhlimm", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PyPiLibraryProperties model - = new PyPiLibraryProperties().withRemarks("x").withName("wlyxgncxyk").withVersion("djhlimm"); - model = BinaryData.fromObject(model).toObject(PyPiLibraryProperties.class); - Assertions.assertEquals("x", model.remarks()); - Assertions.assertEquals("wlyxgncxyk", model.name()); - Assertions.assertEquals("djhlimm", model.version()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/RangerAuditSpecTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/RangerAuditSpecTests.java deleted file mode 100644 index cbb48f8632cc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/RangerAuditSpecTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec; -import org.junit.jupiter.api.Assertions; - -public final class RangerAuditSpecTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RangerAuditSpec model = BinaryData.fromString("{\"storageAccount\":\"vmkcx\"}").toObject(RangerAuditSpec.class); - Assertions.assertEquals("vmkcx", model.storageAccount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RangerAuditSpec model = new RangerAuditSpec().withStorageAccount("vmkcx"); - model = BinaryData.fromObject(model).toObject(RangerAuditSpec.class); - Assertions.assertEquals("vmkcx", model.storageAccount()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/RangerUsersyncSpecTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/RangerUsersyncSpecTests.java deleted file mode 100644 index 64d48784d9fb..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/RangerUsersyncSpecTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RangerUsersyncSpecTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RangerUsersyncSpec model = BinaryData.fromString( - "{\"enabled\":true,\"groups\":[\"helxprglya\",\"dd\",\"kcbcue\",\"rjxgciqib\"],\"mode\":\"static\",\"userMappingLocation\":\"xsdqrhzoymibmrqy\",\"users\":[\"hwflu\",\"zdtmhrkwofy\",\"voqacpiexpbt\",\"iwbwoenwashrtdtk\"]}") - .toObject(RangerUsersyncSpec.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("helxprglya", model.groups().get(0)); - Assertions.assertEquals(RangerUsersyncMode.STATIC, model.mode()); - Assertions.assertEquals("xsdqrhzoymibmrqy", model.userMappingLocation()); - Assertions.assertEquals("hwflu", model.users().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RangerUsersyncSpec model = new RangerUsersyncSpec().withEnabled(true) - .withGroups(Arrays.asList("helxprglya", "dd", "kcbcue", "rjxgciqib")) - .withMode(RangerUsersyncMode.STATIC) - .withUserMappingLocation("xsdqrhzoymibmrqy") - .withUsers(Arrays.asList("hwflu", "zdtmhrkwofy", "voqacpiexpbt", "iwbwoenwashrtdtk")); - model = BinaryData.fromObject(model).toObject(RangerUsersyncSpec.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("helxprglya", model.groups().get(0)); - Assertions.assertEquals(RangerUsersyncMode.STATIC, model.mode()); - Assertions.assertEquals("xsdqrhzoymibmrqy", model.userMappingLocation()); - Assertions.assertEquals("hwflu", model.users().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScalingRuleTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScalingRuleTests.java deleted file mode 100644 index 654c05b718f9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScalingRuleTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule; -import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; -import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; -import org.junit.jupiter.api.Assertions; - -public final class ScalingRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingRule model = BinaryData.fromString( - "{\"actionType\":\"scaleup\",\"evaluationCount\":962281735,\"scalingMetric\":\"nayqi\",\"comparisonRule\":{\"operator\":\"greaterThanOrEqual\",\"threshold\":83.24161}}") - .toObject(ScalingRule.class); - Assertions.assertEquals(ScaleActionType.SCALEUP, model.actionType()); - Assertions.assertEquals(962281735, model.evaluationCount()); - Assertions.assertEquals("nayqi", model.scalingMetric()); - Assertions.assertEquals(ComparisonOperator.GREATER_THAN_OR_EQUAL, model.comparisonRule().operator()); - Assertions.assertEquals(83.24161f, model.comparisonRule().threshold()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingRule model = new ScalingRule().withActionType(ScaleActionType.SCALEUP) - .withEvaluationCount(962281735) - .withScalingMetric("nayqi") - .withComparisonRule( - new ComparisonRule().withOperator(ComparisonOperator.GREATER_THAN_OR_EQUAL).withThreshold(83.24161f)); - model = BinaryData.fromObject(model).toObject(ScalingRule.class); - Assertions.assertEquals(ScaleActionType.SCALEUP, model.actionType()); - Assertions.assertEquals(962281735, model.evaluationCount()); - Assertions.assertEquals("nayqi", model.scalingMetric()); - Assertions.assertEquals(ComparisonOperator.GREATER_THAN_OR_EQUAL, model.comparisonRule().operator()); - Assertions.assertEquals(83.24161f, model.comparisonRule().threshold()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleBasedConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleBasedConfigTests.java deleted file mode 100644 index 71649d9d268a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleBasedConfigTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleBasedConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleBasedConfig model = BinaryData.fromString( - "{\"timeZone\":\"bsrfbj\",\"defaultCount\":891212878,\"schedules\":[{\"startTime\":\"w\",\"endTime\":\"sotftpvj\",\"count\":1235013026,\"days\":[\"Tuesday\",\"Wednesday\",\"Monday\",\"Thursday\"]}]}") - .toObject(ScheduleBasedConfig.class); - Assertions.assertEquals("bsrfbj", model.timeZone()); - Assertions.assertEquals(891212878, model.defaultCount()); - Assertions.assertEquals("w", model.schedules().get(0).startTime()); - Assertions.assertEquals("sotftpvj", model.schedules().get(0).endTime()); - Assertions.assertEquals(1235013026, model.schedules().get(0).count()); - Assertions.assertEquals(ScheduleDay.TUESDAY, model.schedules().get(0).days().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleBasedConfig model = new ScheduleBasedConfig().withTimeZone("bsrfbj") - .withDefaultCount(891212878) - .withSchedules(Arrays.asList(new Schedule().withStartTime("w") - .withEndTime("sotftpvj") - .withCount(1235013026) - .withDays(Arrays.asList(ScheduleDay.TUESDAY, ScheduleDay.WEDNESDAY, ScheduleDay.MONDAY, - ScheduleDay.THURSDAY)))); - model = BinaryData.fromObject(model).toObject(ScheduleBasedConfig.class); - Assertions.assertEquals("bsrfbj", model.timeZone()); - Assertions.assertEquals(891212878, model.defaultCount()); - Assertions.assertEquals("w", model.schedules().get(0).startTime()); - Assertions.assertEquals("sotftpvj", model.schedules().get(0).endTime()); - Assertions.assertEquals(1235013026, model.schedules().get(0).count()); - Assertions.assertEquals(ScheduleDay.TUESDAY, model.schedules().get(0).days().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleTests.java deleted file mode 100644 index 7aefd8191619..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Schedule model = BinaryData.fromString( - "{\"startTime\":\"znfqqnvwpmqtar\",\"endTime\":\"oujmkcjhwqytj\",\"count\":734102755,\"days\":[\"Saturday\"]}") - .toObject(Schedule.class); - Assertions.assertEquals("znfqqnvwpmqtar", model.startTime()); - Assertions.assertEquals("oujmkcjhwqytj", model.endTime()); - Assertions.assertEquals(734102755, model.count()); - Assertions.assertEquals(ScheduleDay.SATURDAY, model.days().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Schedule model = new Schedule().withStartTime("znfqqnvwpmqtar") - .withEndTime("oujmkcjhwqytj") - .withCount(734102755) - .withDays(Arrays.asList(ScheduleDay.SATURDAY)); - model = BinaryData.fromObject(model).toObject(Schedule.class); - Assertions.assertEquals("znfqqnvwpmqtar", model.startTime()); - Assertions.assertEquals("oujmkcjhwqytj", model.endTime()); - Assertions.assertEquals(734102755, model.count()); - Assertions.assertEquals(ScheduleDay.SATURDAY, model.days().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScriptActionProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScriptActionProfileTests.java deleted file mode 100644 index d365d5ed90f0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScriptActionProfileTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ScriptActionProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScriptActionProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptActionProfile model = BinaryData.fromString( - "{\"type\":\"nqxwbp\",\"name\":\"kulpiujwaasi\",\"url\":\"qiiobyuqer\",\"parameters\":\"lp\",\"services\":[\"cciuqgbdbutau\",\"fbtkuwhhmhyk\",\"joxafnndlpi\"],\"timeoutInMinutes\":1639639314,\"shouldPersist\":false}") - .toObject(ScriptActionProfile.class); - Assertions.assertEquals("nqxwbp", model.type()); - Assertions.assertEquals("kulpiujwaasi", model.name()); - Assertions.assertEquals("qiiobyuqer", model.url()); - Assertions.assertEquals("lp", model.parameters()); - Assertions.assertEquals("cciuqgbdbutau", model.services().get(0)); - Assertions.assertEquals(1639639314, model.timeoutInMinutes()); - Assertions.assertEquals(false, model.shouldPersist()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptActionProfile model = new ScriptActionProfile().withType("nqxwbp") - .withName("kulpiujwaasi") - .withUrl("qiiobyuqer") - .withParameters("lp") - .withServices(Arrays.asList("cciuqgbdbutau", "fbtkuwhhmhyk", "joxafnndlpi")) - .withTimeoutInMinutes(1639639314) - .withShouldPersist(false); - model = BinaryData.fromObject(model).toObject(ScriptActionProfile.class); - Assertions.assertEquals("nqxwbp", model.type()); - Assertions.assertEquals("kulpiujwaasi", model.name()); - Assertions.assertEquals("qiiobyuqer", model.url()); - Assertions.assertEquals("lp", model.parameters()); - Assertions.assertEquals("cciuqgbdbutau", model.services().get(0)); - Assertions.assertEquals(1639639314, model.timeoutInMinutes()); - Assertions.assertEquals(false, model.shouldPersist()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceConfigListResultValueEntityTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceConfigListResultValueEntityTests.java deleted file mode 100644 index 366adf101195..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceConfigListResultValueEntityTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigListResultValueEntity; -import org.junit.jupiter.api.Assertions; - -public final class ServiceConfigListResultValueEntityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceConfigListResultValueEntity model - = BinaryData.fromString("{\"value\":\"kfwynw\",\"description\":\"tbvkayhmtnvyq\"}") - .toObject(ServiceConfigListResultValueEntity.class); - Assertions.assertEquals("kfwynw", model.value()); - Assertions.assertEquals("tbvkayhmtnvyq", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceConfigListResultValueEntity model - = new ServiceConfigListResultValueEntity().withValue("kfwynw").withDescription("tbvkayhmtnvyq"); - model = BinaryData.fromObject(model).toObject(ServiceConfigListResultValueEntity.class); - Assertions.assertEquals("kfwynw", model.value()); - Assertions.assertEquals("tbvkayhmtnvyq", model.description()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceStatusTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceStatusTests.java deleted file mode 100644 index 4678e24f4807..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceStatusTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import org.junit.jupiter.api.Assertions; - -public final class ServiceStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceStatus model - = BinaryData.fromString("{\"kind\":\"wnopqgikyzirtx\",\"ready\":\"yuxzejntpsewgi\",\"message\":\"l\"}") - .toObject(ServiceStatus.class); - Assertions.assertEquals("wnopqgikyzirtx", model.kind()); - Assertions.assertEquals("yuxzejntpsewgi", model.ready()); - Assertions.assertEquals("l", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceStatus model - = new ServiceStatus().withKind("wnopqgikyzirtx").withReady("yuxzejntpsewgi").withMessage("l"); - model = BinaryData.fromObject(model).toObject(ServiceStatus.class); - Assertions.assertEquals("wnopqgikyzirtx", model.kind()); - Assertions.assertEquals("yuxzejntpsewgi", model.ready()); - Assertions.assertEquals("l", model.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginTests.java deleted file mode 100644 index a9661d5a23c6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.SparkUserPlugin; -import org.junit.jupiter.api.Assertions; - -public final class SparkUserPluginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkUserPlugin model = BinaryData.fromString("{\"path\":\"mutwuoe\"}").toObject(SparkUserPlugin.class); - Assertions.assertEquals("mutwuoe", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkUserPlugin model = new SparkUserPlugin().withPath("mutwuoe"); - model = BinaryData.fromObject(model).toObject(SparkUserPlugin.class); - Assertions.assertEquals("mutwuoe", model.path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginsTests.java deleted file mode 100644 index c0fdb6ae4121..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginsTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.SparkUserPlugin; -import com.azure.resourcemanager.hdinsight.containers.models.SparkUserPlugins; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SparkUserPluginsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkUserPlugins model - = BinaryData.fromString("{\"plugins\":[{\"path\":\"xcxrsl\"}]}").toObject(SparkUserPlugins.class); - Assertions.assertEquals("xcxrsl", model.plugins().get(0).path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkUserPlugins model - = new SparkUserPlugins().withPlugins(Arrays.asList(new SparkUserPlugin().withPath("xcxrsl"))); - model = BinaryData.fromObject(model).toObject(SparkUserPlugins.class); - Assertions.assertEquals("xcxrsl", model.plugins().get(0).path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshConnectivityEndpointTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshConnectivityEndpointTests.java deleted file mode 100644 index 15c48b334e1b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshConnectivityEndpointTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.SshConnectivityEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class SshConnectivityEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SshConnectivityEndpoint model - = BinaryData.fromString("{\"endpoint\":\"ppcqeqxolz\",\"privateSshEndpoint\":\"hzxct\"}") - .toObject(SshConnectivityEndpoint.class); - Assertions.assertEquals("ppcqeqxolz", model.endpoint()); - Assertions.assertEquals("hzxct", model.privateSshEndpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SshConnectivityEndpoint model - = new SshConnectivityEndpoint().withEndpoint("ppcqeqxolz").withPrivateSshEndpoint("hzxct"); - model = BinaryData.fromObject(model).toObject(SshConnectivityEndpoint.class); - Assertions.assertEquals("ppcqeqxolz", model.endpoint()); - Assertions.assertEquals("hzxct", model.privateSshEndpoint()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshProfileTests.java deleted file mode 100644 index cc78d0847748..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshProfileTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.SshProfile; -import org.junit.jupiter.api.Assertions; - -public final class SshProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SshProfile model - = BinaryData.fromString("{\"count\":1194461063,\"podPrefix\":\"fqjhhkxbpvjymj\",\"vmSize\":\"xjyngudivk\"}") - .toObject(SshProfile.class); - Assertions.assertEquals(1194461063, model.count()); - Assertions.assertEquals("xjyngudivk", model.vmSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SshProfile model = new SshProfile().withCount(1194461063).withVmSize("xjyngudivk"); - model = BinaryData.fromObject(model).toObject(SshProfile.class); - Assertions.assertEquals(1194461063, model.count()); - Assertions.assertEquals("xjyngudivk", model.vmSize()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TagsObjectTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TagsObjectTests.java deleted file mode 100644 index 32242ac7618c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TagsObjectTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TagsObject; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TagsObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TagsObject model = BinaryData.fromString("{\"tags\":{\"zndlikwy\":\"gou\",\"bmadgak\":\"kgfg\"}}") - .toObject(TagsObject.class); - Assertions.assertEquals("gou", model.tags().get("zndlikwy")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TagsObject model = new TagsObject().withTags(mapOf("zndlikwy", "gou", "bmadgak", "kgfg")); - model = BinaryData.fromObject(model).toObject(TagsObject.class); - Assertions.assertEquals("gou", model.tags().get("zndlikwy")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoCoordinatorTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoCoordinatorTests.java deleted file mode 100644 index d61b97625327..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoCoordinatorTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoCoordinator; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoDebugConfig; -import org.junit.jupiter.api.Assertions; - -public final class TrinoCoordinatorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoCoordinator model = BinaryData - .fromString( - "{\"debug\":{\"enable\":true,\"port\":353281330,\"suspend\":false},\"highAvailabilityEnabled\":false}") - .toObject(TrinoCoordinator.class); - Assertions.assertEquals(true, model.debug().enable()); - Assertions.assertEquals(353281330, model.debug().port()); - Assertions.assertEquals(false, model.debug().suspend()); - Assertions.assertEquals(false, model.highAvailabilityEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoCoordinator model = new TrinoCoordinator() - .withDebug(new TrinoDebugConfig().withEnable(true).withPort(353281330).withSuspend(false)) - .withHighAvailabilityEnabled(false); - model = BinaryData.fromObject(model).toObject(TrinoCoordinator.class); - Assertions.assertEquals(true, model.debug().enable()); - Assertions.assertEquals(353281330, model.debug().port()); - Assertions.assertEquals(false, model.debug().suspend()); - Assertions.assertEquals(false, model.highAvailabilityEnabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoDebugConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoDebugConfigTests.java deleted file mode 100644 index 63ddec2191a9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoDebugConfigTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoDebugConfig; -import org.junit.jupiter.api.Assertions; - -public final class TrinoDebugConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoDebugConfig model = BinaryData.fromString("{\"enable\":true,\"port\":1319718925,\"suspend\":true}") - .toObject(TrinoDebugConfig.class); - Assertions.assertEquals(true, model.enable()); - Assertions.assertEquals(1319718925, model.port()); - Assertions.assertEquals(true, model.suspend()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoDebugConfig model = new TrinoDebugConfig().withEnable(true).withPort(1319718925).withSuspend(true); - model = BinaryData.fromObject(model).toObject(TrinoDebugConfig.class); - Assertions.assertEquals(true, model.enable()); - Assertions.assertEquals(1319718925, model.port()); - Assertions.assertEquals(true, model.suspend()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoTelemetryConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoTelemetryConfigTests.java deleted file mode 100644 index 27c21e4d4dc9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoTelemetryConfigTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoTelemetryConfig; -import org.junit.jupiter.api.Assertions; - -public final class TrinoTelemetryConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoTelemetryConfig model = BinaryData.fromString( - "{\"hivecatalogName\":\"eotg\",\"hivecatalogSchema\":\"l\",\"partitionRetentionInDays\":1147743130,\"path\":\"wlauwzizxbmpg\"}") - .toObject(TrinoTelemetryConfig.class); - Assertions.assertEquals("eotg", model.hivecatalogName()); - Assertions.assertEquals("l", model.hivecatalogSchema()); - Assertions.assertEquals(1147743130, model.partitionRetentionInDays()); - Assertions.assertEquals("wlauwzizxbmpg", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoTelemetryConfig model = new TrinoTelemetryConfig().withHivecatalogName("eotg") - .withHivecatalogSchema("l") - .withPartitionRetentionInDays(1147743130) - .withPath("wlauwzizxbmpg"); - model = BinaryData.fromObject(model).toObject(TrinoTelemetryConfig.class); - Assertions.assertEquals("eotg", model.hivecatalogName()); - Assertions.assertEquals("l", model.hivecatalogSchema()); - Assertions.assertEquals(1147743130, model.partitionRetentionInDays()); - Assertions.assertEquals("wlauwzizxbmpg", model.path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginTests.java deleted file mode 100644 index 795f0def36e9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoUserPlugin; -import org.junit.jupiter.api.Assertions; - -public final class TrinoUserPluginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoUserPlugin model - = BinaryData.fromString("{\"enabled\":false,\"name\":\"kwobdagxtibq\",\"path\":\"bxwakbog\"}") - .toObject(TrinoUserPlugin.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("kwobdagxtibq", model.name()); - Assertions.assertEquals("bxwakbog", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoUserPlugin model = new TrinoUserPlugin().withEnabled(false).withName("kwobdagxtibq").withPath("bxwakbog"); - model = BinaryData.fromObject(model).toObject(TrinoUserPlugin.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("kwobdagxtibq", model.name()); - Assertions.assertEquals("bxwakbog", model.path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginsTests.java deleted file mode 100644 index a56890957cfb..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginsTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoUserPlugin; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoUserPlugins; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TrinoUserPluginsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoUserPlugins model = BinaryData - .fromString("{\"plugins\":[{\"enabled\":false,\"name\":\"nsikvmkqzeqqkdl\",\"path\":\"zxmhhvhgu\"}]}") - .toObject(TrinoUserPlugins.class); - Assertions.assertEquals(false, model.plugins().get(0).enabled()); - Assertions.assertEquals("nsikvmkqzeqqkdl", model.plugins().get(0).name()); - Assertions.assertEquals("zxmhhvhgu", model.plugins().get(0).path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoUserPlugins model = new TrinoUserPlugins().withPlugins( - Arrays.asList(new TrinoUserPlugin().withEnabled(false).withName("nsikvmkqzeqqkdl").withPath("zxmhhvhgu"))); - model = BinaryData.fromObject(model).toObject(TrinoUserPlugins.class); - Assertions.assertEquals(false, model.plugins().get(0).enabled()); - Assertions.assertEquals("nsikvmkqzeqqkdl", model.plugins().get(0).name()); - Assertions.assertEquals("zxmhhvhgu", model.plugins().get(0).path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserTelemetryTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserTelemetryTests.java deleted file mode 100644 index 389ca03138de..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserTelemetryTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoTelemetryConfig; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoUserTelemetry; -import org.junit.jupiter.api.Assertions; - -public final class TrinoUserTelemetryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoUserTelemetry model = BinaryData.fromString( - "{\"storage\":{\"hivecatalogName\":\"dlkzgxhuri\",\"hivecatalogSchema\":\"bpodxunkbebxm\",\"partitionRetentionInDays\":1347899854,\"path\":\"ntwlrbqtkoie\"}}") - .toObject(TrinoUserTelemetry.class); - Assertions.assertEquals("dlkzgxhuri", model.storage().hivecatalogName()); - Assertions.assertEquals("bpodxunkbebxm", model.storage().hivecatalogSchema()); - Assertions.assertEquals(1347899854, model.storage().partitionRetentionInDays()); - Assertions.assertEquals("ntwlrbqtkoie", model.storage().path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoUserTelemetry model - = new TrinoUserTelemetry().withStorage(new TrinoTelemetryConfig().withHivecatalogName("dlkzgxhuri") - .withHivecatalogSchema("bpodxunkbebxm") - .withPartitionRetentionInDays(1347899854) - .withPath("ntwlrbqtkoie")); - model = BinaryData.fromObject(model).toObject(TrinoUserTelemetry.class); - Assertions.assertEquals("dlkzgxhuri", model.storage().hivecatalogName()); - Assertions.assertEquals("bpodxunkbebxm", model.storage().hivecatalogSchema()); - Assertions.assertEquals(1347899854, model.storage().partitionRetentionInDays()); - Assertions.assertEquals("ntwlrbqtkoie", model.storage().path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoWorkerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoWorkerTests.java deleted file mode 100644 index 8b08117b2bf7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoWorkerTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoDebugConfig; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoWorker; -import org.junit.jupiter.api.Assertions; - -public final class TrinoWorkerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoWorker model = BinaryData.fromString("{\"debug\":{\"enable\":true,\"port\":1935648017,\"suspend\":false}}") - .toObject(TrinoWorker.class); - Assertions.assertEquals(true, model.debug().enable()); - Assertions.assertEquals(1935648017, model.debug().port()); - Assertions.assertEquals(false, model.debug().suspend()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoWorker model = new TrinoWorker() - .withDebug(new TrinoDebugConfig().withEnable(true).withPort(1935648017).withSuspend(false)); - model = BinaryData.fromObject(model).toObject(TrinoWorker.class); - Assertions.assertEquals(true, model.debug().enable()); - Assertions.assertEquals(1935648017, model.debug().port()); - Assertions.assertEquals(false, model.debug().suspend()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/WebConnectivityEndpointTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/WebConnectivityEndpointTests.java deleted file mode 100644 index 16b8333ee2d2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/WebConnectivityEndpointTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.WebConnectivityEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class WebConnectivityEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebConnectivityEndpoint model = BinaryData.fromString("{\"fqdn\":\"pfqbuaceopzf\",\"privateFqdn\":\"hhuao\"}") - .toObject(WebConnectivityEndpoint.class); - Assertions.assertEquals("pfqbuaceopzf", model.fqdn()); - Assertions.assertEquals("hhuao", model.privateFqdn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebConnectivityEndpoint model = new WebConnectivityEndpoint().withFqdn("pfqbuaceopzf").withPrivateFqdn("hhuao"); - model = BinaryData.fromObject(model).toObject(WebConnectivityEndpoint.class); - Assertions.assertEquals("pfqbuaceopzf", model.fqdn()); - Assertions.assertEquals("hhuao", model.privateFqdn()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker deleted file mode 100644 index 1f0955d450f0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker +++ /dev/null @@ -1 +0,0 @@ -mock-maker-inline diff --git a/sdk/hdinsight/ci.yml b/sdk/hdinsight/ci.yml index 3165bedc6fd3..9e12c25f559e 100644 --- a/sdk/hdinsight/ci.yml +++ b/sdk/hdinsight/ci.yml @@ -10,11 +10,9 @@ trigger: include: - sdk/hdinsight/ci.yml - sdk/hdinsight/azure-resourcemanager-hdinsight/ - - sdk/hdinsight/azure-resourcemanager-hdinsight-containers/ exclude: - sdk/hdinsight/pom.xml - sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml - - sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml pr: branches: @@ -27,21 +25,15 @@ pr: include: - sdk/hdinsight/ci.yml - sdk/hdinsight/azure-resourcemanager-hdinsight/ - - sdk/hdinsight/azure-resourcemanager-hdinsight-containers/ exclude: - sdk/hdinsight/pom.xml - sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml - - sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml parameters: - name: release_azureresourcemanagerhdinsight displayName: 'azure-resourcemanager-hdinsight' type: boolean default: false -- name: release_azureresourcemanagerhdinsightcontainers - displayName: 'azure-resourcemanager-hdinsight-containers' - type: boolean - default: false extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -52,7 +44,3 @@ extends: groupId: com.azure.resourcemanager safeName: azureresourcemanagerhdinsight releaseInBatch: ${{ parameters.release_azureresourcemanagerhdinsight }} - - name: azure-resourcemanager-hdinsight-containers - groupId: com.azure.resourcemanager - safeName: azureresourcemanagerhdinsightcontainers - releaseInBatch: ${{ parameters.release_azureresourcemanagerhdinsightcontainers }} diff --git a/sdk/hdinsight/pom.xml b/sdk/hdinsight/pom.xml index d0cbbb9bc9a5..9878cb60870d 100644 --- a/sdk/hdinsight/pom.xml +++ b/sdk/hdinsight/pom.xml @@ -11,6 +11,5 @@ azure-resourcemanager-hdinsight - azure-resourcemanager-hdinsight-containers diff --git a/sdk/resourcemanager/docs/SINGLE_SERVICE_PACKAGES.md b/sdk/resourcemanager/docs/SINGLE_SERVICE_PACKAGES.md index b2de2a5fcd08..bc2cef431fe5 100644 --- a/sdk/resourcemanager/docs/SINGLE_SERVICE_PACKAGES.md +++ b/sdk/resourcemanager/docs/SINGLE_SERVICE_PACKAGES.md @@ -1067,18 +1067,6 @@ service * [1.0.0-beta.1](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-hdinsight/1.0.0-beta.1) -
-

- hdinsight-containers - -* [package-preview-2024-05](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks#tag-package-preview-2024-05) - * [1.0.0-beta.3](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-hdinsight-containers/1.0.0-beta.3) -* [package-preview-2023-11](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks#tag-package-preview-2023-11) - * [1.0.0-beta.2](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-hdinsight-containers/1.0.0-beta.2) -* [package-2023-06-preview](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks#tag-package-2023-06-preview) - * [1.0.0-beta.1](https://repo1.maven.org/maven2/com/azure/resourcemanager/azure-resourcemanager-hdinsight-containers/1.0.0-beta.1) -
-
healthbot