From 14f4a9137d5e8575766939421c8fb45e93c1073d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 23 Aug 2023 06:43:45 +0000 Subject: [PATCH] CodeGen from PR 25321 in Azure/azure-rest-api-specs Merge 46274165da553491a4e8198eab08225cb3a11d1b into ad6484fee29013ab0b3619217970b106a1f44cf0 --- ...esourceManager.HDInsight.netstandard2.0.cs | 1437 ++++------- .../src/Generated/ArmHDInsightModelFactory.cs | 670 ++--- .../src/Generated/ClusterPoolCollection.cs | 341 +++ .../src/Generated/ClusterPoolData.cs | 93 + ...tionResource.cs => ClusterPoolResource.cs} | 354 +-- .../Extensions/HDInsightExtensions.cs | 298 +-- .../ResourceGroupResourceExtensionClient.cs | 8 +- .../SubscriptionResourceExtensionClient.cs | 292 +-- .../HDInsightApplicationCollection.cs | 340 --- .../src/Generated/HDInsightApplicationData.cs | 50 - .../Generated/HDInsightClusterCollection.cs | 94 +- .../src/Generated/HDInsightClusterData.cs | 53 +- .../src/Generated/HDInsightClusterResource.cs | 2238 ++--------------- ...ightPrivateEndpointConnectionCollection.cs | 340 --- .../HDInsightPrivateEndpointConnectionData.cs | 64 - ...nsightPrivateEndpointConnectionResource.cs | 297 --- .../Generated/HDInsightPrivateLinkResource.cs | 153 -- .../HDInsightPrivateLinkResourceCollection.cs | 256 -- .../HDInsightPrivateLinkResourceData.cs | 49 - .../ClusterJobOperationSource.cs | 31 + .../ClusterPoolOperationSource.cs | 40 + .../HDInsightApplicationOperationSource.cs | 40 - ...rivateEndpointConnectionOperationSource.cs | 40 - .../src/Generated/Models/Action.cs | 72 + .../Models/AksClusterProfile.Serialization.cs | 53 + .../src/Generated/Models/AksClusterProfile.cs | 38 + ...rAgentPoolIdentityProfile.Serialization.cs | 57 + ...ofileAksClusterAgentPoolIdentityProfile.cs | 28 + .../Generated/Models/ApplicationListResult.cs | 37 - .../Models/AuthenticationDirectoryType.cs | 48 - .../AuthorizationProfile.Serialization.cs | 84 + .../Generated/Models/AuthorizationProfile.cs | 37 + .../Models/AutoScaleProfile.Serialization.cs | 101 + .../src/Generated/Models/AutoScaleProfile.cs | 46 + .../src/Generated/Models/AutoScaleType.cs | 51 + ...ion.cs => CatalogOptions.Serialization.cs} | 22 +- .../src/Generated/Models/CatalogOptions.cs | 32 + .../Models/ClientGroupInfo.Serialization.cs | 55 - .../src/Generated/Models/ClientGroupInfo.cs | 32 - .../ClusterComponentsItem.Serialization.cs | 39 + .../Generated/Models/ClusterComponentsItem.cs | 32 + .../Models/ClusterConfigFile.Serialization.cs | 105 + .../src/Generated/Models/ClusterConfigFile.cs | 60 + ...tanceViewPropertiesStatus.Serialization.cs | 45 + .../ClusterInstanceViewPropertiesStatus.cs | 32 + ...ClusterInstanceViewResult.Serialization.cs | 63 + .../Models/ClusterInstanceViewResult.cs | 52 + ...ClusterInstanceViewStatus.Serialization.cs | 45 + .../Models/ClusterInstanceViewStatus.cs | 44 + ...usterInstanceViewsResult.Serialization.cs} | 12 +- .../Models/ClusterInstanceViewsResult.cs | 36 + .../Models/ClusterJob.Serialization.cs | 70 + .../src/Generated/Models/ClusterJob.cs | 53 + ...ion.cs => ClusterJobList.Serialization.cs} | 22 +- .../src/Generated/Models/ClusterJobList.cs | 42 + .../ClusterJobProperties.Serialization.cs | 39 + .../Generated/Models/ClusterJobProperties.cs | 32 + .../src/Generated/Models/ClusterListResult.cs | 6 +- ...AnalyticsApplicationLogs.Serialization.cs} | 30 +- .../ClusterLogAnalyticsApplicationLogs.cs | 32 + ...lusterLogAnalyticsProfile.Serialization.cs | 71 + .../Models/ClusterLogAnalyticsProfile.cs | 38 + ...lusterPoolComputeProfile.Serialization.cs} | 25 +- .../Models/ClusterPoolComputeProfile.cs | 40 + .../Models/ClusterPoolData.Serialization.cs | 222 ++ ...=> ClusterPoolListResult.Serialization.cs} | 12 +- .../Generated/Models/ClusterPoolListResult.cs | 37 + ...rPoolLogAnalyticsProfile.Serialization.cs} | 37 +- .../Models/ClusterPoolLogAnalyticsProfile.cs | 36 + ...lusterPoolNetworkProfile.Serialization.cs} | 19 +- .../Models/ClusterPoolNetworkProfile.cs | 29 + .../Models/ClusterPoolPatch.Serialization.cs | 32 + .../src/Generated/Models/ClusterPoolPatch.cs | 25 + ...cs => ClusterPoolProfile.Serialization.cs} | 19 +- .../Generated/Models/ClusterPoolProfile.cs | 29 + ...opertiesAksClusterProfile.Serialization.cs | 53 + ...PoolResourcePropertiesAksClusterProfile.cs | 28 + ...pertiesClusterPoolProfile.Serialization.cs | 41 + ...oolResourcePropertiesClusterPoolProfile.cs | 24 + ...ePropertiesComputeProfile.Serialization.cs | 51 + ...terPoolResourcePropertiesComputeProfile.cs | 31 + ...ertiesLogAnalyticsProfile.Serialization.cs | 56 + ...olResourcePropertiesLogAnalyticsProfile.cs | 28 + ...PropertiesNetworkProfile.Serialization.cs} | 19 +- ...terPoolResourcePropertiesNetworkProfile.cs | 24 + ...cs => ClusterPoolVersion.Serialization.cs} | 62 +- .../Generated/Models/ClusterPoolVersion.cs | 43 + ...erPoolVersionsListResult.Serialization.cs} | 13 +- .../Models/ClusterPoolVersionsListResult.cs | 36 + .../Models/ClusterProfile.Serialization.cs | 388 +++ .../src/Generated/Models/ClusterProfile.cs | 221 ++ .../ClusterPrometheusProfile.Serialization.cs | 41 + .../Models/ClusterPrometheusProfile.cs | 23 + ....cs => ClusterResizeData.Serialization.cs} | 68 +- .../src/Generated/Models/ClusterResizeData.cs | 39 + .../ClusterServiceConfig.Serialization.cs | 60 + .../Generated/Models/ClusterServiceConfig.cs | 45 + ...sterServiceConfigsProfile.Serialization.cs | 60 + .../Models/ClusterServiceConfigsProfile.cs | 45 + .../Models/ClusterVersion.Serialization.cs | 152 ++ .../src/Generated/Models/ClusterVersion.cs | 57 + ...lusterVersionsListResult.Serialization.cs} | 12 +- .../Models/ClusterVersionsListResult.cs | 36 + .../Generated/Models/ComparisonOperator.cs | 57 + .../Models/ComparisonRule.Serialization.cs | 49 + .../src/Generated/Models/ComparisonRule.cs | 27 + .../Models/ComputeProfile.Serialization.cs | 29 +- .../src/Generated/Models/ComputeProfile.cs | 22 +- ...ComputeResourceDefinition.Serialization.cs | 49 + .../Models/ComputeResourceDefinition.cs | 27 + .../ConnectivityEndpoint.Serialization.cs | 97 - .../Generated/Models/ConnectivityEndpoint.cs | 46 - ...s => ConnectivityProfile.Serialization.cs} | 23 +- .../Generated/Models/ConnectivityProfile.cs | 48 + .../ConnectivityProfileWeb.Serialization.cs | 33 + .../Models/ConnectivityProfileWeb.cs | 24 + .../src/Generated/Models/ContentEncoding.cs | 51 + .../Models/EncryptionInTransitProperties.cs | 28 - .../ExcludedServicesConfig.Serialization.cs | 55 - .../Models/ExcludedServicesConfig.cs | 32 - ...xecuteScriptActionContent.Serialization.cs | 33 - .../Models/ExecuteScriptActionContent.cs | 29 - ...s => FlinkCatalogOptions.Serialization.cs} | 18 +- .../Generated/Models/FlinkCatalogOptions.cs | 28 + .../FlinkHiveCatalogOption.Serialization.cs | 57 + .../Models/FlinkHiveCatalogOption.cs | 39 + .../FlinkJobProperties.Serialization.cs | 176 ++ .../Generated/Models/FlinkJobProperties.cs | 89 + .../Models/FlinkProfile.Serialization.cs | 102 + .../src/Generated/Models/FlinkProfile.cs | 73 + .../FlinkStorageProfile.Serialization.cs | 53 + .../Generated/Models/FlinkStorageProfile.cs | 40 + ...nsightApplicationEndpoint.Serialization.cs | 90 - .../Models/HDInsightApplicationEndpoint.cs | 42 - ...tApplicationHttpsEndpoint.Serialization.cs | 132 - .../HDInsightApplicationHttpsEndpoint.cs | 57 - ...ightApplicationProperties.Serialization.cs | 240 -- .../Models/HDInsightApplicationProperties.cs | 94 - ...sightAsyncOperationResult.Serialization.cs | 48 - .../Models/HDInsightAsyncOperationResult.cs | 34 - .../Models/HDInsightAsyncOperationState.cs | 54 - .../Models/HDInsightAutoScaleCapacity.cs | 32 - ...ghtAutoScaleConfiguration.Serialization.cs | 63 - .../Models/HDInsightAutoScaleConfiguration.cs | 32 - ...onfigurationUpdateContent.Serialization.cs | 26 - ...ightAutoScaleConfigurationUpdateContent.cs | 21 - .../Models/HDInsightAutoScaleRecurrence.cs | 36 - ...DInsightAutoScaleSchedule.Serialization.cs | 74 - .../Models/HDInsightAutoScaleSchedule.cs | 36 - ...tAutoScaleTimeAndCapacity.Serialization.cs | 74 - .../HDInsightAutoScaleTimeAndCapacity.cs | 36 - ...torExtensionEnableContent.Serialization.cs | 36 - ...sightAzureMonitorExtensionEnableContent.cs | 25 - ...ureMonitorExtensionStatus.Serialization.cs | 53 - .../HDInsightAzureMonitorExtensionStatus.cs | 36 - ...torSelectedConfigurations.Serialization.cs | 96 - ...sightAzureMonitorSelectedConfigurations.cs | 41 - ...HDInsightAzureMonitorTableConfiguration.cs | 28 - .../HDInsightBillingMeters.Serialization.cs | 45 - .../Models/HDInsightBillingMeters.cs | 36 - ...HDInsightBillingResources.Serialization.cs | 68 - .../Models/HDInsightBillingResources.cs | 41 - ...ghtBillingSpecsListResult.Serialization.cs | 103 - .../Models/HDInsightBillingSpecsListResult.cs | 52 - ...InsightCapabilitiesResult.Serialization.cs | 83 - .../Models/HDInsightCapabilitiesResult.cs | 46 - ...InsightClusterAaddsDetail.Serialization.cs | 90 - .../Models/HDInsightClusterAaddsDetail.cs | 55 - ...ightClusterConfigurations.Serialization.cs | 55 - .../Models/HDInsightClusterConfigurations.cs | 32 - ...terCreateExtensionContent.Serialization.cs | 31 - .../HDInsightClusterCreateExtensionContent.cs | 23 - ...sterCreateOrUpdateContent.Serialization.cs | 57 - .../HDInsightClusterCreateOrUpdateContent.cs | 35 - ...rCreateOrUpdateProperties.Serialization.cs | 96 - ...DInsightClusterCreateOrUpdateProperties.cs | 85 - ...erCreationValidateContent.Serialization.cs | 77 - ...HDInsightClusterCreationValidateContent.cs | 29 - ...terCreationValidateResult.Serialization.cs | 84 - .../HDInsightClusterCreationValidateResult.cs | 47 - .../HDInsightClusterData.Serialization.cs | 151 +- ...sightClusterDataDiskGroup.Serialization.cs | 64 - .../Models/HDInsightClusterDataDiskGroup.cs | 36 - ...DInsightClusterDefinition.Serialization.cs | 102 - .../Models/HDInsightClusterDefinition.cs | 74 - ...sterDiskEncryptionContent.Serialization.cs | 36 - .../HDInsightClusterDiskEncryptionContent.cs | 27 - ...eClusterMonitoringContent.Serialization.cs | 31 - ...htClusterEnableClusterMonitoringContent.cs | 23 - ...ghtClusterExtensionStatus.Serialization.cs | 43 - .../Models/HDInsightClusterExtensionStatus.cs | 32 - .../HDInsightClusterHostInfo.Serialization.cs | 50 - .../Models/HDInsightClusterHostInfo.cs | 38 - ...tClusterNetworkProperties.Serialization.cs | 63 - .../HDInsightClusterNetworkProperties.cs | 32 - .../HDInsightClusterPatch.Serialization.cs | 108 +- .../Generated/Models/HDInsightClusterPatch.cs | 26 +- ...DInsightClusterProperties.Serialization.cs | 400 --- .../Models/HDInsightClusterProperties.cs | 181 -- .../HDInsightClusterProvisioningState.cs | 60 - ...sightClusterResizeContent.Serialization.cs | 26 - .../Models/HDInsightClusterResizeContent.cs | 21 - .../HDInsightClusterRole.Serialization.cs | 211 -- .../Generated/Models/HDInsightClusterRole.cs | 97 - ...ateGatewaySettingsContent.Serialization.cs | 36 - ...ightClusterUpdateGatewaySettingsContent.cs | 25 - ...dentityCertificateContent.Serialization.cs | 36 - ...ClusterUpdateIdentityCertificateContent.cs | 25 - ...lusterValidationErrorInfo.Serialization.cs | 61 - .../HDInsightClusterValidationErrorInfo.cs | 44 - ...omputeIsolationProperties.Serialization.cs | 59 - .../HDInsightComputeIsolationProperties.cs | 32 - .../Generated/Models/HDInsightDayOfWeek.cs | 66 - ...DInsightDiskBillingMeters.Serialization.cs | 49 - .../Models/HDInsightDiskBillingMeters.cs | 36 - ...tDiskEncryptionProperties.Serialization.cs | 132 - .../HDInsightDiskEncryptionProperties.cs | 51 - .../Generated/Models/HDInsightFilterMode.cs | 57 - .../HDInsightIPConfiguration.Serialization.cs | 148 -- .../Models/HDInsightIPConfiguration.cs | 77 - .../HDInsightLinuxOSProfile.Serialization.cs | 70 - .../Models/HDInsightLinuxOSProfile.cs | 48 - .../Models/HDInsightLocalizedName.cs | 32 - .../HDInsightNameAvailabilityContent.cs | 25 - .../Models/HDInsightNameAvailabilityResult.cs | 36 - .../src/Generated/Models/HDInsightOSType.cs | 51 - ...ateEndpointConnectionData.Serialization.cs | 113 - ...ightPrivateEndpointConnectionListResult.cs | 37 - ...vateEndpointConnectionProvisioningState.cs | 63 - .../HDInsightPrivateIPAllocationMethod.cs | 51 - ...tPrivateLinkConfiguration.Serialization.cs | 109 - .../HDInsightPrivateLinkConfiguration.cs | 64 - ...ivateLinkConfigurationProvisioningState.cs | 60 - .../HDInsightPrivateLinkResourceListResult.cs | 33 - ...inkServiceConnectionState.Serialization.cs | 63 - ...nsightPrivateLinkServiceConnectionState.cs | 38 - ...sightPrivateLinkServiceConnectionStatus.cs | 57 - .../Models/HDInsightPrivateLinkState.cs | 51 - .../HDInsightResourceProviderConnection.cs | 51 - .../src/Generated/Models/HDInsightRoleName.cs | 48 - .../HDInsightSecurityProfile.Serialization.cs | 186 -- .../Models/HDInsightSecurityProfile.cs | 66 - .../Generated/Models/HDInsightSshPublicKey.cs | 28 - ...InsightStorageAccountInfo.Serialization.cs | 175 -- .../Models/HDInsightStorageAccountInfo.cs | 66 - .../src/Generated/Models/HDInsightTier.cs | 51 - .../Models/HDInsightUsage.Serialization.cs | 63 - .../src/Generated/Models/HDInsightUsage.cs | 40 - .../HDInsightVersionSpec.Serialization.cs | 65 - .../Generated/Models/HDInsightVersionSpec.cs | 44 - ...InsightVersionsCapability.Serialization.cs | 43 - .../Models/HDInsightVersionsCapability.cs | 32 - .../Models/HDInsightVirtualNetworkProfile.cs | 34 - ...SizeCompatibilityFilterV2.Serialization.cs | 140 -- .../HDInsightVmSizeCompatibilityFilterV2.cs | 69 - .../HDInsightVmSizeProperty.Serialization.cs | 115 - .../Models/HDInsightVmSizeProperty.cs | 64 - .../src/Generated/Models/HardwareProfile.cs | 28 - .../Models/HiveCatalogOption.Serialization.cs | 73 + .../src/Generated/Models/HiveCatalogOption.cs | 49 + .../Models/IdentityProfile.Serialization.cs | 57 + .../src/Generated/Models/IdentityProfile.cs | 39 + .../src/Generated/Models/JobType.cs | 48 + .../Models/JsonWebKeyEncryptionAlgorithm.cs | 54 - .../KafkaRestProperties.Serialization.cs | 75 - .../Generated/Models/KafkaRestProperties.cs | 36 - .../Generated/Models/KeyVaultObjectType.cs | 54 + .../Models/LoadBasedConfig.Serialization.cs | 98 + .../src/Generated/Models/LoadBasedConfig.cs | 58 + ... NameAvailabilityContent.Serialization.cs} | 4 +- .../Models/NameAvailabilityContent.cs | 23 + ...> NameAvailabilityResult.Serialization.cs} | 6 +- .../Models/NameAvailabilityResult.cs | 36 + .../Models/NodeProfile.Serialization.cs | 57 + .../src/Generated/Models/NodeProfile.cs | 38 + .../src/Generated/Models/OSProfile.cs | 28 - .../Generated/Models/ProvisioningStatus.cs | 57 + .../Models/QuotaCapability.Serialization.cs | 63 - .../src/Generated/Models/QuotaCapability.cs | 40 - .../src/Generated/Models/QuotaInfo.cs | 28 - .../RegionalQuotaCapability.Serialization.cs | 57 - .../Models/RegionalQuotaCapability.cs | 38 - .../Models/RegionsCapability.Serialization.cs | 43 - .../src/Generated/Models/RegionsCapability.cs | 32 - .../RuntimeScriptAction.Serialization.cs | 86 - .../Generated/Models/RuntimeScriptAction.cs | 60 - ...RuntimeScriptActionDetail.Serialization.cs | 149 -- .../Models/RuntimeScriptActionDetail.cs | 70 - .../src/Generated/Models/ScaleActionType.cs | 51 + .../Models/ScalingRule.Serialization.cs | 65 + .../src/Generated/Models/ScalingRule.cs | 42 + .../Models/Schedule.Serialization.cs | 76 + .../src/Generated/Models/Schedule.cs | 58 + .../ScheduleBasedConfig.Serialization.cs | 68 + .../Generated/Models/ScheduleBasedConfig.cs | 51 + .../src/Generated/Models/ScheduleDay.cs | 66 + .../Models/ScriptAction.Serialization.cs | 58 - .../src/Generated/Models/ScriptAction.cs | 39 - .../ScriptActionExecutionHistoryList.cs | 36 - ...iptActionExecutionSummary.Serialization.cs | 43 - .../Models/ScriptActionExecutionSummary.cs | 32 - .../ScriptActionProfile.Serialization.cs | 118 + .../Generated/Models/ScriptActionProfile.cs | 71 + .../src/Generated/Models/ScriptActionsList.cs | 36 - .../Models/SecretReference.Serialization.cs | 68 + .../src/Generated/Models/SecretReference.cs | 53 + ...ion.cs => SecretsProfile.Serialization.cs} | 35 +- .../src/Generated/Models/SecretsProfile.cs | 42 + .../ServiceConfigListResult.Serialization.cs | 49 + .../Models/ServiceConfigListResult.cs | 36 + ...figListResultValueEntity.Serialization.cs} | 14 +- .../ServiceConfigListResultValueEntity.cs | 40 + .../ServiceConfigResult.Serialization.cs | 106 + .../Generated/Models/ServiceConfigResult.cs | 61 + .../Models/ServiceStatus.Serialization.cs | 45 + .../src/Generated/Models/ServiceStatus.cs | 47 + .../SparkMetastoreSpec.Serialization.cs | 89 + .../Generated/Models/SparkMetastoreSpec.cs | 68 + .../Models/SparkProfile.Serialization.cs | 79 + .../src/Generated/Models/SparkProfile.cs | 49 + .../Models/SparkUserPlugin.Serialization.cs | 41 + .../src/Generated/Models/SparkUserPlugin.cs | 29 + .../Models/SparkUserPlugins.Serialization.cs | 59 + .../src/Generated/Models/SparkUserPlugins.cs | 32 + .../SshConnectivityEndpoint.Serialization.cs | 33 + .../Models/SshConnectivityEndpoint.cs | 29 + .../Models/SshProfile.Serialization.cs | 38 +- .../src/Generated/Models/SshProfile.cs | 26 +- .../src/Generated/Models/StorageProfile.cs | 32 - .../Models/TrinoCoordinator.Serialization.cs | 108 + .../src/Generated/Models/TrinoCoordinator.cs | 40 + .../Models/TrinoProfile.Serialization.cs | 108 + .../src/Generated/Models/TrinoProfile.cs | 80 + .../TrinoTelemetryConfig.Serialization.cs | 81 + .../Generated/Models/TrinoTelemetryConfig.cs | 40 + .../Models/TrinoUserPlugin.Serialization.cs | 70 + .../src/Generated/Models/TrinoUserPlugin.cs | 36 + .../Models/TrinoUserPlugins.Serialization.cs | 59 + .../src/Generated/Models/TrinoUserPlugins.cs | 32 + ...cs => TrinoUserTelemetry.Serialization.cs} | 18 +- .../Generated/Models/TrinoUserTelemetry.cs | 28 + .../Models/TrinoWorker.Serialization.cs | 93 + .../src/Generated/Models/TrinoWorker.cs | 36 + ...knownClusterJobProperties.Serialization.cs | 41 + .../Models/UnknownClusterJobProperties.cs | 20 + .../UpdatableClusterProfile.Serialization.cs | 159 ++ .../Models/UpdatableClusterProfile.cs | 67 + .../src/Generated/Models/UsagesListResult.cs | 32 - .../WebConnectivityEndpoint.Serialization.cs | 33 + .../Models/WebConnectivityEndpoint.cs | 29 + .../ApplicationsRestOperations.cs | 533 ---- ...ilableClusterPoolVersionsRestOperations.cs | 181 ++ .../AvailableClusterVersionsRestOperations.cs | 181 ++ ...ations.cs => ClusterJobsRestOperations.cs} | 190 +- .../ClusterPoolsRestOperations.cs | 630 +++++ .../RestOperations/ClustersRestOperations.cs | 990 +++----- .../ConfigurationsRestOperations.cs | 306 --- .../ExtensionsRestOperations.cs | 838 ------ .../RestOperations/LocationsRestOperations.cs | 324 +-- ...rivateEndpointConnectionsRestOperations.cs | 445 ---- .../PrivateLinkResourcesRestOperations.cs | 207 -- .../ScriptActionsRestOperations.cs | 439 ---- .../VirtualMachinesRestOperations.cs | 298 --- .../src/autorest.md | 2 +- 364 files changed, 11998 insertions(+), 19646 deletions(-) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ClusterPoolCollection.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ClusterPoolData.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/{HDInsightApplicationResource.cs => ClusterPoolResource.cs} (59%) delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationCollection.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationData.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionCollection.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionData.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionResource.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResource.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResourceCollection.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResourceData.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/ClusterJobOperationSource.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/ClusterPoolOperationSource.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/HDInsightApplicationOperationSource.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/HDInsightPrivateEndpointConnectionOperationSource.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/Action.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfileAksClusterAgentPoolIdentityProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfileAksClusterAgentPoolIdentityProfile.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ApplicationListResult.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthenticationDirectoryType.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthorizationProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthorizationProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AutoScaleProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AutoScaleProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AutoScaleType.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{StorageProfile.Serialization.cs => CatalogOptions.Serialization.cs} (60%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/CatalogOptions.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClientGroupInfo.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClientGroupInfo.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterComponentsItem.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterComponentsItem.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterConfigFile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterConfigFile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewPropertiesStatus.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewPropertiesStatus.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewResult.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewResult.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewStatus.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewStatus.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{ScriptActionExecutionHistoryList.Serialization.cs => ClusterInstanceViewsResult.Serialization.cs} (68%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewsResult.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJob.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJob.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{UsagesListResult.Serialization.cs => ClusterJobList.Serialization.cs} (55%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobList.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobProperties.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobProperties.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HDInsightAutoScaleCapacity.Serialization.cs => ClusterLogAnalyticsApplicationLogs.Serialization.cs} (51%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsProfile.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{EncryptionInTransitProperties.Serialization.cs => ClusterPoolComputeProfile.Serialization.cs} (52%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolComputeProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolData.Serialization.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{ApplicationListResult.Serialization.cs => ClusterPoolListResult.Serialization.cs} (71%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolListResult.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HDInsightVirtualNetworkProfile.Serialization.cs => ClusterPoolLogAnalyticsProfile.Serialization.cs} (51%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolLogAnalyticsProfile.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HardwareProfile.Serialization.cs => ClusterPoolNetworkProfile.Serialization.cs} (56%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolNetworkProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolPatch.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolPatch.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HDInsightAzureMonitorTableConfiguration.Serialization.cs => ClusterPoolProfile.Serialization.cs} (52%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesAksClusterProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesAksClusterProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesClusterPoolProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesClusterPoolProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesComputeProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesComputeProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesLogAnalyticsProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesLogAnalyticsProfile.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HDInsightSshPublicKey.Serialization.cs => ClusterPoolResourcePropertiesNetworkProfile.Serialization.cs} (52%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesNetworkProfile.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HDInsightPrivateLinkResourceData.Serialization.cs => ClusterPoolVersion.Serialization.cs} (57%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersion.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HDInsightPrivateEndpointConnectionListResult.Serialization.cs => ClusterPoolVersionsListResult.Serialization.cs} (61%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersionsListResult.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPrometheusProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPrometheusProfile.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HDInsightApplicationData.Serialization.cs => ClusterResizeData.Serialization.cs} (66%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterResizeData.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfig.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfig.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfigsProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfigsProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersion.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersion.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{ScriptActionsList.Serialization.cs => ClusterVersionsListResult.Serialization.cs} (69%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersionsListResult.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComparisonOperator.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComparisonRule.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComparisonRule.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeResourceDefinition.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeResourceDefinition.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityEndpoint.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityEndpoint.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HDInsightPrivateLinkResourceListResult.Serialization.cs => ConnectivityProfile.Serialization.cs} (50%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfileWeb.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfileWeb.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ContentEncoding.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/EncryptionInTransitProperties.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExcludedServicesConfig.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExcludedServicesConfig.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExecuteScriptActionContent.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExecuteScriptActionContent.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{QuotaInfo.Serialization.cs => FlinkCatalogOptions.Serialization.cs} (60%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkCatalogOptions.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkHiveCatalogOption.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkHiveCatalogOption.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkJobProperties.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkJobProperties.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkStorageProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkStorageProfile.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationEndpoint.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationEndpoint.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationHttpsEndpoint.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationHttpsEndpoint.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationProperties.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationProperties.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAsyncOperationResult.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAsyncOperationResult.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAsyncOperationState.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleCapacity.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfiguration.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfiguration.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfigurationUpdateContent.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfigurationUpdateContent.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleRecurrence.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleSchedule.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleSchedule.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleTimeAndCapacity.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleTimeAndCapacity.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionEnableContent.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionEnableContent.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionStatus.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionStatus.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorSelectedConfigurations.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorSelectedConfigurations.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorTableConfiguration.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingMeters.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingMeters.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingResources.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingResources.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingSpecsListResult.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingSpecsListResult.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightCapabilitiesResult.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightCapabilitiesResult.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterConfigurations.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterConfigurations.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateExtensionContent.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateExtensionContent.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateContent.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateContent.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateProperties.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateProperties.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateContent.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateContent.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateResult.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateResult.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDataDiskGroup.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDataDiskGroup.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDefinition.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDefinition.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDiskEncryptionContent.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDiskEncryptionContent.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterEnableClusterMonitoringContent.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterEnableClusterMonitoringContent.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterExtensionStatus.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterExtensionStatus.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterHostInfo.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterHostInfo.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterNetworkProperties.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterNetworkProperties.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterProperties.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterProperties.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterProvisioningState.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterResizeContent.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterResizeContent.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterRole.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterRole.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateGatewaySettingsContent.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateGatewaySettingsContent.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateIdentityCertificateContent.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateIdentityCertificateContent.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterValidationErrorInfo.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterValidationErrorInfo.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightComputeIsolationProperties.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightComputeIsolationProperties.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDayOfWeek.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskBillingMeters.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskBillingMeters.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightFilterMode.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightIPConfiguration.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightIPConfiguration.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLinuxOSProfile.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLinuxOSProfile.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLocalizedName.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityContent.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityResult.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightOSType.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionData.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionListResult.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionProvisioningState.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateIPAllocationMethod.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkConfiguration.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkConfiguration.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkConfigurationProvisioningState.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkResourceListResult.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkServiceConnectionState.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkServiceConnectionState.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkServiceConnectionStatus.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkState.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightResourceProviderConnection.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightRoleName.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSshPublicKey.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightStorageAccountInfo.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightStorageAccountInfo.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightTier.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightUsage.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightUsage.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionSpec.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionSpec.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionsCapability.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionsCapability.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVirtualNetworkProfile.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeCompatibilityFilterV2.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeCompatibilityFilterV2.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeProperty.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeProperty.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HardwareProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HiveCatalogOption.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HiveCatalogOption.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/IdentityProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/IdentityProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/JobType.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/JsonWebKeyEncryptionAlgorithm.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/KafkaRestProperties.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/KafkaRestProperties.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/KeyVaultObjectType.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/LoadBasedConfig.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/LoadBasedConfig.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HDInsightNameAvailabilityContent.Serialization.cs => NameAvailabilityContent.Serialization.cs} (83%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityContent.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HDInsightNameAvailabilityResult.Serialization.cs => NameAvailabilityResult.Serialization.cs} (81%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityResult.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NodeProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NodeProfile.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/OSProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ProvisioningStatus.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaCapability.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaCapability.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaInfo.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionalQuotaCapability.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionalQuotaCapability.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionsCapability.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionsCapability.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptAction.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptAction.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptActionDetail.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptActionDetail.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScaleActionType.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScalingRule.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScalingRule.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/Schedule.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/Schedule.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScheduleBasedConfig.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScheduleBasedConfig.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScheduleDay.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptAction.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptAction.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionHistoryList.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionSummary.Serialization.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionSummary.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionProfile.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionsList.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretReference.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretReference.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HDInsightAutoScaleRecurrence.Serialization.cs => SecretsProfile.Serialization.cs} (51%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretsProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResult.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResult.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{HDInsightLocalizedName.Serialization.cs => ServiceConfigListResultValueEntity.Serialization.cs} (59%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResultValueEntity.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigResult.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigResult.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceStatus.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceStatus.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkMetastoreSpec.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkMetastoreSpec.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugin.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugin.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugins.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugins.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshConnectivityEndpoint.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshConnectivityEndpoint.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/StorageProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoCoordinator.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoCoordinator.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoProfile.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoTelemetryConfig.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoTelemetryConfig.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugin.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugin.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugins.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugins.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/{OSProfile.Serialization.cs => TrinoUserTelemetry.Serialization.cs} (56%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserTelemetry.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoWorker.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoWorker.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UnknownClusterJobProperties.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UnknownClusterJobProperties.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UpdatableClusterProfile.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UpdatableClusterProfile.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UsagesListResult.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/WebConnectivityEndpoint.Serialization.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/WebConnectivityEndpoint.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ApplicationsRestOperations.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/AvailableClusterPoolVersionsRestOperations.cs create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/AvailableClusterVersionsRestOperations.cs rename sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/{ScriptExecutionHistoryRestOperations.cs => ClusterJobsRestOperations.cs} (52%) create mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ClusterPoolsRestOperations.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ConfigurationsRestOperations.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ExtensionsRestOperations.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ScriptActionsRestOperations.cs delete mode 100644 sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/VirtualMachinesRestOperations.cs diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/api/Azure.ResourceManager.HDInsight.netstandard2.0.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/api/Azure.ResourceManager.HDInsight.netstandard2.0.cs index b30fe93357c3..8860b5b1bb07 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/api/Azure.ResourceManager.HDInsight.netstandard2.0.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/api/Azure.ResourceManager.HDInsight.netstandard2.0.cs @@ -1,54 +1,62 @@ namespace Azure.ResourceManager.HDInsight { - public partial class HDInsightApplicationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected HDInsightApplicationCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string applicationName, Azure.ResourceManager.HDInsight.HDInsightApplicationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string applicationName, Azure.ResourceManager.HDInsight.HDInsightApplicationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string applicationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string applicationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string applicationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string applicationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public partial class ClusterPoolCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ClusterPoolCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string clusterPoolName, Azure.ResourceManager.HDInsight.ClusterPoolData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string clusterPoolName, Azure.ResourceManager.HDInsight.ClusterPoolData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string clusterPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string clusterPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string clusterPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string clusterPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class HDInsightApplicationData : Azure.ResourceManager.Models.ResourceData - { - public HDInsightApplicationData() { } - public Azure.ETag? ETag { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightApplicationProperties Properties { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public partial class ClusterPoolData : Azure.ResourceManager.Models.TrackedResourceData + { + public ClusterPoolData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.HDInsight.Models.ClusterPoolResourcePropertiesAksClusterProfile AksClusterProfile { get { throw null; } } + public string AksManagedResourceGroupName { get { throw null; } } + public string ClusterPoolVersion { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.ClusterPoolResourcePropertiesComputeProfile ComputeProfile { get { throw null; } set { } } + public string DeploymentId { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.ClusterPoolResourcePropertiesLogAnalyticsProfile LogAnalyticsProfile { get { throw null; } set { } } + public string ManagedResourceGroupName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier NetworkSubnetId { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.ProvisioningStatus? ProvisioningState { get { throw null; } } + public string Status { get { throw null; } } } - public partial class HDInsightApplicationResource : Azure.ResourceManager.ArmResource + public partial class ClusterPoolResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected HDInsightApplicationResource() { } - public virtual Azure.ResourceManager.HDInsight.HDInsightApplicationData Data { get { throw null; } } + protected ClusterPoolResource() { } + public virtual Azure.ResourceManager.HDInsight.ClusterPoolData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterPoolName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetAzureAsyncOperationStatus(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAzureAsyncOperationStatusAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.HDInsightApplicationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.HDInsightApplicationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetHDInsightCluster(string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetHDInsightClusterAsync(string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.HDInsight.HDInsightClusterCollection GetHDInsightClusters() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.ClusterPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.ClusterPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class HDInsightClusterCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected HDInsightClusterCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string clusterName, Azure.ResourceManager.HDInsight.Models.HDInsightClusterCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string clusterName, Azure.ResourceManager.HDInsight.Models.HDInsightClusterCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string clusterName, Azure.ResourceManager.HDInsight.HDInsightClusterData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string clusterName, Azure.ResourceManager.HDInsight.HDInsightClusterData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -62,10 +70,12 @@ protected HDInsightClusterCollection() { } public partial class HDInsightClusterData : Azure.ResourceManager.Models.TrackedResourceData { public HDInsightClusterData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ETag? ETag { get { throw null; } set { } } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightClusterProperties Properties { get { throw null; } set { } } - public System.Collections.Generic.IList Zones { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.ClusterProfile ClusterProfile { get { throw null; } set { } } + public string ClusterType { get { throw null; } set { } } + public System.Collections.Generic.IList ComputeNodes { get { throw null; } set { } } + public string DeploymentId { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.ProvisioningStatus? ProvisioningState { get { throw null; } } + public string Status { get { throw null; } } } public partial class HDInsightClusterResource : Azure.ResourceManager.ArmResource { @@ -75,1082 +85,673 @@ protected HDInsightClusterResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation CreateExtension(Azure.WaitUntil waitUntil, string extensionName, Azure.ResourceManager.HDInsight.Models.HDInsightClusterCreateExtensionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateExtensionAsync(Azure.WaitUntil waitUntil, string extensionName, Azure.ResourceManager.HDInsight.Models.HDInsightClusterCreateExtensionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteExtension(Azure.WaitUntil waitUntil, string extensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteExtensionAsync(Azure.WaitUntil waitUntil, string extensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteScriptAction(string scriptName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteScriptActionAsync(string scriptName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DisableAzureMonitorExtension(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DisableAzureMonitorExtensionAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DisableClusterMonitoringExtension(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DisableClusterMonitoringExtensionAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation EnableAzureMonitorExtension(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightAzureMonitorExtensionEnableContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task EnableAzureMonitorExtensionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightAzureMonitorExtensionEnableContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation EnableClusterMonitoringExtension(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightClusterEnableClusterMonitoringContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task EnableClusterMonitoringExtensionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightClusterEnableClusterMonitoringContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation ExecuteScriptActions(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.ExecuteScriptActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ExecuteScriptActionsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.ExecuteScriptActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetAsyncOperationStatus(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsyncOperationStatusAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetAzureMonitorExtensionStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAzureMonitorExtensionStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetClusterMonitoringExtensionStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetClusterMonitoringExtensionStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetConfiguration(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetConfiguration(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetConfigurationAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetConfigurationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetExtension(string extensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetExtensionAsync(string extensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetExtensionAsyncOperationStatus(string extensionName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetExtensionAsyncOperationStatusAsync(string extensionName, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetGatewaySettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetGatewaySettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetHDInsightApplication(string applicationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHDInsightApplicationAsync(string applicationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.HDInsight.HDInsightApplicationCollection GetHDInsightApplications() { throw null; } - public virtual Azure.Response GetHDInsightPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHDInsightPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.HDInsight.HDInsightPrivateEndpointConnectionCollection GetHDInsightPrivateEndpointConnections() { throw null; } - public virtual Azure.Response GetHDInsightPrivateLinkResource(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetHDInsightPrivateLinkResourceAsync(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.HDInsight.HDInsightPrivateLinkResourceCollection GetHDInsightPrivateLinkResources() { throw null; } - public virtual Azure.Response GetScriptActionExecutionAsyncOperationStatus(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetScriptActionExecutionAsyncOperationStatusAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetScriptActionExecutionDetail(string scriptExecutionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetScriptActionExecutionDetailAsync(string scriptExecutionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetScriptActions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetScriptActionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetScriptExecutionHistories(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetScriptExecutionHistoriesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVirtualMachineAsyncOperationStatus(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetVirtualMachineAsyncOperationStatusAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetVirtualMachineHosts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetVirtualMachineHostsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response PromoteScriptExecutionHistory(string scriptExecutionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task PromoteScriptExecutionHistoryAsync(string scriptExecutionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetClusterJobs(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetClusterJobsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetInstanceView(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetInstanceViewAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetInstanceViews(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetInstanceViewsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetServiceConfigs(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetServiceConfigsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Resize(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightRoleName roleName, Azure.ResourceManager.HDInsight.Models.HDInsightClusterResizeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ResizeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightRoleName roleName, Azure.ResourceManager.HDInsight.Models.HDInsightClusterResizeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation RestartVirtualMachineHosts(Azure.WaitUntil waitUntil, System.Collections.Generic.IEnumerable content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task RestartVirtualMachineHostsAsync(Azure.WaitUntil waitUntil, System.Collections.Generic.IEnumerable content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation RotateDiskEncryptionKey(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightClusterDiskEncryptionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task RotateDiskEncryptionKeyAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightClusterDiskEncryptionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Resize(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.ClusterResizeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ResizeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.ClusterResizeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RunJobClusterJob(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.ClusterJob clusterJob, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RunJobClusterJobAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.ClusterJob clusterJob, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Update(Azure.ResourceManager.HDInsight.Models.HDInsightClusterPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.HDInsight.Models.HDInsightClusterPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateAutoScaleConfiguration(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightRoleName roleName, Azure.ResourceManager.HDInsight.Models.HDInsightAutoScaleConfigurationUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateAutoScaleConfigurationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightRoleName roleName, Azure.ResourceManager.HDInsight.Models.HDInsightAutoScaleConfigurationUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateConfiguration(Azure.WaitUntil waitUntil, string configurationName, System.Collections.Generic.IDictionary clusterConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateConfigurationAsync(Azure.WaitUntil waitUntil, string configurationName, System.Collections.Generic.IDictionary clusterConfiguration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateGatewaySettings(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightClusterUpdateGatewaySettingsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateGatewaySettingsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightClusterUpdateGatewaySettingsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateIdentityCertificate(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightClusterUpdateIdentityCertificateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateIdentityCertificateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightClusterUpdateIdentityCertificateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightClusterPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.Models.HDInsightClusterPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public static partial class HDInsightExtensions { - public static Azure.Response CheckHDInsightNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.HDInsight.Models.HDInsightNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> CheckHDInsightNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.HDInsight.Models.HDInsightNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.HDInsight.HDInsightApplicationResource GetHDInsightApplicationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetHDInsightBillingSpecs(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetHDInsightBillingSpecsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetHDInsightCapabilities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetHDInsightCapabilitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetHDInsightCluster(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetHDInsightClusterAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response CheckHDInsightNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.HDInsight.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckHDInsightNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.HDInsight.Models.NameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetAvailableClusterPoolVersionsByLocation(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetAvailableClusterPoolVersionsByLocationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetAvailableClusterVersionsByLocation(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetAvailableClusterVersionsByLocationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetClusterPool(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string clusterPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetClusterPoolAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string clusterPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.HDInsight.ClusterPoolResource GetClusterPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.HDInsight.ClusterPoolCollection GetClusterPools(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetClusterPools(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetClusterPoolsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.HDInsight.HDInsightClusterResource GetHDInsightClusterResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.HDInsight.HDInsightClusterCollection GetHDInsightClusters(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetHDInsightClusters(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetHDInsightClustersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.HDInsight.HDInsightPrivateEndpointConnectionResource GetHDInsightPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.HDInsight.HDInsightPrivateLinkResource GetHDInsightPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Pageable GetHDInsightUsages(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetHDInsightUsagesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response ValidateHDInsightClusterCreation(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.HDInsight.Models.HDInsightClusterCreationValidateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> ValidateHDInsightClusterCreationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.HDInsight.Models.HDInsightClusterCreationValidateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class HDInsightPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected HDInsightPrivateEndpointConnectionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.HDInsight.HDInsightPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.HDInsight.HDInsightPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class HDInsightPrivateEndpointConnectionData : Azure.ResourceManager.Models.ResourceData - { - public HDInsightPrivateEndpointConnectionData(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionState connectionState) { } - public Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } - public string LinkIdentifier { get { throw null; } } - public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } - } - public partial class HDInsightPrivateEndpointConnectionResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected HDInsightPrivateEndpointConnectionResource() { } - public virtual Azure.ResourceManager.HDInsight.HDInsightPrivateEndpointConnectionData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string privateEndpointConnectionName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.HDInsightPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.HDInsight.HDInsightPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class HDInsightPrivateLinkResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected HDInsightPrivateLinkResource() { } - public virtual Azure.ResourceManager.HDInsight.HDInsightPrivateLinkResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string privateLinkResourceName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class HDInsightPrivateLinkResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected HDInsightPrivateLinkResourceCollection() { } - public virtual Azure.Response Exists(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class HDInsightPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData - { - public HDInsightPrivateLinkResourceData() { } - public string GroupId { get { throw null; } } - public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } - public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } } } namespace Azure.ResourceManager.HDInsight.Models { - public static partial class ArmHDInsightModelFactory - { - public static Azure.ResourceManager.HDInsight.HDInsightApplicationData HDInsightApplicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.HDInsight.Models.HDInsightApplicationProperties properties = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightApplicationHttpsEndpoint HDInsightApplicationHttpsEndpoint(System.Collections.Generic.IEnumerable accessModes = null, string endpointLocation = null, int? destinationPort = default(int?), int? publicPort = default(int?), System.Net.IPAddress privateIPAddress = null, string subDomainSuffix = null, bool? disableGatewayAuth = default(bool?)) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightApplicationProperties HDInsightApplicationProperties(System.Collections.Generic.IEnumerable computeRoles = null, System.Collections.Generic.IEnumerable installScriptActions = null, System.Collections.Generic.IEnumerable uninstallScriptActions = null, System.Collections.Generic.IEnumerable httpsEndpoints = null, System.Collections.Generic.IEnumerable sshEndpoints = null, string provisioningState = null, string applicationType = null, string applicationState = null, System.Collections.Generic.IEnumerable errors = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string marketplaceIdentifier = null, System.Collections.Generic.IEnumerable privateLinkConfigurations = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationResult HDInsightAsyncOperationResult(Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState? status = default(Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState?), Azure.ResponseError error = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightAzureMonitorExtensionStatus HDInsightAzureMonitorExtensionStatus(bool? isClusterMonitoringEnabled = default(bool?), string workspaceId = null, Azure.ResourceManager.HDInsight.Models.HDInsightAzureMonitorSelectedConfigurations selectedConfigurations = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightBillingMeters HDInsightBillingMeters(string meterParameter = null, string meter = null, string unit = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightBillingResources HDInsightBillingResources(Azure.Core.AzureLocation? region = default(Azure.Core.AzureLocation?), System.Collections.Generic.IEnumerable billingMeters = null, System.Collections.Generic.IEnumerable diskBillingMeters = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightBillingSpecsListResult HDInsightBillingSpecsListResult(System.Collections.Generic.IEnumerable vmSizes = null, System.Collections.Generic.IEnumerable vmSizesWithEncryptionAtHost = null, System.Collections.Generic.IEnumerable vmSizeFilters = null, System.Collections.Generic.IEnumerable vmSizeProperties = null, System.Collections.Generic.IEnumerable billingResources = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightCapabilitiesResult HDInsightCapabilitiesResult(System.Collections.Generic.IReadOnlyDictionary versions = null, System.Collections.Generic.IReadOnlyDictionary regions = null, System.Collections.Generic.IEnumerable features = null, Azure.ResourceManager.HDInsight.Models.QuotaCapability quota = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterAaddsDetail HDInsightClusterAaddsDetail(string domainName = null, bool? isInitialSyncComplete = default(bool?), bool? isLdapsEnabled = default(bool?), string ldapsPublicCertificateInBase64 = null, Azure.Core.ResourceIdentifier resourceId = null, Azure.Core.ResourceIdentifier subnetId = null, System.Guid? tenantId = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterConfigurations HDInsightClusterConfigurations(System.Collections.Generic.IReadOnlyDictionary> configurations = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterCreationValidateResult HDInsightClusterCreationValidateResult(System.Collections.Generic.IEnumerable validationErrors = null, System.Collections.Generic.IEnumerable validationWarnings = null, System.TimeSpan? estimatedCreationDuration = default(System.TimeSpan?), System.Collections.Generic.IEnumerable aaddsResourcesDetails = null) { throw null; } - public static Azure.ResourceManager.HDInsight.HDInsightClusterData HDInsightClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.HDInsight.Models.HDInsightClusterProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterDataDiskGroup HDInsightClusterDataDiskGroup(int? disksPerNode = default(int?), string storageAccountType = null, int? diskSizeInGB = default(int?)) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterExtensionStatus HDInsightClusterExtensionStatus(bool? isClusterMonitoringEnabled = default(bool?), string workspaceId = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterHostInfo HDInsightClusterHostInfo(string name = null, string fqdn = null, System.Uri effectiveDiskEncryptionKeyUri = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterProperties HDInsightClusterProperties(string clusterVersion = null, string clusterHdpVersion = null, Azure.ResourceManager.HDInsight.Models.HDInsightOSType? osType = default(Azure.ResourceManager.HDInsight.Models.HDInsightOSType?), Azure.ResourceManager.HDInsight.Models.HDInsightTier? tier = default(Azure.ResourceManager.HDInsight.Models.HDInsightTier?), string clusterId = null, Azure.ResourceManager.HDInsight.Models.HDInsightClusterDefinition clusterDefinition = null, Azure.ResourceManager.HDInsight.Models.KafkaRestProperties kafkaRestProperties = null, Azure.ResourceManager.HDInsight.Models.HDInsightSecurityProfile securityProfile = null, System.Collections.Generic.IEnumerable computeRoles = null, Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState? provisioningState = default(Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string clusterState = null, int? quotaInfoCoresUsed = default(int?), System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable connectivityEndpoints = null, Azure.ResourceManager.HDInsight.Models.HDInsightDiskEncryptionProperties diskEncryptionProperties = null, bool? isEncryptionInTransitEnabled = default(bool?), System.Collections.Generic.IEnumerable storageAccounts = null, string minSupportedTlsVersion = null, Azure.ResourceManager.HDInsight.Models.ExcludedServicesConfig excludedServicesConfig = null, Azure.ResourceManager.HDInsight.Models.HDInsightClusterNetworkProperties networkProperties = null, Azure.ResourceManager.HDInsight.Models.HDInsightComputeIsolationProperties computeIsolationProperties = null, System.Collections.Generic.IEnumerable privateLinkConfigurations = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterValidationErrorInfo HDInsightClusterValidationErrorInfo(string code = null, string message = null, string errorResource = null, System.Collections.Generic.IEnumerable messageArguments = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightDiskBillingMeters HDInsightDiskBillingMeters(string diskRpMeter = null, string sku = null, Azure.ResourceManager.HDInsight.Models.HDInsightTier? tier = default(Azure.ResourceManager.HDInsight.Models.HDInsightTier?)) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightIPConfiguration HDInsightIPConfiguration(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState? provisioningState = default(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState?), bool? isPrimary = default(bool?), System.Net.IPAddress privateIPAddress = null, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod? privateIPAllocationMethod = default(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod?), Azure.Core.ResourceIdentifier subnetId = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightLocalizedName HDInsightLocalizedName(string value = null, string localizedValue = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightNameAvailabilityResult HDInsightNameAvailabilityResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } - public static Azure.ResourceManager.HDInsight.HDInsightPrivateEndpointConnectionData HDInsightPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionState connectionState = null, string linkIdentifier = null, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState?)) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfiguration HDInsightPrivateLinkConfiguration(string id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), string groupId = null, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState? provisioningState = default(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState?), System.Collections.Generic.IEnumerable ipConfigurations = null) { throw null; } - public static Azure.ResourceManager.HDInsight.HDInsightPrivateLinkResourceData HDInsightPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightUsage HDInsightUsage(string unit = null, long? currentValue = default(long?), long? limit = default(long?), Azure.ResourceManager.HDInsight.Models.HDInsightLocalizedName name = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightVersionsCapability HDInsightVersionsCapability(System.Collections.Generic.IEnumerable available = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightVersionSpec HDInsightVersionSpec(string friendlyName = null, string displayName = null, bool? isDefault = default(bool?), System.Collections.Generic.IReadOnlyDictionary componentVersions = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightVmSizeCompatibilityFilterV2 HDInsightVmSizeCompatibilityFilterV2(Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode? filterMode = default(Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode?), System.Collections.Generic.IEnumerable regions = null, System.Collections.Generic.IEnumerable clusterFlavors = null, System.Collections.Generic.IEnumerable nodeTypes = null, System.Collections.Generic.IEnumerable clusterVersions = null, System.Collections.Generic.IEnumerable osType = null, System.Collections.Generic.IEnumerable vmSizes = null, string espApplied = null, string isComputeIsolationSupported = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightVmSizeProperty HDInsightVmSizeProperty(string name = null, int? cores = default(int?), string dataDiskStorageTier = null, string label = null, long? maxDataDiskCount = default(long?), long? memoryInMB = default(long?), bool? isSupportedByVirtualMachines = default(bool?), bool? isSupportedByWebWorkerRoles = default(bool?), long? virtualMachineResourceDiskSizeInMB = default(long?), long? webWorkerResourceDiskSizeInMB = default(long?)) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.QuotaCapability QuotaCapability(long? coresUsed = default(long?), long? maxCoresAllowed = default(long?), System.Collections.Generic.IEnumerable regionalQuotas = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.RegionalQuotaCapability RegionalQuotaCapability(Azure.Core.AzureLocation? region = default(Azure.Core.AzureLocation?), long? coresUsed = default(long?), long? coresAvailable = default(long?)) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.RegionsCapability RegionsCapability(System.Collections.Generic.IEnumerable available = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.RuntimeScriptAction RuntimeScriptAction(string name = null, System.Uri uri = null, string parameters = null, System.Collections.Generic.IEnumerable roles = null, string applicationName = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.RuntimeScriptActionDetail RuntimeScriptActionDetail(string name = null, System.Uri uri = null, string parameters = null, System.Collections.Generic.IEnumerable roles = null, string applicationName = null, long? scriptExecutionId = default(long?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string status = null, string operation = null, System.Collections.Generic.IEnumerable executionSummary = null, string debugInformation = null) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.ScriptActionExecutionSummary ScriptActionExecutionSummary(string status = null, int? instanceCount = default(int?)) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AuthenticationDirectoryType : System.IEquatable + public readonly partial struct Action : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public AuthenticationDirectoryType(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType ActiveDirectory { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType other) { throw null; } + public Action(string value) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.Action Cancel { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.Action Delete { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.Action ListSavepoint { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.Action NEW { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.Action Savepoint { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.Action Start { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.Action StatelessUpdate { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.Action Stop { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.Action Update { get { throw null; } } + public bool Equals(Azure.ResourceManager.HDInsight.Models.Action other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType left, Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType left, Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.HDInsight.Models.Action left, Azure.ResourceManager.HDInsight.Models.Action right) { throw null; } + public static implicit operator Azure.ResourceManager.HDInsight.Models.Action (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.HDInsight.Models.Action left, Azure.ResourceManager.HDInsight.Models.Action right) { throw null; } public override string ToString() { throw null; } } - public partial class ClientGroupInfo + public partial class AksClusterProfile { - public ClientGroupInfo() { } - public string GroupId { get { throw null; } set { } } - public string GroupName { get { throw null; } set { } } + internal AksClusterProfile() { } + public Azure.ResourceManager.HDInsight.Models.AksClusterProfileAksClusterAgentPoolIdentityProfile AksClusterAgentPoolIdentityProfile { get { throw null; } } + public Azure.Core.ResourceIdentifier AksClusterResourceId { get { throw null; } } + public string AksVersion { get { throw null; } } } - public partial class ConnectivityEndpoint + public partial class AksClusterProfileAksClusterAgentPoolIdentityProfile : Azure.ResourceManager.HDInsight.Models.IdentityProfile { - public ConnectivityEndpoint() { } - public string EndpointLocation { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public int? Port { get { throw null; } set { } } - public System.Net.IPAddress PrivateIPAddress { get { throw null; } set { } } - public string Protocol { get { throw null; } set { } } - } - public partial class ExcludedServicesConfig - { - public ExcludedServicesConfig() { } - public string ExcludedServicesConfigId { get { throw null; } set { } } - public string ExcludedServicesList { get { throw null; } set { } } - } - public partial class ExecuteScriptActionContent - { - public ExecuteScriptActionContent(bool persistOnSuccess) { } - public bool PersistOnSuccess { get { throw null; } } - public System.Collections.Generic.IList ScriptActions { get { throw null; } } - } - public partial class HDInsightApplicationEndpoint - { - public HDInsightApplicationEndpoint() { } - public int? DestinationPort { get { throw null; } set { } } - public string EndpointLocation { get { throw null; } set { } } - public System.Net.IPAddress PrivateIPAddress { get { throw null; } set { } } - public int? PublicPort { get { throw null; } set { } } - } - public partial class HDInsightApplicationHttpsEndpoint - { - public HDInsightApplicationHttpsEndpoint() { } - public System.Collections.Generic.IList AccessModes { get { throw null; } } - public int? DestinationPort { get { throw null; } set { } } - public bool? DisableGatewayAuth { get { throw null; } set { } } - public string EndpointLocation { get { throw null; } } - public System.Net.IPAddress PrivateIPAddress { get { throw null; } set { } } - public int? PublicPort { get { throw null; } } - public string SubDomainSuffix { get { throw null; } set { } } - } - public partial class HDInsightApplicationProperties - { - public HDInsightApplicationProperties() { } - public string ApplicationState { get { throw null; } } - public string ApplicationType { get { throw null; } set { } } - public System.Collections.Generic.IList ComputeRoles { get { throw null; } } - public System.DateTimeOffset? CreatedOn { get { throw null; } } - public System.Collections.Generic.IList Errors { get { throw null; } } - public System.Collections.Generic.IList HttpsEndpoints { get { throw null; } } - public System.Collections.Generic.IList InstallScriptActions { get { throw null; } } - public string MarketplaceIdentifier { get { throw null; } } - public System.Collections.Generic.IList PrivateLinkConfigurations { get { throw null; } } - public string ProvisioningState { get { throw null; } } - public System.Collections.Generic.IList SshEndpoints { get { throw null; } } - public System.Collections.Generic.IList UninstallScriptActions { get { throw null; } } - } - public partial class HDInsightAsyncOperationResult - { - internal HDInsightAsyncOperationResult() { } - public Azure.ResponseError Error { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState? Status { get { throw null; } } + public AksClusterProfileAksClusterAgentPoolIdentityProfile(Azure.Core.ResourceIdentifier msiResourceId, string msiClientId, string msiObjectId) : base (default(Azure.Core.ResourceIdentifier), default(string), default(string)) { } + } + public static partial class ArmHDInsightModelFactory + { + public static Azure.ResourceManager.HDInsight.Models.AksClusterProfile AksClusterProfile(Azure.Core.ResourceIdentifier aksClusterResourceId = null, Azure.ResourceManager.HDInsight.Models.AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile = null, string aksVersion = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ClusterComponentsItem ClusterComponentsItem(string name = null, string version = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ClusterInstanceViewPropertiesStatus ClusterInstanceViewPropertiesStatus(string ready = null, string reason = null, string message = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ClusterInstanceViewResult ClusterInstanceViewResult(string name = null, Azure.ResourceManager.HDInsight.Models.ClusterInstanceViewPropertiesStatus status = null, System.Collections.Generic.IEnumerable serviceStatuses = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ClusterInstanceViewStatus ClusterInstanceViewStatus(string ready = null, string reason = null, string message = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ClusterJob ClusterJob(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HDInsight.Models.ClusterJobProperties properties = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ClusterPoolComputeProfile ClusterPoolComputeProfile(string vmSize = null, int? count = default(int?)) { throw null; } + public static Azure.ResourceManager.HDInsight.ClusterPoolData ClusterPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.HDInsight.Models.ProvisioningStatus? provisioningState = default(Azure.ResourceManager.HDInsight.Models.ProvisioningStatus?), string deploymentId = null, string managedResourceGroupName = null, string aksManagedResourceGroupName = null, string clusterPoolVersion = null, Azure.ResourceManager.HDInsight.Models.ClusterPoolResourcePropertiesComputeProfile computeProfile = null, Azure.ResourceManager.HDInsight.Models.ClusterPoolResourcePropertiesAksClusterProfile aksClusterProfile = null, Azure.Core.ResourceIdentifier networkSubnetId = null, Azure.ResourceManager.HDInsight.Models.ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile = null, string status = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ClusterPoolResourcePropertiesAksClusterProfile ClusterPoolResourcePropertiesAksClusterProfile(Azure.Core.ResourceIdentifier aksClusterResourceId = null, Azure.ResourceManager.HDInsight.Models.AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile = null, string aksVersion = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ClusterPoolResourcePropertiesComputeProfile ClusterPoolResourcePropertiesComputeProfile(string vmSize = null, int? count = default(int?)) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ClusterPoolVersion ClusterPoolVersion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string clusterPoolVersionValue = null, string aksVersion = null, bool? isPreview = default(bool?)) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ClusterProfile ClusterProfile(string clusterVersion = null, string ossVersion = null, System.Collections.Generic.IEnumerable components = null, Azure.ResourceManager.HDInsight.Models.IdentityProfile identityProfile = null, Azure.ResourceManager.HDInsight.Models.AuthorizationProfile authorizationProfile = null, Azure.ResourceManager.HDInsight.Models.SecretsProfile secretsProfile = null, System.Collections.Generic.IEnumerable serviceConfigsProfiles = null, Azure.ResourceManager.HDInsight.Models.ConnectivityProfile connectivityProfile = null, Azure.ResourceManager.HDInsight.Models.ClusterLogAnalyticsProfile logAnalyticsProfile = null, bool? prometheusProfileEnabled = default(bool?), Azure.ResourceManager.HDInsight.Models.SshProfile sshProfile = null, Azure.ResourceManager.HDInsight.Models.AutoScaleProfile autoScaleProfile = null, System.Collections.Generic.IDictionary kafkaProfile = null, Azure.ResourceManager.HDInsight.Models.TrinoProfile trinoProfile = null, System.Collections.Generic.IDictionary llapProfile = null, Azure.ResourceManager.HDInsight.Models.FlinkProfile flinkProfile = null, Azure.ResourceManager.HDInsight.Models.SparkProfile sparkProfile = null, System.Collections.Generic.IDictionary stubProfile = null, System.Collections.Generic.IEnumerable scriptActionProfiles = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ClusterResizeData ClusterResizeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), int? targetWorkerNodeCount = default(int?)) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ClusterVersion ClusterVersion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string clusterType = null, string clusterVersionValue = null, string ossVersion = null, string clusterPoolVersion = null, bool? isPreview = default(bool?), System.Collections.Generic.IEnumerable components = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ConnectivityProfile ConnectivityProfile(string webFqdn = null, System.Collections.Generic.IEnumerable ssh = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.FlinkJobProperties FlinkJobProperties(string jobName = null, string jobJarDirectory = null, string jarName = null, string entryClass = null, string args = null, string savePointName = null, Azure.ResourceManager.HDInsight.Models.Action? action = default(Azure.ResourceManager.HDInsight.Models.Action?), System.Collections.Generic.IDictionary flinkConfiguration = null, string jobId = null, string status = null, string jobOutput = null, string actionResult = null, string lastSavePoint = null) { throw null; } + public static Azure.ResourceManager.HDInsight.HDInsightClusterData HDInsightClusterData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.HDInsight.Models.ProvisioningStatus? provisioningState = default(Azure.ResourceManager.HDInsight.Models.ProvisioningStatus?), string clusterType = null, string deploymentId = null, System.Collections.Generic.IEnumerable computeNodes = null, Azure.ResourceManager.HDInsight.Models.ClusterProfile clusterProfile = null, string status = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterPatch HDInsightClusterPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.HDInsight.Models.UpdatableClusterProfile clusterProfile = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.NameAvailabilityResult NameAvailabilityResult(bool? nameAvailable = default(bool?), string reason = null, string message = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ServiceConfigListResultValueEntity ServiceConfigListResultValueEntity(string value = null, string description = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ServiceConfigResult ServiceConfigResult(string serviceName = null, string fileName = null, string content = null, string componentName = null, string serviceConfigListResultPropertiesType = null, string path = null, System.Collections.Generic.IReadOnlyDictionary customKeys = null, System.Collections.Generic.IReadOnlyDictionary defaultKeys = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ServiceStatus ServiceStatus(string kind = null, string ready = null, string message = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.SshConnectivityEndpoint SshConnectivityEndpoint(string endpoint = null) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.SshProfile SshProfile(int count = 0, string podPrefix = null) { throw null; } + } + public partial class AuthorizationProfile + { + public AuthorizationProfile() { } + public System.Collections.Generic.IList GroupIds { get { throw null; } } + public System.Collections.Generic.IList UserIds { get { throw null; } } + } + public partial class AutoScaleProfile + { + public AutoScaleProfile(bool enabled) { } + public Azure.ResourceManager.HDInsight.Models.AutoScaleType? AutoScaleType { get { throw null; } set { } } + public bool Enabled { get { throw null; } set { } } + public int? GracefulDecommissionTimeout { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.LoadBasedConfig LoadBasedConfig { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.ScheduleBasedConfig ScheduleBasedConfig { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightAsyncOperationState : System.IEquatable + public readonly partial struct AutoScaleType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public HDInsightAsyncOperationState(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState Failed { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState InProgress { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState other) { throw null; } + public AutoScaleType(string value) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.AutoScaleType LoadBased { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.AutoScaleType ScheduleBased { get { throw null; } } + public bool Equals(Azure.ResourceManager.HDInsight.Models.AutoScaleType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState left, Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState left, Azure.ResourceManager.HDInsight.Models.HDInsightAsyncOperationState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.HDInsight.Models.AutoScaleType left, Azure.ResourceManager.HDInsight.Models.AutoScaleType right) { throw null; } + public static implicit operator Azure.ResourceManager.HDInsight.Models.AutoScaleType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.HDInsight.Models.AutoScaleType left, Azure.ResourceManager.HDInsight.Models.AutoScaleType right) { throw null; } public override string ToString() { throw null; } } - public partial class HDInsightAutoScaleCapacity - { - public HDInsightAutoScaleCapacity() { } - public int? MaxInstanceCount { get { throw null; } set { } } - public int? MinInstanceCount { get { throw null; } set { } } - } - public partial class HDInsightAutoScaleConfiguration - { - public HDInsightAutoScaleConfiguration() { } - public Azure.ResourceManager.HDInsight.Models.HDInsightAutoScaleCapacity Capacity { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightAutoScaleRecurrence Recurrence { get { throw null; } set { } } - } - public partial class HDInsightAutoScaleConfigurationUpdateContent - { - public HDInsightAutoScaleConfigurationUpdateContent() { } - public Azure.ResourceManager.HDInsight.Models.HDInsightAutoScaleConfiguration AutoScale { get { throw null; } set { } } - } - public partial class HDInsightAutoScaleRecurrence + public partial class ClusterComponentsItem { - public HDInsightAutoScaleRecurrence() { } - public System.Collections.Generic.IList Schedule { get { throw null; } } - public string TimeZone { get { throw null; } set { } } - } - public partial class HDInsightAutoScaleSchedule - { - public HDInsightAutoScaleSchedule() { } - public System.Collections.Generic.IList Days { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.HDInsightAutoScaleTimeAndCapacity TimeAndCapacity { get { throw null; } set { } } - } - public partial class HDInsightAutoScaleTimeAndCapacity - { - public HDInsightAutoScaleTimeAndCapacity() { } - public int? MaxInstanceCount { get { throw null; } set { } } - public int? MinInstanceCount { get { throw null; } set { } } - public string Time { get { throw null; } set { } } - } - public partial class HDInsightAzureMonitorExtensionEnableContent - { - public HDInsightAzureMonitorExtensionEnableContent() { } - public string PrimaryKey { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightAzureMonitorSelectedConfigurations SelectedConfigurations { get { throw null; } set { } } - public string WorkspaceId { get { throw null; } set { } } + internal ClusterComponentsItem() { } + public string Name { get { throw null; } } + public string Version { get { throw null; } } } - public partial class HDInsightAzureMonitorExtensionStatus + public partial class ClusterConfigFile { - internal HDInsightAzureMonitorExtensionStatus() { } - public bool? IsClusterMonitoringEnabled { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.HDInsightAzureMonitorSelectedConfigurations SelectedConfigurations { get { throw null; } } - public string WorkspaceId { get { throw null; } } + public ClusterConfigFile(string fileName) { } + public string Content { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.ContentEncoding? Encoding { get { throw null; } set { } } + public string FileName { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Values { get { throw null; } } } - public partial class HDInsightAzureMonitorSelectedConfigurations + public partial class ClusterInstanceViewPropertiesStatus : Azure.ResourceManager.HDInsight.Models.ClusterInstanceViewStatus { - public HDInsightAzureMonitorSelectedConfigurations() { } - public string ConfigurationVersion { get { throw null; } set { } } - public System.Collections.Generic.IDictionary GlobalConfigurations { get { throw null; } } - public System.Collections.Generic.IList TableList { get { throw null; } } + internal ClusterInstanceViewPropertiesStatus() { } } - public partial class HDInsightAzureMonitorTableConfiguration + public partial class ClusterInstanceViewResult { - public HDInsightAzureMonitorTableConfiguration() { } - public string Name { get { throw null; } set { } } + internal ClusterInstanceViewResult() { } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ServiceStatuses { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.ClusterInstanceViewPropertiesStatus Status { get { throw null; } } } - public partial class HDInsightBillingMeters + public partial class ClusterInstanceViewStatus { - internal HDInsightBillingMeters() { } - public string Meter { get { throw null; } } - public string MeterParameter { get { throw null; } } - public string Unit { get { throw null; } } + internal ClusterInstanceViewStatus() { } + public string Message { get { throw null; } } + public string Ready { get { throw null; } } + public string Reason { get { throw null; } } } - public partial class HDInsightBillingResources + public partial class ClusterJob : Azure.ResourceManager.Models.ResourceData { - internal HDInsightBillingResources() { } - public System.Collections.Generic.IReadOnlyList BillingMeters { get { throw null; } } - public System.Collections.Generic.IReadOnlyList DiskBillingMeters { get { throw null; } } - public Azure.Core.AzureLocation? Region { get { throw null; } } + public ClusterJob(Azure.ResourceManager.HDInsight.Models.ClusterJobProperties properties) { } + public Azure.ResourceManager.HDInsight.Models.ClusterJobProperties Properties { get { throw null; } set { } } } - public partial class HDInsightBillingSpecsListResult + public abstract partial class ClusterJobProperties { - internal HDInsightBillingSpecsListResult() { } - public System.Collections.Generic.IReadOnlyList BillingResources { get { throw null; } } - public System.Collections.Generic.IReadOnlyList VmSizeFilters { get { throw null; } } - public System.Collections.Generic.IReadOnlyList VmSizeProperties { get { throw null; } } - public System.Collections.Generic.IReadOnlyList VmSizes { get { throw null; } } - public System.Collections.Generic.IReadOnlyList VmSizesWithEncryptionAtHost { get { throw null; } } + protected ClusterJobProperties() { } } - public partial class HDInsightCapabilitiesResult + public partial class ClusterLogAnalyticsApplicationLogs { - internal HDInsightCapabilitiesResult() { } - public System.Collections.Generic.IReadOnlyList Features { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.QuotaCapability Quota { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Regions { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Versions { get { throw null; } } + public ClusterLogAnalyticsApplicationLogs() { } + public bool? StdErrorEnabled { get { throw null; } set { } } + public bool? StdOutEnabled { get { throw null; } set { } } } - public partial class HDInsightClusterAaddsDetail + public partial class ClusterLogAnalyticsProfile { - internal HDInsightClusterAaddsDetail() { } - public string DomainName { get { throw null; } } - public bool? IsInitialSyncComplete { get { throw null; } } - public bool? IsLdapsEnabled { get { throw null; } } - public string LdapsPublicCertificateInBase64 { get { throw null; } } - public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } - public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } } - public System.Guid? TenantId { get { throw null; } } + public ClusterLogAnalyticsProfile(bool enabled) { } + public Azure.ResourceManager.HDInsight.Models.ClusterLogAnalyticsApplicationLogs ApplicationLogs { get { throw null; } set { } } + public bool Enabled { get { throw null; } set { } } + public bool? MetricsEnabled { get { throw null; } set { } } } - public partial class HDInsightClusterConfigurations + public partial class ClusterPoolComputeProfile { - internal HDInsightClusterConfigurations() { } - public System.Collections.Generic.IReadOnlyDictionary> Configurations { get { throw null; } } + public ClusterPoolComputeProfile(string vmSize) { } + public int? Count { get { throw null; } } + public string VmSize { get { throw null; } set { } } } - public partial class HDInsightClusterCreateExtensionContent + public partial class ClusterPoolLogAnalyticsProfile { - public HDInsightClusterCreateExtensionContent() { } - public string PrimaryKey { get { throw null; } set { } } - public string WorkspaceId { get { throw null; } set { } } + public ClusterPoolLogAnalyticsProfile(bool enabled) { } + public bool Enabled { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } } } - public partial class HDInsightClusterCreateOrUpdateContent + public partial class ClusterPoolPatch { - public HDInsightClusterCreateOrUpdateContent() { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightClusterCreateOrUpdateProperties Properties { get { throw null; } set { } } + public ClusterPoolPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } - public System.Collections.Generic.IList Zones { get { throw null; } } - } - public partial class HDInsightClusterCreateOrUpdateProperties - { - public HDInsightClusterCreateOrUpdateProperties() { } - public Azure.ResourceManager.HDInsight.Models.HDInsightClusterDefinition ClusterDefinition { get { throw null; } set { } } - public string ClusterVersion { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightComputeIsolationProperties ComputeIsolationProperties { get { throw null; } set { } } - public System.Collections.Generic.IList ComputeRoles { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.HDInsightDiskEncryptionProperties DiskEncryptionProperties { get { throw null; } set { } } - public bool? IsEncryptionInTransitEnabled { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.KafkaRestProperties KafkaRestProperties { get { throw null; } set { } } - public string MinSupportedTlsVersion { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightClusterNetworkProperties NetworkProperties { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightOSType? OSType { get { throw null; } set { } } - public System.Collections.Generic.IList PrivateLinkConfigurations { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.HDInsightSecurityProfile SecurityProfile { get { throw null; } set { } } - public System.Collections.Generic.IList StorageAccounts { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.HDInsightTier? Tier { get { throw null; } set { } } - } - public partial class HDInsightClusterCreationValidateContent : Azure.ResourceManager.HDInsight.Models.HDInsightClusterCreateOrUpdateContent - { - public HDInsightClusterCreationValidateContent() { } - public string ClusterCreateRequestValidationParametersType { get { throw null; } set { } } - public bool? FetchAaddsResource { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public System.Guid? TenantId { get { throw null; } set { } } - } - public partial class HDInsightClusterCreationValidateResult - { - internal HDInsightClusterCreationValidateResult() { } - public System.Collections.Generic.IReadOnlyList AaddsResourcesDetails { get { throw null; } } - public System.TimeSpan? EstimatedCreationDuration { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ValidationErrors { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ValidationWarnings { get { throw null; } } - } - public partial class HDInsightClusterDataDiskGroup - { - public HDInsightClusterDataDiskGroup() { } - public int? DiskSizeInGB { get { throw null; } } - public int? DisksPerNode { get { throw null; } set { } } - public string StorageAccountType { get { throw null; } } - } - public partial class HDInsightClusterDefinition - { - public HDInsightClusterDefinition() { } - public string Blueprint { get { throw null; } set { } } - public System.Collections.Generic.IDictionary ComponentVersion { get { throw null; } } - public System.BinaryData Configurations { get { throw null; } set { } } - public string Kind { get { throw null; } set { } } } - public partial class HDInsightClusterDiskEncryptionContent + public partial class ClusterPoolResourcePropertiesAksClusterProfile : Azure.ResourceManager.HDInsight.Models.AksClusterProfile { - public HDInsightClusterDiskEncryptionContent() { } - public string KeyName { get { throw null; } set { } } - public string KeyVersion { get { throw null; } set { } } - public System.Uri VaultUri { get { throw null; } set { } } - } - public partial class HDInsightClusterEnableClusterMonitoringContent - { - public HDInsightClusterEnableClusterMonitoringContent() { } - public string PrimaryKey { get { throw null; } set { } } - public string WorkspaceId { get { throw null; } set { } } - } - public partial class HDInsightClusterExtensionStatus - { - internal HDInsightClusterExtensionStatus() { } - public bool? IsClusterMonitoringEnabled { get { throw null; } } - public string WorkspaceId { get { throw null; } } - } - public partial class HDInsightClusterGatewaySettings - { - internal HDInsightClusterGatewaySettings() { } - public bool? IsCredentialEnabled { get { throw null; } } - public string Password { get { throw null; } } - public string UserName { get { throw null; } } + internal ClusterPoolResourcePropertiesAksClusterProfile() { } } - public partial class HDInsightClusterHostInfo + public partial class ClusterPoolResourcePropertiesComputeProfile : Azure.ResourceManager.HDInsight.Models.ClusterPoolComputeProfile { - internal HDInsightClusterHostInfo() { } - public System.Uri EffectiveDiskEncryptionKeyUri { get { throw null; } } - public string Fqdn { get { throw null; } } - public string Name { get { throw null; } } + public ClusterPoolResourcePropertiesComputeProfile(string vmSize) : base (default(string)) { } } - public partial class HDInsightClusterNetworkProperties + public partial class ClusterPoolResourcePropertiesLogAnalyticsProfile : Azure.ResourceManager.HDInsight.Models.ClusterPoolLogAnalyticsProfile { - public HDInsightClusterNetworkProperties() { } - public Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkState? PrivateLink { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightResourceProviderConnection? ResourceProviderConnection { get { throw null; } set { } } + public ClusterPoolResourcePropertiesLogAnalyticsProfile(bool enabled) : base (default(bool)) { } } - public partial class HDInsightClusterPatch + public partial class ClusterPoolVersion : Azure.ResourceManager.Models.ResourceData { - public HDInsightClusterPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } set { } } + public ClusterPoolVersion() { } + public string AksVersion { get { throw null; } set { } } + public string ClusterPoolVersionValue { get { throw null; } set { } } + public bool? IsPreview { get { throw null; } set { } } } - public partial class HDInsightClusterProperties + public partial class ClusterProfile { - public HDInsightClusterProperties(Azure.ResourceManager.HDInsight.Models.HDInsightClusterDefinition clusterDefinition) { } - public Azure.ResourceManager.HDInsight.Models.HDInsightClusterDefinition ClusterDefinition { get { throw null; } set { } } - public string ClusterHdpVersion { get { throw null; } set { } } - public string ClusterId { get { throw null; } set { } } - public string ClusterState { get { throw null; } set { } } + public ClusterProfile(string clusterVersion, string ossVersion, Azure.ResourceManager.HDInsight.Models.IdentityProfile identityProfile, Azure.ResourceManager.HDInsight.Models.AuthorizationProfile authorizationProfile) { } + public Azure.ResourceManager.HDInsight.Models.AuthorizationProfile AuthorizationProfile { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.AutoScaleProfile AutoScaleProfile { get { throw null; } set { } } public string ClusterVersion { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightComputeIsolationProperties ComputeIsolationProperties { get { throw null; } set { } } - public System.Collections.Generic.IList ComputeRoles { get { throw null; } } - public System.Collections.Generic.IList ConnectivityEndpoints { get { throw null; } } - public System.DateTimeOffset? CreatedOn { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightDiskEncryptionProperties DiskEncryptionProperties { get { throw null; } set { } } - public System.Collections.Generic.IList Errors { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.ExcludedServicesConfig ExcludedServicesConfig { get { throw null; } set { } } - public bool? IsEncryptionInTransitEnabled { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.KafkaRestProperties KafkaRestProperties { get { throw null; } set { } } - public string MinSupportedTlsVersion { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightClusterNetworkProperties NetworkProperties { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightOSType? OSType { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } - public System.Collections.Generic.IList PrivateLinkConfigurations { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState? ProvisioningState { get { throw null; } set { } } - public int? QuotaInfoCoresUsed { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightSecurityProfile SecurityProfile { get { throw null; } set { } } - public System.Collections.Generic.IList StorageAccounts { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.HDInsightTier? Tier { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Components { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.ConnectivityProfile ConnectivityProfile { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.FlinkProfile FlinkProfile { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.IdentityProfile IdentityProfile { get { throw null; } set { } } + public System.Collections.Generic.IDictionary KafkaProfile { get { throw null; } } + public System.Collections.Generic.IDictionary LlapProfile { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.ClusterLogAnalyticsProfile LogAnalyticsProfile { get { throw null; } set { } } + public string OssVersion { get { throw null; } set { } } + public bool? PrometheusProfileEnabled { get { throw null; } set { } } + public System.Collections.Generic.IList ScriptActionProfiles { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.SecretsProfile SecretsProfile { get { throw null; } set { } } + public System.Collections.Generic.IList ServiceConfigsProfiles { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.SparkProfile SparkProfile { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.SshProfile SshProfile { get { throw null; } set { } } + public System.Collections.Generic.IDictionary StubProfile { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.TrinoProfile TrinoProfile { get { throw null; } set { } } + } + public partial class ClusterResizeData : Azure.ResourceManager.Models.TrackedResourceData + { + public ClusterResizeData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public int? TargetWorkerNodeCount { get { throw null; } set { } } + } + public partial class ClusterServiceConfig + { + public ClusterServiceConfig(string component, System.Collections.Generic.IEnumerable files) { } + public string Component { get { throw null; } set { } } + public System.Collections.Generic.IList Files { get { throw null; } } + } + public partial class ClusterServiceConfigsProfile + { + public ClusterServiceConfigsProfile(string serviceName, System.Collections.Generic.IEnumerable configs) { } + public System.Collections.Generic.IList Configs { get { throw null; } } + public string ServiceName { get { throw null; } set { } } + } + public partial class ClusterVersion : Azure.ResourceManager.Models.ResourceData + { + public ClusterVersion() { } + public string ClusterPoolVersion { get { throw null; } set { } } + public string ClusterType { get { throw null; } set { } } + public string ClusterVersionValue { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Components { get { throw null; } } + public bool? IsPreview { get { throw null; } set { } } + public string OssVersion { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightClusterProvisioningState : System.IEquatable + public readonly partial struct ComparisonOperator : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public HDInsightClusterProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState InProgress { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState other) { throw null; } + public ComparisonOperator(string value) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ComparisonOperator GreaterThan { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ComparisonOperator GreaterThanOrEqual { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ComparisonOperator LessThan { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ComparisonOperator LessThanOrEqual { get { throw null; } } + public bool Equals(Azure.ResourceManager.HDInsight.Models.ComparisonOperator other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState left, Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState left, Azure.ResourceManager.HDInsight.Models.HDInsightClusterProvisioningState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.HDInsight.Models.ComparisonOperator left, Azure.ResourceManager.HDInsight.Models.ComparisonOperator right) { throw null; } + public static implicit operator Azure.ResourceManager.HDInsight.Models.ComparisonOperator (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.HDInsight.Models.ComparisonOperator left, Azure.ResourceManager.HDInsight.Models.ComparisonOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class HDInsightClusterResizeContent - { - public HDInsightClusterResizeContent() { } - public int? TargetInstanceCount { get { throw null; } set { } } - } - public partial class HDInsightClusterRole + public partial class ComparisonRule { - public HDInsightClusterRole() { } - public Azure.ResourceManager.HDInsight.Models.HDInsightAutoScaleConfiguration AutoScaleConfiguration { get { throw null; } set { } } - public System.Collections.Generic.IList DataDisksGroups { get { throw null; } } - public bool? EncryptDataDisks { get { throw null; } set { } } - public string HardwareVmSize { get { throw null; } set { } } - public int? MinInstanceCount { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightLinuxOSProfile OSLinuxProfile { get { throw null; } set { } } - public System.Collections.Generic.IList ScriptActions { get { throw null; } } - public int? TargetInstanceCount { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightVirtualNetworkProfile VirtualNetworkProfile { get { throw null; } set { } } - public string VmGroupName { get { throw null; } set { } } + public ComparisonRule(Azure.ResourceManager.HDInsight.Models.ComparisonOperator @operator, float threshold) { } + public Azure.ResourceManager.HDInsight.Models.ComparisonOperator Operator { get { throw null; } set { } } + public float Threshold { get { throw null; } set { } } } - public partial class HDInsightClusterUpdateGatewaySettingsContent + public partial class ComputeResourceDefinition { - public HDInsightClusterUpdateGatewaySettingsContent() { } - public bool? IsCredentialEnabled { get { throw null; } set { } } - public string Password { get { throw null; } set { } } - public string UserName { get { throw null; } set { } } + public ComputeResourceDefinition(float cpu, long memory) { } + public float Cpu { get { throw null; } set { } } + public long Memory { get { throw null; } set { } } } - public partial class HDInsightClusterUpdateIdentityCertificateContent + public partial class ConnectivityProfile { - public HDInsightClusterUpdateIdentityCertificateContent() { } - public string ApplicationId { get { throw null; } set { } } - public string Certificate { get { throw null; } set { } } - public string CertificatePassword { get { throw null; } set { } } - } - public partial class HDInsightClusterValidationErrorInfo - { - internal HDInsightClusterValidationErrorInfo() { } - public string Code { get { throw null; } } - public string ErrorResource { get { throw null; } } - public string Message { get { throw null; } } - public System.Collections.Generic.IReadOnlyList MessageArguments { get { throw null; } } - } - public partial class HDInsightComputeIsolationProperties - { - public HDInsightComputeIsolationProperties() { } - public bool? EnableComputeIsolation { get { throw null; } set { } } - public string HostSku { get { throw null; } set { } } + internal ConnectivityProfile() { } + public System.Collections.Generic.IReadOnlyList Ssh { get { throw null; } } + public string WebFqdn { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightDayOfWeek : System.IEquatable + public readonly partial struct ContentEncoding : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public HDInsightDayOfWeek(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek Friday { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek Monday { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek Saturday { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek Sunday { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek Thursday { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek Tuesday { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek Wednesday { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek other) { throw null; } + public ContentEncoding(string value) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ContentEncoding Base64 { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ContentEncoding None { get { throw null; } } + public bool Equals(Azure.ResourceManager.HDInsight.Models.ContentEncoding other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek left, Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek left, Azure.ResourceManager.HDInsight.Models.HDInsightDayOfWeek right) { throw null; } + public static bool operator ==(Azure.ResourceManager.HDInsight.Models.ContentEncoding left, Azure.ResourceManager.HDInsight.Models.ContentEncoding right) { throw null; } + public static implicit operator Azure.ResourceManager.HDInsight.Models.ContentEncoding (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.HDInsight.Models.ContentEncoding left, Azure.ResourceManager.HDInsight.Models.ContentEncoding right) { throw null; } public override string ToString() { throw null; } } - public partial class HDInsightDiskBillingMeters - { - internal HDInsightDiskBillingMeters() { } - public string DiskRpMeter { get { throw null; } } - public string Sku { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.HDInsightTier? Tier { get { throw null; } } - } - public partial class HDInsightDiskEncryptionProperties - { - public HDInsightDiskEncryptionProperties() { } - public Azure.ResourceManager.HDInsight.Models.JsonWebKeyEncryptionAlgorithm? EncryptionAlgorithm { get { throw null; } set { } } - public bool? IsEncryptionAtHostEnabled { get { throw null; } set { } } - public string KeyName { get { throw null; } set { } } - public string KeyVersion { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier MsiResourceId { get { throw null; } set { } } - public System.Uri VaultUri { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightFilterMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HDInsightFilterMode(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode Default { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode Exclude { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode Include { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode Recommend { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode left, Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode left, Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode right) { throw null; } - public override string ToString() { throw null; } + public partial class FlinkHiveCatalogOption + { + public FlinkHiveCatalogOption(string metastoreDbConnectionPasswordSecret, string metastoreDbConnectionURL, string metastoreDbConnectionUserName) { } + public string MetastoreDbConnectionPasswordSecret { get { throw null; } set { } } + public string MetastoreDbConnectionURL { get { throw null; } set { } } + public string MetastoreDbConnectionUserName { get { throw null; } set { } } + } + public partial class FlinkJobProperties : Azure.ResourceManager.HDInsight.Models.ClusterJobProperties + { + public FlinkJobProperties(string jobName) { } + public Azure.ResourceManager.HDInsight.Models.Action? Action { get { throw null; } set { } } + public string ActionResult { get { throw null; } } + public string Args { get { throw null; } set { } } + public string EntryClass { get { throw null; } set { } } + public System.Collections.Generic.IDictionary FlinkConfiguration { get { throw null; } } + public string JarName { get { throw null; } set { } } + public string JobId { get { throw null; } } + public string JobJarDirectory { get { throw null; } set { } } + public string JobName { get { throw null; } set { } } + public string JobOutput { get { throw null; } } + public string LastSavePoint { get { throw null; } } + public string SavePointName { get { throw null; } set { } } + public string Status { get { throw null; } } } - public partial class HDInsightIPConfiguration + public partial class FlinkProfile { - public HDInsightIPConfiguration(string name) { } - public Azure.Core.ResourceIdentifier Id { get { throw null; } } - public bool? IsPrimary { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public System.Net.IPAddress PrivateIPAddress { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod? PrivateIPAllocationMethod { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState? ProvisioningState { get { throw null; } } - public Azure.Core.ResourceType? ResourceType { get { throw null; } } - public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + public FlinkProfile(Azure.ResourceManager.HDInsight.Models.FlinkStorageProfile storage, Azure.ResourceManager.HDInsight.Models.ComputeResourceDefinition jobManager, Azure.ResourceManager.HDInsight.Models.ComputeResourceDefinition taskManager) { } + public Azure.ResourceManager.HDInsight.Models.FlinkHiveCatalogOption CatalogOptionsHive { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.ComputeResourceDefinition HistoryServer { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.ComputeResourceDefinition JobManager { get { throw null; } set { } } + public int? NumReplicas { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.FlinkStorageProfile Storage { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.ComputeResourceDefinition TaskManager { get { throw null; } set { } } } - public partial class HDInsightLinuxOSProfile + public partial class FlinkStorageProfile { - public HDInsightLinuxOSProfile() { } - public string Password { get { throw null; } set { } } - public System.Collections.Generic.IList SshPublicKeys { get { throw null; } } - public string Username { get { throw null; } set { } } + public FlinkStorageProfile(System.Uri storageUri) { } + public string Storagekey { get { throw null; } set { } } + public System.Uri StorageUri { get { throw null; } set { } } } - public partial class HDInsightLocalizedName + public partial class HDInsightClusterGatewaySettings { - internal HDInsightLocalizedName() { } - public string LocalizedValue { get { throw null; } } - public string Value { get { throw null; } } + internal HDInsightClusterGatewaySettings() { } + public bool? IsCredentialEnabled { get { throw null; } } + public string Password { get { throw null; } } + public string UserName { get { throw null; } } } - public partial class HDInsightNameAvailabilityContent + public partial class HDInsightClusterPatch : Azure.ResourceManager.Models.TrackedResourceData { - public HDInsightNameAvailabilityContent() { } - public string Name { get { throw null; } set { } } - public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + public HDInsightClusterPatch(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.HDInsight.Models.UpdatableClusterProfile ClusterProfile { get { throw null; } set { } } } - public partial class HDInsightNameAvailabilityResult + public partial class HiveCatalogOption { - internal HDInsightNameAvailabilityResult() { } - public bool? IsNameAvailable { get { throw null; } } - public string Message { get { throw null; } } - public string Reason { get { throw null; } } + public HiveCatalogOption(string catalogName, string metastoreDbConnectionPasswordSecret, string metastoreDbConnectionURL, string metastoreDbConnectionUserName, string metastoreWarehouseDir) { } + public string CatalogName { get { throw null; } set { } } + public string MetastoreDbConnectionPasswordSecret { get { throw null; } set { } } + public string MetastoreDbConnectionURL { get { throw null; } set { } } + public string MetastoreDbConnectionUserName { get { throw null; } set { } } + public string MetastoreWarehouseDir { get { throw null; } set { } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightOSType : System.IEquatable + public partial class IdentityProfile { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HDInsightOSType(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightOSType Linux { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightOSType Windows { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightOSType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightOSType left, Azure.ResourceManager.HDInsight.Models.HDInsightOSType right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightOSType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightOSType left, Azure.ResourceManager.HDInsight.Models.HDInsightOSType right) { throw null; } - public override string ToString() { throw null; } + public IdentityProfile(Azure.Core.ResourceIdentifier msiResourceId, string msiClientId, string msiObjectId) { } + public string MsiClientId { get { throw null; } set { } } + public string MsiObjectId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier MsiResourceId { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightPrivateEndpointConnectionProvisioningState : System.IEquatable + public readonly partial struct KeyVaultObjectType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public HDInsightPrivateEndpointConnectionProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState InProgress { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState other) { throw null; } + public KeyVaultObjectType(string value) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.KeyVaultObjectType Certificate { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.KeyVaultObjectType Key { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.KeyVaultObjectType Secret { get { throw null; } } + public bool Equals(Azure.ResourceManager.HDInsight.Models.KeyVaultObjectType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState left, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState left, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateEndpointConnectionProvisioningState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.HDInsight.Models.KeyVaultObjectType left, Azure.ResourceManager.HDInsight.Models.KeyVaultObjectType right) { throw null; } + public static implicit operator Azure.ResourceManager.HDInsight.Models.KeyVaultObjectType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.HDInsight.Models.KeyVaultObjectType left, Azure.ResourceManager.HDInsight.Models.KeyVaultObjectType right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightPrivateIPAllocationMethod : System.IEquatable + public partial class LoadBasedConfig { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HDInsightPrivateIPAllocationMethod(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod Dynamic { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod Static { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod left, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod left, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateIPAllocationMethod right) { throw null; } - public override string ToString() { throw null; } + public LoadBasedConfig(int minNodes, int maxNodes, System.Collections.Generic.IEnumerable scalingRules) { } + public int? CooldownPeriod { get { throw null; } set { } } + public int MaxNodes { get { throw null; } set { } } + public int MinNodes { get { throw null; } set { } } + public int? PollInterval { get { throw null; } set { } } + public System.Collections.Generic.IList ScalingRules { get { throw null; } } } - public partial class HDInsightPrivateLinkConfiguration + public partial class NameAvailabilityContent { - public HDInsightPrivateLinkConfiguration(string name, string groupId, System.Collections.Generic.IEnumerable ipConfigurations) { } - public string GroupId { get { throw null; } set { } } - public string Id { get { throw null; } } - public System.Collections.Generic.IList IPConfigurations { get { throw null; } } + public NameAvailabilityContent() { } public string Name { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState? ProvisioningState { get { throw null; } } - public Azure.Core.ResourceType? ResourceType { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightPrivateLinkConfigurationProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HDInsightPrivateLinkConfigurationProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState InProgress { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState left, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState left, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkConfigurationProvisioningState right) { throw null; } - public override string ToString() { throw null; } + public string ResourceType { get { throw null; } set { } } } - public partial class HDInsightPrivateLinkServiceConnectionState + public partial class NameAvailabilityResult { - public HDInsightPrivateLinkServiceConnectionState(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionStatus status) { } - public string ActionsRequired { get { throw null; } set { } } - public string Description { get { throw null; } set { } } - public Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionStatus Status { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightPrivateLinkServiceConnectionStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HDInsightPrivateLinkServiceConnectionStatus(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionStatus Approved { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionStatus Pending { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionStatus Rejected { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionStatus Removed { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionStatus other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionStatus left, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionStatus left, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkServiceConnectionStatus right) { throw null; } - public override string ToString() { throw null; } + internal NameAvailabilityResult() { } + public string Message { get { throw null; } } + public bool? NameAvailable { get { throw null; } } + public string Reason { get { throw null; } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightPrivateLinkState : System.IEquatable + public partial class NodeProfile { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HDInsightPrivateLinkState(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkState Disabled { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkState Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkState left, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkState right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkState left, Azure.ResourceManager.HDInsight.Models.HDInsightPrivateLinkState right) { throw null; } - public override string ToString() { throw null; } + public NodeProfile(string nodeProfileType, string vmSize, int count) { } + public int Count { get { throw null; } set { } } + public string NodeProfileType { get { throw null; } set { } } + public string VmSize { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightResourceProviderConnection : System.IEquatable + public readonly partial struct ProvisioningStatus : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public HDInsightResourceProviderConnection(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightResourceProviderConnection Inbound { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightResourceProviderConnection Outbound { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightResourceProviderConnection other) { throw null; } + public ProvisioningStatus(string value) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ProvisioningStatus Accepted { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ProvisioningStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ProvisioningStatus Failed { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ProvisioningStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.HDInsight.Models.ProvisioningStatus other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightResourceProviderConnection left, Azure.ResourceManager.HDInsight.Models.HDInsightResourceProviderConnection right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightResourceProviderConnection (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightResourceProviderConnection left, Azure.ResourceManager.HDInsight.Models.HDInsightResourceProviderConnection right) { throw null; } + public static bool operator ==(Azure.ResourceManager.HDInsight.Models.ProvisioningStatus left, Azure.ResourceManager.HDInsight.Models.ProvisioningStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.HDInsight.Models.ProvisioningStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.HDInsight.Models.ProvisioningStatus left, Azure.ResourceManager.HDInsight.Models.ProvisioningStatus right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightRoleName : System.IEquatable + public readonly partial struct ScaleActionType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public HDInsightRoleName(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightRoleName Workernode { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightRoleName other) { throw null; } + public ScaleActionType(string value) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ScaleActionType Scaledown { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ScaleActionType Scaleup { get { throw null; } } + public bool Equals(Azure.ResourceManager.HDInsight.Models.ScaleActionType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightRoleName left, Azure.ResourceManager.HDInsight.Models.HDInsightRoleName right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightRoleName (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightRoleName left, Azure.ResourceManager.HDInsight.Models.HDInsightRoleName right) { throw null; } + public static bool operator ==(Azure.ResourceManager.HDInsight.Models.ScaleActionType left, Azure.ResourceManager.HDInsight.Models.ScaleActionType right) { throw null; } + public static implicit operator Azure.ResourceManager.HDInsight.Models.ScaleActionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.HDInsight.Models.ScaleActionType left, Azure.ResourceManager.HDInsight.Models.ScaleActionType right) { throw null; } public override string ToString() { throw null; } } - public partial class HDInsightSecurityProfile + public partial class ScalingRule { - public HDInsightSecurityProfile() { } - public Azure.Core.ResourceIdentifier AaddsResourceId { get { throw null; } set { } } - public System.Collections.Generic.IList ClusterUsersGroupDNs { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.AuthenticationDirectoryType? DirectoryType { get { throw null; } set { } } - public string Domain { get { throw null; } set { } } - public string DomainUsername { get { throw null; } set { } } - public string DomainUserPassword { get { throw null; } set { } } - public System.Collections.Generic.IList LdapUris { get { throw null; } } - public Azure.Core.ResourceIdentifier MsiResourceId { get { throw null; } set { } } - public string OrganizationalUnitDN { get { throw null; } set { } } + public ScalingRule(Azure.ResourceManager.HDInsight.Models.ScaleActionType actionType, int evaluationCount, string scalingMetric, Azure.ResourceManager.HDInsight.Models.ComparisonRule comparisonRule) { } + public Azure.ResourceManager.HDInsight.Models.ScaleActionType ActionType { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.ComparisonRule ComparisonRule { get { throw null; } set { } } + public int EvaluationCount { get { throw null; } set { } } + public string ScalingMetric { get { throw null; } set { } } } - public partial class HDInsightSshPublicKey + public partial class Schedule { - public HDInsightSshPublicKey() { } - public string CertificateData { get { throw null; } set { } } + public Schedule(string startTime, string endTime, int count, System.Collections.Generic.IEnumerable days) { } + public int Count { get { throw null; } set { } } + public System.Collections.Generic.IList Days { get { throw null; } } + public string EndTime { get { throw null; } set { } } + public string StartTime { get { throw null; } set { } } } - public partial class HDInsightStorageAccountInfo + public partial class ScheduleBasedConfig { - public HDInsightStorageAccountInfo() { } - public string Container { get { throw null; } set { } } - public bool? EnableSecureChannel { get { throw null; } set { } } - public string Fileshare { get { throw null; } set { } } - public string FileSystem { get { throw null; } set { } } - public bool? IsDefault { get { throw null; } set { } } - public string Key { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier MsiResourceId { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } - public string SasKey { get { throw null; } set { } } + public ScheduleBasedConfig(string timeZone, int defaultCount, System.Collections.Generic.IEnumerable schedules) { } + public int DefaultCount { get { throw null; } set { } } + public System.Collections.Generic.IList Schedules { get { throw null; } } + public string TimeZone { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HDInsightTier : System.IEquatable + public readonly partial struct ScheduleDay : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public HDInsightTier(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.HDInsightTier Premium { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.HDInsightTier Standard { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.HDInsightTier other) { throw null; } + public ScheduleDay(string value) { throw null; } + public static Azure.ResourceManager.HDInsight.Models.ScheduleDay Friday { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ScheduleDay Monday { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ScheduleDay Saturday { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ScheduleDay Sunday { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ScheduleDay Thursday { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ScheduleDay Tuesday { get { throw null; } } + public static Azure.ResourceManager.HDInsight.Models.ScheduleDay Wednesday { get { throw null; } } + public bool Equals(Azure.ResourceManager.HDInsight.Models.ScheduleDay other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.HDInsightTier left, Azure.ResourceManager.HDInsight.Models.HDInsightTier right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.HDInsightTier (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.HDInsightTier left, Azure.ResourceManager.HDInsight.Models.HDInsightTier right) { throw null; } + public static bool operator ==(Azure.ResourceManager.HDInsight.Models.ScheduleDay left, Azure.ResourceManager.HDInsight.Models.ScheduleDay right) { throw null; } + public static implicit operator Azure.ResourceManager.HDInsight.Models.ScheduleDay (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.HDInsight.Models.ScheduleDay left, Azure.ResourceManager.HDInsight.Models.ScheduleDay right) { throw null; } public override string ToString() { throw null; } } - public partial class HDInsightUsage + public partial class ScriptActionProfile + { + public ScriptActionProfile(string scriptActionProfileType, string name, System.Uri uri, System.Collections.Generic.IEnumerable services) { } + public string Name { get { throw null; } set { } } + public string Parameters { get { throw null; } set { } } + public string ScriptActionProfileType { get { throw null; } set { } } + public System.Collections.Generic.IList Services { get { throw null; } } + public bool? ShouldPersist { get { throw null; } set { } } + public int? TimeoutInMinutes { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } + public partial class SecretReference { - internal HDInsightUsage() { } - public long? CurrentValue { get { throw null; } } - public long? Limit { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.HDInsightLocalizedName Name { get { throw null; } } - public string Unit { get { throw null; } } + public SecretReference(string referenceName, Azure.ResourceManager.HDInsight.Models.KeyVaultObjectType keyVaultObjectType, string keyVaultObjectName) { } + public string KeyVaultObjectName { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.KeyVaultObjectType KeyVaultObjectType { get { throw null; } set { } } + public string ReferenceName { get { throw null; } set { } } + public string Version { get { throw null; } set { } } } - public partial class HDInsightVersionsCapability + public partial class SecretsProfile { - internal HDInsightVersionsCapability() { } - public System.Collections.Generic.IReadOnlyList Available { get { throw null; } } + public SecretsProfile(Azure.Core.ResourceIdentifier keyVaultResourceId) { } + public Azure.Core.ResourceIdentifier KeyVaultResourceId { get { throw null; } set { } } + public System.Collections.Generic.IList Secrets { get { throw null; } } } - public partial class HDInsightVersionSpec + public partial class ServiceConfigListResultValueEntity { - internal HDInsightVersionSpec() { } - public System.Collections.Generic.IReadOnlyDictionary ComponentVersions { get { throw null; } } - public string DisplayName { get { throw null; } } - public string FriendlyName { get { throw null; } } - public bool? IsDefault { get { throw null; } } + internal ServiceConfigListResultValueEntity() { } + public string Description { get { throw null; } } + public string Value { get { throw null; } } } - public partial class HDInsightVirtualNetworkProfile + public partial class ServiceConfigResult { - public HDInsightVirtualNetworkProfile() { } - public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } - public string Subnet { get { throw null; } set { } } + internal ServiceConfigResult() { } + public string ComponentName { get { throw null; } } + public string Content { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary CustomKeys { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary DefaultKeys { get { throw null; } } + public string FileName { get { throw null; } } + public string Path { get { throw null; } } + public string ServiceConfigListResultPropertiesType { get { throw null; } } + public string ServiceName { get { throw null; } } } - public partial class HDInsightVmSizeCompatibilityFilterV2 + public partial class ServiceStatus { - internal HDInsightVmSizeCompatibilityFilterV2() { } - public System.Collections.Generic.IReadOnlyList ClusterFlavors { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ClusterVersions { get { throw null; } } - public string EspApplied { get { throw null; } } - public Azure.ResourceManager.HDInsight.Models.HDInsightFilterMode? FilterMode { get { throw null; } } - public string IsComputeIsolationSupported { get { throw null; } } - public System.Collections.Generic.IReadOnlyList NodeTypes { get { throw null; } } - public System.Collections.Generic.IReadOnlyList OSType { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Regions { get { throw null; } } - public System.Collections.Generic.IReadOnlyList VmSizes { get { throw null; } } + internal ServiceStatus() { } + public string Kind { get { throw null; } } + public string Message { get { throw null; } } + public string Ready { get { throw null; } } } - public partial class HDInsightVmSizeProperty + public partial class SparkMetastoreSpec { - internal HDInsightVmSizeProperty() { } - public int? Cores { get { throw null; } } - public string DataDiskStorageTier { get { throw null; } } - public bool? IsSupportedByVirtualMachines { get { throw null; } } - public bool? IsSupportedByWebWorkerRoles { get { throw null; } } - public string Label { get { throw null; } } - public long? MaxDataDiskCount { get { throw null; } } - public long? MemoryInMB { get { throw null; } } - public string Name { get { throw null; } } - public long? VirtualMachineResourceDiskSizeInMB { get { throw null; } } - public long? WebWorkerResourceDiskSizeInMB { get { throw null; } } + public SparkMetastoreSpec(string dbServerHost, string dbName, string dbUserName, string dbPasswordSecretName, string keyVaultId) { } + public string DbName { get { throw null; } set { } } + public string DbPasswordSecretName { get { throw null; } set { } } + public string DbServerHost { get { throw null; } set { } } + public string DbUserName { get { throw null; } set { } } + public string KeyVaultId { get { throw null; } set { } } + public System.Uri ThriftUri { get { throw null; } set { } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct JsonWebKeyEncryptionAlgorithm : System.IEquatable + public partial class SparkProfile { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public JsonWebKeyEncryptionAlgorithm(string value) { throw null; } - public static Azure.ResourceManager.HDInsight.Models.JsonWebKeyEncryptionAlgorithm Rsa15 { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.JsonWebKeyEncryptionAlgorithm RsaOaep { get { throw null; } } - public static Azure.ResourceManager.HDInsight.Models.JsonWebKeyEncryptionAlgorithm RsaOaep256 { get { throw null; } } - public bool Equals(Azure.ResourceManager.HDInsight.Models.JsonWebKeyEncryptionAlgorithm other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.HDInsight.Models.JsonWebKeyEncryptionAlgorithm left, Azure.ResourceManager.HDInsight.Models.JsonWebKeyEncryptionAlgorithm right) { throw null; } - public static implicit operator Azure.ResourceManager.HDInsight.Models.JsonWebKeyEncryptionAlgorithm (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.HDInsight.Models.JsonWebKeyEncryptionAlgorithm left, Azure.ResourceManager.HDInsight.Models.JsonWebKeyEncryptionAlgorithm right) { throw null; } - public override string ToString() { throw null; } + public SparkProfile() { } + public System.Uri DefaultStorageUri { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.SparkMetastoreSpec MetastoreSpec { get { throw null; } set { } } + public System.Collections.Generic.IList Plugins { get { throw null; } } } - public partial class KafkaRestProperties + public partial class SparkUserPlugin { - public KafkaRestProperties() { } - public Azure.ResourceManager.HDInsight.Models.ClientGroupInfo ClientGroupInfo { get { throw null; } set { } } - public System.Collections.Generic.IDictionary ConfigurationOverride { get { throw null; } } + public SparkUserPlugin(string path) { } + public string Path { get { throw null; } set { } } } - public partial class QuotaCapability + public partial class SshConnectivityEndpoint { - internal QuotaCapability() { } - public long? CoresUsed { get { throw null; } } - public long? MaxCoresAllowed { get { throw null; } } - public System.Collections.Generic.IReadOnlyList RegionalQuotas { get { throw null; } } + internal SshConnectivityEndpoint() { } + public string Endpoint { get { throw null; } } } - public partial class RegionalQuotaCapability + public partial class SshProfile { - internal RegionalQuotaCapability() { } - public long? CoresAvailable { get { throw null; } } - public long? CoresUsed { get { throw null; } } - public Azure.Core.AzureLocation? Region { get { throw null; } } + public SshProfile(int count) { } + public int Count { get { throw null; } set { } } + public string PodPrefix { get { throw null; } } } - public partial class RegionsCapability + public partial class TrinoCoordinator { - internal RegionsCapability() { } - public System.Collections.Generic.IReadOnlyList Available { get { throw null; } } + public TrinoCoordinator() { } + public bool? Enable { get { throw null; } set { } } + public bool? HighAvailabilityEnabled { get { throw null; } set { } } + public int? Port { get { throw null; } set { } } + public bool? Suspend { get { throw null; } set { } } } - public partial class RuntimeScriptAction + public partial class TrinoProfile { - public RuntimeScriptAction(string name, System.Uri uri, System.Collections.Generic.IEnumerable roles) { } - public string ApplicationName { get { throw null; } } - public string Name { get { throw null; } set { } } - public string Parameters { get { throw null; } set { } } - public System.Collections.Generic.IList Roles { get { throw null; } } - public System.Uri Uri { get { throw null; } set { } } + public TrinoProfile() { } + public System.Collections.Generic.IList CatalogOptionsHive { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.TrinoCoordinator Coordinator { get { throw null; } set { } } + public System.Collections.Generic.IList Plugins { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.TrinoTelemetryConfig UserTelemetrySpecStorage { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.TrinoWorker Worker { get { throw null; } set { } } } - public partial class RuntimeScriptActionDetail : Azure.ResourceManager.HDInsight.Models.RuntimeScriptAction + public partial class TrinoTelemetryConfig { - public RuntimeScriptActionDetail(string name, System.Uri uri, System.Collections.Generic.IEnumerable roles) : base (default(string), default(System.Uri), default(System.Collections.Generic.IEnumerable)) { } - public string DebugInformation { get { throw null; } } - public System.DateTimeOffset? EndOn { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ExecutionSummary { get { throw null; } } - public string Operation { get { throw null; } } - public long? ScriptExecutionId { get { throw null; } } - public System.DateTimeOffset? StartOn { get { throw null; } } - public string Status { get { throw null; } } + public TrinoTelemetryConfig() { } + public string HivecatalogName { get { throw null; } set { } } + public string HivecatalogSchema { get { throw null; } set { } } + public int? PartitionRetentionInDays { get { throw null; } set { } } + public string Path { get { throw null; } set { } } } - public partial class ScriptAction + public partial class TrinoUserPlugin { - public ScriptAction(string name, System.Uri uri, string parameters) { } + public TrinoUserPlugin() { } + public bool? Enabled { get { throw null; } set { } } public string Name { get { throw null; } set { } } - public string Parameters { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } + public string Path { get { throw null; } set { } } } - public partial class ScriptActionExecutionSummary + public partial class TrinoWorker { - internal ScriptActionExecutionSummary() { } - public int? InstanceCount { get { throw null; } } - public string Status { get { throw null; } } + public TrinoWorker() { } + public bool? Enable { get { throw null; } set { } } + public int? Port { get { throw null; } set { } } + public bool? Suspend { get { throw null; } set { } } + } + public partial class UpdatableClusterProfile + { + public UpdatableClusterProfile() { } + public Azure.ResourceManager.HDInsight.Models.AuthorizationProfile AuthorizationProfile { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.AutoScaleProfile AutoScaleProfile { get { throw null; } set { } } + public Azure.ResourceManager.HDInsight.Models.ClusterLogAnalyticsProfile LogAnalyticsProfile { get { throw null; } set { } } + public bool? PrometheusProfileEnabled { get { throw null; } set { } } + public System.Collections.Generic.IList ScriptActionProfiles { get { throw null; } } + public System.Collections.Generic.IList ServiceConfigsProfiles { get { throw null; } } + public Azure.ResourceManager.HDInsight.Models.SshProfile SshProfile { get { throw null; } set { } } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ArmHDInsightModelFactory.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ArmHDInsightModelFactory.cs index 9cbd2a094846..0a9edf9532f2 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ArmHDInsightModelFactory.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ArmHDInsightModelFactory.cs @@ -8,8 +8,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Net; -using Azure; using Azure.Core; using Azure.ResourceManager.HDInsight; using Azure.ResourceManager.Models; @@ -19,126 +17,67 @@ namespace Azure.ResourceManager.HDInsight.Models /// Model factory for models. public static partial class ArmHDInsightModelFactory { - /// Initializes a new instance of HDInsightApplicationData. + /// Initializes a new instance of ClusterPoolData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The ETag for the application. - /// The tags for the application. - /// The properties of the application. - /// A new instance for mocking. - public static HDInsightApplicationData HDInsightApplicationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, IDictionary tags = null, HDInsightApplicationProperties properties = null) + /// The tags. + /// The location. + /// Provisioning state of the resource. + /// A unique id generated by the RP to identify the resource. + /// 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. + /// 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}. + /// CLuster pool profile. + /// CLuster pool compute profile. + /// Properties of underlying AKS cluster. + /// Cluster pool network profile. + /// Cluster pool log analytics profile to enable OMS agent for AKS cluster. + /// Business status of the resource. + /// A new instance for mocking. + public static ClusterPoolData ClusterPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ProvisioningStatus? provisioningState = null, string deploymentId = null, string managedResourceGroupName = null, string aksManagedResourceGroupName = null, string clusterPoolVersion = null, ClusterPoolResourcePropertiesComputeProfile computeProfile = null, ClusterPoolResourcePropertiesAksClusterProfile aksClusterProfile = null, ResourceIdentifier networkSubnetId = null, ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile = null, string status = null) { tags ??= new Dictionary(); - return new HDInsightApplicationData(id, name, resourceType, systemData, etag, tags, properties); - } - - /// Initializes a new instance of HDInsightApplicationProperties. - /// The list of roles in the cluster. - /// The list of install script actions. - /// The list of uninstall script actions. - /// The list of application HTTPS endpoints. - /// The list of application SSH endpoints. - /// The provisioning state of the application. - /// The application type. - /// The application state. - /// The list of errors. - /// The application create date time. - /// The marketplace identifier. - /// The private link configurations. - /// A new instance for mocking. - public static HDInsightApplicationProperties HDInsightApplicationProperties(IEnumerable computeRoles = null, IEnumerable installScriptActions = null, IEnumerable uninstallScriptActions = null, IEnumerable httpsEndpoints = null, IEnumerable sshEndpoints = null, string provisioningState = null, string applicationType = null, string applicationState = null, IEnumerable errors = null, DateTimeOffset? createdOn = null, string marketplaceIdentifier = null, IEnumerable privateLinkConfigurations = null) - { - computeRoles ??= new List(); - installScriptActions ??= new List(); - uninstallScriptActions ??= new List(); - httpsEndpoints ??= new List(); - sshEndpoints ??= new List(); - errors ??= new List(); - privateLinkConfigurations ??= new List(); - - return new HDInsightApplicationProperties(computeRoles != null ? new ComputeProfile(computeRoles?.ToList()) : null, installScriptActions?.ToList(), uninstallScriptActions?.ToList(), httpsEndpoints?.ToList(), sshEndpoints?.ToList(), provisioningState, applicationType, applicationState, errors?.ToList(), createdOn, marketplaceIdentifier, privateLinkConfigurations?.ToList()); + return new ClusterPoolData(id, name, resourceType, systemData, tags, location, provisioningState, deploymentId, managedResourceGroupName, aksManagedResourceGroupName, clusterPoolVersion != null ? new ClusterPoolResourcePropertiesClusterPoolProfile(clusterPoolVersion) : null, computeProfile, aksClusterProfile, networkSubnetId != null ? new ClusterPoolResourcePropertiesNetworkProfile(networkSubnetId) : null, logAnalyticsProfile, status); } - /// Initializes a new instance of HDInsightClusterDataDiskGroup. - /// The number of disks per node. - /// ReadOnly. The storage account type. Do not set this value. - /// ReadOnly. The DiskSize in GB. Do not set this value. - /// A new instance for mocking. - public static HDInsightClusterDataDiskGroup HDInsightClusterDataDiskGroup(int? disksPerNode = null, string storageAccountType = null, int? diskSizeInGB = null) + /// Initializes a new instance of ClusterPoolResourcePropertiesComputeProfile. + /// The virtual machine SKU. + /// The number of virtual machines. + /// A new instance for mocking. + public static ClusterPoolResourcePropertiesComputeProfile ClusterPoolResourcePropertiesComputeProfile(string vmSize = null, int? count = null) { - return new HDInsightClusterDataDiskGroup(disksPerNode, storageAccountType, diskSizeInGB); + return new ClusterPoolResourcePropertiesComputeProfile(vmSize, count); } - /// Initializes a new instance of RuntimeScriptAction. - /// The name of the script action. - /// The URI to the script. - /// The parameters for the script. - /// The list of roles where script will be executed. - /// The application name of the script action, if any. - /// A new instance for mocking. - public static RuntimeScriptAction RuntimeScriptAction(string name = null, Uri uri = null, string parameters = null, IEnumerable roles = null, string applicationName = null) + /// Initializes a new instance of ClusterPoolComputeProfile. + /// The virtual machine SKU. + /// The number of virtual machines. + /// A new instance for mocking. + public static ClusterPoolComputeProfile ClusterPoolComputeProfile(string vmSize = null, int? count = null) { - roles ??= new List(); - - return new RuntimeScriptAction(name, uri, parameters, roles?.ToList(), applicationName); + return new ClusterPoolComputeProfile(vmSize, count); } - /// Initializes a new instance of HDInsightApplicationHttpsEndpoint. - /// The list of access modes for the application. - /// The location of the endpoint. - /// The destination port to connect to. - /// The public port to connect to. - /// The private ip address of the endpoint. - /// The subdomain suffix of the application. - /// The value indicates whether to disable GatewayAuth. - /// A new instance for mocking. - public static HDInsightApplicationHttpsEndpoint HDInsightApplicationHttpsEndpoint(IEnumerable accessModes = null, string endpointLocation = null, int? destinationPort = null, int? publicPort = null, IPAddress privateIPAddress = null, string subDomainSuffix = null, bool? disableGatewayAuth = null) + /// Initializes a new instance of ClusterPoolResourcePropertiesAksClusterProfile. + /// ARM Resource ID of the AKS cluster. + /// Identity properties of the AKS cluster agentpool MSI. + /// AKS control plane and default node pool version of this ClusterPool. + /// A new instance for mocking. + public static ClusterPoolResourcePropertiesAksClusterProfile ClusterPoolResourcePropertiesAksClusterProfile(ResourceIdentifier aksClusterResourceId = null, AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile = null, string aksVersion = null) { - accessModes ??= new List(); - - return new HDInsightApplicationHttpsEndpoint(accessModes?.ToList(), endpointLocation, destinationPort, publicPort, privateIPAddress, subDomainSuffix, disableGatewayAuth); + return new ClusterPoolResourcePropertiesAksClusterProfile(aksClusterResourceId, aksClusterAgentPoolIdentityProfile, aksVersion); } - /// Initializes a new instance of HDInsightPrivateLinkConfiguration. - /// The private link configuration id. - /// The name of private link configuration. - /// The type of the private link configuration. - /// The HDInsight private linkable sub-resource name to apply the private link configuration to. For example, 'headnode', 'gateway', 'edgenode'. - /// The private link configuration provisioning state, which only appears in the response. - /// The IP configurations for the private link service. - /// A new instance for mocking. - public static HDInsightPrivateLinkConfiguration HDInsightPrivateLinkConfiguration(string id = null, string name = null, ResourceType? resourceType = null, string groupId = null, HDInsightPrivateLinkConfigurationProvisioningState? provisioningState = null, IEnumerable ipConfigurations = null) + /// Initializes a new instance of AksClusterProfile. + /// ARM Resource ID of the AKS cluster. + /// Identity properties of the AKS cluster agentpool MSI. + /// AKS control plane and default node pool version of this ClusterPool. + /// A new instance for mocking. + public static AksClusterProfile AksClusterProfile(ResourceIdentifier aksClusterResourceId = null, AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile = null, string aksVersion = null) { - ipConfigurations ??= new List(); - - return new HDInsightPrivateLinkConfiguration(id, name, resourceType, groupId, provisioningState, ipConfigurations?.ToList()); - } - - /// Initializes a new instance of HDInsightIPConfiguration. - /// The private link IP configuration id. - /// The name of private link IP configuration. - /// The type of the private link IP configuration. - /// The private link configuration provisioning state, which only appears in the response. - /// Indicates whether this IP configuration is primary for the corresponding NIC. - /// The IP address. - /// The method that private IP address is allocated. - /// The subnet resource id. - /// A new instance for mocking. - public static HDInsightIPConfiguration HDInsightIPConfiguration(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, HDInsightPrivateLinkConfigurationProvisioningState? provisioningState = null, bool? isPrimary = null, IPAddress privateIPAddress = null, HDInsightPrivateIPAllocationMethod? privateIPAllocationMethod = null, ResourceIdentifier subnetId = null) - { - return new HDInsightIPConfiguration(id, name, resourceType, provisioningState, isPrimary, privateIPAddress, privateIPAllocationMethod, subnetId != null ? ResourceManagerModelFactory.WritableSubResource(subnetId) : null); - } - - /// Initializes a new instance of HDInsightAsyncOperationResult. - /// The async operation state. - /// The operation error information. - /// A new instance for mocking. - public static HDInsightAsyncOperationResult HDInsightAsyncOperationResult(HDInsightAsyncOperationState? status = null, ResponseError error = null) - { - return new HDInsightAsyncOperationResult(status, error); + return new AksClusterProfile(aksClusterResourceId, aksClusterAgentPoolIdentityProfile, aksVersion); } /// Initializes a new instance of HDInsightClusterData. @@ -148,390 +87,277 @@ public static HDInsightAsyncOperationResult HDInsightAsyncOperationResult(HDInsi /// The systemData. /// The tags. /// The location. - /// The ETag for the resource. - /// The availability zones. - /// The properties of the cluster. - /// The identity of the cluster, if configured. + /// Provisioning state of the resource. + /// The type of cluster. + /// A unique id generated by the RP to identify the resource. + /// The compute profile. + /// Cluster profile. + /// Business status of the resource. /// A new instance for mocking. - public static HDInsightClusterData HDInsightClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable zones = null, HDInsightClusterProperties properties = null, ManagedServiceIdentity identity = null) + public static HDInsightClusterData HDInsightClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ProvisioningStatus? provisioningState = null, string clusterType = null, string deploymentId = null, IEnumerable computeNodes = null, ClusterProfile clusterProfile = null, string status = null) { tags ??= new Dictionary(); - zones ??= new List(); - - return new HDInsightClusterData(id, name, resourceType, systemData, tags, location, etag, zones?.ToList(), properties, identity); - } - - /// Initializes a new instance of HDInsightClusterProperties. - /// The version of the cluster. - /// The hdp version of the cluster. - /// The type of operating system. - /// The cluster tier. - /// The cluster id. - /// The cluster definition. - /// The cluster kafka rest proxy configuration. - /// The security profile. - /// The compute profile. - /// The provisioning state, which only appears in the response. - /// The date on which the cluster was created. - /// The state of the cluster. - /// The quota information. - /// The list of errors. - /// The list of connectivity endpoints. - /// The disk encryption properties. - /// The encryption-in-transit properties. - /// The storage profile. - /// The minimal supported tls version. - /// The excluded services config. - /// The network properties. - /// The compute isolation properties. - /// The private link configurations. - /// The list of private endpoint connections. - /// A new instance for mocking. - public static HDInsightClusterProperties HDInsightClusterProperties(string clusterVersion = null, string clusterHdpVersion = null, HDInsightOSType? osType = null, HDInsightTier? tier = null, string clusterId = null, HDInsightClusterDefinition clusterDefinition = null, KafkaRestProperties kafkaRestProperties = null, HDInsightSecurityProfile securityProfile = null, IEnumerable computeRoles = null, HDInsightClusterProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, string clusterState = null, int? quotaInfoCoresUsed = null, IEnumerable errors = null, IEnumerable connectivityEndpoints = null, HDInsightDiskEncryptionProperties diskEncryptionProperties = null, bool? isEncryptionInTransitEnabled = null, IEnumerable storageAccounts = null, string minSupportedTlsVersion = null, ExcludedServicesConfig excludedServicesConfig = null, HDInsightClusterNetworkProperties networkProperties = null, HDInsightComputeIsolationProperties computeIsolationProperties = null, IEnumerable privateLinkConfigurations = null, IEnumerable privateEndpointConnections = null) - { - computeRoles ??= new List(); - errors ??= new List(); - connectivityEndpoints ??= new List(); - storageAccounts ??= new List(); - privateLinkConfigurations ??= new List(); - privateEndpointConnections ??= new List(); - - return new HDInsightClusterProperties(clusterVersion, clusterHdpVersion, osType, tier, clusterId, clusterDefinition, kafkaRestProperties, securityProfile, computeRoles != null ? new ComputeProfile(computeRoles?.ToList()) : null, provisioningState, createdOn, clusterState, quotaInfoCoresUsed != null ? new QuotaInfo(quotaInfoCoresUsed) : null, errors?.ToList(), connectivityEndpoints?.ToList(), diskEncryptionProperties, isEncryptionInTransitEnabled != null ? new EncryptionInTransitProperties(isEncryptionInTransitEnabled) : null, storageAccounts != null ? new StorageProfile(storageAccounts?.ToList()) : null, minSupportedTlsVersion, excludedServicesConfig, networkProperties, computeIsolationProperties, privateLinkConfigurations?.ToList(), privateEndpointConnections?.ToList()); - } + computeNodes ??= new List(); - /// Initializes a new instance of HDInsightPrivateEndpointConnectionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The private endpoint of the private endpoint connection. - /// The private link service connection state. - /// The link identifier. - /// The provisioning state, which only appears in the response. - /// A new instance for mocking. - public static HDInsightPrivateEndpointConnectionData HDInsightPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier privateEndpointId = null, HDInsightPrivateLinkServiceConnectionState connectionState = null, string linkIdentifier = null, HDInsightPrivateEndpointConnectionProvisioningState? provisioningState = null) - { - return new HDInsightPrivateEndpointConnectionData(id, name, resourceType, systemData, privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null, connectionState, linkIdentifier, provisioningState); + return new HDInsightClusterData(id, name, resourceType, systemData, tags, location, provisioningState, clusterType, deploymentId, computeNodes != null ? new ComputeProfile(computeNodes?.ToList()) : null, clusterProfile, status); } - /// Initializes a new instance of HDInsightClusterConfigurations. - /// The configuration object for the specified configuration for the specified cluster. - /// A new instance for mocking. - public static HDInsightClusterConfigurations HDInsightClusterConfigurations(IReadOnlyDictionary> configurations = null) + /// Initializes a new instance of ClusterProfile. + /// Version with 3/4 part. + /// Version with three part. + /// Component list of this cluster type and version. + /// Identity Profile with details of an MSI. + /// Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. + /// The cluster secret profile. + /// The service configs profiles. + /// Cluster connectivity profile. + /// Cluster log analytics profile to enable or disable OMS agent for cluster. + /// Cluster Prometheus profile. + /// Ssh profile for the cluster. + /// This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. + /// Kafka cluster profile. + /// Trino Cluster profile. + /// LLAP cluster profile. + /// The Flink cluster profile. + /// The spark cluster profile. + /// Stub cluster profile. + /// The script action profile list. + /// A new instance for mocking. + public static ClusterProfile ClusterProfile(string clusterVersion = null, string ossVersion = null, IEnumerable components = null, IdentityProfile identityProfile = null, AuthorizationProfile authorizationProfile = null, SecretsProfile secretsProfile = null, IEnumerable serviceConfigsProfiles = null, ConnectivityProfile connectivityProfile = null, ClusterLogAnalyticsProfile logAnalyticsProfile = null, bool? prometheusProfileEnabled = null, SshProfile sshProfile = null, AutoScaleProfile autoScaleProfile = null, IDictionary kafkaProfile = null, TrinoProfile trinoProfile = null, IDictionary llapProfile = null, FlinkProfile flinkProfile = null, SparkProfile sparkProfile = null, IDictionary stubProfile = null, IEnumerable scriptActionProfiles = null) { - configurations ??= new Dictionary>(); + components ??= new List(); + serviceConfigsProfiles ??= new List(); + kafkaProfile ??= new Dictionary(); + llapProfile ??= new Dictionary(); + stubProfile ??= new Dictionary(); + scriptActionProfiles ??= new List(); - return new HDInsightClusterConfigurations(configurations); + return new ClusterProfile(clusterVersion, ossVersion, components?.ToList(), identityProfile, authorizationProfile, secretsProfile, serviceConfigsProfiles?.ToList(), connectivityProfile, logAnalyticsProfile, prometheusProfileEnabled.HasValue ? new ClusterPrometheusProfile(prometheusProfileEnabled.Value) : null, sshProfile, autoScaleProfile, kafkaProfile, trinoProfile, llapProfile, flinkProfile, sparkProfile, stubProfile, scriptActionProfiles?.ToList()); } - /// Initializes a new instance of HDInsightClusterExtensionStatus. - /// The status of the monitor on the HDInsight cluster. - /// The workspace ID of the monitor on the HDInsight cluster. - /// A new instance for mocking. - public static HDInsightClusterExtensionStatus HDInsightClusterExtensionStatus(bool? isClusterMonitoringEnabled = null, string workspaceId = null) + /// Initializes a new instance of ClusterComponentsItem. + /// + /// + /// A new instance for mocking. + public static ClusterComponentsItem ClusterComponentsItem(string name = null, string version = null) { - return new HDInsightClusterExtensionStatus(isClusterMonitoringEnabled, workspaceId); + return new ClusterComponentsItem(name, version); } - /// Initializes a new instance of HDInsightAzureMonitorExtensionStatus. - /// The status of the monitor on the HDInsight cluster. - /// The workspace ID of the monitor on the HDInsight cluster. - /// The selected configurations. - /// A new instance for mocking. - public static HDInsightAzureMonitorExtensionStatus HDInsightAzureMonitorExtensionStatus(bool? isClusterMonitoringEnabled = null, string workspaceId = null, HDInsightAzureMonitorSelectedConfigurations selectedConfigurations = null) + /// Initializes a new instance of ConnectivityProfile. + /// Web connectivity endpoint details. + /// List of SSH connectivity endpoints. + /// A new instance for mocking. + public static ConnectivityProfile ConnectivityProfile(string webFqdn = null, IEnumerable ssh = null) { - return new HDInsightAzureMonitorExtensionStatus(isClusterMonitoringEnabled, workspaceId, selectedConfigurations); - } - - /// Initializes a new instance of HDInsightCapabilitiesResult. - /// The version capability. - /// The virtual machine size compatibility features. - /// The capability features. - /// The quota capability. - /// A new instance for mocking. - public static HDInsightCapabilitiesResult HDInsightCapabilitiesResult(IReadOnlyDictionary versions = null, IReadOnlyDictionary regions = null, IEnumerable features = null, QuotaCapability quota = null) - { - versions ??= new Dictionary(); - regions ??= new Dictionary(); - features ??= new List(); + ssh ??= new List(); - return new HDInsightCapabilitiesResult(versions, regions, features?.ToList(), quota); + return new ConnectivityProfile(webFqdn != null ? new ConnectivityProfileWeb(webFqdn) : null, ssh?.ToList()); } - /// Initializes a new instance of HDInsightVersionsCapability. - /// The list of version capabilities. - /// A new instance for mocking. - public static HDInsightVersionsCapability HDInsightVersionsCapability(IEnumerable available = null) + /// Initializes a new instance of SshConnectivityEndpoint. + /// SSH connectivity endpoint. + /// is null. + /// A new instance for mocking. + public static SshConnectivityEndpoint SshConnectivityEndpoint(string endpoint = null) { - available ??= new List(); + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } - return new HDInsightVersionsCapability(available?.ToList()); + return new SshConnectivityEndpoint(endpoint); } - /// Initializes a new instance of HDInsightVersionSpec. - /// The friendly name. - /// The display name. - /// Whether or not the version is the default version. - /// The component version property. - /// A new instance for mocking. - public static HDInsightVersionSpec HDInsightVersionSpec(string friendlyName = null, string displayName = null, bool? isDefault = null, IReadOnlyDictionary componentVersions = null) + /// Initializes a new instance of SshProfile. + /// Number of ssh pods per cluster. + /// 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>. + /// A new instance for mocking. + public static SshProfile SshProfile(int count = default, string podPrefix = null) { - componentVersions ??= new Dictionary(); - - return new HDInsightVersionSpec(friendlyName, displayName, isDefault, componentVersions); + return new SshProfile(count, podPrefix); } - /// Initializes a new instance of RegionsCapability. - /// The list of region capabilities. - /// A new instance for mocking. - public static RegionsCapability RegionsCapability(IEnumerable available = null) - { - available ??= new List(); - - return new RegionsCapability(available?.ToList()); - } - - /// Initializes a new instance of QuotaCapability. - /// The number of cores used in the subscription. - /// The number of cores that the subscription allowed. - /// The list of region quota capabilities. - /// A new instance for mocking. - public static QuotaCapability QuotaCapability(long? coresUsed = null, long? maxCoresAllowed = null, IEnumerable regionalQuotas = null) + /// Initializes a new instance of ClusterResizeData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Target node count of worker node. + /// A new instance for mocking. + public static ClusterResizeData ClusterResizeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, int? targetWorkerNodeCount = null) { - regionalQuotas ??= new List(); + tags ??= new Dictionary(); - return new QuotaCapability(coresUsed, maxCoresAllowed, regionalQuotas?.ToList()); + return new ClusterResizeData(id, name, resourceType, systemData, tags, location, targetWorkerNodeCount); } - /// Initializes a new instance of RegionalQuotaCapability. - /// The region name. - /// The number of cores used in the region. - /// The number of cores available in the region. - /// A new instance for mocking. - public static RegionalQuotaCapability RegionalQuotaCapability(AzureLocation? region = null, long? coresUsed = null, long? coresAvailable = null) - { - return new RegionalQuotaCapability(region, coresUsed, coresAvailable); - } - - /// Initializes a new instance of HDInsightUsage. - /// The type of measurement for usage. - /// The current usage. - /// The maximum allowed usage. - /// The details about the localizable name of the used resource. - /// A new instance for mocking. - public static HDInsightUsage HDInsightUsage(string unit = null, long? currentValue = null, long? limit = null, HDInsightLocalizedName name = null) + /// Initializes a new instance of HDInsightClusterPatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Cluster resource patch properties. + /// A new instance for mocking. + public static HDInsightClusterPatch HDInsightClusterPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, UpdatableClusterProfile clusterProfile = null) { - return new HDInsightUsage(unit, currentValue, limit, name); - } + tags ??= new Dictionary(); - /// Initializes a new instance of HDInsightLocalizedName. - /// The name of the used resource. - /// The localized name of the used resource. - /// A new instance for mocking. - public static HDInsightLocalizedName HDInsightLocalizedName(string value = null, string localizedValue = null) - { - return new HDInsightLocalizedName(value, localizedValue); + return new HDInsightClusterPatch(id, name, resourceType, systemData, tags, location, clusterProfile); } - /// Initializes a new instance of HDInsightBillingSpecsListResult. - /// The virtual machine sizes to include or exclude. - /// The vm sizes which enable encryption at host. - /// The virtual machine filtering mode. Effectively this can enabling or disabling the virtual machine sizes in a particular set. - /// The vm size properties. - /// The billing and managed disk billing resources for a region. - /// A new instance for mocking. - public static HDInsightBillingSpecsListResult HDInsightBillingSpecsListResult(IEnumerable vmSizes = null, IEnumerable vmSizesWithEncryptionAtHost = null, IEnumerable vmSizeFilters = null, IEnumerable vmSizeProperties = null, IEnumerable billingResources = null) + /// Initializes a new instance of ClusterJob. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Properties of cluster job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// A new instance for mocking. + public static ClusterJob ClusterJob(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ClusterJobProperties properties = null) { - vmSizes ??= new List(); - vmSizesWithEncryptionAtHost ??= new List(); - vmSizeFilters ??= new List(); - vmSizeProperties ??= new List(); - billingResources ??= new List(); - - return new HDInsightBillingSpecsListResult(vmSizes?.ToList(), vmSizesWithEncryptionAtHost?.ToList(), vmSizeFilters?.ToList(), vmSizeProperties?.ToList(), billingResources?.ToList()); + return new ClusterJob(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of HDInsightVmSizeCompatibilityFilterV2. - /// The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. - /// The list of regions under the effect of the filter. - /// The list of cluster flavors under the effect of the filter. - /// The list of node types affected by the filter. - /// The list of cluster versions affected in Major.Minor format. - /// The OSType affected, Windows or Linux. - /// The list of virtual machine sizes to include or exclude. - /// Whether apply for ESP cluster. 'true' means only for ESP, 'false' means only for non-ESP, null or empty string or others mean for both. - /// Whether support compute isolation. 'true' means only for ComputeIsolationEnabled, 'false' means only for regular cluster. - /// A new instance for mocking. - public static HDInsightVmSizeCompatibilityFilterV2 HDInsightVmSizeCompatibilityFilterV2(HDInsightFilterMode? filterMode = null, IEnumerable regions = null, IEnumerable clusterFlavors = null, IEnumerable nodeTypes = null, IEnumerable clusterVersions = null, IEnumerable osType = null, IEnumerable vmSizes = null, string espApplied = null, string isComputeIsolationSupported = null) + /// Initializes a new instance of ServiceConfigResult. + /// Service Config Name. + /// File Name. + /// Content in the service config file. + /// Component Name. + /// Config type. + /// Config file path. + /// The custom keys. + /// The default keys. + /// A new instance for mocking. + public static ServiceConfigResult ServiceConfigResult(string serviceName = null, string fileName = null, string content = null, string componentName = null, string serviceConfigListResultPropertiesType = null, string path = null, IReadOnlyDictionary customKeys = null, IReadOnlyDictionary defaultKeys = null) { - regions ??= new List(); - clusterFlavors ??= new List(); - nodeTypes ??= new List(); - clusterVersions ??= new List(); - osType ??= new List(); - vmSizes ??= new List(); - - return new HDInsightVmSizeCompatibilityFilterV2(filterMode, regions?.ToList(), clusterFlavors?.ToList(), nodeTypes?.ToList(), clusterVersions?.ToList(), osType?.ToList(), vmSizes?.ToList(), espApplied, isComputeIsolationSupported); - } + customKeys ??= new Dictionary(); + defaultKeys ??= new Dictionary(); - /// Initializes a new instance of HDInsightVmSizeProperty. - /// The vm size name. - /// The number of cores that the vm size has. - /// The data disk storage tier of the vm size. - /// The label of the vm size. - /// The max data disk count of the vm size. - /// The memory whose unit is MB of the vm size. - /// This indicates this vm size is supported by virtual machines or not. - /// The indicates this vm size is supported by web worker roles or not. - /// The virtual machine resource disk size whose unit is MB of the vm size. - /// The web worker resource disk size whose unit is MB of the vm size. - /// A new instance for mocking. - public static HDInsightVmSizeProperty HDInsightVmSizeProperty(string name = null, int? cores = null, string dataDiskStorageTier = null, string label = null, long? maxDataDiskCount = null, long? memoryInMB = null, bool? isSupportedByVirtualMachines = null, bool? isSupportedByWebWorkerRoles = null, long? virtualMachineResourceDiskSizeInMB = null, long? webWorkerResourceDiskSizeInMB = null) - { - return new HDInsightVmSizeProperty(name, cores, dataDiskStorageTier, label, maxDataDiskCount, memoryInMB, isSupportedByVirtualMachines, isSupportedByWebWorkerRoles, virtualMachineResourceDiskSizeInMB, webWorkerResourceDiskSizeInMB); + return new ServiceConfigResult(serviceName, fileName, content, componentName, serviceConfigListResultPropertiesType, path, customKeys, defaultKeys); } - /// Initializes a new instance of HDInsightBillingResources. - /// The region or location. - /// The billing meter information. - /// The managed disk billing information. - /// A new instance for mocking. - public static HDInsightBillingResources HDInsightBillingResources(AzureLocation? region = null, IEnumerable billingMeters = null, IEnumerable diskBillingMeters = null) + /// Initializes a new instance of ServiceConfigListResultValueEntity. + /// Config value. + /// Config description. + /// A new instance for mocking. + public static ServiceConfigListResultValueEntity ServiceConfigListResultValueEntity(string value = null, string description = null) { - billingMeters ??= new List(); - diskBillingMeters ??= new List(); - - return new HDInsightBillingResources(region, billingMeters?.ToList(), diskBillingMeters?.ToList()); + return new ServiceConfigListResultValueEntity(value, description); } - /// Initializes a new instance of HDInsightBillingMeters. - /// The virtual machine sizes. - /// The HDInsight meter guid. - /// The unit of meter, VMHours or CoreHours. - /// A new instance for mocking. - public static HDInsightBillingMeters HDInsightBillingMeters(string meterParameter = null, string meter = null, string unit = null) + /// Initializes a new instance of NameAvailabilityResult. + /// Indicator of availability of the Microsoft.HDInsight resource name. + /// The reason of unavailability. + /// The error message of unavailability. + /// A new instance for mocking. + public static NameAvailabilityResult NameAvailabilityResult(bool? nameAvailable = null, string reason = null, string message = null) { - return new HDInsightBillingMeters(meterParameter, meter, unit); + return new NameAvailabilityResult(nameAvailable, reason, message); } - /// Initializes a new instance of HDInsightDiskBillingMeters. - /// The managed disk meter guid. - /// The managed disk billing sku, P30 or S30. - /// The managed disk billing tier, Standard or Premium. - /// A new instance for mocking. - public static HDInsightDiskBillingMeters HDInsightDiskBillingMeters(string diskRpMeter = null, string sku = null, HDInsightTier? tier = null) + /// Initializes a new instance of ClusterInstanceViewResult. + /// Name of the instance view. + /// Status of the instance view. + /// List of statuses of relevant services that make up the HDInsight on aks cluster to surface to the customer. + /// A new instance for mocking. + public static ClusterInstanceViewResult ClusterInstanceViewResult(string name = null, ClusterInstanceViewPropertiesStatus status = null, IEnumerable serviceStatuses = null) { - return new HDInsightDiskBillingMeters(diskRpMeter, sku, tier); - } + serviceStatuses ??= new List(); - /// Initializes a new instance of HDInsightNameAvailabilityResult. - /// This indicates whether the name is available. - /// The reason of the result. - /// The related message. - /// A new instance for mocking. - public static HDInsightNameAvailabilityResult HDInsightNameAvailabilityResult(bool? isNameAvailable = null, string reason = null, string message = null) - { - return new HDInsightNameAvailabilityResult(isNameAvailable, reason, message); + return new ClusterInstanceViewResult(name, status, serviceStatuses?.ToList()); } - /// Initializes a new instance of HDInsightClusterCreationValidateResult. - /// The validation errors. - /// The validation warnings. - /// The estimated creation duration. - /// The Azure active directory domain service resource details. - /// A new instance for mocking. - public static HDInsightClusterCreationValidateResult HDInsightClusterCreationValidateResult(IEnumerable validationErrors = null, IEnumerable validationWarnings = null, TimeSpan? estimatedCreationDuration = null, IEnumerable aaddsResourcesDetails = null) + /// Initializes a new instance of ClusterInstanceViewPropertiesStatus. + /// The cluster ready status. + /// The status reason. + /// The additional message. + /// A new instance for mocking. + public static ClusterInstanceViewPropertiesStatus ClusterInstanceViewPropertiesStatus(string ready = null, string reason = null, string message = null) { - validationErrors ??= new List(); - validationWarnings ??= new List(); - aaddsResourcesDetails ??= new List(); - - return new HDInsightClusterCreationValidateResult(validationErrors?.ToList(), validationWarnings?.ToList(), estimatedCreationDuration, aaddsResourcesDetails?.ToList()); + return new ClusterInstanceViewPropertiesStatus(ready, reason, message); } - /// Initializes a new instance of HDInsightClusterValidationErrorInfo. - /// The error code. - /// The error message. - /// The error resource. - /// The message arguments. - /// A new instance for mocking. - public static HDInsightClusterValidationErrorInfo HDInsightClusterValidationErrorInfo(string code = null, string message = null, string errorResource = null, IEnumerable messageArguments = null) + /// Initializes a new instance of ClusterInstanceViewStatus. + /// The cluster ready status. + /// The status reason. + /// The additional message. + /// A new instance for mocking. + public static ClusterInstanceViewStatus ClusterInstanceViewStatus(string ready = null, string reason = null, string message = null) { - messageArguments ??= new List(); - - return new HDInsightClusterValidationErrorInfo(code, message, errorResource, messageArguments?.ToList()); + return new ClusterInstanceViewStatus(ready, reason, message); } - /// Initializes a new instance of HDInsightClusterAaddsDetail. - /// The Azure active directory domain service name. - /// This indicates whether initial sync complete or not. - /// This indicates whether enable ldaps or not. - /// The base 64 format string of public ldap certificate. - /// The resource id of azure active directory domain service. - /// The subnet resource id. - /// The tenant id of azure active directory domain service . - /// A new instance for mocking. - public static HDInsightClusterAaddsDetail HDInsightClusterAaddsDetail(string domainName = null, bool? isInitialSyncComplete = null, bool? isLdapsEnabled = null, string ldapsPublicCertificateInBase64 = null, ResourceIdentifier resourceId = null, ResourceIdentifier subnetId = null, Guid? tenantId = null) + /// Initializes a new instance of ServiceStatus. + /// Kind of the service. E.g. "Zookeeper". + /// Indicates if the service is ready / healthy. Values can be "true", "false", "unknown" or anything else. + /// A message describing the error if any. + /// A new instance for mocking. + public static ServiceStatus ServiceStatus(string kind = null, string ready = null, string message = null) { - return new HDInsightClusterAaddsDetail(domainName, isInitialSyncComplete, isLdapsEnabled, ldapsPublicCertificateInBase64, resourceId, subnetId, tenantId); + return new ServiceStatus(kind, ready, message); } - /// Initializes a new instance of HDInsightPrivateLinkResourceData. + /// Initializes a new instance of ClusterPoolVersion. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The private link resource group id. - /// The private link resource required member names. - /// The private link resource Private link DNS zone name. - /// A new instance for mocking. - public static HDInsightPrivateLinkResourceData HDInsightPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) + /// Cluster pool version is a 2-part version. + /// AKS version. + /// Indicate if this version is in preview or not. + /// A new instance for mocking. + public static ClusterPoolVersion ClusterPoolVersion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string clusterPoolVersionValue = null, string aksVersion = null, bool? isPreview = null) { - requiredMembers ??= new List(); - requiredZoneNames ??= new List(); - - return new HDInsightPrivateLinkResourceData(id, name, resourceType, systemData, groupId, requiredMembers?.ToList(), requiredZoneNames?.ToList()); + return new ClusterPoolVersion(id, name, resourceType, systemData, clusterPoolVersionValue, aksVersion, isPreview); } - /// Initializes a new instance of RuntimeScriptActionDetail. - /// The name of the script action. - /// The URI to the script. - /// The parameters for the script. - /// The list of roles where script will be executed. - /// The application name of the script action, if any. - /// The execution id of the script action. - /// The start time of script action execution. - /// The end time of script action execution. - /// The current execution status of the script action. - /// The reason why the script action was executed. - /// The summary of script action execution result. - /// The script action execution debug information. - /// A new instance for mocking. - public static RuntimeScriptActionDetail RuntimeScriptActionDetail(string name = null, Uri uri = null, string parameters = null, IEnumerable roles = null, string applicationName = null, long? scriptExecutionId = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string status = null, string operation = null, IEnumerable executionSummary = null, string debugInformation = null) - { - roles ??= new List(); - executionSummary ??= new List(); - - return new RuntimeScriptActionDetail(name, uri, parameters, roles?.ToList(), applicationName, scriptExecutionId, startOn, endOn, status, operation, executionSummary?.ToList(), debugInformation); - } - - /// Initializes a new instance of ScriptActionExecutionSummary. - /// The status of script action execution. - /// The instance count for a given script action execution status. - /// A new instance for mocking. - public static ScriptActionExecutionSummary ScriptActionExecutionSummary(string status = null, int? instanceCount = null) - { - return new ScriptActionExecutionSummary(status, instanceCount); - } - - /// Initializes a new instance of HDInsightClusterHostInfo. - /// The host name. - /// The Fully Qualified Domain Name of host. - /// The effective disk encryption key URL used by the host. - /// A new instance for mocking. - public static HDInsightClusterHostInfo HDInsightClusterHostInfo(string name = null, string fqdn = null, Uri effectiveDiskEncryptionKeyUri = null) - { - return new HDInsightClusterHostInfo(name, fqdn, effectiveDiskEncryptionKeyUri); + /// Initializes a new instance of ClusterVersion. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The type of cluster. + /// Version with three part. + /// Version with three part. + /// The two part cluster pool version. If the cluster version is before cluster pool version on-board, the return value will be empty string. + /// Indicate if this version is in preview or not. + /// Component list of this cluster type and version. + /// A new instance for mocking. + public static ClusterVersion ClusterVersion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string clusterType = null, string clusterVersionValue = null, string ossVersion = null, string clusterPoolVersion = null, bool? isPreview = null, IEnumerable components = null) + { + components ??= new List(); + + return new ClusterVersion(id, name, resourceType, systemData, clusterType, clusterVersionValue, ossVersion, clusterPoolVersion, isPreview, components?.ToList()); + } + + /// Initializes a new instance of FlinkJobProperties. + /// Name of job. + /// A string property that specifies the directory where the job JAR is located. + /// A string property that represents the name of the job JAR. + /// A string property that specifies the entry class for the Flink job. + /// A string property representing additional JVM arguments for the Flink job. It should be space separated value. + /// A string property that represents the name of the savepoint for the Flink job. + /// 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. + /// 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. + /// Unique id for identifying a job. + /// Status of job. + /// Output of job. + /// Action result of job. + /// The last savepoint. + /// A new instance for mocking. + public static FlinkJobProperties FlinkJobProperties(string jobName = null, string jobJarDirectory = null, string jarName = null, string entryClass = null, string args = null, string savePointName = null, Action? action = null, IDictionary flinkConfiguration = null, string jobId = null, string status = null, string jobOutput = null, string actionResult = null, string lastSavePoint = null) + { + flinkConfiguration ??= new Dictionary(); + + return new FlinkJobProperties(JobType.FlinkJob, jobName, jobJarDirectory, jarName, entryClass, args, savePointName, action, flinkConfiguration, jobId, status, jobOutput, actionResult, lastSavePoint); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ClusterPoolCollection.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ClusterPoolCollection.cs new file mode 100644 index 000000000000..7e9d5ff6740d --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ClusterPoolCollection.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.HDInsight +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetClusterPools method from an instance of . + /// + public partial class ClusterPoolCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _clusterPoolClientDiagnostics; + private readonly ClusterPoolsRestOperations _clusterPoolRestClient; + + /// Initializes a new instance of the class for mocking. + protected ClusterPoolCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ClusterPoolCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _clusterPoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", ClusterPoolResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ClusterPoolResource.ResourceType, out string clusterPoolApiVersion); + _clusterPoolRestClient = new ClusterPoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, clusterPoolApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a cluster pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} + /// + /// + /// Operation Id + /// ClusterPools_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the cluster pool. + /// The Cluster Pool to create. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string clusterPoolName, ClusterPoolData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _clusterPoolRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, clusterPoolName, data, cancellationToken).ConfigureAwait(false); + var operation = new HDInsightArmOperation(new ClusterPoolOperationSource(Client), _clusterPoolClientDiagnostics, Pipeline, _clusterPoolRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, clusterPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a cluster pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} + /// + /// + /// Operation Id + /// ClusterPools_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the cluster pool. + /// The Cluster Pool to create. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string clusterPoolName, ClusterPoolData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _clusterPoolRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, clusterPoolName, data, cancellationToken); + var operation = new HDInsightArmOperation(new ClusterPoolOperationSource(Client), _clusterPoolClientDiagnostics, Pipeline, _clusterPoolRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, clusterPoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a cluster pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} + /// + /// + /// Operation Id + /// ClusterPools_Get + /// + /// + /// + /// The name of the cluster pool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string clusterPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolCollection.Get"); + scope.Start(); + try + { + var response = await _clusterPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, clusterPoolName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ClusterPoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a cluster pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} + /// + /// + /// Operation Id + /// ClusterPools_Get + /// + /// + /// + /// The name of the cluster pool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string clusterPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolCollection.Get"); + scope.Start(); + try + { + var response = _clusterPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, clusterPoolName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ClusterPoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the HDInsight cluster pools under a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools + /// + /// + /// Operation Id + /// ClusterPools_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _clusterPoolRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _clusterPoolRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ClusterPoolResource(Client, ClusterPoolData.DeserializeClusterPoolData(e)), _clusterPoolClientDiagnostics, Pipeline, "ClusterPoolCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the HDInsight cluster pools under a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools + /// + /// + /// Operation Id + /// ClusterPools_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _clusterPoolRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _clusterPoolRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ClusterPoolResource(Client, ClusterPoolData.DeserializeClusterPoolData(e)), _clusterPoolClientDiagnostics, Pipeline, "ClusterPoolCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} + /// + /// + /// Operation Id + /// ClusterPools_Get + /// + /// + /// + /// The name of the cluster pool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string clusterPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolCollection.Exists"); + scope.Start(); + try + { + var response = await _clusterPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, clusterPoolName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} + /// + /// + /// Operation Id + /// ClusterPools_Get + /// + /// + /// + /// The name of the cluster pool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string clusterPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolCollection.Exists"); + scope.Start(); + try + { + var response = _clusterPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, clusterPoolName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ClusterPoolData.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ClusterPoolData.cs new file mode 100644 index 000000000000..cbc8297c95ce --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ClusterPoolData.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.HDInsight.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HDInsight +{ + /// + /// A class representing the ClusterPool data model. + /// Cluster pool. + /// + public partial class ClusterPoolData : TrackedResourceData + { + /// Initializes a new instance of ClusterPoolData. + /// The location. + public ClusterPoolData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of ClusterPoolData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Provisioning state of the resource. + /// A unique id generated by the RP to identify the resource. + /// 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. + /// 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}. + /// CLuster pool profile. + /// CLuster pool compute profile. + /// Properties of underlying AKS cluster. + /// Cluster pool network profile. + /// Cluster pool log analytics profile to enable OMS agent for AKS cluster. + /// Business status of the resource. + internal ClusterPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ProvisioningStatus? provisioningState, string deploymentId, string managedResourceGroupName, string aksManagedResourceGroupName, ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile, ClusterPoolResourcePropertiesComputeProfile computeProfile, ClusterPoolResourcePropertiesAksClusterProfile aksClusterProfile, ClusterPoolResourcePropertiesNetworkProfile networkProfile, ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile, string status) : base(id, name, resourceType, systemData, tags, location) + { + ProvisioningState = provisioningState; + DeploymentId = deploymentId; + ManagedResourceGroupName = managedResourceGroupName; + AksManagedResourceGroupName = aksManagedResourceGroupName; + ClusterPoolProfile = clusterPoolProfile; + ComputeProfile = computeProfile; + AksClusterProfile = aksClusterProfile; + NetworkProfile = networkProfile; + LogAnalyticsProfile = logAnalyticsProfile; + Status = status; + } + + /// Provisioning state of the resource. + public ProvisioningStatus? ProvisioningState { get; } + /// A unique id generated by the RP to identify the resource. + public string DeploymentId { get; } + /// 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. + public string ManagedResourceGroupName { get; set; } + /// 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}. + public string AksManagedResourceGroupName { get; } + /// CLuster pool profile. + internal ClusterPoolResourcePropertiesClusterPoolProfile ClusterPoolProfile { get; set; } + /// Cluster pool version is a 2-part version. + public string ClusterPoolVersion + { + get => ClusterPoolProfile is null ? default : ClusterPoolProfile.ClusterPoolVersion; + set => ClusterPoolProfile = new ClusterPoolResourcePropertiesClusterPoolProfile(value); + } + + /// CLuster pool compute profile. + public ClusterPoolResourcePropertiesComputeProfile ComputeProfile { get; set; } + /// Properties of underlying AKS cluster. + public ClusterPoolResourcePropertiesAksClusterProfile AksClusterProfile { get; } + /// Cluster pool network profile. + internal ClusterPoolResourcePropertiesNetworkProfile NetworkProfile { get; set; } + /// Cluster pool subnet resource id. + public ResourceIdentifier NetworkSubnetId + { + get => NetworkProfile is null ? default : NetworkProfile.SubnetId; + set => NetworkProfile = new ClusterPoolResourcePropertiesNetworkProfile(value); + } + + /// Cluster pool log analytics profile to enable OMS agent for AKS cluster. + public ClusterPoolResourcePropertiesLogAnalyticsProfile LogAnalyticsProfile { get; set; } + /// Business status of the resource. + public string Status { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationResource.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ClusterPoolResource.cs similarity index 59% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationResource.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ClusterPoolResource.cs index 2ad884d0e684..e4294904d9c5 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationResource.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/ClusterPoolResource.cs @@ -15,64 +15,65 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; using Azure.ResourceManager.HDInsight.Models; +using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.HDInsight { /// - /// A Class representing a HDInsightApplication along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetHDInsightApplicationResource method. - /// Otherwise you can get one from its parent resource using the GetHDInsightApplication method. + /// A Class representing a ClusterPool along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetClusterPoolResource method. + /// Otherwise you can get one from its parent resource using the GetClusterPool method. /// - public partial class HDInsightApplicationResource : ArmResource + public partial class ClusterPoolResource : ArmResource { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterPoolName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _hdInsightApplicationApplicationsClientDiagnostics; - private readonly ApplicationsRestOperations _hdInsightApplicationApplicationsRestClient; - private readonly HDInsightApplicationData _data; + private readonly ClientDiagnostics _clusterPoolClientDiagnostics; + private readonly ClusterPoolsRestOperations _clusterPoolRestClient; + private readonly ClusterPoolData _data; - /// Initializes a new instance of the class for mocking. - protected HDInsightApplicationResource() + /// Initializes a new instance of the class for mocking. + protected ClusterPoolResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal HDInsightApplicationResource(ArmClient client, HDInsightApplicationData data) : this(client, data.Id) + internal ClusterPoolResource(ArmClient client, ClusterPoolData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal HDInsightApplicationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal ClusterPoolResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _hdInsightApplicationApplicationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string hdInsightApplicationApplicationsApiVersion); - _hdInsightApplicationApplicationsRestClient = new ApplicationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hdInsightApplicationApplicationsApiVersion); + _clusterPoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string clusterPoolApiVersion); + _clusterPoolRestClient = new ClusterPoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, clusterPoolApiVersion); #if DEBUG ValidateResourceId(Id); #endif } /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.HDInsight/clusters/applications"; + public static readonly ResourceType ResourceType = "Microsoft.HDInsight/clusterpools"; /// Gets whether or not the current instance has data. public virtual bool HasData { get; } /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual HDInsightApplicationData Data + public virtual ClusterPoolData Data { get { @@ -88,96 +89,83 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of HDInsightClusterResources in the ClusterPool. + /// An object representing collection of HDInsightClusterResources and their operations over a HDInsightClusterResource. + public virtual HDInsightClusterCollection GetHDInsightClusters() + { + return GetCachedClient(Client => new HDInsightClusterCollection(Client, Id)); + } + /// - /// Gets properties of the specified application. + /// Gets a HDInsight cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id - /// Applications_Get + /// Clusters_Get /// /// /// + /// The name of the HDInsight cluster. /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetHDInsightClusterAsync(string clusterName, CancellationToken cancellationToken = default) { - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.Get"); - scope.Start(); - try - { - var response = await _hdInsightApplicationApplicationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HDInsightApplicationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + return await GetHDInsightClusters().GetAsync(clusterName, cancellationToken).ConfigureAwait(false); } /// - /// Gets properties of the specified application. + /// Gets a HDInsight cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id - /// Applications_Get + /// Clusters_Get /// /// /// + /// The name of the HDInsight cluster. /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetHDInsightCluster(string clusterName, CancellationToken cancellationToken = default) { - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.Get"); - scope.Start(); - try - { - var response = _hdInsightApplicationApplicationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HDInsightApplicationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + return GetHDInsightClusters().Get(clusterName, cancellationToken); } /// - /// Deletes the specified application on the HDInsight cluster. + /// Gets a cluster pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Applications_Delete + /// ClusterPools_Get /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.Delete"); + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolResource.Get"); scope.Start(); try { - var response = await _hdInsightApplicationApplicationsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_hdInsightApplicationApplicationsClientDiagnostics, Pipeline, _hdInsightApplicationApplicationsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _clusterPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ClusterPoolResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -187,31 +175,29 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Deletes the specified application on the HDInsight cluster. + /// Gets a cluster pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Applications_Delete + /// ClusterPools_Get /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.Delete"); + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolResource.Get"); scope.Start(); try { - var response = _hdInsightApplicationApplicationsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new HDInsightArmOperation(_hdInsightApplicationApplicationsClientDiagnostics, Pipeline, _hdInsightApplicationApplicationsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; + var response = _clusterPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ClusterPoolResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -221,34 +207,30 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Creates applications for the HDInsight cluster. + /// Deletes a Cluster Pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Applications_Create + /// ClusterPools_Delete /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The application create request. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, HDInsightApplicationData data, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.Update"); + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolResource.Delete"); scope.Start(); try { - var response = await _hdInsightApplicationApplicationsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(new HDInsightApplicationOperationSource(Client), _hdInsightApplicationApplicationsClientDiagnostics, Pipeline, _hdInsightApplicationApplicationsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _clusterPoolRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new HDInsightArmOperation(_clusterPoolClientDiagnostics, Pipeline, _clusterPoolRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -259,34 +241,30 @@ public virtual async Task> UpdateAsyn } /// - /// Creates applications for the HDInsight cluster. + /// Deletes a Cluster Pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Applications_Create + /// ClusterPools_Delete /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The application create request. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, HDInsightApplicationData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.Update"); + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolResource.Delete"); scope.Start(); try { - var response = _hdInsightApplicationApplicationsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new HDInsightArmOperation(new HDInsightApplicationOperationSource(Client), _hdInsightApplicationApplicationsClientDiagnostics, Pipeline, _hdInsightApplicationApplicationsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _clusterPoolRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new HDInsightArmOperation(_clusterPoolClientDiagnostics, Pipeline, _clusterPoolRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); + operation.WaitForCompletionResponse(cancellationToken); return operation; } catch (Exception e) @@ -297,32 +275,35 @@ public virtual ArmOperation Update(WaitUntil waitU } /// - /// Gets the async operation status. + /// Updates an existing Cluster Pool Tags. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}/azureasyncoperations/{operationId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Applications_GetAzureAsyncOperationStatus + /// ClusterPools_UpdateTags /// /// /// - /// The long running operation id. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to update tags. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAzureAsyncOperationStatusAsync(string operationId, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ClusterPoolPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.GetAzureAsyncOperationStatus"); + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolResource.Update"); scope.Start(); try { - var response = await _hdInsightApplicationApplicationsRestClient.GetAzureAsyncOperationStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); - return response; + var response = await _clusterPoolRestClient.UpdateTagsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new HDInsightArmOperation(new ClusterPoolOperationSource(Client), _clusterPoolClientDiagnostics, Pipeline, _clusterPoolRestClient.CreateUpdateTagsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -332,32 +313,35 @@ public virtual async Task> GetAzureAsync } /// - /// Gets the async operation status. + /// Updates an existing Cluster Pool Tags. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}/azureasyncoperations/{operationId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Applications_GetAzureAsyncOperationStatus + /// ClusterPools_UpdateTags /// /// /// - /// The long running operation id. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to update tags. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetAzureAsyncOperationStatus(string operationId, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ClusterPoolPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.GetAzureAsyncOperationStatus"); + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolResource.Update"); scope.Start(); try { - var response = _hdInsightApplicationApplicationsRestClient.GetAzureAsyncOperationStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); - return response; + var response = _clusterPoolRestClient.UpdateTags(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new HDInsightArmOperation(new ClusterPoolOperationSource(Client), _clusterPoolClientDiagnostics, Pipeline, _clusterPoolRestClient.CreateUpdateTagsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; } catch (Exception e) { @@ -371,11 +355,11 @@ public virtual Response GetAzureAsyncOperationSta /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Applications_Get + /// ClusterPools_Get /// /// /// @@ -383,12 +367,12 @@ public virtual Response GetAzureAsyncOperationSta /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.AddTag"); + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolResource.AddTag"); scope.Start(); try { @@ -397,14 +381,19 @@ public virtual async Task> AddTagAsync(st var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _hdInsightApplicationApplicationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HDInsightApplicationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _clusterPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ClusterPoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + var patch = new ClusterPoolPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -420,11 +409,11 @@ public virtual async Task> AddTagAsync(st /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Applications_Get + /// ClusterPools_Get /// /// /// @@ -432,12 +421,12 @@ public virtual async Task> AddTagAsync(st /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.AddTag"); + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolResource.AddTag"); scope.Start(); try { @@ -446,14 +435,19 @@ public virtual Response AddTag(string key, string var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _hdInsightApplicationApplicationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new HDInsightApplicationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _clusterPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ClusterPoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags[key] = value; - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + var patch = new ClusterPoolPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -469,22 +463,22 @@ public virtual Response AddTag(string key, string /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Applications_Get + /// ClusterPools_Get /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.SetTags"); + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolResource.SetTags"); scope.Start(); try { @@ -494,14 +488,15 @@ public virtual async Task> SetTagsAsync(I var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _hdInsightApplicationApplicationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HDInsightApplicationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _clusterPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ClusterPoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + var patch = new ClusterPoolPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -517,22 +512,22 @@ public virtual async Task> SetTagsAsync(I /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Applications_Get + /// ClusterPools_Get /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.SetTags"); + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolResource.SetTags"); scope.Start(); try { @@ -542,14 +537,15 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Applications_Get + /// ClusterPools_Get /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.RemoveTag"); + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolResource.RemoveTag"); scope.Start(); try { @@ -589,14 +585,19 @@ public virtual async Task> RemoveTagAsync var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _hdInsightApplicationApplicationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HDInsightApplicationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _clusterPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ClusterPoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + var patch = new ClusterPoolPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -612,22 +613,22 @@ public virtual async Task> RemoveTagAsync /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Applications_Get + /// ClusterPools_Get /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationResource.RemoveTag"); + using var scope = _clusterPoolClientDiagnostics.CreateScope("ClusterPoolResource.RemoveTag"); scope.Start(); try { @@ -636,14 +637,19 @@ public virtual Response RemoveTag(string key, Canc var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _hdInsightApplicationApplicationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new HDInsightApplicationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _clusterPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ClusterPoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.Remove(key); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + var patch = new ClusterPoolPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Extensions/HDInsightExtensions.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Extensions/HDInsightExtensions.cs index cd9ce4463aac..5b2a8a784b8f 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Extensions/HDInsightExtensions.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Extensions/HDInsightExtensions.cs @@ -50,20 +50,20 @@ private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtens return new SubscriptionResourceExtensionClient(client, scope); }); } - #region HDInsightApplicationResource + #region ClusterPoolResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static HDInsightApplicationResource GetHDInsightApplicationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ClusterPoolResource GetClusterPoolResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - HDInsightApplicationResource.ValidateResourceId(id); - return new HDInsightApplicationResource(client, id); + ClusterPoolResource.ValidateResourceId(id); + return new ClusterPoolResource(client, id); } ); } @@ -88,368 +88,240 @@ public static HDInsightClusterResource GetHDInsightClusterResource(this ArmClien } #endregion - #region HDInsightPrivateEndpointConnectionResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static HDInsightPrivateEndpointConnectionResource GetHDInsightPrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - HDInsightPrivateEndpointConnectionResource.ValidateResourceId(id); - return new HDInsightPrivateEndpointConnectionResource(client, id); - } - ); - } - #endregion - - #region HDInsightPrivateLinkResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static HDInsightPrivateLinkResource GetHDInsightPrivateLinkResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - HDInsightPrivateLinkResource.ValidateResourceId(id); - return new HDInsightPrivateLinkResource(client, id); - } - ); - } - #endregion - - /// Gets a collection of HDInsightClusterResources in the ResourceGroupResource. + /// Gets a collection of ClusterPoolResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of HDInsightClusterResources and their operations over a HDInsightClusterResource. - public static HDInsightClusterCollection GetHDInsightClusters(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of ClusterPoolResources and their operations over a ClusterPoolResource. + public static ClusterPoolCollection GetClusterPools(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetHDInsightClusters(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetClusterPools(); } /// - /// Gets the specified cluster. + /// Gets a cluster pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Clusters_Get + /// ClusterPools_Get /// /// /// /// The instance the method will execute against. - /// The name of the cluster. + /// The name of the cluster pool. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public static async Task> GetHDInsightClusterAsync(this ResourceGroupResource resourceGroupResource, string clusterName, CancellationToken cancellationToken = default) + public static async Task> GetClusterPoolAsync(this ResourceGroupResource resourceGroupResource, string clusterPoolName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetHDInsightClusters().GetAsync(clusterName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetClusterPools().GetAsync(clusterPoolName, cancellationToken).ConfigureAwait(false); } /// - /// Gets the specified cluster. + /// Gets a cluster pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName} /// /// /// Operation Id - /// Clusters_Get + /// ClusterPools_Get /// /// /// /// The instance the method will execute against. - /// The name of the cluster. + /// The name of the cluster pool. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public static Response GetHDInsightCluster(this ResourceGroupResource resourceGroupResource, string clusterName, CancellationToken cancellationToken = default) + public static Response GetClusterPool(this ResourceGroupResource resourceGroupResource, string clusterPoolName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetHDInsightClusters().Get(clusterName, cancellationToken); + return resourceGroupResource.GetClusterPools().Get(clusterPoolName, cancellationToken); } /// - /// Lists all the HDInsight clusters under the subscription. + /// Gets the list of Cluster Pools within a Subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusters + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusterpools /// /// /// Operation Id - /// Clusters_List + /// ClusterPools_ListBySubscription /// /// /// /// The instance the method will execute against. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetHDInsightClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetClusterPoolsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetHDInsightClustersAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetClusterPoolsAsync(cancellationToken); } /// - /// Lists all the HDInsight clusters under the subscription. + /// Gets the list of Cluster Pools within a Subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusters + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusterpools /// /// /// Operation Id - /// Clusters_List + /// ClusterPools_ListBySubscription /// /// /// /// The instance the method will execute against. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetHDInsightClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetClusterPools(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetHDInsightClusters(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetClusterPools(cancellationToken); } /// - /// Gets the capabilities for the specified location. + /// Check the availability of the resource name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/capabilities - /// - /// - /// Operation Id - /// Locations_GetCapabilities - /// - /// - /// - /// The instance the method will execute against. - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - public static async Task> GetHDInsightCapabilitiesAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) - { - return await GetSubscriptionResourceExtensionClient(subscriptionResource).GetHDInsightCapabilitiesAsync(location, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the capabilities for the specified location. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/capabilities - /// - /// - /// Operation Id - /// Locations_GetCapabilities - /// - /// - /// - /// The instance the method will execute against. - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - public static Response GetHDInsightCapabilities(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) - { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetHDInsightCapabilities(location, cancellationToken); - } - - /// - /// Lists the usages for the specified location. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/usages + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/checkNameAvailability /// /// /// Operation Id - /// Locations_ListUsages + /// Locations_CheckNameAvailability /// /// /// /// The instance the method will execute against. - /// The Azure location (region) for which to make the request. + /// The name of the Azure region. + /// The name and type of the resource. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetHDInsightUsagesAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + /// is null. + public static async Task> CheckHDInsightNameAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetHDInsightUsagesAsync(location, cancellationToken); - } + Argument.AssertNotNull(content, nameof(content)); - /// - /// Lists the usages for the specified location. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/usages - /// - /// - /// Operation Id - /// Locations_ListUsages - /// - /// - /// - /// The instance the method will execute against. - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetHDInsightUsages(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) - { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetHDInsightUsages(location, cancellationToken); + return await GetSubscriptionResourceExtensionClient(subscriptionResource).CheckHDInsightNameAvailabilityAsync(location, content, cancellationToken).ConfigureAwait(false); } /// - /// Lists the billingSpecs for the specified subscription and location. + /// Check the availability of the resource name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/billingSpecs + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/checkNameAvailability /// /// /// Operation Id - /// Locations_ListBillingSpecs + /// Locations_CheckNameAvailability /// /// /// /// The instance the method will execute against. - /// The Azure location (region) for which to make the request. + /// The name of the Azure region. + /// The name and type of the resource. /// The cancellation token to use. - public static async Task> GetHDInsightBillingSpecsAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + /// is null. + public static Response CheckHDInsightNameAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) { - return await GetSubscriptionResourceExtensionClient(subscriptionResource).GetHDInsightBillingSpecsAsync(location, cancellationToken).ConfigureAwait(false); - } + Argument.AssertNotNull(content, nameof(content)); - /// - /// Lists the billingSpecs for the specified subscription and location. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/billingSpecs - /// - /// - /// Operation Id - /// Locations_ListBillingSpecs - /// - /// - /// - /// The instance the method will execute against. - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - public static Response GetHDInsightBillingSpecs(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) - { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetHDInsightBillingSpecs(location, cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).CheckHDInsightNameAvailability(location, content, cancellationToken); } /// - /// Check the cluster name is available or not. + /// Returns a list of available cluster pool versions. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/checkNameAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterPoolVersions /// /// /// Operation Id - /// Locations_CheckNameAvailability + /// AvailableClusterPoolVersions_ListByLocation /// /// /// /// The instance the method will execute against. - /// The Azure location (region) for which to make the request. - /// The HDInsightNameAvailabilityContent to use. + /// The name of the Azure region. /// The cancellation token to use. - /// is null. - public static async Task> CheckHDInsightNameAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, HDInsightNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAvailableClusterPoolVersionsByLocationAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - return await GetSubscriptionResourceExtensionClient(subscriptionResource).CheckHDInsightNameAvailabilityAsync(location, content, cancellationToken).ConfigureAwait(false); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAvailableClusterPoolVersionsByLocationAsync(location, cancellationToken); } /// - /// Check the cluster name is available or not. + /// Returns a list of available cluster pool versions. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/checkNameAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterPoolVersions /// /// /// Operation Id - /// Locations_CheckNameAvailability + /// AvailableClusterPoolVersions_ListByLocation /// /// /// /// The instance the method will execute against. - /// The Azure location (region) for which to make the request. - /// The HDInsightNameAvailabilityContent to use. + /// The name of the Azure region. /// The cancellation token to use. - /// is null. - public static Response CheckHDInsightNameAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, HDInsightNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAvailableClusterPoolVersionsByLocation(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - return GetSubscriptionResourceExtensionClient(subscriptionResource).CheckHDInsightNameAvailability(location, content, cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAvailableClusterPoolVersionsByLocation(location, cancellationToken); } /// - /// Validate the cluster create request spec is valid or not. + /// Returns a list of available cluster versions. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/validateCreateRequest + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterVersions /// /// /// Operation Id - /// Locations_ValidateClusterCreateRequest + /// AvailableClusterVersions_ListByLocation /// /// /// /// The instance the method will execute against. - /// The Azure location (region) for which to make the request. - /// The HDInsightClusterCreationValidateContent to use. + /// The name of the Azure region. /// The cancellation token to use. - /// is null. - public static async Task> ValidateHDInsightClusterCreationAsync(this SubscriptionResource subscriptionResource, AzureLocation location, HDInsightClusterCreationValidateContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAvailableClusterVersionsByLocationAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - return await GetSubscriptionResourceExtensionClient(subscriptionResource).ValidateHDInsightClusterCreationAsync(location, content, cancellationToken).ConfigureAwait(false); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAvailableClusterVersionsByLocationAsync(location, cancellationToken); } /// - /// Validate the cluster create request spec is valid or not. + /// Returns a list of available cluster versions. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/validateCreateRequest + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterVersions /// /// /// Operation Id - /// Locations_ValidateClusterCreateRequest + /// AvailableClusterVersions_ListByLocation /// /// /// /// The instance the method will execute against. - /// The Azure location (region) for which to make the request. - /// The HDInsightClusterCreationValidateContent to use. + /// The name of the Azure region. /// The cancellation token to use. - /// is null. - public static Response ValidateHDInsightClusterCreation(this SubscriptionResource subscriptionResource, AzureLocation location, HDInsightClusterCreationValidateContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAvailableClusterVersionsByLocation(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - return GetSubscriptionResourceExtensionClient(subscriptionResource).ValidateHDInsightClusterCreation(location, content, cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAvailableClusterVersionsByLocation(location, cancellationToken); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index 1155b189ff6c..792a1a290653 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -31,11 +31,11 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// Gets a collection of HDInsightClusterResources in the ResourceGroupResource. - /// An object representing collection of HDInsightClusterResources and their operations over a HDInsightClusterResource. - public virtual HDInsightClusterCollection GetHDInsightClusters() + /// Gets a collection of ClusterPoolResources in the ResourceGroupResource. + /// An object representing collection of ClusterPoolResources and their operations over a ClusterPoolResource. + public virtual ClusterPoolCollection GetClusterPools() { - return GetCachedClient(Client => new HDInsightClusterCollection(Client, Id)); + return GetCachedClient(Client => new ClusterPoolCollection(Client, Id)); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 3c6906135cff..bb0b574c5ac6 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -19,10 +19,14 @@ namespace Azure.ResourceManager.HDInsight /// A class to add extension methods to SubscriptionResource. internal partial class SubscriptionResourceExtensionClient : ArmResource { - private ClientDiagnostics _hdInsightClusterClustersClientDiagnostics; - private ClustersRestOperations _hdInsightClusterClustersRestClient; + private ClientDiagnostics _clusterPoolClientDiagnostics; + private ClusterPoolsRestOperations _clusterPoolRestClient; private ClientDiagnostics _locationsClientDiagnostics; private LocationsRestOperations _locationsRestClient; + private ClientDiagnostics _availableClusterPoolVersionsClientDiagnostics; + private AvailableClusterPoolVersionsRestOperations _availableClusterPoolVersionsRestClient; + private ClientDiagnostics _availableClusterVersionsClientDiagnostics; + private AvailableClusterVersionsRestOperations _availableClusterVersionsRestClient; /// Initializes a new instance of the class for mocking. protected SubscriptionResourceExtensionClient() @@ -36,10 +40,14 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie { } - private ClientDiagnostics HDInsightClusterClustersClientDiagnostics => _hdInsightClusterClustersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HDInsight", HDInsightClusterResource.ResourceType.Namespace, Diagnostics); - private ClustersRestOperations HDInsightClusterClustersRestClient => _hdInsightClusterClustersRestClient ??= new ClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(HDInsightClusterResource.ResourceType)); + private ClientDiagnostics ClusterPoolClientDiagnostics => _clusterPoolClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HDInsight", ClusterPoolResource.ResourceType.Namespace, Diagnostics); + private ClusterPoolsRestOperations ClusterPoolRestClient => _clusterPoolRestClient ??= new ClusterPoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ClusterPoolResource.ResourceType)); private ClientDiagnostics LocationsClientDiagnostics => _locationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HDInsight", ProviderConstants.DefaultProviderNamespace, Diagnostics); private LocationsRestOperations LocationsRestClient => _locationsRestClient ??= new LocationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics AvailableClusterPoolVersionsClientDiagnostics => _availableClusterPoolVersionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HDInsight", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private AvailableClusterPoolVersionsRestOperations AvailableClusterPoolVersionsRestClient => _availableClusterPoolVersionsRestClient ??= new AvailableClusterPoolVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics AvailableClusterVersionsClientDiagnostics => _availableClusterVersionsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HDInsight", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private AvailableClusterVersionsRestOperations AvailableClusterVersionsRestClient => _availableClusterVersionsRestClient ??= new AvailableClusterVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -48,177 +56,72 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// Lists all the HDInsight clusters under the subscription. + /// Gets the list of Cluster Pools within a Subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusters + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusterpools /// /// /// Operation Id - /// Clusters_List + /// ClusterPools_ListBySubscription /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetHDInsightClustersAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetClusterPoolsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => HDInsightClusterClustersRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HDInsightClusterClustersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HDInsightClusterResource(Client, HDInsightClusterData.DeserializeHDInsightClusterData(e)), HDInsightClusterClustersClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetHDInsightClusters", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ClusterPoolRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ClusterPoolRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ClusterPoolResource(Client, ClusterPoolData.DeserializeClusterPoolData(e)), ClusterPoolClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetClusterPools", "value", "nextLink", cancellationToken); } /// - /// Lists all the HDInsight clusters under the subscription. + /// Gets the list of Cluster Pools within a Subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusters + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusterpools /// /// /// Operation Id - /// Clusters_List + /// ClusterPools_ListBySubscription /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetHDInsightClusters(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetClusterPools(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => HDInsightClusterClustersRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HDInsightClusterClustersRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HDInsightClusterResource(Client, HDInsightClusterData.DeserializeHDInsightClusterData(e)), HDInsightClusterClustersClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetHDInsightClusters", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ClusterPoolRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ClusterPoolRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ClusterPoolResource(Client, ClusterPoolData.DeserializeClusterPoolData(e)), ClusterPoolClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetClusterPools", "value", "nextLink", cancellationToken); } /// - /// Gets the capabilities for the specified location. + /// Check the availability of the resource name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/capabilities - /// - /// - /// Operation Id - /// Locations_GetCapabilities - /// - /// - /// - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - public virtual async Task> GetHDInsightCapabilitiesAsync(AzureLocation location, CancellationToken cancellationToken = default) - { - using var scope = LocationsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetHDInsightCapabilities"); - scope.Start(); - try - { - var response = await LocationsRestClient.GetCapabilitiesAsync(Id.SubscriptionId, location, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the capabilities for the specified location. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/capabilities - /// - /// - /// Operation Id - /// Locations_GetCapabilities - /// - /// - /// - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - public virtual Response GetHDInsightCapabilities(AzureLocation location, CancellationToken cancellationToken = default) - { - using var scope = LocationsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetHDInsightCapabilities"); - scope.Start(); - try - { - var response = LocationsRestClient.GetCapabilities(Id.SubscriptionId, location, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the usages for the specified location. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/usages - /// - /// - /// Operation Id - /// Locations_ListUsages - /// - /// - /// - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetHDInsightUsagesAsync(AzureLocation location, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => LocationsRestClient.CreateListUsagesRequest(Id.SubscriptionId, location); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, HDInsightUsage.DeserializeHDInsightUsage, LocationsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetHDInsightUsages", "value", null, cancellationToken); - } - - /// - /// Lists the usages for the specified location. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/usages - /// - /// - /// Operation Id - /// Locations_ListUsages - /// - /// - /// - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetHDInsightUsages(AzureLocation location, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => LocationsRestClient.CreateListUsagesRequest(Id.SubscriptionId, location); - return PageableHelpers.CreatePageable(FirstPageRequest, null, HDInsightUsage.DeserializeHDInsightUsage, LocationsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetHDInsightUsages", "value", null, cancellationToken); - } - - /// - /// Lists the billingSpecs for the specified subscription and location. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/billingSpecs + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/checkNameAvailability /// /// /// Operation Id - /// Locations_ListBillingSpecs + /// Locations_CheckNameAvailability /// /// /// - /// The Azure location (region) for which to make the request. + /// The name of the Azure region. + /// The name and type of the resource. /// The cancellation token to use. - public virtual async Task> GetHDInsightBillingSpecsAsync(AzureLocation location, CancellationToken cancellationToken = default) + public virtual async Task> CheckHDInsightNameAvailabilityAsync(AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) { - using var scope = LocationsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetHDInsightBillingSpecs"); + using var scope = LocationsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckHDInsightNameAvailability"); scope.Start(); try { - var response = await LocationsRestClient.ListBillingSpecsAsync(Id.SubscriptionId, location, cancellationToken).ConfigureAwait(false); + var response = await LocationsRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -229,27 +132,28 @@ public virtual async Task> GetHDInsigh } /// - /// Lists the billingSpecs for the specified subscription and location. + /// Check the availability of the resource name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/billingSpecs + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/checkNameAvailability /// /// /// Operation Id - /// Locations_ListBillingSpecs + /// Locations_CheckNameAvailability /// /// /// - /// The Azure location (region) for which to make the request. + /// The name of the Azure region. + /// The name and type of the resource. /// The cancellation token to use. - public virtual Response GetHDInsightBillingSpecs(AzureLocation location, CancellationToken cancellationToken = default) + public virtual Response CheckHDInsightNameAvailability(AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) { - using var scope = LocationsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetHDInsightBillingSpecs"); + using var scope = LocationsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckHDInsightNameAvailability"); scope.Start(); try { - var response = LocationsRestClient.ListBillingSpecs(Id.SubscriptionId, location, cancellationToken); + var response = LocationsRestClient.CheckNameAvailability(Id.SubscriptionId, location, content, cancellationToken); return response; } catch (Exception e) @@ -260,131 +164,95 @@ public virtual Response GetHDInsightBillingSpec } /// - /// Check the cluster name is available or not. + /// Returns a list of available cluster pool versions. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/checkNameAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterPoolVersions /// /// /// Operation Id - /// Locations_CheckNameAvailability + /// AvailableClusterPoolVersions_ListByLocation /// /// /// - /// The Azure location (region) for which to make the request. - /// The HDInsightNameAvailabilityContent to use. + /// The name of the Azure region. /// The cancellation token to use. - public virtual async Task> CheckHDInsightNameAvailabilityAsync(AzureLocation location, HDInsightNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAvailableClusterPoolVersionsByLocationAsync(AzureLocation location, CancellationToken cancellationToken = default) { - using var scope = LocationsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckHDInsightNameAvailability"); - scope.Start(); - try - { - var response = await LocationsRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => AvailableClusterPoolVersionsRestClient.CreateListByLocationRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AvailableClusterPoolVersionsRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, location); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, ClusterPoolVersion.DeserializeClusterPoolVersion, AvailableClusterPoolVersionsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetAvailableClusterPoolVersionsByLocation", "value", "nextLink", cancellationToken); } /// - /// Check the cluster name is available or not. + /// Returns a list of available cluster pool versions. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/checkNameAvailability + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterPoolVersions /// /// /// Operation Id - /// Locations_CheckNameAvailability + /// AvailableClusterPoolVersions_ListByLocation /// /// /// - /// The Azure location (region) for which to make the request. - /// The HDInsightNameAvailabilityContent to use. + /// The name of the Azure region. /// The cancellation token to use. - public virtual Response CheckHDInsightNameAvailability(AzureLocation location, HDInsightNameAvailabilityContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAvailableClusterPoolVersionsByLocation(AzureLocation location, CancellationToken cancellationToken = default) { - using var scope = LocationsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckHDInsightNameAvailability"); - scope.Start(); - try - { - var response = LocationsRestClient.CheckNameAvailability(Id.SubscriptionId, location, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => AvailableClusterPoolVersionsRestClient.CreateListByLocationRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AvailableClusterPoolVersionsRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, location); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, ClusterPoolVersion.DeserializeClusterPoolVersion, AvailableClusterPoolVersionsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetAvailableClusterPoolVersionsByLocation", "value", "nextLink", cancellationToken); } /// - /// Validate the cluster create request spec is valid or not. + /// Returns a list of available cluster versions. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/validateCreateRequest + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterVersions /// /// /// Operation Id - /// Locations_ValidateClusterCreateRequest + /// AvailableClusterVersions_ListByLocation /// /// /// - /// The Azure location (region) for which to make the request. - /// The HDInsightClusterCreationValidateContent to use. + /// The name of the Azure region. /// The cancellation token to use. - public virtual async Task> ValidateHDInsightClusterCreationAsync(AzureLocation location, HDInsightClusterCreationValidateContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAvailableClusterVersionsByLocationAsync(AzureLocation location, CancellationToken cancellationToken = default) { - using var scope = LocationsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.ValidateHDInsightClusterCreation"); - scope.Start(); - try - { - var response = await LocationsRestClient.ValidateClusterCreateRequestAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => AvailableClusterVersionsRestClient.CreateListByLocationRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AvailableClusterVersionsRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, location); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, ClusterVersion.DeserializeClusterVersion, AvailableClusterVersionsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetAvailableClusterVersionsByLocation", "value", "nextLink", cancellationToken); } /// - /// Validate the cluster create request spec is valid or not. + /// Returns a list of available cluster versions. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/validateCreateRequest + /// /subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterVersions /// /// /// Operation Id - /// Locations_ValidateClusterCreateRequest + /// AvailableClusterVersions_ListByLocation /// /// /// - /// The Azure location (region) for which to make the request. - /// The HDInsightClusterCreationValidateContent to use. + /// The name of the Azure region. /// The cancellation token to use. - public virtual Response ValidateHDInsightClusterCreation(AzureLocation location, HDInsightClusterCreationValidateContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAvailableClusterVersionsByLocation(AzureLocation location, CancellationToken cancellationToken = default) { - using var scope = LocationsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.ValidateHDInsightClusterCreation"); - scope.Start(); - try - { - var response = LocationsRestClient.ValidateClusterCreateRequest(Id.SubscriptionId, location, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => AvailableClusterVersionsRestClient.CreateListByLocationRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AvailableClusterVersionsRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, location); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, ClusterVersion.DeserializeClusterVersion, AvailableClusterVersionsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetAvailableClusterVersionsByLocation", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationCollection.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationCollection.cs deleted file mode 100644 index f59aa5e150cf..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationCollection.cs +++ /dev/null @@ -1,340 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.HDInsight -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetHDInsightApplications method from an instance of . - /// - public partial class HDInsightApplicationCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _hdInsightApplicationApplicationsClientDiagnostics; - private readonly ApplicationsRestOperations _hdInsightApplicationApplicationsRestClient; - - /// Initializes a new instance of the class for mocking. - protected HDInsightApplicationCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal HDInsightApplicationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hdInsightApplicationApplicationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", HDInsightApplicationResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(HDInsightApplicationResource.ResourceType, out string hdInsightApplicationApplicationsApiVersion); - _hdInsightApplicationApplicationsRestClient = new ApplicationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hdInsightApplicationApplicationsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != HDInsightClusterResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, HDInsightClusterResource.ResourceType), nameof(id)); - } - - /// - /// Creates applications for the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} - /// - /// - /// Operation Id - /// Applications_Create - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The constant value for the application name. - /// The application create request. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string applicationName, HDInsightApplicationData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _hdInsightApplicationApplicationsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationName, data, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(new HDInsightApplicationOperationSource(Client), _hdInsightApplicationApplicationsClientDiagnostics, Pipeline, _hdInsightApplicationApplicationsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates applications for the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} - /// - /// - /// Operation Id - /// Applications_Create - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The constant value for the application name. - /// The application create request. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string applicationName, HDInsightApplicationData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _hdInsightApplicationApplicationsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationName, data, cancellationToken); - var operation = new HDInsightArmOperation(new HDInsightApplicationOperationSource(Client), _hdInsightApplicationApplicationsClientDiagnostics, Pipeline, _hdInsightApplicationApplicationsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets properties of the specified application. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} - /// - /// - /// Operation Id - /// Applications_Get - /// - /// - /// - /// The constant value for the application name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string applicationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationCollection.Get"); - scope.Start(); - try - { - var response = await _hdInsightApplicationApplicationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HDInsightApplicationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets properties of the specified application. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} - /// - /// - /// Operation Id - /// Applications_Get - /// - /// - /// - /// The constant value for the application name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string applicationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationCollection.Get"); - scope.Start(); - try - { - var response = _hdInsightApplicationApplicationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HDInsightApplicationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists all of the applications for the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications - /// - /// - /// Operation Id - /// Applications_ListByCluster - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightApplicationApplicationsRestClient.CreateListByClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hdInsightApplicationApplicationsRestClient.CreateListByClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HDInsightApplicationResource(Client, HDInsightApplicationData.DeserializeHDInsightApplicationData(e)), _hdInsightApplicationApplicationsClientDiagnostics, Pipeline, "HDInsightApplicationCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all of the applications for the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications - /// - /// - /// Operation Id - /// Applications_ListByCluster - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightApplicationApplicationsRestClient.CreateListByClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hdInsightApplicationApplicationsRestClient.CreateListByClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HDInsightApplicationResource(Client, HDInsightApplicationData.DeserializeHDInsightApplicationData(e)), _hdInsightApplicationApplicationsClientDiagnostics, Pipeline, "HDInsightApplicationCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} - /// - /// - /// Operation Id - /// Applications_Get - /// - /// - /// - /// The constant value for the application name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string applicationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationCollection.Exists"); - scope.Start(); - try - { - var response = await _hdInsightApplicationApplicationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} - /// - /// - /// Operation Id - /// Applications_Get - /// - /// - /// - /// The constant value for the application name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string applicationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - - using var scope = _hdInsightApplicationApplicationsClientDiagnostics.CreateScope("HDInsightApplicationCollection.Exists"); - scope.Start(); - try - { - var response = _hdInsightApplicationApplicationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationData.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationData.cs deleted file mode 100644 index cf543f8dc962..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationData.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure; -using Azure.Core; -using Azure.ResourceManager.HDInsight.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HDInsight -{ - /// - /// A class representing the HDInsightApplication data model. - /// The HDInsight cluster application - /// - public partial class HDInsightApplicationData : ResourceData - { - /// Initializes a new instance of HDInsightApplicationData. - public HDInsightApplicationData() - { - Tags = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of HDInsightApplicationData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The ETag for the application. - /// The tags for the application. - /// The properties of the application. - internal HDInsightApplicationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? etag, IDictionary tags, HDInsightApplicationProperties properties) : base(id, name, resourceType, systemData) - { - ETag = etag; - Tags = tags; - Properties = properties; - } - - /// The ETag for the application. - public ETag? ETag { get; set; } - /// The tags for the application. - public IDictionary Tags { get; } - /// The properties of the application. - public HDInsightApplicationProperties Properties { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterCollection.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterCollection.cs index 38e85f023f20..144bc1e34380 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterCollection.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterCollection.cs @@ -15,15 +15,13 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.HDInsight.Models; -using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.HDInsight { /// /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetHDInsightClusters method from an instance of . + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetHDInsightClusters method from an instance of . /// public partial class HDInsightClusterCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -50,16 +48,16 @@ internal HDInsightClusterCollection(ArmClient client, ResourceIdentifier id) : b internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + if (id.ResourceType != ClusterPoolResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ClusterPoolResource.ResourceType), nameof(id)); } /// - /// Creates a new HDInsight cluster with the specified parameters. + /// Creates a cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -68,22 +66,22 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the cluster. - /// The cluster create request. + /// The name of the HDInsight cluster. + /// The cluster to create. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string clusterName, HDInsightClusterCreateOrUpdateContent content, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string clusterName, HDInsightClusterData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _hdInsightClusterClustersRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, clusterName, content, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(new HDInsightClusterOperationSource(Client), _hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, clusterName, content).Request, response, OperationFinalStateVia.Location); + var response = await _hdInsightClusterClustersRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, data, cancellationToken).ConfigureAwait(false); + var operation = new HDInsightArmOperation(new HDInsightClusterOperationSource(Client), _hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -96,11 +94,11 @@ public virtual async Task> CreateOrUpdate } /// - /// Creates a new HDInsight cluster with the specified parameters. + /// Creates a cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -109,22 +107,22 @@ public virtual async Task> CreateOrUpdate /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the cluster. - /// The cluster create request. + /// The name of the HDInsight cluster. + /// The cluster to create. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string clusterName, HDInsightClusterCreateOrUpdateContent content, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string clusterName, HDInsightClusterData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterCollection.CreateOrUpdate"); scope.Start(); try { - var response = _hdInsightClusterClustersRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, clusterName, content, cancellationToken); - var operation = new HDInsightArmOperation(new HDInsightClusterOperationSource(Client), _hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, clusterName, content).Request, response, OperationFinalStateVia.Location); + var response = _hdInsightClusterClustersRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, data, cancellationToken); + var operation = new HDInsightArmOperation(new HDInsightClusterOperationSource(Client), _hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -137,11 +135,11 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w } /// - /// Gets the specified cluster. + /// Gets a HDInsight cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -149,7 +147,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// - /// The name of the cluster. + /// The name of the HDInsight cluster. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -161,7 +159,7 @@ public virtual async Task> GetAsync(string cl scope.Start(); try { - var response = await _hdInsightClusterClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, clusterName, cancellationToken).ConfigureAwait(false); + var response = await _hdInsightClusterClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new HDInsightClusterResource(Client, response.Value), response.GetRawResponse()); @@ -174,11 +172,11 @@ public virtual async Task> GetAsync(string cl } /// - /// Gets the specified cluster. + /// Gets a HDInsight cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -186,7 +184,7 @@ public virtual async Task> GetAsync(string cl /// /// /// - /// The name of the cluster. + /// The name of the HDInsight cluster. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -198,7 +196,7 @@ public virtual Response Get(string clusterName, Cancel scope.Start(); try { - var response = _hdInsightClusterClustersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, clusterName, cancellationToken); + var response = _hdInsightClusterClustersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new HDInsightClusterResource(Client, response.Value), response.GetRawResponse()); @@ -211,15 +209,15 @@ public virtual Response Get(string clusterName, Cancel } /// - /// Lists the HDInsight clusters in a resource group. + /// Lists the HDInsight cluster pools under a resource group. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters /// /// /// Operation Id - /// Clusters_ListByResourceGroup + /// Clusters_ListByClusterPoolName /// /// /// @@ -227,21 +225,21 @@ public virtual Response Get(string clusterName, Cancel /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightClusterClustersRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hdInsightClusterClustersRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightClusterClustersRestClient.CreateListByClusterPoolNameRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hdInsightClusterClustersRestClient.CreateListByClusterPoolNameNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HDInsightClusterResource(Client, HDInsightClusterData.DeserializeHDInsightClusterData(e)), _hdInsightClusterClustersClientDiagnostics, Pipeline, "HDInsightClusterCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// Lists the HDInsight clusters in a resource group. + /// Lists the HDInsight cluster pools under a resource group. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters /// /// /// Operation Id - /// Clusters_ListByResourceGroup + /// Clusters_ListByClusterPoolName /// /// /// @@ -249,8 +247,8 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightClusterClustersRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hdInsightClusterClustersRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightClusterClustersRestClient.CreateListByClusterPoolNameRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hdInsightClusterClustersRestClient.CreateListByClusterPoolNameNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HDInsightClusterResource(Client, HDInsightClusterData.DeserializeHDInsightClusterData(e)), _hdInsightClusterClustersClientDiagnostics, Pipeline, "HDInsightClusterCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -259,7 +257,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -267,7 +265,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// - /// The name of the cluster. + /// The name of the HDInsight cluster. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -279,7 +277,7 @@ public virtual async Task> ExistsAsync(string clusterName, Cancel scope.Start(); try { - var response = await _hdInsightClusterClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, clusterName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _hdInsightClusterClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -294,7 +292,7 @@ public virtual async Task> ExistsAsync(string clusterName, Cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -302,7 +300,7 @@ public virtual async Task> ExistsAsync(string clusterName, Cancel /// /// /// - /// The name of the cluster. + /// The name of the HDInsight cluster. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -314,7 +312,7 @@ public virtual Response Exists(string clusterName, CancellationToken cance scope.Start(); try { - var response = _hdInsightClusterClustersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, clusterName, cancellationToken: cancellationToken); + var response = _hdInsightClusterClustersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clusterName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterData.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterData.cs index bbf623230079..f86117611f35 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterData.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterData.cs @@ -6,7 +6,6 @@ #nullable disable using System.Collections.Generic; -using Azure; using Azure.Core; using Azure.ResourceManager.HDInsight.Models; using Azure.ResourceManager.Models; @@ -15,7 +14,7 @@ namespace Azure.ResourceManager.HDInsight { /// /// A class representing the HDInsightCluster data model. - /// The HDInsight cluster. + /// The cluster. /// public partial class HDInsightClusterData : TrackedResourceData { @@ -23,7 +22,6 @@ public partial class HDInsightClusterData : TrackedResourceData /// The location. public HDInsightClusterData(AzureLocation location) : base(location) { - Zones = new ChangeTrackingList(); } /// Initializes a new instance of HDInsightClusterData. @@ -33,25 +31,40 @@ public HDInsightClusterData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The ETag for the resource. - /// The availability zones. - /// The properties of the cluster. - /// The identity of the cluster, if configured. - internal HDInsightClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList zones, HDInsightClusterProperties properties, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + /// Provisioning state of the resource. + /// The type of cluster. + /// A unique id generated by the RP to identify the resource. + /// The compute profile. + /// Cluster profile. + /// Business status of the resource. + internal HDInsightClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ProvisioningStatus? provisioningState, string clusterType, string deploymentId, ComputeProfile computeProfile, ClusterProfile clusterProfile, string status) : base(id, name, resourceType, systemData, tags, location) { - ETag = etag; - Zones = zones; - Properties = properties; - Identity = identity; + ProvisioningState = provisioningState; + ClusterType = clusterType; + DeploymentId = deploymentId; + ComputeProfile = computeProfile; + ClusterProfile = clusterProfile; + Status = status; } - /// The ETag for the resource. - public ETag? ETag { get; set; } - /// The availability zones. - public IList Zones { get; } - /// The properties of the cluster. - public HDInsightClusterProperties Properties { get; set; } - /// The identity of the cluster, if configured. - public ManagedServiceIdentity Identity { get; set; } + /// Provisioning state of the resource. + public ProvisioningStatus? ProvisioningState { get; } + /// The type of cluster. + public string ClusterType { get; set; } + /// A unique id generated by the RP to identify the resource. + public string DeploymentId { get; } + /// The compute profile. + internal ComputeProfile ComputeProfile { get; set; } + /// The nodes definitions. + public IList ComputeNodes + { + get => ComputeProfile is null ? default : ComputeProfile.Nodes; + set => ComputeProfile = new ComputeProfile(value); + } + + /// Cluster profile. + public ClusterProfile ClusterProfile { get; set; } + /// Business status of the resource. + public string Status { get; } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterResource.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterResource.cs index a4b5cac1b659..1d33e466888a 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterResource.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterResource.cs @@ -15,7 +15,6 @@ using Azure.Core.Pipeline; using Azure.ResourceManager; using Azure.ResourceManager.HDInsight.Models; -using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.HDInsight { @@ -23,29 +22,21 @@ namespace Azure.ResourceManager.HDInsight /// A Class representing a HDInsightCluster along with the instance operations that can be performed on it. /// If you have a you can construct a /// from an instance of using the GetHDInsightClusterResource method. - /// Otherwise you can get one from its parent resource using the GetHDInsightCluster method. + /// Otherwise you can get one from its parent resource using the GetHDInsightCluster method. /// public partial class HDInsightClusterResource : ArmResource { /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName) + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}"; return new ResourceIdentifier(resourceId); } private readonly ClientDiagnostics _hdInsightClusterClustersClientDiagnostics; private readonly ClustersRestOperations _hdInsightClusterClustersRestClient; - private readonly ClientDiagnostics _configurationsClientDiagnostics; - private readonly ConfigurationsRestOperations _configurationsRestClient; - private readonly ClientDiagnostics _extensionsClientDiagnostics; - private readonly ExtensionsRestOperations _extensionsRestClient; - private readonly ClientDiagnostics _scriptActionsClientDiagnostics; - private readonly ScriptActionsRestOperations _scriptActionsRestClient; - private readonly ClientDiagnostics _scriptExecutionHistoryClientDiagnostics; - private readonly ScriptExecutionHistoryRestOperations _scriptExecutionHistoryRestClient; - private readonly ClientDiagnostics _virtualMachinesClientDiagnostics; - private readonly VirtualMachinesRestOperations _virtualMachinesRestClient; + private readonly ClientDiagnostics _clusterJobsClientDiagnostics; + private readonly ClusterJobsRestOperations _clusterJobsRestClient; private readonly HDInsightClusterData _data; /// Initializes a new instance of the class for mocking. @@ -70,23 +61,15 @@ internal HDInsightClusterResource(ArmClient client, ResourceIdentifier id) : bas _hdInsightClusterClustersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string hdInsightClusterClustersApiVersion); _hdInsightClusterClustersRestClient = new ClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hdInsightClusterClustersApiVersion); - _configurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _configurationsRestClient = new ConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _extensionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _extensionsRestClient = new ExtensionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _scriptActionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _scriptActionsRestClient = new ScriptActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _scriptExecutionHistoryClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _scriptExecutionHistoryRestClient = new ScriptExecutionHistoryRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _virtualMachinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _virtualMachinesRestClient = new VirtualMachinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _clusterJobsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _clusterJobsRestClient = new ClusterJobsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif } /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.HDInsight/clusters"; + public static readonly ResourceType ResourceType = "Microsoft.HDInsight/clusterpools/clusters"; /// Gets whether or not the current instance has data. public virtual bool HasData { get; } @@ -109,171 +92,12 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of HDInsightApplicationResources in the HDInsightCluster. - /// An object representing collection of HDInsightApplicationResources and their operations over a HDInsightApplicationResource. - public virtual HDInsightApplicationCollection GetHDInsightApplications() - { - return GetCachedClient(Client => new HDInsightApplicationCollection(Client, Id)); - } - - /// - /// Gets properties of the specified application. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} - /// - /// - /// Operation Id - /// Applications_Get - /// - /// - /// - /// The constant value for the application name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetHDInsightApplicationAsync(string applicationName, CancellationToken cancellationToken = default) - { - return await GetHDInsightApplications().GetAsync(applicationName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets properties of the specified application. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName} - /// - /// - /// Operation Id - /// Applications_Get - /// - /// - /// - /// The constant value for the application name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetHDInsightApplication(string applicationName, CancellationToken cancellationToken = default) - { - return GetHDInsightApplications().Get(applicationName, cancellationToken); - } - - /// Gets a collection of HDInsightPrivateEndpointConnectionResources in the HDInsightCluster. - /// An object representing collection of HDInsightPrivateEndpointConnectionResources and their operations over a HDInsightPrivateEndpointConnectionResource. - public virtual HDInsightPrivateEndpointConnectionCollection GetHDInsightPrivateEndpointConnections() - { - return GetCachedClient(Client => new HDInsightPrivateEndpointConnectionCollection(Client, Id)); - } - - /// - /// Gets the specific private endpoint connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_Get - /// - /// - /// - /// The name of the private endpoint connection. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetHDInsightPrivateEndpointConnectionAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - return await GetHDInsightPrivateEndpointConnections().GetAsync(privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the specific private endpoint connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_Get - /// - /// - /// - /// The name of the private endpoint connection. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetHDInsightPrivateEndpointConnection(string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - return GetHDInsightPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); - } - - /// Gets a collection of HDInsightPrivateLinkResources in the HDInsightCluster. - /// An object representing collection of HDInsightPrivateLinkResources and their operations over a HDInsightPrivateLinkResource. - public virtual HDInsightPrivateLinkResourceCollection GetHDInsightPrivateLinkResources() - { - return GetCachedClient(Client => new HDInsightPrivateLinkResourceCollection(Client, Id)); - } - - /// - /// Gets the specific private link resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetHDInsightPrivateLinkResourceAsync(string privateLinkResourceName, CancellationToken cancellationToken = default) - { - return await GetHDInsightPrivateLinkResources().GetAsync(privateLinkResourceName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the specific private link resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetHDInsightPrivateLinkResource(string privateLinkResourceName, CancellationToken cancellationToken = default) - { - return GetHDInsightPrivateLinkResources().Get(privateLinkResourceName, cancellationToken); - } - /// - /// Gets the specified cluster. + /// Gets a HDInsight cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -288,7 +112,7 @@ public virtual async Task> GetAsync(Cancellat scope.Start(); try { - var response = await _hdInsightClusterClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _hdInsightClusterClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new HDInsightClusterResource(Client, response.Value), response.GetRawResponse()); @@ -301,11 +125,11 @@ public virtual async Task> GetAsync(Cancellat } /// - /// Gets the specified cluster. + /// Gets a HDInsight cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -320,7 +144,7 @@ public virtual Response Get(CancellationToken cancella scope.Start(); try { - var response = _hdInsightClusterClustersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _hdInsightClusterClustersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new HDInsightClusterResource(Client, response.Value), response.GetRawResponse()); @@ -333,11 +157,11 @@ public virtual Response Get(CancellationToken cancella } /// - /// Deletes the specified HDInsight cluster. + /// Deletes a cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -353,8 +177,8 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell scope.Start(); try { - var response = await _hdInsightClusterClustersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _hdInsightClusterClustersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -367,11 +191,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Deletes the specified HDInsight cluster. + /// Deletes a cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -387,8 +211,8 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel scope.Start(); try { - var response = _hdInsightClusterClustersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _hdInsightClusterClustersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -401,11 +225,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Patch HDInsight cluster with the specified parameters. + /// Updates an existing Cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -413,10 +237,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// - /// The cluster patch request. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Patch a cluster. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(HDInsightClusterPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, HDInsightClusterPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -424,8 +249,11 @@ public virtual async Task> UpdateAsync(HDInsi scope.Start(); try { - var response = await _hdInsightClusterClustersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new HDInsightClusterResource(Client, response.Value), response.GetRawResponse()); + var response = await _hdInsightClusterClustersRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new HDInsightArmOperation(new HDInsightClusterOperationSource(Client), _hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -435,11 +263,11 @@ public virtual async Task> UpdateAsync(HDInsi } /// - /// Patch HDInsight cluster with the specified parameters. + /// Updates an existing Cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -447,10 +275,11 @@ public virtual async Task> UpdateAsync(HDInsi /// /// /// - /// The cluster patch request. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Patch a cluster. /// The cancellation token to use. /// is null. - public virtual Response Update(HDInsightClusterPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, HDInsightClusterPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -458,8 +287,11 @@ public virtual Response Update(HDInsightClusterPatch p scope.Start(); try { - var response = _hdInsightClusterClustersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - return Response.FromValue(new HDInsightClusterResource(Client, response.Value), response.GetRawResponse()); + var response = _hdInsightClusterClustersRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new HDInsightArmOperation(new HDInsightClusterOperationSource(Client), _hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; } catch (Exception e) { @@ -469,11 +301,11 @@ public virtual Response Update(HDInsightClusterPatch p } /// - /// Resizes the specified HDInsight cluster to the specified size. + /// Resize an existing Cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/resize + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/resize /// /// /// Operation Id @@ -482,22 +314,21 @@ public virtual Response Update(HDInsightClusterPatch p /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The constant value for the roleName. - /// The parameters for the resize operation. + /// Resize a cluster. /// The cancellation token to use. - /// is null. - public virtual async Task ResizeAsync(WaitUntil waitUntil, HDInsightRoleName roleName, HDInsightClusterResizeContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> ResizeAsync(WaitUntil waitUntil, ClusterResizeData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.Resize"); scope.Start(); try { - var response = await _hdInsightClusterClustersRestClient.ResizeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, roleName, content, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateResizeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, roleName, content).Request, response, OperationFinalStateVia.Location); + var response = await _hdInsightClusterClustersRestClient.ResizeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new HDInsightArmOperation(new HDInsightClusterOperationSource(Client), _hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateResizeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -508,11 +339,11 @@ public virtual async Task ResizeAsync(WaitUntil waitUntil, HDInsig } /// - /// Resizes the specified HDInsight cluster to the specified size. + /// Resize an existing Cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/resize + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/resize /// /// /// Operation Id @@ -521,22 +352,21 @@ public virtual async Task ResizeAsync(WaitUntil waitUntil, HDInsig /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The constant value for the roleName. - /// The parameters for the resize operation. + /// Resize a cluster. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Resize(WaitUntil waitUntil, HDInsightRoleName roleName, HDInsightClusterResizeContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Resize(WaitUntil waitUntil, ClusterResizeData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.Resize"); scope.Start(); try { - var response = _hdInsightClusterClustersRestClient.Resize(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, roleName, content, cancellationToken); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateResizeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, roleName, content).Request, response, OperationFinalStateVia.Location); + var response = _hdInsightClusterClustersRestClient.Resize(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new HDInsightArmOperation(new HDInsightClusterOperationSource(Client), _hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateResizeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -547,180 +377,114 @@ public virtual ArmOperation Resize(WaitUntil waitUntil, HDInsightRoleName roleNa } /// - /// Updates the Autoscale Configuration for HDInsight cluster. + /// Lists the config dump of all services running in cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/autoscale + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/serviceConfigs /// /// /// Operation Id - /// Clusters_UpdateAutoScaleConfiguration + /// Clusters_ListServiceConfigs /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The constant value for the roleName. - /// The parameters for the update autoscale configuration operation. /// The cancellation token to use. - /// is null. - public virtual async Task UpdateAutoScaleConfigurationAsync(WaitUntil waitUntil, HDInsightRoleName roleName, HDInsightAutoScaleConfigurationUpdateContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetServiceConfigsAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.UpdateAutoScaleConfiguration"); - scope.Start(); - try - { - var response = await _hdInsightClusterClustersRestClient.UpdateAutoScaleConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, roleName, content, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateUpdateAutoScaleConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, roleName, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightClusterClustersRestClient.CreateListServiceConfigsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hdInsightClusterClustersRestClient.CreateListServiceConfigsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, ServiceConfigResult.DeserializeServiceConfigResult, _hdInsightClusterClustersClientDiagnostics, Pipeline, "HDInsightClusterResource.GetServiceConfigs", "value", "nextLink", cancellationToken); } /// - /// Updates the Autoscale Configuration for HDInsight cluster. + /// Lists the config dump of all services running in cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/autoscale + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/serviceConfigs /// /// /// Operation Id - /// Clusters_UpdateAutoScaleConfiguration + /// Clusters_ListServiceConfigs /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The constant value for the roleName. - /// The parameters for the update autoscale configuration operation. /// The cancellation token to use. - /// is null. - public virtual ArmOperation UpdateAutoScaleConfiguration(WaitUntil waitUntil, HDInsightRoleName roleName, HDInsightAutoScaleConfigurationUpdateContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetServiceConfigs(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.UpdateAutoScaleConfiguration"); - scope.Start(); - try - { - var response = _hdInsightClusterClustersRestClient.UpdateAutoScaleConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, roleName, content, cancellationToken); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateUpdateAutoScaleConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, roleName, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightClusterClustersRestClient.CreateListServiceConfigsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hdInsightClusterClustersRestClient.CreateListServiceConfigsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, ServiceConfigResult.DeserializeServiceConfigResult, _hdInsightClusterClustersClientDiagnostics, Pipeline, "HDInsightClusterResource.GetServiceConfigs", "value", "nextLink", cancellationToken); } /// - /// Rotate disk encryption key of the specified HDInsight cluster. + /// Lists the lists of instance views /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/rotatediskencryptionkey + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews /// /// /// Operation Id - /// Clusters_RotateDiskEncryptionKey + /// Clusters_ListInstanceViews /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for the disk encryption operation. /// The cancellation token to use. - /// is null. - public virtual async Task RotateDiskEncryptionKeyAsync(WaitUntil waitUntil, HDInsightClusterDiskEncryptionContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetInstanceViewsAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.RotateDiskEncryptionKey"); - scope.Start(); - try - { - var response = await _hdInsightClusterClustersRestClient.RotateDiskEncryptionKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateRotateDiskEncryptionKeyRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightClusterClustersRestClient.CreateListInstanceViewsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hdInsightClusterClustersRestClient.CreateListInstanceViewsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, ClusterInstanceViewResult.DeserializeClusterInstanceViewResult, _hdInsightClusterClustersClientDiagnostics, Pipeline, "HDInsightClusterResource.GetInstanceViews", "value", "nextLink", cancellationToken); } /// - /// Rotate disk encryption key of the specified HDInsight cluster. + /// Lists the lists of instance views /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/rotatediskencryptionkey + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews /// /// /// Operation Id - /// Clusters_RotateDiskEncryptionKey + /// Clusters_ListInstanceViews /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for the disk encryption operation. /// The cancellation token to use. - /// is null. - public virtual ArmOperation RotateDiskEncryptionKey(WaitUntil waitUntil, HDInsightClusterDiskEncryptionContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetInstanceViews(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.RotateDiskEncryptionKey"); - scope.Start(); - try - { - var response = _hdInsightClusterClustersRestClient.RotateDiskEncryptionKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateRotateDiskEncryptionKeyRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightClusterClustersRestClient.CreateListInstanceViewsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hdInsightClusterClustersRestClient.CreateListInstanceViewsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, ClusterInstanceViewResult.DeserializeClusterInstanceViewResult, _hdInsightClusterClustersClientDiagnostics, Pipeline, "HDInsightClusterResource.GetInstanceViews", "value", "nextLink", cancellationToken); } /// - /// Gets the gateway settings for the specified cluster. + /// Gets the status of a cluster instance. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/getGatewaySettings + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews/default /// /// /// Operation Id - /// Clusters_GetGatewaySettings + /// Clusters_GetInstanceView /// /// /// /// The cancellation token to use. - public virtual async Task> GetGatewaySettingsAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetInstanceViewAsync(CancellationToken cancellationToken = default) { - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.GetGatewaySettings"); + using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.GetInstanceView"); scope.Start(); try { - var response = await _hdInsightClusterClustersRestClient.GetGatewaySettingsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _hdInsightClusterClustersRestClient.GetInstanceViewAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -731,26 +495,26 @@ public virtual async Task> GetGatewayS } /// - /// Gets the gateway settings for the specified cluster. + /// Gets the status of a cluster instance. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/getGatewaySettings + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews/default /// /// /// Operation Id - /// Clusters_GetGatewaySettings + /// Clusters_GetInstanceView /// /// /// /// The cancellation token to use. - public virtual Response GetGatewaySettings(CancellationToken cancellationToken = default) + public virtual Response GetInstanceView(CancellationToken cancellationToken = default) { - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.GetGatewaySettings"); + using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.GetInstanceView"); scope.Start(); try { - var response = _hdInsightClusterClustersRestClient.GetGatewaySettings(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _hdInsightClusterClustersRestClient.GetInstanceView(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -761,72 +525,34 @@ public virtual Response GetGatewaySettings(Canc } /// - /// Configures the gateway settings on the specified cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/updateGatewaySettings - /// - /// - /// Operation Id - /// Clusters_UpdateGatewaySettings - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cluster configurations. - /// The cancellation token to use. - /// is null. - public virtual async Task UpdateGatewaySettingsAsync(WaitUntil waitUntil, HDInsightClusterUpdateGatewaySettingsContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.UpdateGatewaySettings"); - scope.Start(); - try - { - var response = await _hdInsightClusterClustersRestClient.UpdateGatewaySettingsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateUpdateGatewaySettingsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Configures the gateway settings on the specified cluster. + /// Operations on jobs of HDInsight on AKS cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/updateGatewaySettings + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/runJob /// /// /// Operation Id - /// Clusters_UpdateGatewaySettings + /// ClusterJobs_RunJob /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cluster configurations. + /// The Cluster job. /// The cancellation token to use. - /// is null. - public virtual ArmOperation UpdateGatewaySettings(WaitUntil waitUntil, HDInsightClusterUpdateGatewaySettingsContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> RunJobClusterJobAsync(WaitUntil waitUntil, ClusterJob clusterJob, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(clusterJob, nameof(clusterJob)); - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.UpdateGatewaySettings"); + using var scope = _clusterJobsClientDiagnostics.CreateScope("HDInsightClusterResource.RunJobClusterJob"); scope.Start(); try { - var response = _hdInsightClusterClustersRestClient.UpdateGatewaySettings(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateUpdateGatewaySettingsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _clusterJobsRestClient.RunJobAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterJob, cancellationToken).ConfigureAwait(false); + var operation = new HDInsightArmOperation(new ClusterJobOperationSource(), _clusterJobsClientDiagnostics, Pipeline, _clusterJobsRestClient.CreateRunJobRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterJob).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -837,104 +563,34 @@ public virtual ArmOperation UpdateGatewaySettings(WaitUntil waitUntil, HDInsight } /// - /// The the async operation status. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/azureasyncoperations/{operationId} - /// - /// - /// Operation Id - /// Clusters_GetAzureAsyncOperationStatus - /// - /// - /// - /// The long running operation id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsyncOperationStatusAsync(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.GetAsyncOperationStatus"); - scope.Start(); - try - { - var response = await _hdInsightClusterClustersRestClient.GetAzureAsyncOperationStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// The the async operation status. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/azureasyncoperations/{operationId} - /// - /// - /// Operation Id - /// Clusters_GetAzureAsyncOperationStatus - /// - /// - /// - /// The long running operation id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetAsyncOperationStatus(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.GetAsyncOperationStatus"); - scope.Start(); - try - { - var response = _hdInsightClusterClustersRestClient.GetAzureAsyncOperationStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates the cluster identity certificate. + /// Operations on jobs of HDInsight on AKS cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/updateClusterIdentityCertificate + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/runJob /// /// /// Operation Id - /// Clusters_UpdateIdentityCertificate + /// ClusterJobs_RunJob /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cluster configurations. + /// The Cluster job. /// The cancellation token to use. - /// is null. - public virtual async Task UpdateIdentityCertificateAsync(WaitUntil waitUntil, HDInsightClusterUpdateIdentityCertificateContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation RunJobClusterJob(WaitUntil waitUntil, ClusterJob clusterJob, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(clusterJob, nameof(clusterJob)); - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.UpdateIdentityCertificate"); + using var scope = _clusterJobsClientDiagnostics.CreateScope("HDInsightClusterResource.RunJobClusterJob"); scope.Start(); try { - var response = await _hdInsightClusterClustersRestClient.UpdateIdentityCertificateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateUpdateIdentityCertificateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _clusterJobsRestClient.RunJob(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterJob, cancellationToken); + var operation = new HDInsightArmOperation(new ClusterJobOperationSource(), _clusterJobsClientDiagnostics, Pipeline, _clusterJobsRestClient.CreateRunJobRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterJob).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -945,1597 +601,47 @@ public virtual async Task UpdateIdentityCertificateAsync(WaitUntil } /// - /// Updates the cluster identity certificate. + /// Get jobs of HDInsight on AKS cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/updateClusterIdentityCertificate + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/jobs /// /// /// Operation Id - /// Clusters_UpdateIdentityCertificate + /// ClusterJobs_List /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cluster configurations. /// The cancellation token to use. - /// is null. - public virtual ArmOperation UpdateIdentityCertificate(WaitUntil waitUntil, HDInsightClusterUpdateIdentityCertificateContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetClusterJobsAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.UpdateIdentityCertificate"); - scope.Start(); - try - { - var response = _hdInsightClusterClustersRestClient.UpdateIdentityCertificate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateUpdateIdentityCertificateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _clusterJobsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _clusterJobsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, ClusterJob.DeserializeClusterJob, _clusterJobsClientDiagnostics, Pipeline, "HDInsightClusterResource.GetClusterJobs", "value", "nextLink", cancellationToken); } /// - /// Executes script actions on the specified HDInsight cluster. + /// Get jobs of HDInsight on AKS cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/executeScriptActions + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/jobs /// /// /// Operation Id - /// Clusters_ExecuteScriptActions + /// ClusterJobs_List /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for executing script actions. /// The cancellation token to use. - /// is null. - public virtual async Task ExecuteScriptActionsAsync(WaitUntil waitUntil, ExecuteScriptActionContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetClusterJobs(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.ExecuteScriptActions"); - scope.Start(); - try - { - var response = await _hdInsightClusterClustersRestClient.ExecuteScriptActionsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateExecuteScriptActionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Executes script actions on the specified HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/executeScriptActions - /// - /// - /// Operation Id - /// Clusters_ExecuteScriptActions - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameters for executing script actions. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation ExecuteScriptActions(WaitUntil waitUntil, ExecuteScriptActionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _hdInsightClusterClustersClientDiagnostics.CreateScope("HDInsightClusterResource.ExecuteScriptActions"); - scope.Start(); - try - { - var response = _hdInsightClusterClustersRestClient.ExecuteScriptActions(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new HDInsightArmOperation(_hdInsightClusterClustersClientDiagnostics, Pipeline, _hdInsightClusterClustersRestClient.CreateExecuteScriptActionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets all configuration information for an HDI cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations - /// - /// - /// Operation Id - /// Configurations_List - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetConfigurationAsync(CancellationToken cancellationToken = default) - { - using var scope = _configurationsClientDiagnostics.CreateScope("HDInsightClusterResource.GetConfiguration"); - scope.Start(); - try - { - var response = await _configurationsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets all configuration information for an HDI cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations - /// - /// - /// Operation Id - /// Configurations_List - /// - /// - /// - /// The cancellation token to use. - public virtual Response GetConfiguration(CancellationToken cancellationToken = default) - { - using var scope = _configurationsClientDiagnostics.CreateScope("HDInsightClusterResource.GetConfiguration"); - scope.Start(); - try - { - var response = _configurationsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings in cluster endpoint instead. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName} - /// - /// - /// Operation Id - /// Configurations_Update - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the cluster configuration. - /// The cluster configurations. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task UpdateConfigurationAsync(WaitUntil waitUntil, string configurationName, IDictionary clusterConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(clusterConfiguration, nameof(clusterConfiguration)); - - using var scope = _configurationsClientDiagnostics.CreateScope("HDInsightClusterResource.UpdateConfiguration"); - scope.Start(); - try - { - var response = await _configurationsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, clusterConfiguration, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_configurationsClientDiagnostics, Pipeline, _configurationsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, clusterConfiguration).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings in cluster endpoint instead. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName} - /// - /// - /// Operation Id - /// Configurations_Update - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the cluster configuration. - /// The cluster configurations. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation UpdateConfiguration(WaitUntil waitUntil, string configurationName, IDictionary clusterConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(clusterConfiguration, nameof(clusterConfiguration)); - - using var scope = _configurationsClientDiagnostics.CreateScope("HDInsightClusterResource.UpdateConfiguration"); - scope.Start(); - try - { - var response = _configurationsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, clusterConfiguration, cancellationToken); - var operation = new HDInsightArmOperation(_configurationsClientDiagnostics, Pipeline, _configurationsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, clusterConfiguration).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// The configuration object for the specified cluster. This API is not recommended and might be removed in the future. Please consider using List configurations API instead. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName} - /// - /// - /// Operation Id - /// Configurations_Get - /// - /// - /// - /// The name of the cluster configuration. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task>> GetConfigurationAsync(string configurationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - - using var scope = _configurationsClientDiagnostics.CreateScope("HDInsightClusterResource.GetConfiguration"); - scope.Start(); - try - { - var response = await _configurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// The configuration object for the specified cluster. This API is not recommended and might be removed in the future. Please consider using List configurations API instead. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName} - /// - /// - /// Operation Id - /// Configurations_Get - /// - /// - /// - /// The name of the cluster configuration. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response> GetConfiguration(string configurationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - - using var scope = _configurationsClientDiagnostics.CreateScope("HDInsightClusterResource.GetConfiguration"); - scope.Start(); - try - { - var response = _configurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Enables the Operations Management Suite (OMS) on the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring - /// - /// - /// Operation Id - /// Extensions_EnableMonitoring - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The Operations Management Suite (OMS) workspace parameters. - /// The cancellation token to use. - /// is null. - public virtual async Task EnableClusterMonitoringExtensionAsync(WaitUntil waitUntil, HDInsightClusterEnableClusterMonitoringContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.EnableClusterMonitoringExtension"); - scope.Start(); - try - { - var response = await _extensionsRestClient.EnableMonitoringAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_extensionsClientDiagnostics, Pipeline, _extensionsRestClient.CreateEnableMonitoringRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Enables the Operations Management Suite (OMS) on the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring - /// - /// - /// Operation Id - /// Extensions_EnableMonitoring - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The Operations Management Suite (OMS) workspace parameters. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation EnableClusterMonitoringExtension(WaitUntil waitUntil, HDInsightClusterEnableClusterMonitoringContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.EnableClusterMonitoringExtension"); - scope.Start(); - try - { - var response = _extensionsRestClient.EnableMonitoring(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new HDInsightArmOperation(_extensionsClientDiagnostics, Pipeline, _extensionsRestClient.CreateEnableMonitoringRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the status of Operations Management Suite (OMS) on the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring - /// - /// - /// Operation Id - /// Extensions_GetMonitoringStatus - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetClusterMonitoringExtensionStatusAsync(CancellationToken cancellationToken = default) - { - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.GetClusterMonitoringExtensionStatus"); - scope.Start(); - try - { - var response = await _extensionsRestClient.GetMonitoringStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the status of Operations Management Suite (OMS) on the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring - /// - /// - /// Operation Id - /// Extensions_GetMonitoringStatus - /// - /// - /// - /// The cancellation token to use. - public virtual Response GetClusterMonitoringExtensionStatus(CancellationToken cancellationToken = default) - { - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.GetClusterMonitoringExtensionStatus"); - scope.Start(); - try - { - var response = _extensionsRestClient.GetMonitoringStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Disables the Operations Management Suite (OMS) on the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring - /// - /// - /// Operation Id - /// Extensions_DisableMonitoring - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DisableClusterMonitoringExtensionAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.DisableClusterMonitoringExtension"); - scope.Start(); - try - { - var response = await _extensionsRestClient.DisableMonitoringAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_extensionsClientDiagnostics, Pipeline, _extensionsRestClient.CreateDisableMonitoringRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Disables the Operations Management Suite (OMS) on the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring - /// - /// - /// Operation Id - /// Extensions_DisableMonitoring - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation DisableClusterMonitoringExtension(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.DisableClusterMonitoringExtension"); - scope.Start(); - try - { - var response = _extensionsRestClient.DisableMonitoring(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new HDInsightArmOperation(_extensionsClientDiagnostics, Pipeline, _extensionsRestClient.CreateDisableMonitoringRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Enables the Azure Monitor on the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor - /// - /// - /// Operation Id - /// Extensions_EnableAzureMonitor - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The Log Analytics workspace parameters. - /// The cancellation token to use. - /// is null. - public virtual async Task EnableAzureMonitorExtensionAsync(WaitUntil waitUntil, HDInsightAzureMonitorExtensionEnableContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.EnableAzureMonitorExtension"); - scope.Start(); - try - { - var response = await _extensionsRestClient.EnableAzureMonitorAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_extensionsClientDiagnostics, Pipeline, _extensionsRestClient.CreateEnableAzureMonitorRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Enables the Azure Monitor on the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor - /// - /// - /// Operation Id - /// Extensions_EnableAzureMonitor - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The Log Analytics workspace parameters. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation EnableAzureMonitorExtension(WaitUntil waitUntil, HDInsightAzureMonitorExtensionEnableContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.EnableAzureMonitorExtension"); - scope.Start(); - try - { - var response = _extensionsRestClient.EnableAzureMonitor(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new HDInsightArmOperation(_extensionsClientDiagnostics, Pipeline, _extensionsRestClient.CreateEnableAzureMonitorRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the status of Azure Monitor on the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor - /// - /// - /// Operation Id - /// Extensions_GetAzureMonitorStatus - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAzureMonitorExtensionStatusAsync(CancellationToken cancellationToken = default) - { - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.GetAzureMonitorExtensionStatus"); - scope.Start(); - try - { - var response = await _extensionsRestClient.GetAzureMonitorStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the status of Azure Monitor on the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor - /// - /// - /// Operation Id - /// Extensions_GetAzureMonitorStatus - /// - /// - /// - /// The cancellation token to use. - public virtual Response GetAzureMonitorExtensionStatus(CancellationToken cancellationToken = default) - { - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.GetAzureMonitorExtensionStatus"); - scope.Start(); - try - { - var response = _extensionsRestClient.GetAzureMonitorStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Disables the Azure Monitor on the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor - /// - /// - /// Operation Id - /// Extensions_DisableAzureMonitor - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DisableAzureMonitorExtensionAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.DisableAzureMonitorExtension"); - scope.Start(); - try - { - var response = await _extensionsRestClient.DisableAzureMonitorAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_extensionsClientDiagnostics, Pipeline, _extensionsRestClient.CreateDisableAzureMonitorRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Disables the Azure Monitor on the HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor - /// - /// - /// Operation Id - /// Extensions_DisableAzureMonitor - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation DisableAzureMonitorExtension(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.DisableAzureMonitorExtension"); - scope.Start(); - try - { - var response = _extensionsRestClient.DisableAzureMonitor(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new HDInsightArmOperation(_extensionsClientDiagnostics, Pipeline, _extensionsRestClient.CreateDisableAzureMonitorRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates an HDInsight cluster extension. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName} - /// - /// - /// Operation Id - /// Extensions_Create - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the cluster extension. - /// The cluster extensions create request. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task CreateExtensionAsync(WaitUntil waitUntil, string extensionName, HDInsightClusterCreateExtensionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.CreateExtension"); - scope.Start(); - try - { - var response = await _extensionsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, extensionName, content, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_extensionsClientDiagnostics, Pipeline, _extensionsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, extensionName, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates an HDInsight cluster extension. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName} - /// - /// - /// Operation Id - /// Extensions_Create - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the cluster extension. - /// The cluster extensions create request. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateExtension(WaitUntil waitUntil, string extensionName, HDInsightClusterCreateExtensionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.CreateExtension"); - scope.Start(); - try - { - var response = _extensionsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, extensionName, content, cancellationToken); - var operation = new HDInsightArmOperation(_extensionsClientDiagnostics, Pipeline, _extensionsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, extensionName, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the extension properties for the specified HDInsight cluster extension. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName} - /// - /// - /// Operation Id - /// Extensions_Get - /// - /// - /// - /// The name of the cluster extension. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetExtensionAsync(string extensionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.GetExtension"); - scope.Start(); - try - { - var response = await _extensionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, extensionName, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the extension properties for the specified HDInsight cluster extension. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName} - /// - /// - /// Operation Id - /// Extensions_Get - /// - /// - /// - /// The name of the cluster extension. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetExtension(string extensionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.GetExtension"); - scope.Start(); - try - { - var response = _extensionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, extensionName, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the specified extension for HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName} - /// - /// - /// Operation Id - /// Extensions_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the cluster extension. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task DeleteExtensionAsync(WaitUntil waitUntil, string extensionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.DeleteExtension"); - scope.Start(); - try - { - var response = await _extensionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, extensionName, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_extensionsClientDiagnostics, Pipeline, _extensionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, extensionName).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the specified extension for HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName} - /// - /// - /// Operation Id - /// Extensions_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the cluster extension. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual ArmOperation DeleteExtension(WaitUntil waitUntil, string extensionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.DeleteExtension"); - scope.Start(); - try - { - var response = _extensionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, extensionName, cancellationToken); - var operation = new HDInsightArmOperation(_extensionsClientDiagnostics, Pipeline, _extensionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, extensionName).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the async operation status. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}/azureAsyncOperations/{operationId} - /// - /// - /// Operation Id - /// Extensions_GetAzureAsyncOperationStatus - /// - /// - /// - /// The name of the cluster extension. - /// The long running operation id. - /// The cancellation token to use. - /// or is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> GetExtensionAsyncOperationStatusAsync(string extensionName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.GetExtensionAsyncOperationStatus"); - scope.Start(); - try - { - var response = await _extensionsRestClient.GetAzureAsyncOperationStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, extensionName, operationId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the async operation status. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}/azureAsyncOperations/{operationId} - /// - /// - /// Operation Id - /// Extensions_GetAzureAsyncOperationStatus - /// - /// - /// - /// The name of the cluster extension. - /// The long running operation id. - /// The cancellation token to use. - /// or is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response GetExtensionAsyncOperationStatus(string extensionName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _extensionsClientDiagnostics.CreateScope("HDInsightClusterResource.GetExtensionAsyncOperationStatus"); - scope.Start(); - try - { - var response = _extensionsRestClient.GetAzureAsyncOperationStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, extensionName, operationId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a specified persisted script action of the cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions/{scriptName} - /// - /// - /// Operation Id - /// ScriptActions_Delete - /// - /// - /// - /// The name of the script. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task DeleteScriptActionAsync(string scriptName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(scriptName, nameof(scriptName)); - - using var scope = _scriptActionsClientDiagnostics.CreateScope("HDInsightClusterResource.DeleteScriptAction"); - scope.Start(); - try - { - var response = await _scriptActionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, scriptName, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a specified persisted script action of the cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions/{scriptName} - /// - /// - /// Operation Id - /// ScriptActions_Delete - /// - /// - /// - /// The name of the script. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response DeleteScriptAction(string scriptName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(scriptName, nameof(scriptName)); - - using var scope = _scriptActionsClientDiagnostics.CreateScope("HDInsightClusterResource.DeleteScriptAction"); - scope.Start(); - try - { - var response = _scriptActionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, scriptName, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists all the persisted script actions for the specified cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions - /// - /// - /// Operation Id - /// ScriptActions_ListByCluster - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetScriptActionsAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _scriptActionsRestClient.CreateListByClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scriptActionsRestClient.CreateListByClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, RuntimeScriptActionDetail.DeserializeRuntimeScriptActionDetail, _scriptActionsClientDiagnostics, Pipeline, "HDInsightClusterResource.GetScriptActions", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all the persisted script actions for the specified cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions - /// - /// - /// Operation Id - /// ScriptActions_ListByCluster - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetScriptActions(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _scriptActionsRestClient.CreateListByClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scriptActionsRestClient.CreateListByClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, RuntimeScriptActionDetail.DeserializeRuntimeScriptActionDetail, _scriptActionsClientDiagnostics, Pipeline, "HDInsightClusterResource.GetScriptActions", "value", "nextLink", cancellationToken); - } - - /// - /// Gets the script execution detail for the given script execution ID. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory/{scriptExecutionId} - /// - /// - /// Operation Id - /// ScriptActions_GetExecutionDetail - /// - /// - /// - /// The script execution Id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetScriptActionExecutionDetailAsync(string scriptExecutionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(scriptExecutionId, nameof(scriptExecutionId)); - - using var scope = _scriptActionsClientDiagnostics.CreateScope("HDInsightClusterResource.GetScriptActionExecutionDetail"); - scope.Start(); - try - { - var response = await _scriptActionsRestClient.GetExecutionDetailAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, scriptExecutionId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the script execution detail for the given script execution ID. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory/{scriptExecutionId} - /// - /// - /// Operation Id - /// ScriptActions_GetExecutionDetail - /// - /// - /// - /// The script execution Id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetScriptActionExecutionDetail(string scriptExecutionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(scriptExecutionId, nameof(scriptExecutionId)); - - using var scope = _scriptActionsClientDiagnostics.CreateScope("HDInsightClusterResource.GetScriptActionExecutionDetail"); - scope.Start(); - try - { - var response = _scriptActionsRestClient.GetExecutionDetail(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, scriptExecutionId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the async operation status of execution operation. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/executeScriptActions/azureasyncoperations/{operationId} - /// - /// - /// Operation Id - /// ScriptActions_GetExecutionAsyncOperationStatus - /// - /// - /// - /// The long running operation id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetScriptActionExecutionAsyncOperationStatusAsync(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _scriptActionsClientDiagnostics.CreateScope("HDInsightClusterResource.GetScriptActionExecutionAsyncOperationStatus"); - scope.Start(); - try - { - var response = await _scriptActionsRestClient.GetExecutionAsyncOperationStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the async operation status of execution operation. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/executeScriptActions/azureasyncoperations/{operationId} - /// - /// - /// Operation Id - /// ScriptActions_GetExecutionAsyncOperationStatus - /// - /// - /// - /// The long running operation id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetScriptActionExecutionAsyncOperationStatus(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _scriptActionsClientDiagnostics.CreateScope("HDInsightClusterResource.GetScriptActionExecutionAsyncOperationStatus"); - scope.Start(); - try - { - var response = _scriptActionsRestClient.GetExecutionAsyncOperationStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists all scripts' execution history for the specified cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory - /// - /// - /// Operation Id - /// ScriptExecutionHistory_ListByCluster - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetScriptExecutionHistoriesAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _scriptExecutionHistoryRestClient.CreateListByClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scriptExecutionHistoryRestClient.CreateListByClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, RuntimeScriptActionDetail.DeserializeRuntimeScriptActionDetail, _scriptExecutionHistoryClientDiagnostics, Pipeline, "HDInsightClusterResource.GetScriptExecutionHistories", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all scripts' execution history for the specified cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory - /// - /// - /// Operation Id - /// ScriptExecutionHistory_ListByCluster - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetScriptExecutionHistories(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _scriptExecutionHistoryRestClient.CreateListByClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scriptExecutionHistoryRestClient.CreateListByClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, RuntimeScriptActionDetail.DeserializeRuntimeScriptActionDetail, _scriptExecutionHistoryClientDiagnostics, Pipeline, "HDInsightClusterResource.GetScriptExecutionHistories", "value", "nextLink", cancellationToken); - } - - /// - /// Promotes the specified ad-hoc script execution to a persisted script. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory/{scriptExecutionId}/promote - /// - /// - /// Operation Id - /// ScriptExecutionHistory_Promote - /// - /// - /// - /// The script execution Id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task PromoteScriptExecutionHistoryAsync(string scriptExecutionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(scriptExecutionId, nameof(scriptExecutionId)); - - using var scope = _scriptExecutionHistoryClientDiagnostics.CreateScope("HDInsightClusterResource.PromoteScriptExecutionHistory"); - scope.Start(); - try - { - var response = await _scriptExecutionHistoryRestClient.PromoteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, scriptExecutionId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Promotes the specified ad-hoc script execution to a persisted script. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory/{scriptExecutionId}/promote - /// - /// - /// Operation Id - /// ScriptExecutionHistory_Promote - /// - /// - /// - /// The script execution Id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response PromoteScriptExecutionHistory(string scriptExecutionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(scriptExecutionId, nameof(scriptExecutionId)); - - using var scope = _scriptExecutionHistoryClientDiagnostics.CreateScope("HDInsightClusterResource.PromoteScriptExecutionHistory"); - scope.Start(); - try - { - var response = _scriptExecutionHistoryRestClient.Promote(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, scriptExecutionId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the HDInsight clusters hosts - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/listHosts - /// - /// - /// Operation Id - /// VirtualMachines_ListHosts - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetVirtualMachineHostsAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _virtualMachinesRestClient.CreateListHostsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, HDInsightClusterHostInfo.DeserializeHDInsightClusterHostInfo, _virtualMachinesClientDiagnostics, Pipeline, "HDInsightClusterResource.GetVirtualMachineHosts", "", null, cancellationToken); - } - - /// - /// Lists the HDInsight clusters hosts - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/listHosts - /// - /// - /// Operation Id - /// VirtualMachines_ListHosts - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetVirtualMachineHosts(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _virtualMachinesRestClient.CreateListHostsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, null, HDInsightClusterHostInfo.DeserializeHDInsightClusterHostInfo, _virtualMachinesClientDiagnostics, Pipeline, "HDInsightClusterResource.GetVirtualMachineHosts", "", null, cancellationToken); - } - - /// - /// Restarts the specified HDInsight cluster hosts. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/restartHosts - /// - /// - /// Operation Id - /// VirtualMachines_RestartHosts - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The list of hosts to restart. - /// The cancellation token to use. - /// is null. - public virtual async Task RestartVirtualMachineHostsAsync(WaitUntil waitUntil, IEnumerable content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _virtualMachinesClientDiagnostics.CreateScope("HDInsightClusterResource.RestartVirtualMachineHosts"); - scope.Start(); - try - { - var response = await _virtualMachinesRestClient.RestartHostsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_virtualMachinesClientDiagnostics, Pipeline, _virtualMachinesRestClient.CreateRestartHostsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Restarts the specified HDInsight cluster hosts. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/restartHosts - /// - /// - /// Operation Id - /// VirtualMachines_RestartHosts - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The list of hosts to restart. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation RestartVirtualMachineHosts(WaitUntil waitUntil, IEnumerable content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _virtualMachinesClientDiagnostics.CreateScope("HDInsightClusterResource.RestartVirtualMachineHosts"); - scope.Start(); - try - { - var response = _virtualMachinesRestClient.RestartHosts(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new HDInsightArmOperation(_virtualMachinesClientDiagnostics, Pipeline, _virtualMachinesRestClient.CreateRestartHostsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the async operation status. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/restartHosts/azureasyncoperations/{operationId} - /// - /// - /// Operation Id - /// VirtualMachines_GetAsyncOperationStatus - /// - /// - /// - /// The long running operation id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetVirtualMachineAsyncOperationStatusAsync(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _virtualMachinesClientDiagnostics.CreateScope("HDInsightClusterResource.GetVirtualMachineAsyncOperationStatus"); - scope.Start(); - try - { - var response = await _virtualMachinesRestClient.GetAsyncOperationStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the async operation status. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/restartHosts/azureasyncoperations/{operationId} - /// - /// - /// Operation Id - /// VirtualMachines_GetAsyncOperationStatus - /// - /// - /// - /// The long running operation id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetVirtualMachineAsyncOperationStatus(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _virtualMachinesClientDiagnostics.CreateScope("HDInsightClusterResource.GetVirtualMachineAsyncOperationStatus"); - scope.Start(); - try - { - var response = _virtualMachinesRestClient.GetAsyncOperationStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _clusterJobsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _clusterJobsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, ClusterJob.DeserializeClusterJob, _clusterJobsClientDiagnostics, Pipeline, "HDInsightClusterResource.GetClusterJobs", "value", "nextLink", cancellationToken); } /// @@ -2543,7 +649,7 @@ public virtual Response GetVirtualMachineAsyncOpe /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -2569,20 +675,20 @@ public virtual async Task> AddTagAsync(string var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _hdInsightClusterClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _hdInsightClusterClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new HDInsightClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new HDInsightClusterPatch(); + var patch = new HDInsightClusterPatch(current.Location); foreach (var tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -2597,7 +703,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -2623,20 +729,20 @@ public virtual Response AddTag(string key, string valu var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _hdInsightClusterClustersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var originalResponse = _hdInsightClusterClustersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return Response.FromValue(new HDInsightClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new HDInsightClusterPatch(); + var patch = new HDInsightClusterPatch(current.Location); foreach (var tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = Update(patch, cancellationToken: cancellationToken); - return result; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -2651,7 +757,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -2676,16 +782,16 @@ public virtual async Task> SetTagsAsync(IDict var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _hdInsightClusterClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _hdInsightClusterClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new HDInsightClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new HDInsightClusterPatch(); + var patch = new HDInsightClusterPatch(current.Location); patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -2700,7 +806,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -2725,16 +831,16 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -2773,20 +879,20 @@ public virtual async Task> RemoveTagAsync(str var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _hdInsightClusterClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _hdInsightClusterClustersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new HDInsightClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new HDInsightClusterPatch(); + var patch = new HDInsightClusterPatch(current.Location); foreach (var tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -2801,7 +907,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName} /// /// /// Operation Id @@ -2825,20 +931,20 @@ public virtual Response RemoveTag(string key, Cancella var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _hdInsightClusterClustersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var originalResponse = _hdInsightClusterClustersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return Response.FromValue(new HDInsightClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new HDInsightClusterPatch(); + var patch = new HDInsightClusterPatch(current.Location); foreach (var tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = Update(patch, cancellationToken: cancellationToken); - return result; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionCollection.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionCollection.cs deleted file mode 100644 index 3c6880096bf7..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionCollection.cs +++ /dev/null @@ -1,340 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.HDInsight -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetHDInsightPrivateEndpointConnections method from an instance of . - /// - public partial class HDInsightPrivateEndpointConnectionCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics; - private readonly PrivateEndpointConnectionsRestOperations _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient; - - /// Initializes a new instance of the class for mocking. - protected HDInsightPrivateEndpointConnectionCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal HDInsightPrivateEndpointConnectionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", HDInsightPrivateEndpointConnectionResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(HDInsightPrivateEndpointConnectionResource.ResourceType, out string hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsApiVersion); - _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient = new PrivateEndpointConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != HDInsightClusterResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, HDInsightClusterResource.ResourceType), nameof(id)); - } - - /// - /// Approve or reject a private endpoint connection manually. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the private endpoint connection. - /// The private endpoint connection create or update request. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, HDInsightPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("HDInsightPrivateEndpointConnectionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(new HDInsightPrivateEndpointConnectionOperationSource(Client), _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Approve or reject a private endpoint connection manually. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the private endpoint connection. - /// The private endpoint connection create or update request. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, HDInsightPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("HDInsightPrivateEndpointConnectionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); - var operation = new HDInsightArmOperation(new HDInsightPrivateEndpointConnectionOperationSource(Client), _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specific private endpoint connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_Get - /// - /// - /// - /// The name of the private endpoint connection. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var scope = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("HDInsightPrivateEndpointConnectionCollection.Get"); - scope.Start(); - try - { - var response = await _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HDInsightPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specific private endpoint connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_Get - /// - /// - /// - /// The name of the private endpoint connection. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var scope = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("HDInsightPrivateEndpointConnectionCollection.Get"); - scope.Start(); - try - { - var response = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HDInsightPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the private endpoint connections for a HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections - /// - /// - /// Operation Id - /// PrivateEndpointConnections_ListByCluster - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HDInsightPrivateEndpointConnectionResource(Client, HDInsightPrivateEndpointConnectionData.DeserializeHDInsightPrivateEndpointConnectionData(e)), _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "HDInsightPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists the private endpoint connections for a HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections - /// - /// - /// Operation Id - /// PrivateEndpointConnections_ListByCluster - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HDInsightPrivateEndpointConnectionResource(Client, HDInsightPrivateEndpointConnectionData.DeserializeHDInsightPrivateEndpointConnectionData(e)), _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "HDInsightPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_Get - /// - /// - /// - /// The name of the private endpoint connection. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var scope = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("HDInsightPrivateEndpointConnectionCollection.Exists"); - scope.Start(); - try - { - var response = await _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_Get - /// - /// - /// - /// The name of the private endpoint connection. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var scope = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("HDInsightPrivateEndpointConnectionCollection.Exists"); - scope.Start(); - try - { - var response = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionData.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionData.cs deleted file mode 100644 index 4dcc7544dad4..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionData.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.HDInsight.Models; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.HDInsight -{ - /// - /// A class representing the HDInsightPrivateEndpointConnection data model. - /// The private endpoint connection. - /// - public partial class HDInsightPrivateEndpointConnectionData : ResourceData - { - /// Initializes a new instance of HDInsightPrivateEndpointConnectionData. - /// The private link service connection state. - /// is null. - public HDInsightPrivateEndpointConnectionData(HDInsightPrivateLinkServiceConnectionState connectionState) - { - Argument.AssertNotNull(connectionState, nameof(connectionState)); - - ConnectionState = connectionState; - } - - /// Initializes a new instance of HDInsightPrivateEndpointConnectionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The private endpoint of the private endpoint connection. - /// The private link service connection state. - /// The link identifier. - /// The provisioning state, which only appears in the response. - internal HDInsightPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SubResource privateEndpoint, HDInsightPrivateLinkServiceConnectionState connectionState, string linkIdentifier, HDInsightPrivateEndpointConnectionProvisioningState? provisioningState) : base(id, name, resourceType, systemData) - { - PrivateEndpoint = privateEndpoint; - ConnectionState = connectionState; - LinkIdentifier = linkIdentifier; - ProvisioningState = provisioningState; - } - - /// The private endpoint of the private endpoint connection. - internal SubResource PrivateEndpoint { get; } - /// Gets Id. - public ResourceIdentifier PrivateEndpointId - { - get => PrivateEndpoint?.Id; - } - - /// The private link service connection state. - public HDInsightPrivateLinkServiceConnectionState ConnectionState { get; set; } - /// The link identifier. - public string LinkIdentifier { get; } - /// The provisioning state, which only appears in the response. - public HDInsightPrivateEndpointConnectionProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionResource.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionResource.cs deleted file mode 100644 index 8a808dd5370e..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionResource.cs +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.HDInsight -{ - /// - /// A Class representing a HDInsightPrivateEndpointConnection along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetHDInsightPrivateEndpointConnectionResource method. - /// Otherwise you can get one from its parent resource using the GetHDInsightPrivateEndpointConnection method. - /// - public partial class HDInsightPrivateEndpointConnectionResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string privateEndpointConnectionName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics; - private readonly PrivateEndpointConnectionsRestOperations _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient; - private readonly HDInsightPrivateEndpointConnectionData _data; - - /// Initializes a new instance of the class for mocking. - protected HDInsightPrivateEndpointConnectionResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal HDInsightPrivateEndpointConnectionResource(ArmClient client, HDInsightPrivateEndpointConnectionData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal HDInsightPrivateEndpointConnectionResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsApiVersion); - _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient = new PrivateEndpointConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.HDInsight/clusters/privateEndpointConnections"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual HDInsightPrivateEndpointConnectionData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets the specific private endpoint connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("HDInsightPrivateEndpointConnectionResource.Get"); - scope.Start(); - try - { - var response = await _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HDInsightPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specific private endpoint connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("HDInsightPrivateEndpointConnectionResource.Get"); - scope.Start(); - try - { - var response = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HDInsightPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the specific private endpoint connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("HDInsightPrivateEndpointConnectionResource.Delete"); - scope.Start(); - try - { - var response = await _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(_hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the specific private endpoint connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("HDInsightPrivateEndpointConnectionResource.Delete"); - scope.Start(); - try - { - var response = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new HDInsightArmOperation(_hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Approve or reject a private endpoint connection manually. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The private endpoint connection create or update request. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, HDInsightPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("HDInsightPrivateEndpointConnectionResource.Update"); - scope.Start(); - try - { - var response = await _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new HDInsightArmOperation(new HDInsightPrivateEndpointConnectionOperationSource(Client), _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Approve or reject a private endpoint connection manually. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The private endpoint connection create or update request. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, HDInsightPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("HDInsightPrivateEndpointConnectionResource.Update"); - scope.Start(); - try - { - var response = _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new HDInsightArmOperation(new HDInsightPrivateEndpointConnectionOperationSource(Client), _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _hdInsightPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResource.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResource.cs deleted file mode 100644 index cd5cf409e8ee..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResource.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.HDInsight -{ - /// - /// A Class representing a HDInsightPrivateLinkResource along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetHDInsightPrivateLinkResource method. - /// Otherwise you can get one from its parent resource using the GetHDInsightPrivateLinkResource method. - /// - public partial class HDInsightPrivateLinkResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string privateLinkResourceName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _hdInsightPrivateLinkResourcePrivateLinkResourcesClientDiagnostics; - private readonly PrivateLinkResourcesRestOperations _hdInsightPrivateLinkResourcePrivateLinkResourcesRestClient; - private readonly HDInsightPrivateLinkResourceData _data; - - /// Initializes a new instance of the class for mocking. - protected HDInsightPrivateLinkResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal HDInsightPrivateLinkResource(ArmClient client, HDInsightPrivateLinkResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal HDInsightPrivateLinkResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hdInsightPrivateLinkResourcePrivateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string hdInsightPrivateLinkResourcePrivateLinkResourcesApiVersion); - _hdInsightPrivateLinkResourcePrivateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hdInsightPrivateLinkResourcePrivateLinkResourcesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.HDInsight/clusters/privateLinkResources"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual HDInsightPrivateLinkResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets the specific private link resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _hdInsightPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("HDInsightPrivateLinkResource.Get"); - scope.Start(); - try - { - var response = await _hdInsightPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HDInsightPrivateLinkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specific private link resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _hdInsightPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("HDInsightPrivateLinkResource.Get"); - scope.Start(); - try - { - var response = _hdInsightPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HDInsightPrivateLinkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResourceCollection.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResourceCollection.cs deleted file mode 100644 index 5b2dcb49af5b..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResourceCollection.cs +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.HDInsight -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetHDInsightPrivateLinkResources method from an instance of . - /// - public partial class HDInsightPrivateLinkResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _hdInsightPrivateLinkResourcePrivateLinkResourcesClientDiagnostics; - private readonly PrivateLinkResourcesRestOperations _hdInsightPrivateLinkResourcePrivateLinkResourcesRestClient; - - /// Initializes a new instance of the class for mocking. - protected HDInsightPrivateLinkResourceCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal HDInsightPrivateLinkResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _hdInsightPrivateLinkResourcePrivateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HDInsight", HDInsightPrivateLinkResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(HDInsightPrivateLinkResource.ResourceType, out string hdInsightPrivateLinkResourcePrivateLinkResourcesApiVersion); - _hdInsightPrivateLinkResourcePrivateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hdInsightPrivateLinkResourcePrivateLinkResourcesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != HDInsightClusterResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, HDInsightClusterResource.ResourceType), nameof(id)); - } - - /// - /// Gets the specific private link resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string privateLinkResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); - - using var scope = _hdInsightPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("HDInsightPrivateLinkResourceCollection.Get"); - scope.Start(); - try - { - var response = await _hdInsightPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HDInsightPrivateLinkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specific private link resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string privateLinkResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); - - using var scope = _hdInsightPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("HDInsightPrivateLinkResourceCollection.Get"); - scope.Start(); - try - { - var response = _hdInsightPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new HDInsightPrivateLinkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists the private link resources in a HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources - /// - /// - /// Operation Id - /// PrivateLinkResources_ListByCluster - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new HDInsightPrivateLinkResource(Client, HDInsightPrivateLinkResourceData.DeserializeHDInsightPrivateLinkResourceData(e)), _hdInsightPrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "HDInsightPrivateLinkResourceCollection.GetAll", "value", null, cancellationToken); - } - - /// - /// Lists the private link resources in a HDInsight cluster. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources - /// - /// - /// Operation Id - /// PrivateLinkResources_ListByCluster - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _hdInsightPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, null, e => new HDInsightPrivateLinkResource(Client, HDInsightPrivateLinkResourceData.DeserializeHDInsightPrivateLinkResourceData(e)), _hdInsightPrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "HDInsightPrivateLinkResourceCollection.GetAll", "value", null, cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string privateLinkResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); - - using var scope = _hdInsightPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("HDInsightPrivateLinkResourceCollection.Exists"); - scope.Start(); - try - { - var response = await _hdInsightPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName} - /// - /// - /// Operation Id - /// PrivateLinkResources_Get - /// - /// - /// - /// The name of the private link resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string privateLinkResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); - - using var scope = _hdInsightPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("HDInsightPrivateLinkResourceCollection.Exists"); - scope.Start(); - try - { - var response = _hdInsightPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResourceData.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResourceData.cs deleted file mode 100644 index 8c5869e05716..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResourceData.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HDInsight -{ - /// - /// A class representing the HDInsightPrivateLinkResource data model. - /// A private link resource - /// - public partial class HDInsightPrivateLinkResourceData : ResourceData - { - /// Initializes a new instance of HDInsightPrivateLinkResourceData. - public HDInsightPrivateLinkResourceData() - { - RequiredMembers = new ChangeTrackingList(); - RequiredZoneNames = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightPrivateLinkResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The private link resource group id. - /// The private link resource required member names. - /// The private link resource Private link DNS zone name. - internal HDInsightPrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string groupId, IReadOnlyList requiredMembers, IList requiredZoneNames) : base(id, name, resourceType, systemData) - { - GroupId = groupId; - RequiredMembers = requiredMembers; - RequiredZoneNames = requiredZoneNames; - } - - /// The private link resource group id. - public string GroupId { get; } - /// The private link resource required member names. - public IReadOnlyList RequiredMembers { get; } - /// The private link resource Private link DNS zone name. - public IList RequiredZoneNames { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/ClusterJobOperationSource.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/ClusterJobOperationSource.cs new file mode 100644 index 000000000000..b6d6e0f8ced9 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/ClusterJobOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.HDInsight.Models; + +namespace Azure.ResourceManager.HDInsight +{ + internal class ClusterJobOperationSource : IOperationSource + { + ClusterJob IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ClusterJob.DeserializeClusterJob(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ClusterJob.DeserializeClusterJob(document.RootElement); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/ClusterPoolOperationSource.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/ClusterPoolOperationSource.cs new file mode 100644 index 000000000000..285918602160 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/ClusterPoolOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.HDInsight +{ + internal class ClusterPoolOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ClusterPoolOperationSource(ArmClient client) + { + _client = client; + } + + ClusterPoolResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ClusterPoolData.DeserializeClusterPoolData(document.RootElement); + return new ClusterPoolResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ClusterPoolData.DeserializeClusterPoolData(document.RootElement); + return new ClusterPoolResource(_client, data); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/HDInsightApplicationOperationSource.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/HDInsightApplicationOperationSource.cs deleted file mode 100644 index faa718100376..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/HDInsightApplicationOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.HDInsight -{ - internal class HDInsightApplicationOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal HDInsightApplicationOperationSource(ArmClient client) - { - _client = client; - } - - HDInsightApplicationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = HDInsightApplicationData.DeserializeHDInsightApplicationData(document.RootElement); - return new HDInsightApplicationResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = HDInsightApplicationData.DeserializeHDInsightApplicationData(document.RootElement); - return new HDInsightApplicationResource(_client, data); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/HDInsightPrivateEndpointConnectionOperationSource.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/HDInsightPrivateEndpointConnectionOperationSource.cs deleted file mode 100644 index bf7cd6db3d46..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/LongRunningOperation/HDInsightPrivateEndpointConnectionOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.HDInsight -{ - internal class HDInsightPrivateEndpointConnectionOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal HDInsightPrivateEndpointConnectionOperationSource(ArmClient client) - { - _client = client; - } - - HDInsightPrivateEndpointConnectionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = HDInsightPrivateEndpointConnectionData.DeserializeHDInsightPrivateEndpointConnectionData(document.RootElement); - return new HDInsightPrivateEndpointConnectionResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = HDInsightPrivateEndpointConnectionData.DeserializeHDInsightPrivateEndpointConnectionData(document.RootElement); - return new HDInsightPrivateEndpointConnectionResource(_client, data); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/Action.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/Action.cs new file mode 100644 index 000000000000..0073d3b88594 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/Action.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// 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 readonly partial struct Action : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Action(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NEWValue = "NEW"; + private const string UpdateValue = "UPDATE"; + private const string StatelessUpdateValue = "STATELESS_UPDATE"; + private const string StopValue = "STOP"; + private const string StartValue = "START"; + private const string CancelValue = "CANCEL"; + private const string SavepointValue = "SAVEPOINT"; + private const string ListSavepointValue = "LIST_SAVEPOINT"; + private const string DeleteValue = "DELETE"; + + /// NEW. + public static Action NEW { get; } = new Action(NEWValue); + /// UPDATE. + public static Action Update { get; } = new Action(UpdateValue); + /// STATELESS_UPDATE. + public static Action StatelessUpdate { get; } = new Action(StatelessUpdateValue); + /// STOP. + public static Action Stop { get; } = new Action(StopValue); + /// START. + public static Action Start { get; } = new Action(StartValue); + /// CANCEL. + public static Action Cancel { get; } = new Action(CancelValue); + /// SAVEPOINT. + public static Action Savepoint { get; } = new Action(SavepointValue); + /// LIST_SAVEPOINT. + public static Action ListSavepoint { get; } = new Action(ListSavepointValue); + /// DELETE. + public static Action Delete { get; } = new Action(DeleteValue); + /// Determines if two values are the same. + public static bool operator ==(Action left, Action right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Action left, Action right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator Action(string value) => new Action(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Action other && Equals(other); + /// + public bool Equals(Action other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfile.Serialization.cs new file mode 100644 index 000000000000..c52a8258626a --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfile.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class AksClusterProfile + { + internal static AksClusterProfile DeserializeAksClusterProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional aksClusterResourceId = default; + Optional aksClusterAgentPoolIdentityProfile = default; + Optional aksVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("aksClusterResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aksClusterResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("aksClusterAgentPoolIdentityProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aksClusterAgentPoolIdentityProfile = AksClusterProfileAksClusterAgentPoolIdentityProfile.DeserializeAksClusterProfileAksClusterAgentPoolIdentityProfile(property.Value); + continue; + } + if (property.NameEquals("aksVersion"u8)) + { + aksVersion = property.Value.GetString(); + continue; + } + } + return new AksClusterProfile(aksClusterResourceId.Value, aksClusterAgentPoolIdentityProfile.Value, aksVersion.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfile.cs new file mode 100644 index 000000000000..f2cb53aed969 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfile.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Properties of the cluster pool underlying AKS cluster. + public partial class AksClusterProfile + { + /// Initializes a new instance of AksClusterProfile. + internal AksClusterProfile() + { + } + + /// Initializes a new instance of AksClusterProfile. + /// ARM Resource ID of the AKS cluster. + /// Identity properties of the AKS cluster agentpool MSI. + /// AKS control plane and default node pool version of this ClusterPool. + internal AksClusterProfile(ResourceIdentifier aksClusterResourceId, AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile, string aksVersion) + { + AksClusterResourceId = aksClusterResourceId; + AksClusterAgentPoolIdentityProfile = aksClusterAgentPoolIdentityProfile; + AksVersion = aksVersion; + } + + /// ARM Resource ID of the AKS cluster. + public ResourceIdentifier AksClusterResourceId { get; } + /// Identity properties of the AKS cluster agentpool MSI. + public AksClusterProfileAksClusterAgentPoolIdentityProfile AksClusterAgentPoolIdentityProfile { get; } + /// AKS control plane and default node pool version of this ClusterPool. + public string AksVersion { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfileAksClusterAgentPoolIdentityProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfileAksClusterAgentPoolIdentityProfile.Serialization.cs new file mode 100644 index 000000000000..4d313ce303d2 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfileAksClusterAgentPoolIdentityProfile.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class AksClusterProfileAksClusterAgentPoolIdentityProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("msiResourceId"u8); + writer.WriteStringValue(MsiResourceId); + writer.WritePropertyName("msiClientId"u8); + writer.WriteStringValue(MsiClientId); + writer.WritePropertyName("msiObjectId"u8); + writer.WriteStringValue(MsiObjectId); + writer.WriteEndObject(); + } + + internal static AksClusterProfileAksClusterAgentPoolIdentityProfile DeserializeAksClusterProfileAksClusterAgentPoolIdentityProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier msiResourceId = default; + string msiClientId = default; + string msiObjectId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("msiResourceId"u8)) + { + msiResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("msiClientId"u8)) + { + msiClientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("msiObjectId"u8)) + { + msiObjectId = property.Value.GetString(); + continue; + } + } + return new AksClusterProfileAksClusterAgentPoolIdentityProfile(msiResourceId, msiClientId, msiObjectId); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfileAksClusterAgentPoolIdentityProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfileAksClusterAgentPoolIdentityProfile.cs new file mode 100644 index 000000000000..c39884f21e71 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AksClusterProfileAksClusterAgentPoolIdentityProfile.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Identity properties of the AKS cluster agentpool MSI. + public partial class AksClusterProfileAksClusterAgentPoolIdentityProfile : IdentityProfile + { + /// Initializes a new instance of AksClusterProfileAksClusterAgentPoolIdentityProfile. + /// ResourceId of the MSI. + /// ClientId of the MSI. + /// ObjectId of the MSI. + /// , or is null. + public AksClusterProfileAksClusterAgentPoolIdentityProfile(ResourceIdentifier msiResourceId, string msiClientId, string msiObjectId) : base(msiResourceId, msiClientId, msiObjectId) + { + Argument.AssertNotNull(msiResourceId, nameof(msiResourceId)); + Argument.AssertNotNull(msiClientId, nameof(msiClientId)); + Argument.AssertNotNull(msiObjectId, nameof(msiObjectId)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ApplicationListResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ApplicationListResult.cs deleted file mode 100644 index 6be4664d62ea..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ApplicationListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.HDInsight; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// Result of the request to list cluster Applications. It contains a list of operations and a URL link to get the next set of results. - internal partial class ApplicationListResult - { - /// Initializes a new instance of ApplicationListResult. - internal ApplicationListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of ApplicationListResult. - /// The list of HDInsight applications installed on HDInsight cluster. - /// The URL to get the next set of operation list results if there are any. - internal ApplicationListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// The list of HDInsight applications installed on HDInsight cluster. - public IReadOnlyList Value { get; } - /// The URL to get the next set of operation list results if there are any. - public string NextLink { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthenticationDirectoryType.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthenticationDirectoryType.cs deleted file mode 100644 index 16e57470d10c..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthenticationDirectoryType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The directory type. - public readonly partial struct AuthenticationDirectoryType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AuthenticationDirectoryType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ActiveDirectoryValue = "ActiveDirectory"; - - /// ActiveDirectory. - public static AuthenticationDirectoryType ActiveDirectory { get; } = new AuthenticationDirectoryType(ActiveDirectoryValue); - /// Determines if two values are the same. - public static bool operator ==(AuthenticationDirectoryType left, AuthenticationDirectoryType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AuthenticationDirectoryType left, AuthenticationDirectoryType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AuthenticationDirectoryType(string value) => new AuthenticationDirectoryType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AuthenticationDirectoryType other && Equals(other); - /// - public bool Equals(AuthenticationDirectoryType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthorizationProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthorizationProfile.Serialization.cs new file mode 100644 index 000000000000..f6f08f06d916 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthorizationProfile.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class AuthorizationProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(UserIds)) + { + writer.WritePropertyName("userIds"u8); + writer.WriteStartArray(); + foreach (var item in UserIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(GroupIds)) + { + writer.WritePropertyName("groupIds"u8); + writer.WriteStartArray(); + foreach (var item in GroupIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static AuthorizationProfile DeserializeAuthorizationProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> userIds = default; + Optional> groupIds = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + userIds = array; + continue; + } + if (property.NameEquals("groupIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + groupIds = array; + continue; + } + } + return new AuthorizationProfile(Optional.ToList(userIds), Optional.ToList(groupIds)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthorizationProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthorizationProfile.cs new file mode 100644 index 000000000000..7155e5ff27b5 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AuthorizationProfile.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. + public partial class AuthorizationProfile + { + /// Initializes a new instance of AuthorizationProfile. + public AuthorizationProfile() + { + UserIds = new ChangeTrackingList(); + GroupIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of AuthorizationProfile. + /// AAD user Ids authorized for data plane access. + /// AAD group Ids authorized for data plane access. + internal AuthorizationProfile(IList userIds, IList groupIds) + { + UserIds = userIds; + GroupIds = groupIds; + } + + /// AAD user Ids authorized for data plane access. + public IList UserIds { get; } + /// AAD group Ids authorized for data plane access. + public IList GroupIds { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AutoScaleProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AutoScaleProfile.Serialization.cs new file mode 100644 index 000000000000..2a6c34423101 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AutoScaleProfile.Serialization.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class AutoScaleProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(Enabled); + if (Optional.IsDefined(GracefulDecommissionTimeout)) + { + writer.WritePropertyName("gracefulDecommissionTimeout"u8); + writer.WriteNumberValue(GracefulDecommissionTimeout.Value); + } + if (Optional.IsDefined(AutoScaleType)) + { + writer.WritePropertyName("autoscaleType"u8); + writer.WriteStringValue(AutoScaleType.Value.ToString()); + } + if (Optional.IsDefined(ScheduleBasedConfig)) + { + writer.WritePropertyName("scheduleBasedConfig"u8); + writer.WriteObjectValue(ScheduleBasedConfig); + } + if (Optional.IsDefined(LoadBasedConfig)) + { + writer.WritePropertyName("loadBasedConfig"u8); + writer.WriteObjectValue(LoadBasedConfig); + } + writer.WriteEndObject(); + } + + internal static AutoScaleProfile DeserializeAutoScaleProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool enabled = default; + Optional gracefulDecommissionTimeout = default; + Optional autoScaleType = default; + Optional scheduleBasedConfig = default; + Optional loadBasedConfig = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("gracefulDecommissionTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gracefulDecommissionTimeout = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("autoscaleType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoScaleType = new AutoScaleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("scheduleBasedConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduleBasedConfig = ScheduleBasedConfig.DeserializeScheduleBasedConfig(property.Value); + continue; + } + if (property.NameEquals("loadBasedConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBasedConfig = LoadBasedConfig.DeserializeLoadBasedConfig(property.Value); + continue; + } + } + return new AutoScaleProfile(enabled, Optional.ToNullable(gracefulDecommissionTimeout), Optional.ToNullable(autoScaleType), scheduleBasedConfig.Value, loadBasedConfig.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AutoScaleProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AutoScaleProfile.cs new file mode 100644 index 000000000000..72a4f959e0dc --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AutoScaleProfile.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. + public partial class AutoScaleProfile + { + /// Initializes a new instance of AutoScaleProfile. + /// This indicates whether auto scale is enabled on HDInsight on AKS cluster. + public AutoScaleProfile(bool enabled) + { + Enabled = enabled; + } + + /// Initializes a new instance of AutoScaleProfile. + /// This indicates whether auto scale is enabled on HDInsight on AKS cluster. + /// 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. + /// User to specify which type of Autoscale to be implemented - Scheduled Based or Load Based. + /// Profiles of schedule based Autoscale. + /// Profiles of load based Autoscale. + internal AutoScaleProfile(bool enabled, int? gracefulDecommissionTimeout, AutoScaleType? autoScaleType, ScheduleBasedConfig scheduleBasedConfig, LoadBasedConfig loadBasedConfig) + { + Enabled = enabled; + GracefulDecommissionTimeout = gracefulDecommissionTimeout; + AutoScaleType = autoScaleType; + ScheduleBasedConfig = scheduleBasedConfig; + LoadBasedConfig = loadBasedConfig; + } + + /// This indicates whether auto scale is enabled on HDInsight on AKS cluster. + public bool Enabled { get; set; } + /// 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. + public int? GracefulDecommissionTimeout { get; set; } + /// User to specify which type of Autoscale to be implemented - Scheduled Based or Load Based. + public AutoScaleType? AutoScaleType { get; set; } + /// Profiles of schedule based Autoscale. + public ScheduleBasedConfig ScheduleBasedConfig { get; set; } + /// Profiles of load based Autoscale. + public LoadBasedConfig LoadBasedConfig { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AutoScaleType.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AutoScaleType.cs new file mode 100644 index 000000000000..4c855ad53397 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/AutoScaleType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// User to specify which type of Autoscale to be implemented - Scheduled Based or Load Based. + public readonly partial struct AutoScaleType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoScaleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ScheduleBasedValue = "ScheduleBased"; + private const string LoadBasedValue = "LoadBased"; + + /// ScheduleBased. + public static AutoScaleType ScheduleBased { get; } = new AutoScaleType(ScheduleBasedValue); + /// LoadBased. + public static AutoScaleType LoadBased { get; } = new AutoScaleType(LoadBasedValue); + /// Determines if two values are the same. + public static bool operator ==(AutoScaleType left, AutoScaleType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoScaleType left, AutoScaleType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AutoScaleType(string value) => new AutoScaleType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoScaleType other && Equals(other); + /// + public bool Equals(AutoScaleType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/StorageProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/CatalogOptions.Serialization.cs similarity index 60% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/StorageProfile.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/CatalogOptions.Serialization.cs index a51d38e29810..fe2234c39986 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/StorageProfile.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/CatalogOptions.Serialization.cs @@ -11,16 +11,16 @@ namespace Azure.ResourceManager.HDInsight.Models { - internal partial class StorageProfile : IUtf8JsonSerializable + internal partial class CatalogOptions : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsCollectionDefined(StorageAccounts)) + if (Optional.IsCollectionDefined(Hive)) { - writer.WritePropertyName("storageaccounts"u8); + writer.WritePropertyName("hive"u8); writer.WriteStartArray(); - foreach (var item in StorageAccounts) + foreach (var item in Hive) { writer.WriteObjectValue(item); } @@ -29,31 +29,31 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static StorageProfile DeserializeStorageProfile(JsonElement element) + internal static CatalogOptions DeserializeCatalogOptions(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> storageaccounts = default; + Optional> hive = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("storageaccounts"u8)) + if (property.NameEquals("hive"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HDInsightStorageAccountInfo.DeserializeHDInsightStorageAccountInfo(item)); + array.Add(HiveCatalogOption.DeserializeHiveCatalogOption(item)); } - storageaccounts = array; + hive = array; continue; } } - return new StorageProfile(Optional.ToList(storageaccounts)); + return new CatalogOptions(Optional.ToList(hive)); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/CatalogOptions.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/CatalogOptions.cs new file mode 100644 index 000000000000..fac1f70705fc --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/CatalogOptions.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Trino cluster catalog options. + internal partial class CatalogOptions + { + /// Initializes a new instance of CatalogOptions. + public CatalogOptions() + { + Hive = new ChangeTrackingList(); + } + + /// Initializes a new instance of CatalogOptions. + /// hive catalog options. + internal CatalogOptions(IList hive) + { + Hive = hive; + } + + /// hive catalog options. + public IList Hive { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClientGroupInfo.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClientGroupInfo.Serialization.cs deleted file mode 100644 index bf016af9f00a..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClientGroupInfo.Serialization.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class ClientGroupInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(GroupName)) - { - writer.WritePropertyName("groupName"u8); - writer.WriteStringValue(GroupName); - } - if (Optional.IsDefined(GroupId)) - { - writer.WritePropertyName("groupId"u8); - writer.WriteStringValue(GroupId); - } - writer.WriteEndObject(); - } - - internal static ClientGroupInfo DeserializeClientGroupInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional groupName = default; - Optional groupId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("groupName"u8)) - { - groupName = property.Value.GetString(); - continue; - } - if (property.NameEquals("groupId"u8)) - { - groupId = property.Value.GetString(); - continue; - } - } - return new ClientGroupInfo(groupName.Value, groupId.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClientGroupInfo.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClientGroupInfo.cs deleted file mode 100644 index f0595356d502..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClientGroupInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The information of AAD security group. - public partial class ClientGroupInfo - { - /// Initializes a new instance of ClientGroupInfo. - public ClientGroupInfo() - { - } - - /// Initializes a new instance of ClientGroupInfo. - /// The AAD security group name. - /// The AAD security group id. - internal ClientGroupInfo(string groupName, string groupId) - { - GroupName = groupName; - GroupId = groupId; - } - - /// The AAD security group name. - public string GroupName { get; set; } - /// The AAD security group id. - public string GroupId { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterComponentsItem.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterComponentsItem.Serialization.cs new file mode 100644 index 000000000000..cabcb6e0404b --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterComponentsItem.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterComponentsItem + { + internal static ClusterComponentsItem DeserializeClusterComponentsItem(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + } + return new ClusterComponentsItem(name.Value, version.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterComponentsItem.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterComponentsItem.cs new file mode 100644 index 000000000000..e2a8fb6d2511 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterComponentsItem.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The ClusterComponentsItem. + public partial class ClusterComponentsItem + { + /// Initializes a new instance of ClusterComponentsItem. + internal ClusterComponentsItem() + { + } + + /// Initializes a new instance of ClusterComponentsItem. + /// + /// + internal ClusterComponentsItem(string name, string version) + { + Name = name; + Version = version; + } + + /// Gets the name. + public string Name { get; } + /// Gets the version. + public string Version { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterConfigFile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterConfigFile.Serialization.cs new file mode 100644 index 000000000000..9948e99b8a78 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterConfigFile.Serialization.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterConfigFile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("fileName"u8); + writer.WriteStringValue(FileName); + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + if (Optional.IsDefined(Encoding)) + { + writer.WritePropertyName("encoding"u8); + writer.WriteStringValue(Encoding.Value.ToString()); + } + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsCollectionDefined(Values)) + { + writer.WritePropertyName("values"u8); + writer.WriteStartObject(); + foreach (var item in Values) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static ClusterConfigFile DeserializeClusterConfigFile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fileName = default; + Optional content = default; + Optional encoding = default; + Optional path = default; + Optional> values = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fileName"u8)) + { + fileName = property.Value.GetString(); + continue; + } + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("encoding"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encoding = new ContentEncoding(property.Value.GetString()); + continue; + } + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("values"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + values = dictionary; + continue; + } + } + return new ClusterConfigFile(fileName, content.Value, Optional.ToNullable(encoding), path.Value, Optional.ToDictionary(values)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterConfigFile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterConfigFile.cs new file mode 100644 index 000000000000..10eea9bc821e --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterConfigFile.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster configuration files. + public partial class ClusterConfigFile + { + /// Initializes a new instance of ClusterConfigFile. + /// Configuration file name. + /// is null. + public ClusterConfigFile(string fileName) + { + Argument.AssertNotNull(fileName, nameof(fileName)); + + FileName = fileName; + Values = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ClusterConfigFile. + /// Configuration file name. + /// Free form content of the entire configuration file. + /// 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. + /// Path of the config file if content is specified. + /// + /// List of key value pairs + /// where key represents a valid service configuration name and value represents the value of the config. + /// + internal ClusterConfigFile(string fileName, string content, ContentEncoding? encoding, string path, IDictionary values) + { + FileName = fileName; + Content = content; + Encoding = encoding; + Path = path; + Values = values; + } + + /// Configuration file name. + public string FileName { get; set; } + /// Free form content of the entire configuration file. + public string Content { get; set; } + /// 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 ContentEncoding? Encoding { get; set; } + /// Path of the config file if content is specified. + public string Path { get; set; } + /// + /// List of key value pairs + /// where key represents a valid service configuration name and value represents the value of the config. + /// + public IDictionary Values { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewPropertiesStatus.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewPropertiesStatus.Serialization.cs new file mode 100644 index 000000000000..97a390606041 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewPropertiesStatus.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterInstanceViewPropertiesStatus + { + internal static ClusterInstanceViewPropertiesStatus DeserializeClusterInstanceViewPropertiesStatus(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ready = default; + Optional reason = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ready"u8)) + { + ready = property.Value.GetString(); + continue; + } + if (property.NameEquals("reason"u8)) + { + reason = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + } + return new ClusterInstanceViewPropertiesStatus(ready, reason.Value, message.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewPropertiesStatus.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewPropertiesStatus.cs new file mode 100644 index 000000000000..de9c0466588c --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewPropertiesStatus.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Status of the instance view. + public partial class ClusterInstanceViewPropertiesStatus : ClusterInstanceViewStatus + { + /// Initializes a new instance of ClusterInstanceViewPropertiesStatus. + /// The cluster ready status. + /// is null. + internal ClusterInstanceViewPropertiesStatus(string ready) : base(ready) + { + Argument.AssertNotNull(ready, nameof(ready)); + } + + /// Initializes a new instance of ClusterInstanceViewPropertiesStatus. + /// The cluster ready status. + /// The status reason. + /// The additional message. + internal ClusterInstanceViewPropertiesStatus(string ready, string reason, string message) : base(ready, reason, message) + { + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewResult.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewResult.Serialization.cs new file mode 100644 index 000000000000..708a1acc0e9b --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewResult.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterInstanceViewResult + { + internal static ClusterInstanceViewResult DeserializeClusterInstanceViewResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + ClusterInstanceViewPropertiesStatus status = default; + IReadOnlyList serviceStatuses = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("status"u8)) + { + status = ClusterInstanceViewPropertiesStatus.DeserializeClusterInstanceViewPropertiesStatus(property0.Value); + continue; + } + if (property0.NameEquals("serviceStatuses"u8)) + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ServiceStatus.DeserializeServiceStatus(item)); + } + serviceStatuses = array; + continue; + } + } + continue; + } + } + return new ClusterInstanceViewResult(name, status, serviceStatuses); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewResult.cs new file mode 100644 index 000000000000..67f7b3e0cde7 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewResult.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster Instance View. + public partial class ClusterInstanceViewResult + { + /// Initializes a new instance of ClusterInstanceViewResult. + /// Name of the instance view. + /// Status of the instance view. + /// List of statuses of relevant services that make up the HDInsight on aks cluster to surface to the customer. + /// , or is null. + internal ClusterInstanceViewResult(string name, ClusterInstanceViewPropertiesStatus status, IEnumerable serviceStatuses) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(status, nameof(status)); + Argument.AssertNotNull(serviceStatuses, nameof(serviceStatuses)); + + Name = name; + Status = status; + ServiceStatuses = serviceStatuses.ToList(); + } + + /// Initializes a new instance of ClusterInstanceViewResult. + /// Name of the instance view. + /// Status of the instance view. + /// List of statuses of relevant services that make up the HDInsight on aks cluster to surface to the customer. + internal ClusterInstanceViewResult(string name, ClusterInstanceViewPropertiesStatus status, IReadOnlyList serviceStatuses) + { + Name = name; + Status = status; + ServiceStatuses = serviceStatuses; + } + + /// Name of the instance view. + public string Name { get; } + /// Status of the instance view. + public ClusterInstanceViewPropertiesStatus Status { get; } + /// List of statuses of relevant services that make up the HDInsight on aks cluster to surface to the customer. + public IReadOnlyList ServiceStatuses { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewStatus.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewStatus.Serialization.cs new file mode 100644 index 000000000000..c413f9fa061a --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewStatus.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterInstanceViewStatus + { + internal static ClusterInstanceViewStatus DeserializeClusterInstanceViewStatus(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ready = default; + Optional reason = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ready"u8)) + { + ready = property.Value.GetString(); + continue; + } + if (property.NameEquals("reason"u8)) + { + reason = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + } + return new ClusterInstanceViewStatus(ready, reason.Value, message.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewStatus.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewStatus.cs new file mode 100644 index 000000000000..55f7e24411c0 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewStatus.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Status of the instance view. + public partial class ClusterInstanceViewStatus + { + /// Initializes a new instance of ClusterInstanceViewStatus. + /// The cluster ready status. + /// is null. + internal ClusterInstanceViewStatus(string ready) + { + Argument.AssertNotNull(ready, nameof(ready)); + + Ready = ready; + } + + /// Initializes a new instance of ClusterInstanceViewStatus. + /// The cluster ready status. + /// The status reason. + /// The additional message. + internal ClusterInstanceViewStatus(string ready, string reason, string message) + { + Ready = ready; + Reason = reason; + Message = message; + } + + /// The cluster ready status. + public string Ready { get; } + /// The status reason. + public string Reason { get; } + /// The additional message. + public string Message { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionHistoryList.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewsResult.Serialization.cs similarity index 68% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionHistoryList.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewsResult.Serialization.cs index 63584bc9a74b..77dec89abc6f 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionHistoryList.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewsResult.Serialization.cs @@ -11,15 +11,15 @@ namespace Azure.ResourceManager.HDInsight.Models { - internal partial class ScriptActionExecutionHistoryList + internal partial class ClusterInstanceViewsResult { - internal static ScriptActionExecutionHistoryList DeserializeScriptActionExecutionHistoryList(JsonElement element) + internal static ClusterInstanceViewsResult DeserializeClusterInstanceViewsResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -29,10 +29,10 @@ internal static ScriptActionExecutionHistoryList DeserializeScriptActionExecutio { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(RuntimeScriptActionDetail.DeserializeRuntimeScriptActionDetail(item)); + array.Add(ClusterInstanceViewResult.DeserializeClusterInstanceViewResult(item)); } value = array; continue; @@ -43,7 +43,7 @@ internal static ScriptActionExecutionHistoryList DeserializeScriptActionExecutio continue; } } - return new ScriptActionExecutionHistoryList(Optional.ToList(value), nextLink.Value); + return new ClusterInstanceViewsResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewsResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewsResult.cs new file mode 100644 index 000000000000..7e94b189edb8 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterInstanceViewsResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The instance view of a HDInsight Cluster. + internal partial class ClusterInstanceViewsResult + { + /// Initializes a new instance of ClusterInstanceViewsResult. + internal ClusterInstanceViewsResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ClusterInstanceViewsResult. + /// Cluster instance view array. + /// The link (url) to the next page of results. + internal ClusterInstanceViewsResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Cluster instance view array. + public IReadOnlyList Value { get; } + /// The link (url) to the next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJob.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJob.Serialization.cs new file mode 100644 index 000000000000..b8bb50874312 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJob.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterJob : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static ClusterJob DeserializeClusterJob(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ClusterJobProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = ClusterJobProperties.DeserializeClusterJobProperties(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new ClusterJob(id, name, type, systemData.Value, properties); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJob.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJob.cs new file mode 100644 index 000000000000..45193f67935a --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJob.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster job. + public partial class ClusterJob : ResourceData + { + /// Initializes a new instance of ClusterJob. + /// + /// Properties of cluster job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// is null. + public ClusterJob(ClusterJobProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of ClusterJob. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Properties of cluster job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal ClusterJob(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ClusterJobProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// Properties of cluster job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public ClusterJobProperties Properties { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UsagesListResult.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobList.Serialization.cs similarity index 55% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UsagesListResult.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobList.Serialization.cs index 67e1d5d635f2..cca976dcc5c6 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UsagesListResult.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobList.Serialization.cs @@ -11,33 +11,35 @@ namespace Azure.ResourceManager.HDInsight.Models { - internal partial class UsagesListResult + internal partial class ClusterJobList { - internal static UsagesListResult DeserializeUsagesListResult(JsonElement element) + internal static ClusterJobList DeserializeClusterJobList(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + IReadOnlyList value = default; + Optional nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HDInsightUsage.DeserializeHDInsightUsage(item)); + array.Add(ClusterJob.DeserializeClusterJob(item)); } value = array; continue; } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } } - return new UsagesListResult(Optional.ToList(value)); + return new ClusterJobList(value, nextLink.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobList.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobList.cs new file mode 100644 index 000000000000..fd82b0ef1b4c --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobList.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Collection of cluster job. + internal partial class ClusterJobList + { + /// Initializes a new instance of ClusterJobList. + /// Collection of cluster job. + /// is null. + internal ClusterJobList(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of ClusterJobList. + /// Collection of cluster job. + /// The Url of next result page. + internal ClusterJobList(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Collection of cluster job. + public IReadOnlyList Value { get; } + /// The Url of next result page. + public string NextLink { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobProperties.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobProperties.Serialization.cs new file mode 100644 index 000000000000..e86c432ed39a --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobProperties.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterJobProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + writer.WriteEndObject(); + } + + internal static ClusterJobProperties DeserializeClusterJobProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("jobType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "FlinkJob": return FlinkJobProperties.DeserializeFlinkJobProperties(element); + } + } + return UnknownClusterJobProperties.DeserializeUnknownClusterJobProperties(element); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobProperties.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobProperties.cs new file mode 100644 index 000000000000..35854864d3f6 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterJobProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// + /// Properties of cluster job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class ClusterJobProperties + { + /// Initializes a new instance of ClusterJobProperties. + protected ClusterJobProperties() + { + } + + /// Initializes a new instance of ClusterJobProperties. + /// Type of cluster job. + internal ClusterJobProperties(JobType jobType) + { + JobType = jobType; + } + + /// Type of cluster job. + internal JobType JobType { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterListResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterListResult.cs index d933208d0320..d24548f0df90 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterListResult.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterListResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.HDInsight.Models { - /// The List Cluster operation response. + /// The list cluster operation response. internal partial class ClusterListResult { /// Initializes a new instance of ClusterListResult. @@ -21,7 +21,7 @@ internal ClusterListResult() } /// Initializes a new instance of ClusterListResult. - /// The list of Clusters. + /// The list of clusters. /// The link (url) to the next page of results. internal ClusterListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal ClusterListResult(IReadOnlyList value, string nex NextLink = nextLink; } - /// The list of Clusters. + /// The list of clusters. public IReadOnlyList Value { get; } /// The link (url) to the next page of results. public string NextLink { get; } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleCapacity.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.Serialization.cs similarity index 51% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleCapacity.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.Serialization.cs index d119766363cd..fe6f01324557 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleCapacity.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.Serialization.cs @@ -10,54 +10,54 @@ namespace Azure.ResourceManager.HDInsight.Models { - public partial class HDInsightAutoScaleCapacity : IUtf8JsonSerializable + public partial class ClusterLogAnalyticsApplicationLogs : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(MinInstanceCount)) + if (Optional.IsDefined(StdOutEnabled)) { - writer.WritePropertyName("minInstanceCount"u8); - writer.WriteNumberValue(MinInstanceCount.Value); + writer.WritePropertyName("stdOutEnabled"u8); + writer.WriteBooleanValue(StdOutEnabled.Value); } - if (Optional.IsDefined(MaxInstanceCount)) + if (Optional.IsDefined(StdErrorEnabled)) { - writer.WritePropertyName("maxInstanceCount"u8); - writer.WriteNumberValue(MaxInstanceCount.Value); + writer.WritePropertyName("stdErrorEnabled"u8); + writer.WriteBooleanValue(StdErrorEnabled.Value); } writer.WriteEndObject(); } - internal static HDInsightAutoScaleCapacity DeserializeHDInsightAutoScaleCapacity(JsonElement element) + internal static ClusterLogAnalyticsApplicationLogs DeserializeClusterLogAnalyticsApplicationLogs(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional minInstanceCount = default; - Optional maxInstanceCount = default; + Optional stdOutEnabled = default; + Optional stdErrorEnabled = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("minInstanceCount"u8)) + if (property.NameEquals("stdOutEnabled"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - minInstanceCount = property.Value.GetInt32(); + stdOutEnabled = property.Value.GetBoolean(); continue; } - if (property.NameEquals("maxInstanceCount"u8)) + if (property.NameEquals("stdErrorEnabled"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - maxInstanceCount = property.Value.GetInt32(); + stdErrorEnabled = property.Value.GetBoolean(); continue; } } - return new HDInsightAutoScaleCapacity(Optional.ToNullable(minInstanceCount), Optional.ToNullable(maxInstanceCount)); + return new ClusterLogAnalyticsApplicationLogs(Optional.ToNullable(stdOutEnabled), Optional.ToNullable(stdErrorEnabled)); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.cs new file mode 100644 index 000000000000..f061e4e55c28 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsApplicationLogs.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Collection of logs to be enabled or disabled for log analytics. + public partial class ClusterLogAnalyticsApplicationLogs + { + /// Initializes a new instance of ClusterLogAnalyticsApplicationLogs. + public ClusterLogAnalyticsApplicationLogs() + { + } + + /// Initializes a new instance of ClusterLogAnalyticsApplicationLogs. + /// True if stdout is enabled, otherwise false. + /// True if stderror is enabled, otherwise false. + internal ClusterLogAnalyticsApplicationLogs(bool? stdOutEnabled, bool? stdErrorEnabled) + { + StdOutEnabled = stdOutEnabled; + StdErrorEnabled = stdErrorEnabled; + } + + /// True if stdout is enabled, otherwise false. + public bool? StdOutEnabled { get; set; } + /// True if stderror is enabled, otherwise false. + public bool? StdErrorEnabled { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsProfile.Serialization.cs new file mode 100644 index 000000000000..1df232549163 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsProfile.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterLogAnalyticsProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(Enabled); + if (Optional.IsDefined(ApplicationLogs)) + { + writer.WritePropertyName("applicationLogs"u8); + writer.WriteObjectValue(ApplicationLogs); + } + if (Optional.IsDefined(MetricsEnabled)) + { + writer.WritePropertyName("metricsEnabled"u8); + writer.WriteBooleanValue(MetricsEnabled.Value); + } + writer.WriteEndObject(); + } + + internal static ClusterLogAnalyticsProfile DeserializeClusterLogAnalyticsProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool enabled = default; + Optional applicationLogs = default; + Optional metricsEnabled = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("applicationLogs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + applicationLogs = ClusterLogAnalyticsApplicationLogs.DeserializeClusterLogAnalyticsApplicationLogs(property.Value); + continue; + } + if (property.NameEquals("metricsEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metricsEnabled = property.Value.GetBoolean(); + continue; + } + } + return new ClusterLogAnalyticsProfile(enabled, applicationLogs.Value, Optional.ToNullable(metricsEnabled)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsProfile.cs new file mode 100644 index 000000000000..b5bb8749ae8c --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterLogAnalyticsProfile.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster log analytics profile to enable or disable OMS agent for cluster. + public partial class ClusterLogAnalyticsProfile + { + /// Initializes a new instance of ClusterLogAnalyticsProfile. + /// True if log analytics is enabled for the cluster, otherwise false. + public ClusterLogAnalyticsProfile(bool enabled) + { + Enabled = enabled; + } + + /// Initializes a new instance of ClusterLogAnalyticsProfile. + /// True if log analytics is enabled for the cluster, otherwise false. + /// Collection of logs to be enabled or disabled for log analytics. + /// True if metrics are enabled, otherwise false. + internal ClusterLogAnalyticsProfile(bool enabled, ClusterLogAnalyticsApplicationLogs applicationLogs, bool? metricsEnabled) + { + Enabled = enabled; + ApplicationLogs = applicationLogs; + MetricsEnabled = metricsEnabled; + } + + /// True if log analytics is enabled for the cluster, otherwise false. + public bool Enabled { get; set; } + /// Collection of logs to be enabled or disabled for log analytics. + public ClusterLogAnalyticsApplicationLogs ApplicationLogs { get; set; } + /// True if metrics are enabled, otherwise false. + public bool? MetricsEnabled { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/EncryptionInTransitProperties.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolComputeProfile.Serialization.cs similarity index 52% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/EncryptionInTransitProperties.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolComputeProfile.Serialization.cs index d2b732ad9111..d6e277fa3f2b 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/EncryptionInTransitProperties.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolComputeProfile.Serialization.cs @@ -10,39 +10,42 @@ namespace Azure.ResourceManager.HDInsight.Models { - internal partial class EncryptionInTransitProperties : IUtf8JsonSerializable + public partial class ClusterPoolComputeProfile : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(IsEncryptionInTransitEnabled)) - { - writer.WritePropertyName("isEncryptionInTransitEnabled"u8); - writer.WriteBooleanValue(IsEncryptionInTransitEnabled.Value); - } + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); writer.WriteEndObject(); } - internal static EncryptionInTransitProperties DeserializeEncryptionInTransitProperties(JsonElement element) + internal static ClusterPoolComputeProfile DeserializeClusterPoolComputeProfile(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional isEncryptionInTransitEnabled = default; + string vmSize = default; + Optional count = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("isEncryptionInTransitEnabled"u8)) + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("count"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isEncryptionInTransitEnabled = property.Value.GetBoolean(); + count = property.Value.GetInt32(); continue; } } - return new EncryptionInTransitProperties(Optional.ToNullable(isEncryptionInTransitEnabled)); + return new ClusterPoolComputeProfile(vmSize, Optional.ToNullable(count)); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolComputeProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolComputeProfile.cs new file mode 100644 index 000000000000..7c3ae1129e45 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolComputeProfile.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster pool compute profile. + public partial class ClusterPoolComputeProfile + { + /// Initializes a new instance of ClusterPoolComputeProfile. + /// The virtual machine SKU. + /// is null. + public ClusterPoolComputeProfile(string vmSize) + { + Argument.AssertNotNull(vmSize, nameof(vmSize)); + + VmSize = vmSize; + } + + /// Initializes a new instance of ClusterPoolComputeProfile. + /// The virtual machine SKU. + /// The number of virtual machines. + internal ClusterPoolComputeProfile(string vmSize, int? count) + { + VmSize = vmSize; + Count = count; + } + + /// The virtual machine SKU. + public string VmSize { get; set; } + /// The number of virtual machines. + public int? Count { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolData.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolData.Serialization.cs new file mode 100644 index 000000000000..d2e88f8492fa --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolData.Serialization.cs @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.HDInsight.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HDInsight +{ + public partial class ClusterPoolData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ManagedResourceGroupName)) + { + writer.WritePropertyName("managedResourceGroupName"u8); + writer.WriteStringValue(ManagedResourceGroupName); + } + if (Optional.IsDefined(ClusterPoolProfile)) + { + writer.WritePropertyName("clusterPoolProfile"u8); + writer.WriteObjectValue(ClusterPoolProfile); + } + if (Optional.IsDefined(ComputeProfile)) + { + writer.WritePropertyName("computeProfile"u8); + writer.WriteObjectValue(ComputeProfile); + } + if (Optional.IsDefined(NetworkProfile)) + { + writer.WritePropertyName("networkProfile"u8); + writer.WriteObjectValue(NetworkProfile); + } + if (Optional.IsDefined(LogAnalyticsProfile)) + { + writer.WritePropertyName("logAnalyticsProfile"u8); + writer.WriteObjectValue(LogAnalyticsProfile); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static ClusterPoolData DeserializeClusterPoolData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional provisioningState = default; + Optional deploymentId = default; + Optional managedResourceGroupName = default; + Optional aksManagedResourceGroupName = default; + Optional clusterPoolProfile = default; + Optional computeProfile = default; + Optional aksClusterProfile = default; + Optional networkProfile = default; + Optional logAnalyticsProfile = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("deploymentId"u8)) + { + deploymentId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("managedResourceGroupName"u8)) + { + managedResourceGroupName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("aksManagedResourceGroupName"u8)) + { + aksManagedResourceGroupName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("clusterPoolProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterPoolProfile = ClusterPoolResourcePropertiesClusterPoolProfile.DeserializeClusterPoolResourcePropertiesClusterPoolProfile(property0.Value); + continue; + } + if (property0.NameEquals("computeProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeProfile = ClusterPoolResourcePropertiesComputeProfile.DeserializeClusterPoolResourcePropertiesComputeProfile(property0.Value); + continue; + } + if (property0.NameEquals("aksClusterProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aksClusterProfile = ClusterPoolResourcePropertiesAksClusterProfile.DeserializeClusterPoolResourcePropertiesAksClusterProfile(property0.Value); + continue; + } + if (property0.NameEquals("networkProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkProfile = ClusterPoolResourcePropertiesNetworkProfile.DeserializeClusterPoolResourcePropertiesNetworkProfile(property0.Value); + continue; + } + if (property0.NameEquals("logAnalyticsProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logAnalyticsProfile = ClusterPoolResourcePropertiesLogAnalyticsProfile.DeserializeClusterPoolResourcePropertiesLogAnalyticsProfile(property0.Value); + continue; + } + if (property0.NameEquals("status"u8)) + { + status = property0.Value.GetString(); + continue; + } + } + continue; + } + } + return new ClusterPoolData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(provisioningState), deploymentId.Value, managedResourceGroupName.Value, aksManagedResourceGroupName.Value, clusterPoolProfile.Value, computeProfile.Value, aksClusterProfile.Value, networkProfile.Value, logAnalyticsProfile.Value, status.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ApplicationListResult.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolListResult.Serialization.cs similarity index 71% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ApplicationListResult.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolListResult.Serialization.cs index 154423745423..a79a97144be5 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ApplicationListResult.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolListResult.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.HDInsight.Models { - internal partial class ApplicationListResult + internal partial class ClusterPoolListResult { - internal static ApplicationListResult DeserializeApplicationListResult(JsonElement element) + internal static ClusterPoolListResult DeserializeClusterPoolListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static ApplicationListResult DeserializeApplicationListResult(JsonEleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HDInsightApplicationData.DeserializeHDInsightApplicationData(item)); + array.Add(ClusterPoolData.DeserializeClusterPoolData(item)); } value = array; continue; @@ -44,7 +44,7 @@ internal static ApplicationListResult DeserializeApplicationListResult(JsonEleme continue; } } - return new ApplicationListResult(Optional.ToList(value), nextLink.Value); + return new ClusterPoolListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolListResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolListResult.cs new file mode 100644 index 000000000000..363698a376a1 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.HDInsight; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The list cluster pools operation response. + internal partial class ClusterPoolListResult + { + /// Initializes a new instance of ClusterPoolListResult. + internal ClusterPoolListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ClusterPoolListResult. + /// The list of cluster pools. + /// The link (url) to the next page of results. + internal ClusterPoolListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The list of cluster pools. + public IReadOnlyList Value { get; } + /// The link (url) to the next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVirtualNetworkProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolLogAnalyticsProfile.Serialization.cs similarity index 51% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVirtualNetworkProfile.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolLogAnalyticsProfile.Serialization.cs index 6c1ae1e39e00..c8de28e4de84 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVirtualNetworkProfile.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolLogAnalyticsProfile.Serialization.cs @@ -10,50 +10,47 @@ namespace Azure.ResourceManager.HDInsight.Models { - public partial class HDInsightVirtualNetworkProfile : IUtf8JsonSerializable + public partial class ClusterPoolLogAnalyticsProfile : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Id)) + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(Enabled); + if (Optional.IsDefined(WorkspaceId)) { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Subnet)) - { - writer.WritePropertyName("subnet"u8); - writer.WriteStringValue(Subnet); + writer.WritePropertyName("workspaceId"u8); + writer.WriteStringValue(WorkspaceId); } writer.WriteEndObject(); } - internal static HDInsightVirtualNetworkProfile DeserializeHDInsightVirtualNetworkProfile(JsonElement element) + internal static ClusterPoolLogAnalyticsProfile DeserializeClusterPoolLogAnalyticsProfile(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional id = default; - Optional subnet = default; + bool enabled = default; + Optional workspaceId = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (property.NameEquals("enabled"u8)) + { + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("workspaceId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("subnet"u8)) - { - subnet = property.Value.GetString(); + workspaceId = new ResourceIdentifier(property.Value.GetString()); continue; } } - return new HDInsightVirtualNetworkProfile(id.Value, subnet.Value); + return new ClusterPoolLogAnalyticsProfile(enabled, workspaceId.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolLogAnalyticsProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolLogAnalyticsProfile.cs new file mode 100644 index 000000000000..64ed5caad80c --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolLogAnalyticsProfile.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster pool log analytics profile used to enable or disable OMS agent for AKS cluster. + public partial class ClusterPoolLogAnalyticsProfile + { + /// Initializes a new instance of ClusterPoolLogAnalyticsProfile. + /// True if log analytics is enabled for cluster pool, otherwise false. + public ClusterPoolLogAnalyticsProfile(bool enabled) + { + Enabled = enabled; + } + + /// Initializes a new instance of ClusterPoolLogAnalyticsProfile. + /// True if log analytics is enabled for cluster pool, otherwise false. + /// Log analytics workspace to associate with the OMS agent. + internal ClusterPoolLogAnalyticsProfile(bool enabled, ResourceIdentifier workspaceId) + { + Enabled = enabled; + WorkspaceId = workspaceId; + } + + /// True if log analytics is enabled for cluster pool, otherwise false. + public bool Enabled { get; set; } + /// Log analytics workspace to associate with the OMS agent. + public ResourceIdentifier WorkspaceId { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HardwareProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolNetworkProfile.Serialization.cs similarity index 56% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HardwareProfile.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolNetworkProfile.Serialization.cs index 5049dc0dd23b..6259efc51e6d 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HardwareProfile.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolNetworkProfile.Serialization.cs @@ -10,35 +10,32 @@ namespace Azure.ResourceManager.HDInsight.Models { - internal partial class HardwareProfile : IUtf8JsonSerializable + internal partial class ClusterPoolNetworkProfile : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(VmSize)) - { - writer.WritePropertyName("vmSize"u8); - writer.WriteStringValue(VmSize); - } + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); writer.WriteEndObject(); } - internal static HardwareProfile DeserializeHardwareProfile(JsonElement element) + internal static ClusterPoolNetworkProfile DeserializeClusterPoolNetworkProfile(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional vmSize = default; + ResourceIdentifier subnetId = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("vmSize"u8)) + if (property.NameEquals("subnetId"u8)) { - vmSize = property.Value.GetString(); + subnetId = new ResourceIdentifier(property.Value.GetString()); continue; } } - return new HardwareProfile(vmSize.Value); + return new ClusterPoolNetworkProfile(subnetId); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolNetworkProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolNetworkProfile.cs new file mode 100644 index 000000000000..c3f02dcf6d9e --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolNetworkProfile.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster pool networking configuration. + internal partial class ClusterPoolNetworkProfile + { + /// Initializes a new instance of ClusterPoolNetworkProfile. + /// Cluster pool subnet resource id. + /// is null. + public ClusterPoolNetworkProfile(ResourceIdentifier subnetId) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + + SubnetId = subnetId; + } + + /// Cluster pool subnet resource id. + public ResourceIdentifier SubnetId { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolPatch.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolPatch.Serialization.cs new file mode 100644 index 000000000000..fa2e2b453b99 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolPatch.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterPoolPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolPatch.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolPatch.cs new file mode 100644 index 000000000000..a0cd0ef2ec7b --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolPatch.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Tags object for patch operations. + public partial class ClusterPoolPatch + { + /// Initializes a new instance of ClusterPoolPatch. + public ClusterPoolPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorTableConfiguration.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolProfile.Serialization.cs similarity index 52% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorTableConfiguration.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolProfile.Serialization.cs index b6b2dcd9ed71..b1c6caa6ebed 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorTableConfiguration.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolProfile.Serialization.cs @@ -10,35 +10,32 @@ namespace Azure.ResourceManager.HDInsight.Models { - public partial class HDInsightAzureMonitorTableConfiguration : IUtf8JsonSerializable + internal partial class ClusterPoolProfile : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } + writer.WritePropertyName("clusterPoolVersion"u8); + writer.WriteStringValue(ClusterPoolVersion); writer.WriteEndObject(); } - internal static HDInsightAzureMonitorTableConfiguration DeserializeHDInsightAzureMonitorTableConfiguration(JsonElement element) + internal static ClusterPoolProfile DeserializeClusterPoolProfile(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional name = default; + string clusterPoolVersion = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (property.NameEquals("clusterPoolVersion"u8)) { - name = property.Value.GetString(); + clusterPoolVersion = property.Value.GetString(); continue; } } - return new HDInsightAzureMonitorTableConfiguration(name.Value); + return new ClusterPoolProfile(clusterPoolVersion); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolProfile.cs new file mode 100644 index 000000000000..9d6df92d3c3a --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolProfile.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster pool profile. + internal partial class ClusterPoolProfile + { + /// Initializes a new instance of ClusterPoolProfile. + /// Cluster pool version is a 2-part version. + /// is null. + public ClusterPoolProfile(string clusterPoolVersion) + { + Argument.AssertNotNull(clusterPoolVersion, nameof(clusterPoolVersion)); + + ClusterPoolVersion = clusterPoolVersion; + } + + /// Cluster pool version is a 2-part version. + public string ClusterPoolVersion { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesAksClusterProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesAksClusterProfile.Serialization.cs new file mode 100644 index 000000000000..7f6e36b3fcc3 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesAksClusterProfile.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterPoolResourcePropertiesAksClusterProfile + { + internal static ClusterPoolResourcePropertiesAksClusterProfile DeserializeClusterPoolResourcePropertiesAksClusterProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional aksClusterResourceId = default; + Optional aksClusterAgentPoolIdentityProfile = default; + Optional aksVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("aksClusterResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aksClusterResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("aksClusterAgentPoolIdentityProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aksClusterAgentPoolIdentityProfile = AksClusterProfileAksClusterAgentPoolIdentityProfile.DeserializeAksClusterProfileAksClusterAgentPoolIdentityProfile(property.Value); + continue; + } + if (property.NameEquals("aksVersion"u8)) + { + aksVersion = property.Value.GetString(); + continue; + } + } + return new ClusterPoolResourcePropertiesAksClusterProfile(aksClusterResourceId.Value, aksClusterAgentPoolIdentityProfile.Value, aksVersion.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesAksClusterProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesAksClusterProfile.cs new file mode 100644 index 000000000000..394e26a02a02 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesAksClusterProfile.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Properties of underlying AKS cluster. + public partial class ClusterPoolResourcePropertiesAksClusterProfile : AksClusterProfile + { + /// Initializes a new instance of ClusterPoolResourcePropertiesAksClusterProfile. + internal ClusterPoolResourcePropertiesAksClusterProfile() + { + } + + /// Initializes a new instance of ClusterPoolResourcePropertiesAksClusterProfile. + /// ARM Resource ID of the AKS cluster. + /// Identity properties of the AKS cluster agentpool MSI. + /// AKS control plane and default node pool version of this ClusterPool. + internal ClusterPoolResourcePropertiesAksClusterProfile(ResourceIdentifier aksClusterResourceId, AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile, string aksVersion) : base(aksClusterResourceId, aksClusterAgentPoolIdentityProfile, aksVersion) + { + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesClusterPoolProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesClusterPoolProfile.Serialization.cs new file mode 100644 index 000000000000..6d39c7e39a18 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesClusterPoolProfile.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + internal partial class ClusterPoolResourcePropertiesClusterPoolProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("clusterPoolVersion"u8); + writer.WriteStringValue(ClusterPoolVersion); + writer.WriteEndObject(); + } + + internal static ClusterPoolResourcePropertiesClusterPoolProfile DeserializeClusterPoolResourcePropertiesClusterPoolProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clusterPoolVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clusterPoolVersion"u8)) + { + clusterPoolVersion = property.Value.GetString(); + continue; + } + } + return new ClusterPoolResourcePropertiesClusterPoolProfile(clusterPoolVersion); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesClusterPoolProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesClusterPoolProfile.cs new file mode 100644 index 000000000000..6227143744a3 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesClusterPoolProfile.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// CLuster pool profile. + internal partial class ClusterPoolResourcePropertiesClusterPoolProfile : ClusterPoolProfile + { + /// Initializes a new instance of ClusterPoolResourcePropertiesClusterPoolProfile. + /// Cluster pool version is a 2-part version. + /// is null. + public ClusterPoolResourcePropertiesClusterPoolProfile(string clusterPoolVersion) : base(clusterPoolVersion) + { + Argument.AssertNotNull(clusterPoolVersion, nameof(clusterPoolVersion)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesComputeProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesComputeProfile.Serialization.cs new file mode 100644 index 000000000000..6ebb53dda662 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesComputeProfile.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterPoolResourcePropertiesComputeProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); + writer.WriteEndObject(); + } + + internal static ClusterPoolResourcePropertiesComputeProfile DeserializeClusterPoolResourcePropertiesComputeProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmSize = default; + Optional count = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt32(); + continue; + } + } + return new ClusterPoolResourcePropertiesComputeProfile(vmSize, Optional.ToNullable(count)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesComputeProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesComputeProfile.cs new file mode 100644 index 000000000000..bbb8b67da36d --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesComputeProfile.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// CLuster pool compute profile. + public partial class ClusterPoolResourcePropertiesComputeProfile : ClusterPoolComputeProfile + { + /// Initializes a new instance of ClusterPoolResourcePropertiesComputeProfile. + /// The virtual machine SKU. + /// is null. + public ClusterPoolResourcePropertiesComputeProfile(string vmSize) : base(vmSize) + { + Argument.AssertNotNull(vmSize, nameof(vmSize)); + } + + /// Initializes a new instance of ClusterPoolResourcePropertiesComputeProfile. + /// The virtual machine SKU. + /// The number of virtual machines. + internal ClusterPoolResourcePropertiesComputeProfile(string vmSize, int? count) : base(vmSize, count) + { + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesLogAnalyticsProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesLogAnalyticsProfile.Serialization.cs new file mode 100644 index 000000000000..6fe308314d53 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesLogAnalyticsProfile.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterPoolResourcePropertiesLogAnalyticsProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(Enabled); + if (Optional.IsDefined(WorkspaceId)) + { + writer.WritePropertyName("workspaceId"u8); + writer.WriteStringValue(WorkspaceId); + } + writer.WriteEndObject(); + } + + internal static ClusterPoolResourcePropertiesLogAnalyticsProfile DeserializeClusterPoolResourcePropertiesLogAnalyticsProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool enabled = default; + Optional workspaceId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("workspaceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workspaceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new ClusterPoolResourcePropertiesLogAnalyticsProfile(enabled, workspaceId.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesLogAnalyticsProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesLogAnalyticsProfile.cs new file mode 100644 index 000000000000..58d05981d69f --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesLogAnalyticsProfile.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster pool log analytics profile to enable OMS agent for AKS cluster. + public partial class ClusterPoolResourcePropertiesLogAnalyticsProfile : ClusterPoolLogAnalyticsProfile + { + /// Initializes a new instance of ClusterPoolResourcePropertiesLogAnalyticsProfile. + /// True if log analytics is enabled for cluster pool, otherwise false. + public ClusterPoolResourcePropertiesLogAnalyticsProfile(bool enabled) : base(enabled) + { + } + + /// Initializes a new instance of ClusterPoolResourcePropertiesLogAnalyticsProfile. + /// True if log analytics is enabled for cluster pool, otherwise false. + /// Log analytics workspace to associate with the OMS agent. + internal ClusterPoolResourcePropertiesLogAnalyticsProfile(bool enabled, ResourceIdentifier workspaceId) : base(enabled, workspaceId) + { + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSshPublicKey.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesNetworkProfile.Serialization.cs similarity index 52% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSshPublicKey.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesNetworkProfile.Serialization.cs index 0f3d3f6218c4..ba8bd089ebe4 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSshPublicKey.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesNetworkProfile.Serialization.cs @@ -10,35 +10,32 @@ namespace Azure.ResourceManager.HDInsight.Models { - public partial class HDInsightSshPublicKey : IUtf8JsonSerializable + internal partial class ClusterPoolResourcePropertiesNetworkProfile : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(CertificateData)) - { - writer.WritePropertyName("certificateData"u8); - writer.WriteStringValue(CertificateData); - } + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); writer.WriteEndObject(); } - internal static HDInsightSshPublicKey DeserializeHDInsightSshPublicKey(JsonElement element) + internal static ClusterPoolResourcePropertiesNetworkProfile DeserializeClusterPoolResourcePropertiesNetworkProfile(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional certificateData = default; + ResourceIdentifier subnetId = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("certificateData"u8)) + if (property.NameEquals("subnetId"u8)) { - certificateData = property.Value.GetString(); + subnetId = new ResourceIdentifier(property.Value.GetString()); continue; } } - return new HDInsightSshPublicKey(certificateData.Value); + return new ClusterPoolResourcePropertiesNetworkProfile(subnetId); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesNetworkProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesNetworkProfile.cs new file mode 100644 index 000000000000..10b191a686b8 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolResourcePropertiesNetworkProfile.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster pool network profile. + internal partial class ClusterPoolResourcePropertiesNetworkProfile : ClusterPoolNetworkProfile + { + /// Initializes a new instance of ClusterPoolResourcePropertiesNetworkProfile. + /// Cluster pool subnet resource id. + /// is null. + public ClusterPoolResourcePropertiesNetworkProfile(ResourceIdentifier subnetId) : base(subnetId) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkResourceData.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersion.Serialization.cs similarity index 57% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkResourceData.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersion.Serialization.cs index bfa2dd90036d..5b13183f70ff 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkResourceData.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersion.Serialization.cs @@ -5,35 +5,39 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.HDInsight +namespace Azure.ResourceManager.HDInsight.Models { - public partial class HDInsightPrivateLinkResourceData : IUtf8JsonSerializable + public partial class ClusterPoolVersion : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsCollectionDefined(RequiredZoneNames)) + if (Optional.IsDefined(ClusterPoolVersionValue)) { - writer.WritePropertyName("requiredZoneNames"u8); - writer.WriteStartArray(); - foreach (var item in RequiredZoneNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); + writer.WritePropertyName("clusterPoolVersion"u8); + writer.WriteStringValue(ClusterPoolVersionValue); + } + if (Optional.IsDefined(AksVersion)) + { + writer.WritePropertyName("aksVersion"u8); + writer.WriteStringValue(AksVersion); + } + if (Optional.IsDefined(IsPreview)) + { + writer.WritePropertyName("isPreview"u8); + writer.WriteBooleanValue(IsPreview.Value); } writer.WriteEndObject(); writer.WriteEndObject(); } - internal static HDInsightPrivateLinkResourceData DeserializeHDInsightPrivateLinkResourceData(JsonElement element) + internal static ClusterPoolVersion DeserializeClusterPoolVersion(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -43,9 +47,9 @@ internal static HDInsightPrivateLinkResourceData DeserializeHDInsightPrivateLink string name = default; ResourceType type = default; Optional systemData = default; - Optional groupId = default; - Optional> requiredMembers = default; - Optional> requiredZoneNames = default; + Optional clusterPoolVersion = default; + Optional aksVersion = default; + Optional isPreview = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -81,44 +85,30 @@ internal static HDInsightPrivateLinkResourceData DeserializeHDInsightPrivateLink } foreach (var property0 in property.Value.EnumerateObject()) { - if (property0.NameEquals("groupId"u8)) + if (property0.NameEquals("clusterPoolVersion"u8)) { - groupId = property0.Value.GetString(); + clusterPoolVersion = property0.Value.GetString(); continue; } - if (property0.NameEquals("requiredMembers"u8)) + if (property0.NameEquals("aksVersion"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - requiredMembers = array; + aksVersion = property0.Value.GetString(); continue; } - if (property0.NameEquals("requiredZoneNames"u8)) + if (property0.NameEquals("isPreview"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - requiredZoneNames = array; + isPreview = property0.Value.GetBoolean(); continue; } } continue; } } - return new HDInsightPrivateLinkResourceData(id, name, type, systemData.Value, groupId.Value, Optional.ToList(requiredMembers), Optional.ToList(requiredZoneNames)); + return new ClusterPoolVersion(id, name, type, systemData.Value, clusterPoolVersion.Value, aksVersion.Value, Optional.ToNullable(isPreview)); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersion.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersion.cs new file mode 100644 index 000000000000..0f967ccaf729 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersion.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Available cluster pool version. + public partial class ClusterPoolVersion : ResourceData + { + /// Initializes a new instance of ClusterPoolVersion. + public ClusterPoolVersion() + { + } + + /// Initializes a new instance of ClusterPoolVersion. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Cluster pool version is a 2-part version. + /// AKS version. + /// Indicate if this version is in preview or not. + internal ClusterPoolVersion(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string clusterPoolVersionValue, string aksVersion, bool? isPreview) : base(id, name, resourceType, systemData) + { + ClusterPoolVersionValue = clusterPoolVersionValue; + AksVersion = aksVersion; + IsPreview = isPreview; + } + + /// Cluster pool version is a 2-part version. + public string ClusterPoolVersionValue { get; set; } + /// AKS version. + public string AksVersion { get; set; } + /// Indicate if this version is in preview or not. + public bool? IsPreview { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionListResult.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersionsListResult.Serialization.cs similarity index 61% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionListResult.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersionsListResult.Serialization.cs index 2b40ebccb9bd..e7213a761aaa 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersionsListResult.Serialization.cs @@ -8,19 +8,18 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.HDInsight; namespace Azure.ResourceManager.HDInsight.Models { - internal partial class HDInsightPrivateEndpointConnectionListResult + internal partial class ClusterPoolVersionsListResult { - internal static HDInsightPrivateEndpointConnectionListResult DeserializeHDInsightPrivateEndpointConnectionListResult(JsonElement element) + internal static ClusterPoolVersionsListResult DeserializeClusterPoolVersionsListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +29,10 @@ internal static HDInsightPrivateEndpointConnectionListResult DeserializeHDInsigh { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HDInsightPrivateEndpointConnectionData.DeserializeHDInsightPrivateEndpointConnectionData(item)); + array.Add(ClusterPoolVersion.DeserializeClusterPoolVersion(item)); } value = array; continue; @@ -44,7 +43,7 @@ internal static HDInsightPrivateEndpointConnectionListResult DeserializeHDInsigh continue; } } - return new HDInsightPrivateEndpointConnectionListResult(Optional.ToList(value), nextLink.Value); + return new ClusterPoolVersionsListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersionsListResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersionsListResult.cs new file mode 100644 index 000000000000..bd174b3010cf --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPoolVersionsListResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Represents a list of cluster pool versions. + internal partial class ClusterPoolVersionsListResult + { + /// Initializes a new instance of ClusterPoolVersionsListResult. + internal ClusterPoolVersionsListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ClusterPoolVersionsListResult. + /// The list of cluster pool versions. + /// The link (url) to the next page of results. + internal ClusterPoolVersionsListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The list of cluster pool versions. + public IReadOnlyList Value { get; } + /// The link (url) to the next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterProfile.Serialization.cs new file mode 100644 index 000000000000..37764989b14b --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterProfile.Serialization.cs @@ -0,0 +1,388 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("clusterVersion"u8); + writer.WriteStringValue(ClusterVersion); + writer.WritePropertyName("ossVersion"u8); + writer.WriteStringValue(OssVersion); + writer.WritePropertyName("identityProfile"u8); + writer.WriteObjectValue(IdentityProfile); + writer.WritePropertyName("authorizationProfile"u8); + writer.WriteObjectValue(AuthorizationProfile); + if (Optional.IsDefined(SecretsProfile)) + { + writer.WritePropertyName("secretsProfile"u8); + writer.WriteObjectValue(SecretsProfile); + } + if (Optional.IsCollectionDefined(ServiceConfigsProfiles)) + { + writer.WritePropertyName("serviceConfigsProfiles"u8); + writer.WriteStartArray(); + foreach (var item in ServiceConfigsProfiles) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LogAnalyticsProfile)) + { + writer.WritePropertyName("logAnalyticsProfile"u8); + writer.WriteObjectValue(LogAnalyticsProfile); + } + if (Optional.IsDefined(PrometheusProfile)) + { + writer.WritePropertyName("prometheusProfile"u8); + writer.WriteObjectValue(PrometheusProfile); + } + if (Optional.IsDefined(SshProfile)) + { + writer.WritePropertyName("sshProfile"u8); + writer.WriteObjectValue(SshProfile); + } + if (Optional.IsDefined(AutoScaleProfile)) + { + writer.WritePropertyName("autoscaleProfile"u8); + writer.WriteObjectValue(AutoScaleProfile); + } + if (Optional.IsCollectionDefined(KafkaProfile)) + { + writer.WritePropertyName("kafkaProfile"u8); + writer.WriteStartObject(); + foreach (var item in KafkaProfile) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(TrinoProfile)) + { + writer.WritePropertyName("trinoProfile"u8); + writer.WriteObjectValue(TrinoProfile); + } + if (Optional.IsCollectionDefined(LlapProfile)) + { + writer.WritePropertyName("llapProfile"u8); + writer.WriteStartObject(); + foreach (var item in LlapProfile) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(FlinkProfile)) + { + writer.WritePropertyName("flinkProfile"u8); + writer.WriteObjectValue(FlinkProfile); + } + if (Optional.IsDefined(SparkProfile)) + { + writer.WritePropertyName("sparkProfile"u8); + writer.WriteObjectValue(SparkProfile); + } + if (Optional.IsCollectionDefined(StubProfile)) + { + writer.WritePropertyName("stubProfile"u8); + writer.WriteStartObject(); + foreach (var item in StubProfile) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ScriptActionProfiles)) + { + writer.WritePropertyName("scriptActionProfiles"u8); + writer.WriteStartArray(); + foreach (var item in ScriptActionProfiles) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static ClusterProfile DeserializeClusterProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clusterVersion = default; + string ossVersion = default; + Optional> components = default; + IdentityProfile identityProfile = default; + AuthorizationProfile authorizationProfile = default; + Optional secretsProfile = default; + Optional> serviceConfigsProfiles = default; + Optional connectivityProfile = default; + Optional logAnalyticsProfile = default; + Optional prometheusProfile = default; + Optional sshProfile = default; + Optional autoScaleProfile = default; + Optional> kafkaProfile = default; + Optional trinoProfile = default; + Optional> llapProfile = default; + Optional flinkProfile = default; + Optional sparkProfile = default; + Optional> stubProfile = default; + Optional> scriptActionProfiles = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clusterVersion"u8)) + { + clusterVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("ossVersion"u8)) + { + ossVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("components"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ClusterComponentsItem.DeserializeClusterComponentsItem(item)); + } + components = array; + continue; + } + if (property.NameEquals("identityProfile"u8)) + { + identityProfile = IdentityProfile.DeserializeIdentityProfile(property.Value); + continue; + } + if (property.NameEquals("authorizationProfile"u8)) + { + authorizationProfile = AuthorizationProfile.DeserializeAuthorizationProfile(property.Value); + continue; + } + if (property.NameEquals("secretsProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secretsProfile = SecretsProfile.DeserializeSecretsProfile(property.Value); + continue; + } + if (property.NameEquals("serviceConfigsProfiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ClusterServiceConfigsProfile.DeserializeClusterServiceConfigsProfile(item)); + } + serviceConfigsProfiles = array; + continue; + } + if (property.NameEquals("connectivityProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectivityProfile = ConnectivityProfile.DeserializeConnectivityProfile(property.Value); + continue; + } + if (property.NameEquals("logAnalyticsProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logAnalyticsProfile = ClusterLogAnalyticsProfile.DeserializeClusterLogAnalyticsProfile(property.Value); + continue; + } + if (property.NameEquals("prometheusProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + prometheusProfile = ClusterPrometheusProfile.DeserializeClusterPrometheusProfile(property.Value); + continue; + } + if (property.NameEquals("sshProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sshProfile = SshProfile.DeserializeSshProfile(property.Value); + continue; + } + if (property.NameEquals("autoscaleProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoScaleProfile = AutoScaleProfile.DeserializeAutoScaleProfile(property.Value); + continue; + } + if (property.NameEquals("kafkaProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + kafkaProfile = dictionary; + continue; + } + if (property.NameEquals("trinoProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trinoProfile = TrinoProfile.DeserializeTrinoProfile(property.Value); + continue; + } + if (property.NameEquals("llapProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + llapProfile = dictionary; + continue; + } + if (property.NameEquals("flinkProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + flinkProfile = FlinkProfile.DeserializeFlinkProfile(property.Value); + continue; + } + if (property.NameEquals("sparkProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sparkProfile = SparkProfile.DeserializeSparkProfile(property.Value); + continue; + } + if (property.NameEquals("stubProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + stubProfile = dictionary; + continue; + } + if (property.NameEquals("scriptActionProfiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ScriptActionProfile.DeserializeScriptActionProfile(item)); + } + scriptActionProfiles = array; + continue; + } + } + return new ClusterProfile(clusterVersion, ossVersion, Optional.ToList(components), identityProfile, authorizationProfile, secretsProfile.Value, Optional.ToList(serviceConfigsProfiles), connectivityProfile.Value, logAnalyticsProfile.Value, prometheusProfile.Value, sshProfile.Value, autoScaleProfile.Value, Optional.ToDictionary(kafkaProfile), trinoProfile.Value, Optional.ToDictionary(llapProfile), flinkProfile.Value, sparkProfile.Value, Optional.ToDictionary(stubProfile), Optional.ToList(scriptActionProfiles)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterProfile.cs new file mode 100644 index 000000000000..4f526c321027 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterProfile.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster profile. + public partial class ClusterProfile + { + /// Initializes a new instance of ClusterProfile. + /// Version with 3/4 part. + /// Version with three part. + /// Identity Profile with details of an MSI. + /// Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. + /// , , or is null. + public ClusterProfile(string clusterVersion, string ossVersion, IdentityProfile identityProfile, AuthorizationProfile authorizationProfile) + { + Argument.AssertNotNull(clusterVersion, nameof(clusterVersion)); + Argument.AssertNotNull(ossVersion, nameof(ossVersion)); + Argument.AssertNotNull(identityProfile, nameof(identityProfile)); + Argument.AssertNotNull(authorizationProfile, nameof(authorizationProfile)); + + ClusterVersion = clusterVersion; + OssVersion = ossVersion; + Components = new ChangeTrackingList(); + IdentityProfile = identityProfile; + AuthorizationProfile = authorizationProfile; + ServiceConfigsProfiles = new ChangeTrackingList(); + KafkaProfile = new ChangeTrackingDictionary(); + LlapProfile = new ChangeTrackingDictionary(); + StubProfile = new ChangeTrackingDictionary(); + ScriptActionProfiles = new ChangeTrackingList(); + } + + /// Initializes a new instance of ClusterProfile. + /// Version with 3/4 part. + /// Version with three part. + /// Component list of this cluster type and version. + /// Identity Profile with details of an MSI. + /// Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. + /// The cluster secret profile. + /// The service configs profiles. + /// Cluster connectivity profile. + /// Cluster log analytics profile to enable or disable OMS agent for cluster. + /// Cluster Prometheus profile. + /// Ssh profile for the cluster. + /// This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. + /// Kafka cluster profile. + /// Trino Cluster profile. + /// LLAP cluster profile. + /// The Flink cluster profile. + /// The spark cluster profile. + /// Stub cluster profile. + /// The script action profile list. + internal ClusterProfile(string clusterVersion, string ossVersion, IReadOnlyList components, IdentityProfile identityProfile, AuthorizationProfile authorizationProfile, SecretsProfile secretsProfile, IList serviceConfigsProfiles, ConnectivityProfile connectivityProfile, ClusterLogAnalyticsProfile logAnalyticsProfile, ClusterPrometheusProfile prometheusProfile, SshProfile sshProfile, AutoScaleProfile autoScaleProfile, IDictionary kafkaProfile, TrinoProfile trinoProfile, IDictionary llapProfile, FlinkProfile flinkProfile, SparkProfile sparkProfile, IDictionary stubProfile, IList scriptActionProfiles) + { + ClusterVersion = clusterVersion; + OssVersion = ossVersion; + Components = components; + IdentityProfile = identityProfile; + AuthorizationProfile = authorizationProfile; + SecretsProfile = secretsProfile; + ServiceConfigsProfiles = serviceConfigsProfiles; + ConnectivityProfile = connectivityProfile; + LogAnalyticsProfile = logAnalyticsProfile; + PrometheusProfile = prometheusProfile; + SshProfile = sshProfile; + AutoScaleProfile = autoScaleProfile; + KafkaProfile = kafkaProfile; + TrinoProfile = trinoProfile; + LlapProfile = llapProfile; + FlinkProfile = flinkProfile; + SparkProfile = sparkProfile; + StubProfile = stubProfile; + ScriptActionProfiles = scriptActionProfiles; + } + + /// Version with 3/4 part. + public string ClusterVersion { get; set; } + /// Version with three part. + public string OssVersion { get; set; } + /// Component list of this cluster type and version. + public IReadOnlyList Components { get; } + /// Identity Profile with details of an MSI. + public IdentityProfile IdentityProfile { get; set; } + /// Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. + public AuthorizationProfile AuthorizationProfile { get; set; } + /// The cluster secret profile. + public SecretsProfile SecretsProfile { get; set; } + /// The service configs profiles. + public IList ServiceConfigsProfiles { get; } + /// Cluster connectivity profile. + public ConnectivityProfile ConnectivityProfile { get; } + /// Cluster log analytics profile to enable or disable OMS agent for cluster. + public ClusterLogAnalyticsProfile LogAnalyticsProfile { get; set; } + /// Cluster Prometheus profile. + internal ClusterPrometheusProfile PrometheusProfile { get; set; } + /// Enable Prometheus for cluster or not. + public bool? PrometheusProfileEnabled + { + get => PrometheusProfile is null ? default(bool?) : PrometheusProfile.Enabled; + set + { + PrometheusProfile = value.HasValue ? new ClusterPrometheusProfile(value.Value) : null; + } + } + + /// Ssh profile for the cluster. + public SshProfile SshProfile { get; set; } + /// This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. + public AutoScaleProfile AutoScaleProfile { get; set; } + /// + /// Kafka cluster profile. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary KafkaProfile { get; } + /// Trino Cluster profile. + public TrinoProfile TrinoProfile { get; set; } + /// + /// LLAP cluster profile. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary LlapProfile { get; } + /// The Flink cluster profile. + public FlinkProfile FlinkProfile { get; set; } + /// The spark cluster profile. + public SparkProfile SparkProfile { get; set; } + /// + /// Stub cluster profile. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary StubProfile { get; } + /// The script action profile list. + public IList ScriptActionProfiles { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPrometheusProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPrometheusProfile.Serialization.cs new file mode 100644 index 000000000000..b0b8f7ee8ffa --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPrometheusProfile.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + internal partial class ClusterPrometheusProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(Enabled); + writer.WriteEndObject(); + } + + internal static ClusterPrometheusProfile DeserializeClusterPrometheusProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool enabled = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + enabled = property.Value.GetBoolean(); + continue; + } + } + return new ClusterPrometheusProfile(enabled); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPrometheusProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPrometheusProfile.cs new file mode 100644 index 000000000000..04256732b4ff --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterPrometheusProfile.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster Prometheus profile. + internal partial class ClusterPrometheusProfile + { + /// Initializes a new instance of ClusterPrometheusProfile. + /// Enable Prometheus for cluster or not. + public ClusterPrometheusProfile(bool enabled) + { + Enabled = enabled; + } + + /// Enable Prometheus for cluster or not. + public bool Enabled { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationData.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterResizeData.Serialization.cs similarity index 66% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationData.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterResizeData.Serialization.cs index 2f280effb1bb..0f288f12a8f3 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationData.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterResizeData.Serialization.cs @@ -7,23 +7,16 @@ using System.Collections.Generic; using System.Text.Json; -using Azure; using Azure.Core; -using Azure.ResourceManager.HDInsight.Models; using Azure.ResourceManager.Models; -namespace Azure.ResourceManager.HDInsight +namespace Azure.ResourceManager.HDInsight.Models { - public partial class HDInsightApplicationData : IUtf8JsonSerializable + public partial class ClusterResizeData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -35,38 +28,34 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } - if (Optional.IsDefined(Properties)) + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(TargetWorkerNodeCount)) { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); + writer.WritePropertyName("targetWorkerNodeCount"u8); + writer.WriteNumberValue(TargetWorkerNodeCount.Value); } writer.WriteEndObject(); + writer.WriteEndObject(); } - internal static HDInsightApplicationData DeserializeHDInsightApplicationData(JsonElement element) + internal static ClusterResizeData DeserializeClusterResizeData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional etag = default; Optional> tags = default; - Optional properties = default; + AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional systemData = default; + Optional targetWorkerNodeCount = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -81,13 +70,9 @@ internal static HDInsightApplicationData DeserializeHDInsightApplicationData(Jso tags = dictionary; continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("location"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = HDInsightApplicationProperties.DeserializeHDInsightApplicationProperties(property.Value); + location = new AzureLocation(property.Value.GetString()); continue; } if (property.NameEquals("id"u8)) @@ -114,8 +99,29 @@ internal static HDInsightApplicationData DeserializeHDInsightApplicationData(Jso systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("targetWorkerNodeCount"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetWorkerNodeCount = property0.Value.GetInt32(); + continue; + } + } + continue; + } } - return new HDInsightApplicationData(id, name, type, systemData.Value, Optional.ToNullable(etag), Optional.ToDictionary(tags), properties.Value); + return new ClusterResizeData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(targetWorkerNodeCount)); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterResizeData.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterResizeData.cs new file mode 100644 index 000000000000..bda6f9f3b366 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterResizeData.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The parameters for resizing a cluster. + public partial class ClusterResizeData : TrackedResourceData + { + /// Initializes a new instance of ClusterResizeData. + /// The location. + public ClusterResizeData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of ClusterResizeData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Target node count of worker node. + internal ClusterResizeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, int? targetWorkerNodeCount) : base(id, name, resourceType, systemData, tags, location) + { + TargetWorkerNodeCount = targetWorkerNodeCount; + } + + /// Target node count of worker node. + public int? TargetWorkerNodeCount { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfig.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfig.Serialization.cs new file mode 100644 index 000000000000..4388c148dfd2 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfig.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterServiceConfig : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("component"u8); + writer.WriteStringValue(Component); + writer.WritePropertyName("files"u8); + writer.WriteStartArray(); + foreach (var item in Files) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static ClusterServiceConfig DeserializeClusterServiceConfig(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string component = default; + IList files = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("component"u8)) + { + component = property.Value.GetString(); + continue; + } + if (property.NameEquals("files"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ClusterConfigFile.DeserializeClusterConfigFile(item)); + } + files = array; + continue; + } + } + return new ClusterServiceConfig(component, files); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfig.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfig.cs new file mode 100644 index 000000000000..170e740e50d6 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfig.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster configs per component. + public partial class ClusterServiceConfig + { + /// Initializes a new instance of ClusterServiceConfig. + /// Name of the component the config files should apply to. + /// List of Config Files. + /// or is null. + public ClusterServiceConfig(string component, IEnumerable files) + { + Argument.AssertNotNull(component, nameof(component)); + Argument.AssertNotNull(files, nameof(files)); + + Component = component; + Files = files.ToList(); + } + + /// Initializes a new instance of ClusterServiceConfig. + /// Name of the component the config files should apply to. + /// List of Config Files. + internal ClusterServiceConfig(string component, IList files) + { + Component = component; + Files = files; + } + + /// Name of the component the config files should apply to. + public string Component { get; set; } + /// List of Config Files. + public IList Files { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfigsProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfigsProfile.Serialization.cs new file mode 100644 index 000000000000..ea714d4bcd46 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfigsProfile.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterServiceConfigsProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("serviceName"u8); + writer.WriteStringValue(ServiceName); + writer.WritePropertyName("configs"u8); + writer.WriteStartArray(); + foreach (var item in Configs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static ClusterServiceConfigsProfile DeserializeClusterServiceConfigsProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string serviceName = default; + IList configs = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceName"u8)) + { + serviceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("configs"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ClusterServiceConfig.DeserializeClusterServiceConfig(item)); + } + configs = array; + continue; + } + } + return new ClusterServiceConfigsProfile(serviceName, configs); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfigsProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfigsProfile.cs new file mode 100644 index 000000000000..b0c2608dc5c7 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterServiceConfigsProfile.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster service configs. + public partial class ClusterServiceConfigsProfile + { + /// Initializes a new instance of ClusterServiceConfigsProfile. + /// Name of the service the configurations should apply to. + /// List of service configs. + /// or is null. + public ClusterServiceConfigsProfile(string serviceName, IEnumerable configs) + { + Argument.AssertNotNull(serviceName, nameof(serviceName)); + Argument.AssertNotNull(configs, nameof(configs)); + + ServiceName = serviceName; + Configs = configs.ToList(); + } + + /// Initializes a new instance of ClusterServiceConfigsProfile. + /// Name of the service the configurations should apply to. + /// List of service configs. + internal ClusterServiceConfigsProfile(string serviceName, IList configs) + { + ServiceName = serviceName; + Configs = configs; + } + + /// Name of the service the configurations should apply to. + public string ServiceName { get; set; } + /// List of service configs. + public IList Configs { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersion.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersion.Serialization.cs new file mode 100644 index 000000000000..f245d8d2ef67 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersion.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ClusterVersion : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ClusterType)) + { + writer.WritePropertyName("clusterType"u8); + writer.WriteStringValue(ClusterType); + } + if (Optional.IsDefined(ClusterVersionValue)) + { + writer.WritePropertyName("clusterVersion"u8); + writer.WriteStringValue(ClusterVersionValue); + } + if (Optional.IsDefined(OssVersion)) + { + writer.WritePropertyName("ossVersion"u8); + writer.WriteStringValue(OssVersion); + } + if (Optional.IsDefined(ClusterPoolVersion)) + { + writer.WritePropertyName("clusterPoolVersion"u8); + writer.WriteStringValue(ClusterPoolVersion); + } + if (Optional.IsDefined(IsPreview)) + { + writer.WritePropertyName("isPreview"u8); + writer.WriteBooleanValue(IsPreview.Value); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static ClusterVersion DeserializeClusterVersion(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional clusterType = default; + Optional clusterVersion = default; + Optional ossVersion = default; + Optional clusterPoolVersion = default; + Optional isPreview = default; + Optional> components = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("clusterType"u8)) + { + clusterType = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("clusterVersion"u8)) + { + clusterVersion = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("ossVersion"u8)) + { + ossVersion = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("clusterPoolVersion"u8)) + { + clusterPoolVersion = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("isPreview"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreview = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("components"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ClusterComponentsItem.DeserializeClusterComponentsItem(item)); + } + components = array; + continue; + } + } + continue; + } + } + return new ClusterVersion(id, name, type, systemData.Value, clusterType.Value, clusterVersion.Value, ossVersion.Value, clusterPoolVersion.Value, Optional.ToNullable(isPreview), Optional.ToList(components)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersion.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersion.cs new file mode 100644 index 000000000000..aa875d74bde8 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersion.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Available cluster version. + public partial class ClusterVersion : ResourceData + { + /// Initializes a new instance of ClusterVersion. + public ClusterVersion() + { + Components = new ChangeTrackingList(); + } + + /// Initializes a new instance of ClusterVersion. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The type of cluster. + /// Version with three part. + /// Version with three part. + /// The two part cluster pool version. If the cluster version is before cluster pool version on-board, the return value will be empty string. + /// Indicate if this version is in preview or not. + /// Component list of this cluster type and version. + internal ClusterVersion(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string clusterType, string clusterVersionValue, string ossVersion, string clusterPoolVersion, bool? isPreview, IReadOnlyList components) : base(id, name, resourceType, systemData) + { + ClusterType = clusterType; + ClusterVersionValue = clusterVersionValue; + OssVersion = ossVersion; + ClusterPoolVersion = clusterPoolVersion; + IsPreview = isPreview; + Components = components; + } + + /// The type of cluster. + public string ClusterType { get; set; } + /// Version with three part. + public string ClusterVersionValue { get; set; } + /// Version with three part. + public string OssVersion { get; set; } + /// The two part cluster pool version. If the cluster version is before cluster pool version on-board, the return value will be empty string. + public string ClusterPoolVersion { get; set; } + /// Indicate if this version is in preview or not. + public bool? IsPreview { get; set; } + /// Component list of this cluster type and version. + public IReadOnlyList Components { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionsList.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersionsListResult.Serialization.cs similarity index 69% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionsList.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersionsListResult.Serialization.cs index bc916bcefb9a..f3cb23e83ecf 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionsList.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersionsListResult.Serialization.cs @@ -11,15 +11,15 @@ namespace Azure.ResourceManager.HDInsight.Models { - internal partial class ScriptActionsList + internal partial class ClusterVersionsListResult { - internal static ScriptActionsList DeserializeScriptActionsList(JsonElement element) + internal static ClusterVersionsListResult DeserializeClusterVersionsListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -29,10 +29,10 @@ internal static ScriptActionsList DeserializeScriptActionsList(JsonElement eleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(RuntimeScriptActionDetail.DeserializeRuntimeScriptActionDetail(item)); + array.Add(ClusterVersion.DeserializeClusterVersion(item)); } value = array; continue; @@ -43,7 +43,7 @@ internal static ScriptActionsList DeserializeScriptActionsList(JsonElement eleme continue; } } - return new ScriptActionsList(Optional.ToList(value), nextLink.Value); + return new ClusterVersionsListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersionsListResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersionsListResult.cs new file mode 100644 index 000000000000..26208796673e --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ClusterVersionsListResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Represents a list of cluster versions. + internal partial class ClusterVersionsListResult + { + /// Initializes a new instance of ClusterVersionsListResult. + internal ClusterVersionsListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ClusterVersionsListResult. + /// The list of cluster versions. + /// The link (url) to the next page of results. + internal ClusterVersionsListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The list of cluster versions. + public IReadOnlyList Value { get; } + /// The link (url) to the next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComparisonOperator.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComparisonOperator.cs new file mode 100644 index 000000000000..4ad4ec13f5aa --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComparisonOperator.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The comparison operator. + public readonly partial struct ComparisonOperator : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ComparisonOperator(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GreaterThanValue = "greaterThan"; + private const string GreaterThanOrEqualValue = "greaterThanOrEqual"; + private const string LessThanValue = "lessThan"; + private const string LessThanOrEqualValue = "lessThanOrEqual"; + + /// greaterThan. + public static ComparisonOperator GreaterThan { get; } = new ComparisonOperator(GreaterThanValue); + /// greaterThanOrEqual. + public static ComparisonOperator GreaterThanOrEqual { get; } = new ComparisonOperator(GreaterThanOrEqualValue); + /// lessThan. + public static ComparisonOperator LessThan { get; } = new ComparisonOperator(LessThanValue); + /// lessThanOrEqual. + public static ComparisonOperator LessThanOrEqual { get; } = new ComparisonOperator(LessThanOrEqualValue); + /// Determines if two values are the same. + public static bool operator ==(ComparisonOperator left, ComparisonOperator right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ComparisonOperator left, ComparisonOperator right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ComparisonOperator(string value) => new ComparisonOperator(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ComparisonOperator other && Equals(other); + /// + public bool Equals(ComparisonOperator other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComparisonRule.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComparisonRule.Serialization.cs new file mode 100644 index 000000000000..6979463eb6f3 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComparisonRule.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ComparisonRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("operator"u8); + writer.WriteStringValue(Operator.ToString()); + writer.WritePropertyName("threshold"u8); + writer.WriteNumberValue(Threshold); + writer.WriteEndObject(); + } + + internal static ComparisonRule DeserializeComparisonRule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ComparisonOperator @operator = default; + float threshold = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operator"u8)) + { + @operator = new ComparisonOperator(property.Value.GetString()); + continue; + } + if (property.NameEquals("threshold"u8)) + { + threshold = property.Value.GetSingle(); + continue; + } + } + return new ComparisonRule(@operator, threshold); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComparisonRule.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComparisonRule.cs new file mode 100644 index 000000000000..b1b57baea4ee --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComparisonRule.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The comparison rule. + public partial class ComparisonRule + { + /// Initializes a new instance of ComparisonRule. + /// The comparison operator. + /// Threshold setting. + public ComparisonRule(ComparisonOperator @operator, float threshold) + { + Operator = @operator; + Threshold = threshold; + } + + /// The comparison operator. + public ComparisonOperator Operator { get; set; } + /// Threshold setting. + public float Threshold { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeProfile.Serialization.cs index e92c3b5db3c1..2f1f812547e1 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeProfile.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeProfile.Serialization.cs @@ -16,16 +16,13 @@ internal partial class ComputeProfile : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Roles)) + writer.WritePropertyName("nodes"u8); + writer.WriteStartArray(); + foreach (var item in Nodes) { - writer.WritePropertyName("roles"u8); - writer.WriteStartArray(); - foreach (var item in Roles) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item); } + writer.WriteEndArray(); writer.WriteEndObject(); } @@ -35,25 +32,21 @@ internal static ComputeProfile DeserializeComputeProfile(JsonElement element) { return null; } - Optional> roles = default; + IList nodes = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("roles"u8)) + if (property.NameEquals("nodes"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HDInsightClusterRole.DeserializeHDInsightClusterRole(item)); + array.Add(NodeProfile.DeserializeNodeProfile(item)); } - roles = array; + nodes = array; continue; } } - return new ComputeProfile(Optional.ToList(roles)); + return new ComputeProfile(nodes); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeProfile.cs index 92ee4e7382c0..80d5a1072a0f 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeProfile.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeProfile.cs @@ -5,28 +5,34 @@ #nullable disable +using System; using System.Collections.Generic; +using System.Linq; using Azure.Core; namespace Azure.ResourceManager.HDInsight.Models { - /// Describes the compute profile. + /// The compute profile. internal partial class ComputeProfile { /// Initializes a new instance of ComputeProfile. - public ComputeProfile() + /// The nodes definitions. + /// is null. + public ComputeProfile(IEnumerable nodes) { - Roles = new ChangeTrackingList(); + Argument.AssertNotNull(nodes, nameof(nodes)); + + Nodes = nodes.ToList(); } /// Initializes a new instance of ComputeProfile. - /// The list of roles in the cluster. - internal ComputeProfile(IList roles) + /// The nodes definitions. + internal ComputeProfile(IList nodes) { - Roles = roles; + Nodes = nodes; } - /// The list of roles in the cluster. - public IList Roles { get; } + /// The nodes definitions. + public IList Nodes { get; } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeResourceDefinition.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeResourceDefinition.Serialization.cs new file mode 100644 index 000000000000..24ea51be353e --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeResourceDefinition.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ComputeResourceDefinition : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("cpu"u8); + writer.WriteNumberValue(Cpu); + writer.WritePropertyName("memory"u8); + writer.WriteNumberValue(Memory); + writer.WriteEndObject(); + } + + internal static ComputeResourceDefinition DeserializeComputeResourceDefinition(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float cpu = default; + long memory = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu"u8)) + { + cpu = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("memory"u8)) + { + memory = property.Value.GetInt64(); + continue; + } + } + return new ComputeResourceDefinition(cpu, memory); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeResourceDefinition.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeResourceDefinition.cs new file mode 100644 index 000000000000..a7770ff6566c --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ComputeResourceDefinition.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The cpu and memory requirement definition. + public partial class ComputeResourceDefinition + { + /// Initializes a new instance of ComputeResourceDefinition. + /// The required CPU. + /// The required memory in MB, Container memory will be 110 percentile. + public ComputeResourceDefinition(float cpu, long memory) + { + Cpu = cpu; + Memory = memory; + } + + /// The required CPU. + public float Cpu { get; set; } + /// The required memory in MB, Container memory will be 110 percentile. + public long Memory { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityEndpoint.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityEndpoint.Serialization.cs deleted file mode 100644 index 2918472d9627..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityEndpoint.Serialization.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Net; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class ConnectivityEndpoint : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Protocol)) - { - writer.WritePropertyName("protocol"u8); - writer.WriteStringValue(Protocol); - } - if (Optional.IsDefined(EndpointLocation)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(EndpointLocation); - } - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - writer.WriteNumberValue(Port.Value); - } - if (Optional.IsDefined(PrivateIPAddress)) - { - writer.WritePropertyName("privateIPAddress"u8); - writer.WriteStringValue(PrivateIPAddress.ToString()); - } - writer.WriteEndObject(); - } - - internal static ConnectivityEndpoint DeserializeConnectivityEndpoint(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional protocol = default; - Optional location = default; - Optional port = default; - Optional privateIPAddress = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("protocol"u8)) - { - protocol = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - location = property.Value.GetString(); - continue; - } - if (property.NameEquals("port"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("privateIPAddress"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateIPAddress = IPAddress.Parse(property.Value.GetString()); - continue; - } - } - return new ConnectivityEndpoint(name.Value, protocol.Value, location.Value, Optional.ToNullable(port), privateIPAddress.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityEndpoint.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityEndpoint.cs deleted file mode 100644 index 4295caced56f..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityEndpoint.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Net; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The connectivity properties. - public partial class ConnectivityEndpoint - { - /// Initializes a new instance of ConnectivityEndpoint. - public ConnectivityEndpoint() - { - } - - /// Initializes a new instance of ConnectivityEndpoint. - /// The name of the endpoint. - /// The protocol of the endpoint. - /// The location of the endpoint. - /// The port to connect to. - /// The private ip address of the endpoint. - internal ConnectivityEndpoint(string name, string protocol, string endpointLocation, int? port, IPAddress privateIPAddress) - { - Name = name; - Protocol = protocol; - EndpointLocation = endpointLocation; - Port = port; - PrivateIPAddress = privateIPAddress; - } - - /// The name of the endpoint. - public string Name { get; set; } - /// The protocol of the endpoint. - public string Protocol { get; set; } - /// The location of the endpoint. - public string EndpointLocation { get; set; } - /// The port to connect to. - public int? Port { get; set; } - /// The private ip address of the endpoint. - public IPAddress PrivateIPAddress { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkResourceListResult.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfile.Serialization.cs similarity index 50% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkResourceListResult.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfile.Serialization.cs index fb8bfc6f05fd..814f6562434b 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfile.Serialization.cs @@ -8,37 +8,42 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.HDInsight; namespace Azure.ResourceManager.HDInsight.Models { - internal partial class HDInsightPrivateLinkResourceListResult + public partial class ConnectivityProfile { - internal static HDInsightPrivateLinkResourceListResult DeserializeHDInsightPrivateLinkResourceListResult(JsonElement element) + internal static ConnectivityProfile DeserializeConnectivityProfile(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + ConnectivityProfileWeb web = default; + Optional> ssh = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) + if (property.NameEquals("web"u8)) + { + web = ConnectivityProfileWeb.DeserializeConnectivityProfileWeb(property.Value); + continue; + } + if (property.NameEquals("ssh"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HDInsightPrivateLinkResourceData.DeserializeHDInsightPrivateLinkResourceData(item)); + array.Add(SshConnectivityEndpoint.DeserializeSshConnectivityEndpoint(item)); } - value = array; + ssh = array; continue; } } - return new HDInsightPrivateLinkResourceListResult(Optional.ToList(value)); + return new ConnectivityProfile(web, Optional.ToList(ssh)); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfile.cs new file mode 100644 index 000000000000..00e719e43e2a --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfile.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster connectivity profile. + public partial class ConnectivityProfile + { + /// Initializes a new instance of ConnectivityProfile. + /// Web connectivity endpoint details. + /// is null. + internal ConnectivityProfile(ConnectivityProfileWeb web) + { + Argument.AssertNotNull(web, nameof(web)); + + Web = web; + Ssh = new ChangeTrackingList(); + } + + /// Initializes a new instance of ConnectivityProfile. + /// Web connectivity endpoint details. + /// List of SSH connectivity endpoints. + internal ConnectivityProfile(ConnectivityProfileWeb web, IReadOnlyList ssh) + { + Web = web; + Ssh = ssh; + } + + /// Web connectivity endpoint details. + internal ConnectivityProfileWeb Web { get; } + /// Web connectivity endpoint. + public string WebFqdn + { + get => Web?.Fqdn; + } + + /// List of SSH connectivity endpoints. + public IReadOnlyList Ssh { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfileWeb.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfileWeb.Serialization.cs new file mode 100644 index 000000000000..e7eb0267062c --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfileWeb.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + internal partial class ConnectivityProfileWeb + { + internal static ConnectivityProfileWeb DeserializeConnectivityProfileWeb(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fqdn = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fqdn"u8)) + { + fqdn = property.Value.GetString(); + continue; + } + } + return new ConnectivityProfileWeb(fqdn); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfileWeb.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfileWeb.cs new file mode 100644 index 000000000000..c7b087b92aa8 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ConnectivityProfileWeb.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Web connectivity endpoint details. + internal partial class ConnectivityProfileWeb : WebConnectivityEndpoint + { + /// Initializes a new instance of ConnectivityProfileWeb. + /// Web connectivity endpoint. + /// is null. + internal ConnectivityProfileWeb(string fqdn) : base(fqdn) + { + Argument.AssertNotNull(fqdn, nameof(fqdn)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ContentEncoding.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ContentEncoding.cs new file mode 100644 index 000000000000..6aa3917425d4 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ContentEncoding.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// 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 readonly partial struct ContentEncoding : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContentEncoding(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string Base64Value = "Base64"; + private const string NoneValue = "None"; + + /// Base64. + public static ContentEncoding Base64 { get; } = new ContentEncoding(Base64Value); + /// None. + public static ContentEncoding None { get; } = new ContentEncoding(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(ContentEncoding left, ContentEncoding right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContentEncoding left, ContentEncoding right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContentEncoding(string value) => new ContentEncoding(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContentEncoding other && Equals(other); + /// + public bool Equals(ContentEncoding other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/EncryptionInTransitProperties.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/EncryptionInTransitProperties.cs deleted file mode 100644 index 6f597a3f7504..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/EncryptionInTransitProperties.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The encryption-in-transit properties. - internal partial class EncryptionInTransitProperties - { - /// Initializes a new instance of EncryptionInTransitProperties. - public EncryptionInTransitProperties() - { - } - - /// Initializes a new instance of EncryptionInTransitProperties. - /// Indicates whether or not inter cluster node communication is encrypted in transit. - internal EncryptionInTransitProperties(bool? isEncryptionInTransitEnabled) - { - IsEncryptionInTransitEnabled = isEncryptionInTransitEnabled; - } - - /// Indicates whether or not inter cluster node communication is encrypted in transit. - public bool? IsEncryptionInTransitEnabled { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExcludedServicesConfig.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExcludedServicesConfig.Serialization.cs deleted file mode 100644 index 02801a067d8b..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExcludedServicesConfig.Serialization.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class ExcludedServicesConfig : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ExcludedServicesConfigId)) - { - writer.WritePropertyName("excludedServicesConfigId"u8); - writer.WriteStringValue(ExcludedServicesConfigId); - } - if (Optional.IsDefined(ExcludedServicesList)) - { - writer.WritePropertyName("excludedServicesList"u8); - writer.WriteStringValue(ExcludedServicesList); - } - writer.WriteEndObject(); - } - - internal static ExcludedServicesConfig DeserializeExcludedServicesConfig(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional excludedServicesConfigId = default; - Optional excludedServicesList = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("excludedServicesConfigId"u8)) - { - excludedServicesConfigId = property.Value.GetString(); - continue; - } - if (property.NameEquals("excludedServicesList"u8)) - { - excludedServicesList = property.Value.GetString(); - continue; - } - } - return new ExcludedServicesConfig(excludedServicesConfigId.Value, excludedServicesList.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExcludedServicesConfig.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExcludedServicesConfig.cs deleted file mode 100644 index 496aac6a2262..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExcludedServicesConfig.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The configuration that services will be excluded when creating cluster. - public partial class ExcludedServicesConfig - { - /// Initializes a new instance of ExcludedServicesConfig. - public ExcludedServicesConfig() - { - } - - /// Initializes a new instance of ExcludedServicesConfig. - /// The config id of excluded services. - /// The list of excluded services. - internal ExcludedServicesConfig(string excludedServicesConfigId, string excludedServicesList) - { - ExcludedServicesConfigId = excludedServicesConfigId; - ExcludedServicesList = excludedServicesList; - } - - /// The config id of excluded services. - public string ExcludedServicesConfigId { get; set; } - /// The list of excluded services. - public string ExcludedServicesList { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExecuteScriptActionContent.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExecuteScriptActionContent.Serialization.cs deleted file mode 100644 index 4ff1d06bd36d..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExecuteScriptActionContent.Serialization.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class ExecuteScriptActionContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(ScriptActions)) - { - writer.WritePropertyName("scriptActions"u8); - writer.WriteStartArray(); - foreach (var item in ScriptActions) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("persistOnSuccess"u8); - writer.WriteBooleanValue(PersistOnSuccess); - writer.WriteEndObject(); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExecuteScriptActionContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExecuteScriptActionContent.cs deleted file mode 100644 index 98e896a3ab8e..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ExecuteScriptActionContent.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The parameters for the script actions to execute on a running cluster. - public partial class ExecuteScriptActionContent - { - /// Initializes a new instance of ExecuteScriptActionContent. - /// Gets or sets if the scripts needs to be persisted. - public ExecuteScriptActionContent(bool persistOnSuccess) - { - ScriptActions = new ChangeTrackingList(); - PersistOnSuccess = persistOnSuccess; - } - - /// The list of run time script actions. - public IList ScriptActions { get; } - /// Gets or sets if the scripts needs to be persisted. - public bool PersistOnSuccess { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaInfo.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkCatalogOptions.Serialization.cs similarity index 60% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaInfo.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkCatalogOptions.Serialization.cs index 1f527963655a..f7dd30098b2a 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaInfo.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkCatalogOptions.Serialization.cs @@ -10,39 +10,39 @@ namespace Azure.ResourceManager.HDInsight.Models { - internal partial class QuotaInfo : IUtf8JsonSerializable + internal partial class FlinkCatalogOptions : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(CoresUsed)) + if (Optional.IsDefined(Hive)) { - writer.WritePropertyName("coresUsed"u8); - writer.WriteNumberValue(CoresUsed.Value); + writer.WritePropertyName("hive"u8); + writer.WriteObjectValue(Hive); } writer.WriteEndObject(); } - internal static QuotaInfo DeserializeQuotaInfo(JsonElement element) + internal static FlinkCatalogOptions DeserializeFlinkCatalogOptions(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional coresUsed = default; + Optional hive = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("coresUsed"u8)) + if (property.NameEquals("hive"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - coresUsed = property.Value.GetInt32(); + hive = FlinkHiveCatalogOption.DeserializeFlinkHiveCatalogOption(property.Value); continue; } } - return new QuotaInfo(Optional.ToNullable(coresUsed)); + return new FlinkCatalogOptions(hive.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkCatalogOptions.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkCatalogOptions.cs new file mode 100644 index 000000000000..64a7f715341d --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkCatalogOptions.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Flink cluster catalog options. + internal partial class FlinkCatalogOptions + { + /// Initializes a new instance of FlinkCatalogOptions. + public FlinkCatalogOptions() + { + } + + /// Initializes a new instance of FlinkCatalogOptions. + /// Hive Catalog Option for Flink cluster. + internal FlinkCatalogOptions(FlinkHiveCatalogOption hive) + { + Hive = hive; + } + + /// Hive Catalog Option for Flink cluster. + public FlinkHiveCatalogOption Hive { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkHiveCatalogOption.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkHiveCatalogOption.Serialization.cs new file mode 100644 index 000000000000..50d97e72c3a3 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkHiveCatalogOption.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class FlinkHiveCatalogOption : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("metastoreDbConnectionPasswordSecret"u8); + writer.WriteStringValue(MetastoreDbConnectionPasswordSecret); + writer.WritePropertyName("metastoreDbConnectionURL"u8); + writer.WriteStringValue(MetastoreDbConnectionURL); + writer.WritePropertyName("metastoreDbConnectionUserName"u8); + writer.WriteStringValue(MetastoreDbConnectionUserName); + writer.WriteEndObject(); + } + + internal static FlinkHiveCatalogOption DeserializeFlinkHiveCatalogOption(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string metastoreDbConnectionPasswordSecret = default; + string metastoreDbConnectionURL = default; + string metastoreDbConnectionUserName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("metastoreDbConnectionPasswordSecret"u8)) + { + metastoreDbConnectionPasswordSecret = property.Value.GetString(); + continue; + } + if (property.NameEquals("metastoreDbConnectionURL"u8)) + { + metastoreDbConnectionURL = property.Value.GetString(); + continue; + } + if (property.NameEquals("metastoreDbConnectionUserName"u8)) + { + metastoreDbConnectionUserName = property.Value.GetString(); + continue; + } + } + return new FlinkHiveCatalogOption(metastoreDbConnectionPasswordSecret, metastoreDbConnectionURL, metastoreDbConnectionUserName); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkHiveCatalogOption.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkHiveCatalogOption.cs new file mode 100644 index 000000000000..dcd02b13f891 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkHiveCatalogOption.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Hive Catalog Option for Flink cluster. + public partial class FlinkHiveCatalogOption + { + /// Initializes a new instance of FlinkHiveCatalogOption. + /// Secret reference name from secretsProfile.secrets containing password for database connection. + /// Connection string for hive metastore database. + /// User name for database connection. + /// , or is null. + public FlinkHiveCatalogOption(string metastoreDbConnectionPasswordSecret, string metastoreDbConnectionURL, string metastoreDbConnectionUserName) + { + Argument.AssertNotNull(metastoreDbConnectionPasswordSecret, nameof(metastoreDbConnectionPasswordSecret)); + Argument.AssertNotNull(metastoreDbConnectionURL, nameof(metastoreDbConnectionURL)); + Argument.AssertNotNull(metastoreDbConnectionUserName, nameof(metastoreDbConnectionUserName)); + + MetastoreDbConnectionPasswordSecret = metastoreDbConnectionPasswordSecret; + MetastoreDbConnectionURL = metastoreDbConnectionURL; + MetastoreDbConnectionUserName = metastoreDbConnectionUserName; + } + + /// Secret reference name from secretsProfile.secrets containing password for database connection. + public string MetastoreDbConnectionPasswordSecret { get; set; } + /// Connection string for hive metastore database. + public string MetastoreDbConnectionURL { get; set; } + /// User name for database connection. + public string MetastoreDbConnectionUserName { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkJobProperties.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkJobProperties.Serialization.cs new file mode 100644 index 000000000000..91ea666d6e71 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkJobProperties.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class FlinkJobProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("jobName"u8); + writer.WriteStringValue(JobName); + if (Optional.IsDefined(JobJarDirectory)) + { + writer.WritePropertyName("jobJarDirectory"u8); + writer.WriteStringValue(JobJarDirectory); + } + if (Optional.IsDefined(JarName)) + { + writer.WritePropertyName("jarName"u8); + writer.WriteStringValue(JarName); + } + if (Optional.IsDefined(EntryClass)) + { + writer.WritePropertyName("entryClass"u8); + writer.WriteStringValue(EntryClass); + } + if (Optional.IsDefined(Args)) + { + writer.WritePropertyName("args"u8); + writer.WriteStringValue(Args); + } + if (Optional.IsDefined(SavePointName)) + { + writer.WritePropertyName("savePointName"u8); + writer.WriteStringValue(SavePointName); + } + if (Optional.IsDefined(Action)) + { + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.Value.ToString()); + } + if (Optional.IsCollectionDefined(FlinkConfiguration)) + { + writer.WritePropertyName("flinkConfiguration"u8); + writer.WriteStartObject(); + foreach (var item in FlinkConfiguration) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + writer.WriteEndObject(); + } + + internal static FlinkJobProperties DeserializeFlinkJobProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string jobName = default; + Optional jobJarDirectory = default; + Optional jarName = default; + Optional entryClass = default; + Optional args = default; + Optional savePointName = default; + Optional action = default; + Optional> flinkConfiguration = default; + Optional jobId = default; + Optional status = default; + Optional jobOutput = default; + Optional actionResult = default; + Optional lastSavePoint = default; + JobType jobType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobName"u8)) + { + jobName = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobJarDirectory"u8)) + { + jobJarDirectory = property.Value.GetString(); + continue; + } + if (property.NameEquals("jarName"u8)) + { + jarName = property.Value.GetString(); + continue; + } + if (property.NameEquals("entryClass"u8)) + { + entryClass = property.Value.GetString(); + continue; + } + if (property.NameEquals("args"u8)) + { + args = property.Value.GetString(); + continue; + } + if (property.NameEquals("savePointName"u8)) + { + savePointName = property.Value.GetString(); + continue; + } + if (property.NameEquals("action"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + action = new Action(property.Value.GetString()); + continue; + } + if (property.NameEquals("flinkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + flinkConfiguration = dictionary; + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobOutput"u8)) + { + jobOutput = property.Value.GetString(); + continue; + } + if (property.NameEquals("actionResult"u8)) + { + actionResult = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastSavePoint"u8)) + { + lastSavePoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobType"u8)) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + } + return new FlinkJobProperties(jobType, jobName, jobJarDirectory.Value, jarName.Value, entryClass.Value, args.Value, savePointName.Value, Optional.ToNullable(action), Optional.ToDictionary(flinkConfiguration), jobId.Value, status.Value, jobOutput.Value, actionResult.Value, lastSavePoint.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkJobProperties.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkJobProperties.cs new file mode 100644 index 000000000000..1b7a698cf8f7 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkJobProperties.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Properties of flink job. + public partial class FlinkJobProperties : ClusterJobProperties + { + /// Initializes a new instance of FlinkJobProperties. + /// Name of job. + /// is null. + public FlinkJobProperties(string jobName) + { + Argument.AssertNotNull(jobName, nameof(jobName)); + + JobName = jobName; + FlinkConfiguration = new ChangeTrackingDictionary(); + JobType = JobType.FlinkJob; + } + + /// Initializes a new instance of FlinkJobProperties. + /// Type of cluster job. + /// Name of job. + /// A string property that specifies the directory where the job JAR is located. + /// A string property that represents the name of the job JAR. + /// A string property that specifies the entry class for the Flink job. + /// A string property representing additional JVM arguments for the Flink job. It should be space separated value. + /// A string property that represents the name of the savepoint for the Flink job. + /// 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. + /// 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. + /// Unique id for identifying a job. + /// Status of job. + /// Output of job. + /// Action result of job. + /// The last savepoint. + internal FlinkJobProperties(JobType jobType, string jobName, string jobJarDirectory, string jarName, string entryClass, string args, string savePointName, Action? action, IDictionary flinkConfiguration, string jobId, string status, string jobOutput, string actionResult, string lastSavePoint) : base(jobType) + { + JobName = jobName; + JobJarDirectory = jobJarDirectory; + JarName = jarName; + EntryClass = entryClass; + Args = args; + SavePointName = savePointName; + Action = action; + FlinkConfiguration = flinkConfiguration; + JobId = jobId; + Status = status; + JobOutput = jobOutput; + ActionResult = actionResult; + LastSavePoint = lastSavePoint; + JobType = jobType; + } + + /// Name of job. + public string JobName { get; set; } + /// A string property that specifies the directory where the job JAR is located. + public string JobJarDirectory { get; set; } + /// A string property that represents the name of the job JAR. + public string JarName { get; set; } + /// A string property that specifies the entry class for the Flink job. + public string EntryClass { get; set; } + /// A string property representing additional JVM arguments for the Flink job. It should be space separated value. + public string Args { get; set; } + /// A string property that represents the name of the savepoint for the Flink job. + public string SavePointName { get; set; } + /// 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 Action? Action { get; set; } + /// 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. + public IDictionary FlinkConfiguration { get; } + /// Unique id for identifying a job. + public string JobId { get; } + /// Status of job. + public string Status { get; } + /// Output of job. + public string JobOutput { get; } + /// Action result of job. + public string ActionResult { get; } + /// The last savepoint. + public string LastSavePoint { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkProfile.Serialization.cs new file mode 100644 index 000000000000..f10fcb2387ca --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkProfile.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class FlinkProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("storage"u8); + writer.WriteObjectValue(Storage); + if (Optional.IsDefined(NumReplicas)) + { + writer.WritePropertyName("numReplicas"u8); + writer.WriteNumberValue(NumReplicas.Value); + } + writer.WritePropertyName("jobManager"u8); + writer.WriteObjectValue(JobManager); + if (Optional.IsDefined(HistoryServer)) + { + writer.WritePropertyName("historyServer"u8); + writer.WriteObjectValue(HistoryServer); + } + writer.WritePropertyName("taskManager"u8); + writer.WriteObjectValue(TaskManager); + if (Optional.IsDefined(CatalogOptions)) + { + writer.WritePropertyName("catalogOptions"u8); + writer.WriteObjectValue(CatalogOptions); + } + writer.WriteEndObject(); + } + + internal static FlinkProfile DeserializeFlinkProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FlinkStorageProfile storage = default; + Optional numReplicas = default; + ComputeResourceDefinition jobManager = default; + Optional historyServer = default; + ComputeResourceDefinition taskManager = default; + Optional catalogOptions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storage"u8)) + { + storage = FlinkStorageProfile.DeserializeFlinkStorageProfile(property.Value); + continue; + } + if (property.NameEquals("numReplicas"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("jobManager"u8)) + { + jobManager = ComputeResourceDefinition.DeserializeComputeResourceDefinition(property.Value); + continue; + } + if (property.NameEquals("historyServer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + historyServer = ComputeResourceDefinition.DeserializeComputeResourceDefinition(property.Value); + continue; + } + if (property.NameEquals("taskManager"u8)) + { + taskManager = ComputeResourceDefinition.DeserializeComputeResourceDefinition(property.Value); + continue; + } + if (property.NameEquals("catalogOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + catalogOptions = FlinkCatalogOptions.DeserializeFlinkCatalogOptions(property.Value); + continue; + } + } + return new FlinkProfile(storage, Optional.ToNullable(numReplicas), jobManager, historyServer.Value, taskManager, catalogOptions.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkProfile.cs new file mode 100644 index 000000000000..f613d76d1eb6 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkProfile.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The Flink cluster profile. + public partial class FlinkProfile + { + /// Initializes a new instance of FlinkProfile. + /// The storage profile. + /// Job Manager container/ process CPU and memory requirements. + /// Task Manager container/ process CPU and memory requirements. + /// , or is null. + public FlinkProfile(FlinkStorageProfile storage, ComputeResourceDefinition jobManager, ComputeResourceDefinition taskManager) + { + Argument.AssertNotNull(storage, nameof(storage)); + Argument.AssertNotNull(jobManager, nameof(jobManager)); + Argument.AssertNotNull(taskManager, nameof(taskManager)); + + Storage = storage; + JobManager = jobManager; + TaskManager = taskManager; + } + + /// Initializes a new instance of FlinkProfile. + /// The storage profile. + /// The number of task managers. + /// Job Manager container/ process CPU and memory requirements. + /// History Server container/ process CPU and memory requirements. + /// Task Manager container/ process CPU and memory requirements. + /// Flink cluster catalog options. + internal FlinkProfile(FlinkStorageProfile storage, int? numReplicas, ComputeResourceDefinition jobManager, ComputeResourceDefinition historyServer, ComputeResourceDefinition taskManager, FlinkCatalogOptions catalogOptions) + { + Storage = storage; + NumReplicas = numReplicas; + JobManager = jobManager; + HistoryServer = historyServer; + TaskManager = taskManager; + CatalogOptions = catalogOptions; + } + + /// The storage profile. + public FlinkStorageProfile Storage { get; set; } + /// The number of task managers. + public int? NumReplicas { get; set; } + /// Job Manager container/ process CPU and memory requirements. + public ComputeResourceDefinition JobManager { get; set; } + /// History Server container/ process CPU and memory requirements. + public ComputeResourceDefinition HistoryServer { get; set; } + /// Task Manager container/ process CPU and memory requirements. + public ComputeResourceDefinition TaskManager { get; set; } + /// Flink cluster catalog options. + internal FlinkCatalogOptions CatalogOptions { get; set; } + /// Hive Catalog Option for Flink cluster. + public FlinkHiveCatalogOption CatalogOptionsHive + { + get => CatalogOptions is null ? default : CatalogOptions.Hive; + set + { + if (CatalogOptions is null) + CatalogOptions = new FlinkCatalogOptions(); + CatalogOptions.Hive = value; + } + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkStorageProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkStorageProfile.Serialization.cs new file mode 100644 index 000000000000..203f260741a8 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkStorageProfile.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class FlinkStorageProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("storageUri"u8); + writer.WriteStringValue(StorageUri.AbsoluteUri); + if (Optional.IsDefined(Storagekey)) + { + writer.WritePropertyName("storagekey"u8); + writer.WriteStringValue(Storagekey); + } + writer.WriteEndObject(); + } + + internal static FlinkStorageProfile DeserializeFlinkStorageProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri storageUri = default; + Optional storagekey = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storageUri"u8)) + { + storageUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("storagekey"u8)) + { + storagekey = property.Value.GetString(); + continue; + } + } + return new FlinkStorageProfile(storageUri, storagekey.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkStorageProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkStorageProfile.cs new file mode 100644 index 000000000000..aa3e02dc06ba --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/FlinkStorageProfile.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The storage profile. + public partial class FlinkStorageProfile + { + /// Initializes a new instance of FlinkStorageProfile. + /// Storage account uri which is used for savepoint and checkpoint state. + /// is null. + public FlinkStorageProfile(Uri storageUri) + { + Argument.AssertNotNull(storageUri, nameof(storageUri)); + + StorageUri = storageUri; + } + + /// Initializes a new instance of FlinkStorageProfile. + /// Storage account uri which is used for savepoint and checkpoint state. + /// Storage key is only required for wasb(s) storage. + internal FlinkStorageProfile(Uri storageUri, string storagekey) + { + StorageUri = storageUri; + Storagekey = storagekey; + } + + /// Storage account uri which is used for savepoint and checkpoint state. + public Uri StorageUri { get; set; } + /// Storage key is only required for wasb(s) storage. + public string Storagekey { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationEndpoint.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationEndpoint.Serialization.cs deleted file mode 100644 index c24b3be9ecd7..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationEndpoint.Serialization.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Net; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightApplicationEndpoint : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(EndpointLocation)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(EndpointLocation); - } - if (Optional.IsDefined(DestinationPort)) - { - writer.WritePropertyName("destinationPort"u8); - writer.WriteNumberValue(DestinationPort.Value); - } - if (Optional.IsDefined(PublicPort)) - { - writer.WritePropertyName("publicPort"u8); - writer.WriteNumberValue(PublicPort.Value); - } - if (Optional.IsDefined(PrivateIPAddress)) - { - writer.WritePropertyName("privateIPAddress"u8); - writer.WriteStringValue(PrivateIPAddress.ToString()); - } - writer.WriteEndObject(); - } - - internal static HDInsightApplicationEndpoint DeserializeHDInsightApplicationEndpoint(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional location = default; - Optional destinationPort = default; - Optional publicPort = default; - Optional privateIPAddress = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("location"u8)) - { - location = property.Value.GetString(); - continue; - } - if (property.NameEquals("destinationPort"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - destinationPort = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("publicPort"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publicPort = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("privateIPAddress"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateIPAddress = IPAddress.Parse(property.Value.GetString()); - continue; - } - } - return new HDInsightApplicationEndpoint(location.Value, Optional.ToNullable(destinationPort), Optional.ToNullable(publicPort), privateIPAddress.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationEndpoint.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationEndpoint.cs deleted file mode 100644 index d4fe7a7e52ca..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationEndpoint.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Net; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// Gets the application SSH endpoint. - public partial class HDInsightApplicationEndpoint - { - /// Initializes a new instance of HDInsightApplicationEndpoint. - public HDInsightApplicationEndpoint() - { - } - - /// Initializes a new instance of HDInsightApplicationEndpoint. - /// The location of the endpoint. - /// The destination port to connect to. - /// The public port to connect to. - /// The private ip address of the endpoint. - internal HDInsightApplicationEndpoint(string endpointLocation, int? destinationPort, int? publicPort, IPAddress privateIPAddress) - { - EndpointLocation = endpointLocation; - DestinationPort = destinationPort; - PublicPort = publicPort; - PrivateIPAddress = privateIPAddress; - } - - /// The location of the endpoint. - public string EndpointLocation { get; set; } - /// The destination port to connect to. - public int? DestinationPort { get; set; } - /// The public port to connect to. - public int? PublicPort { get; set; } - /// The private ip address of the endpoint. - public IPAddress PrivateIPAddress { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationHttpsEndpoint.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationHttpsEndpoint.Serialization.cs deleted file mode 100644 index 4b6d140aca94..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationHttpsEndpoint.Serialization.cs +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Net; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightApplicationHttpsEndpoint : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(AccessModes)) - { - writer.WritePropertyName("accessModes"u8); - writer.WriteStartArray(); - foreach (var item in AccessModes) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(DestinationPort)) - { - writer.WritePropertyName("destinationPort"u8); - writer.WriteNumberValue(DestinationPort.Value); - } - if (Optional.IsDefined(PrivateIPAddress)) - { - writer.WritePropertyName("privateIPAddress"u8); - writer.WriteStringValue(PrivateIPAddress.ToString()); - } - if (Optional.IsDefined(SubDomainSuffix)) - { - writer.WritePropertyName("subDomainSuffix"u8); - writer.WriteStringValue(SubDomainSuffix); - } - if (Optional.IsDefined(DisableGatewayAuth)) - { - writer.WritePropertyName("disableGatewayAuth"u8); - writer.WriteBooleanValue(DisableGatewayAuth.Value); - } - writer.WriteEndObject(); - } - - internal static HDInsightApplicationHttpsEndpoint DeserializeHDInsightApplicationHttpsEndpoint(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> accessModes = default; - Optional location = default; - Optional destinationPort = default; - Optional publicPort = default; - Optional privateIPAddress = default; - Optional subDomainSuffix = default; - Optional disableGatewayAuth = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("accessModes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - accessModes = array; - continue; - } - if (property.NameEquals("location"u8)) - { - location = property.Value.GetString(); - continue; - } - if (property.NameEquals("destinationPort"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - destinationPort = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("publicPort"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publicPort = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("privateIPAddress"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateIPAddress = IPAddress.Parse(property.Value.GetString()); - continue; - } - if (property.NameEquals("subDomainSuffix"u8)) - { - subDomainSuffix = property.Value.GetString(); - continue; - } - if (property.NameEquals("disableGatewayAuth"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disableGatewayAuth = property.Value.GetBoolean(); - continue; - } - } - return new HDInsightApplicationHttpsEndpoint(Optional.ToList(accessModes), location.Value, Optional.ToNullable(destinationPort), Optional.ToNullable(publicPort), privateIPAddress.Value, subDomainSuffix.Value, Optional.ToNullable(disableGatewayAuth)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationHttpsEndpoint.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationHttpsEndpoint.cs deleted file mode 100644 index ff1814b19e3f..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationHttpsEndpoint.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Net; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// Gets the application HTTP endpoints. - public partial class HDInsightApplicationHttpsEndpoint - { - /// Initializes a new instance of HDInsightApplicationHttpsEndpoint. - public HDInsightApplicationHttpsEndpoint() - { - AccessModes = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightApplicationHttpsEndpoint. - /// The list of access modes for the application. - /// The location of the endpoint. - /// The destination port to connect to. - /// The public port to connect to. - /// The private ip address of the endpoint. - /// The subdomain suffix of the application. - /// The value indicates whether to disable GatewayAuth. - internal HDInsightApplicationHttpsEndpoint(IList accessModes, string endpointLocation, int? destinationPort, int? publicPort, IPAddress privateIPAddress, string subDomainSuffix, bool? disableGatewayAuth) - { - AccessModes = accessModes; - EndpointLocation = endpointLocation; - DestinationPort = destinationPort; - PublicPort = publicPort; - PrivateIPAddress = privateIPAddress; - SubDomainSuffix = subDomainSuffix; - DisableGatewayAuth = disableGatewayAuth; - } - - /// The list of access modes for the application. - public IList AccessModes { get; } - /// The location of the endpoint. - public string EndpointLocation { get; } - /// The destination port to connect to. - public int? DestinationPort { get; set; } - /// The public port to connect to. - public int? PublicPort { get; } - /// The private ip address of the endpoint. - public IPAddress PrivateIPAddress { get; set; } - /// The subdomain suffix of the application. - public string SubDomainSuffix { get; set; } - /// The value indicates whether to disable GatewayAuth. - public bool? DisableGatewayAuth { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationProperties.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationProperties.Serialization.cs deleted file mode 100644 index 736b3e48b68c..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationProperties.Serialization.cs +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightApplicationProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ComputeProfile)) - { - writer.WritePropertyName("computeProfile"u8); - writer.WriteObjectValue(ComputeProfile); - } - if (Optional.IsCollectionDefined(InstallScriptActions)) - { - writer.WritePropertyName("installScriptActions"u8); - writer.WriteStartArray(); - foreach (var item in InstallScriptActions) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(UninstallScriptActions)) - { - writer.WritePropertyName("uninstallScriptActions"u8); - writer.WriteStartArray(); - foreach (var item in UninstallScriptActions) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(HttpsEndpoints)) - { - writer.WritePropertyName("httpsEndpoints"u8); - writer.WriteStartArray(); - foreach (var item in HttpsEndpoints) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(SshEndpoints)) - { - writer.WritePropertyName("sshEndpoints"u8); - writer.WriteStartArray(); - foreach (var item in SshEndpoints) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ApplicationType)) - { - writer.WritePropertyName("applicationType"u8); - writer.WriteStringValue(ApplicationType); - } - if (Optional.IsCollectionDefined(Errors)) - { - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(PrivateLinkConfigurations)) - { - writer.WritePropertyName("privateLinkConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in PrivateLinkConfigurations) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static HDInsightApplicationProperties DeserializeHDInsightApplicationProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional computeProfile = default; - Optional> installScriptActions = default; - Optional> uninstallScriptActions = default; - Optional> httpsEndpoints = default; - Optional> sshEndpoints = default; - Optional provisioningState = default; - Optional applicationType = default; - Optional applicationState = default; - Optional> errors = default; - Optional createdDate = default; - Optional marketplaceIdentifier = default; - Optional> privateLinkConfigurations = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("computeProfile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - computeProfile = ComputeProfile.DeserializeComputeProfile(property.Value); - continue; - } - if (property.NameEquals("installScriptActions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RuntimeScriptAction.DeserializeRuntimeScriptAction(item)); - } - installScriptActions = array; - continue; - } - if (property.NameEquals("uninstallScriptActions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RuntimeScriptAction.DeserializeRuntimeScriptAction(item)); - } - uninstallScriptActions = array; - continue; - } - if (property.NameEquals("httpsEndpoints"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightApplicationHttpsEndpoint.DeserializeHDInsightApplicationHttpsEndpoint(item)); - } - httpsEndpoints = array; - continue; - } - if (property.NameEquals("sshEndpoints"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightApplicationEndpoint.DeserializeHDInsightApplicationEndpoint(item)); - } - sshEndpoints = array; - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - provisioningState = property.Value.GetString(); - continue; - } - if (property.NameEquals("applicationType"u8)) - { - applicationType = property.Value.GetString(); - continue; - } - if (property.NameEquals("applicationState"u8)) - { - applicationState = property.Value.GetString(); - continue; - } - if (property.NameEquals("errors"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - errors = array; - continue; - } - if (property.NameEquals("createdDate"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createdDate = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("marketplaceIdentifier"u8)) - { - marketplaceIdentifier = property.Value.GetString(); - continue; - } - if (property.NameEquals("privateLinkConfigurations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightPrivateLinkConfiguration.DeserializeHDInsightPrivateLinkConfiguration(item)); - } - privateLinkConfigurations = array; - continue; - } - } - return new HDInsightApplicationProperties(computeProfile.Value, Optional.ToList(installScriptActions), Optional.ToList(uninstallScriptActions), Optional.ToList(httpsEndpoints), Optional.ToList(sshEndpoints), provisioningState.Value, applicationType.Value, applicationState.Value, Optional.ToList(errors), Optional.ToNullable(createdDate), marketplaceIdentifier.Value, Optional.ToList(privateLinkConfigurations)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationProperties.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationProperties.cs deleted file mode 100644 index 7c5a9e75f606..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightApplicationProperties.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The HDInsight cluster application GET response. - public partial class HDInsightApplicationProperties - { - /// Initializes a new instance of HDInsightApplicationProperties. - public HDInsightApplicationProperties() - { - InstallScriptActions = new ChangeTrackingList(); - UninstallScriptActions = new ChangeTrackingList(); - HttpsEndpoints = new ChangeTrackingList(); - SshEndpoints = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); - PrivateLinkConfigurations = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightApplicationProperties. - /// The list of roles in the cluster. - /// The list of install script actions. - /// The list of uninstall script actions. - /// The list of application HTTPS endpoints. - /// The list of application SSH endpoints. - /// The provisioning state of the application. - /// The application type. - /// The application state. - /// The list of errors. - /// The application create date time. - /// The marketplace identifier. - /// The private link configurations. - internal HDInsightApplicationProperties(ComputeProfile computeProfile, IList installScriptActions, IList uninstallScriptActions, IList httpsEndpoints, IList sshEndpoints, string provisioningState, string applicationType, string applicationState, IList errors, DateTimeOffset? createdOn, string marketplaceIdentifier, IList privateLinkConfigurations) - { - ComputeProfile = computeProfile; - InstallScriptActions = installScriptActions; - UninstallScriptActions = uninstallScriptActions; - HttpsEndpoints = httpsEndpoints; - SshEndpoints = sshEndpoints; - ProvisioningState = provisioningState; - ApplicationType = applicationType; - ApplicationState = applicationState; - Errors = errors; - CreatedOn = createdOn; - MarketplaceIdentifier = marketplaceIdentifier; - PrivateLinkConfigurations = privateLinkConfigurations; - } - - /// The list of roles in the cluster. - internal ComputeProfile ComputeProfile { get; set; } - /// The list of roles in the cluster. - public IList ComputeRoles - { - get - { - if (ComputeProfile is null) - ComputeProfile = new ComputeProfile(); - return ComputeProfile.Roles; - } - } - - /// The list of install script actions. - public IList InstallScriptActions { get; } - /// The list of uninstall script actions. - public IList UninstallScriptActions { get; } - /// The list of application HTTPS endpoints. - public IList HttpsEndpoints { get; } - /// The list of application SSH endpoints. - public IList SshEndpoints { get; } - /// The provisioning state of the application. - public string ProvisioningState { get; } - /// The application type. - public string ApplicationType { get; set; } - /// The application state. - public string ApplicationState { get; } - /// The list of errors. - public IList Errors { get; } - /// The application create date time. - public DateTimeOffset? CreatedOn { get; } - /// The marketplace identifier. - public string MarketplaceIdentifier { get; } - /// The private link configurations. - public IList PrivateLinkConfigurations { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAsyncOperationResult.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAsyncOperationResult.Serialization.cs deleted file mode 100644 index c28f343e2244..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAsyncOperationResult.Serialization.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightAsyncOperationResult - { - internal static HDInsightAsyncOperationResult DeserializeHDInsightAsyncOperationResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional status = default; - Optional error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new HDInsightAsyncOperationState(property.Value.GetString()); - continue; - } - if (property.NameEquals("error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - error = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new HDInsightAsyncOperationResult(Optional.ToNullable(status), error.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAsyncOperationResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAsyncOperationResult.cs deleted file mode 100644 index 79b0ca191962..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAsyncOperationResult.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The azure async operation response. - public partial class HDInsightAsyncOperationResult - { - /// Initializes a new instance of HDInsightAsyncOperationResult. - internal HDInsightAsyncOperationResult() - { - } - - /// Initializes a new instance of HDInsightAsyncOperationResult. - /// The async operation state. - /// The operation error information. - internal HDInsightAsyncOperationResult(HDInsightAsyncOperationState? status, ResponseError error) - { - Status = status; - Error = error; - } - - /// The async operation state. - public HDInsightAsyncOperationState? Status { get; } - /// The operation error information. - public ResponseError Error { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAsyncOperationState.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAsyncOperationState.cs deleted file mode 100644 index 7991530d437e..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAsyncOperationState.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The async operation state. - public readonly partial struct HDInsightAsyncOperationState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightAsyncOperationState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "InProgress"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - - /// InProgress. - public static HDInsightAsyncOperationState InProgress { get; } = new HDInsightAsyncOperationState(InProgressValue); - /// Succeeded. - public static HDInsightAsyncOperationState Succeeded { get; } = new HDInsightAsyncOperationState(SucceededValue); - /// Failed. - public static HDInsightAsyncOperationState Failed { get; } = new HDInsightAsyncOperationState(FailedValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightAsyncOperationState left, HDInsightAsyncOperationState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightAsyncOperationState left, HDInsightAsyncOperationState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightAsyncOperationState(string value) => new HDInsightAsyncOperationState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightAsyncOperationState other && Equals(other); - /// - public bool Equals(HDInsightAsyncOperationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleCapacity.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleCapacity.cs deleted file mode 100644 index d27d4fcae688..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleCapacity.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The load-based autoscale request parameters. - public partial class HDInsightAutoScaleCapacity - { - /// Initializes a new instance of HDInsightAutoScaleCapacity. - public HDInsightAutoScaleCapacity() - { - } - - /// Initializes a new instance of HDInsightAutoScaleCapacity. - /// The minimum instance count of the cluster. - /// The maximum instance count of the cluster. - internal HDInsightAutoScaleCapacity(int? minInstanceCount, int? maxInstanceCount) - { - MinInstanceCount = minInstanceCount; - MaxInstanceCount = maxInstanceCount; - } - - /// The minimum instance count of the cluster. - public int? MinInstanceCount { get; set; } - /// The maximum instance count of the cluster. - public int? MaxInstanceCount { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfiguration.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfiguration.Serialization.cs deleted file mode 100644 index e5e33f801f24..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfiguration.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightAutoScaleConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Capacity)) - { - writer.WritePropertyName("capacity"u8); - writer.WriteObjectValue(Capacity); - } - if (Optional.IsDefined(Recurrence)) - { - writer.WritePropertyName("recurrence"u8); - writer.WriteObjectValue(Recurrence); - } - writer.WriteEndObject(); - } - - internal static HDInsightAutoScaleConfiguration DeserializeHDInsightAutoScaleConfiguration(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional capacity = default; - Optional recurrence = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("capacity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - capacity = HDInsightAutoScaleCapacity.DeserializeHDInsightAutoScaleCapacity(property.Value); - continue; - } - if (property.NameEquals("recurrence"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - recurrence = HDInsightAutoScaleRecurrence.DeserializeHDInsightAutoScaleRecurrence(property.Value); - continue; - } - } - return new HDInsightAutoScaleConfiguration(capacity.Value, recurrence.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfiguration.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfiguration.cs deleted file mode 100644 index f40ac401cb82..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The autoscale request parameters. - public partial class HDInsightAutoScaleConfiguration - { - /// Initializes a new instance of HDInsightAutoScaleConfiguration. - public HDInsightAutoScaleConfiguration() - { - } - - /// Initializes a new instance of HDInsightAutoScaleConfiguration. - /// Parameters for load-based autoscale. - /// Parameters for schedule-based autoscale. - internal HDInsightAutoScaleConfiguration(HDInsightAutoScaleCapacity capacity, HDInsightAutoScaleRecurrence recurrence) - { - Capacity = capacity; - Recurrence = recurrence; - } - - /// Parameters for load-based autoscale. - public HDInsightAutoScaleCapacity Capacity { get; set; } - /// Parameters for schedule-based autoscale. - public HDInsightAutoScaleRecurrence Recurrence { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfigurationUpdateContent.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfigurationUpdateContent.Serialization.cs deleted file mode 100644 index 6ff769cff812..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfigurationUpdateContent.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightAutoScaleConfigurationUpdateContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AutoScale)) - { - writer.WritePropertyName("autoscale"u8); - writer.WriteObjectValue(AutoScale); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfigurationUpdateContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfigurationUpdateContent.cs deleted file mode 100644 index ee8497de4a80..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleConfigurationUpdateContent.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The autoscale configuration update parameter. - public partial class HDInsightAutoScaleConfigurationUpdateContent - { - /// Initializes a new instance of HDInsightAutoScaleConfigurationUpdateContent. - public HDInsightAutoScaleConfigurationUpdateContent() - { - } - - /// The autoscale configuration. - public HDInsightAutoScaleConfiguration AutoScale { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleRecurrence.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleRecurrence.cs deleted file mode 100644 index 098b5299a812..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleRecurrence.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// Schedule-based autoscale request parameters. - public partial class HDInsightAutoScaleRecurrence - { - /// Initializes a new instance of HDInsightAutoScaleRecurrence. - public HDInsightAutoScaleRecurrence() - { - Schedule = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightAutoScaleRecurrence. - /// The time zone for the autoscale schedule times. - /// Array of schedule-based autoscale rules. - internal HDInsightAutoScaleRecurrence(string timeZone, IList schedule) - { - TimeZone = timeZone; - Schedule = schedule; - } - - /// The time zone for the autoscale schedule times. - public string TimeZone { get; set; } - /// Array of schedule-based autoscale rules. - public IList Schedule { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleSchedule.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleSchedule.Serialization.cs deleted file mode 100644 index a3be1ce6d1be..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleSchedule.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightAutoScaleSchedule : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Days)) - { - writer.WritePropertyName("days"u8); - writer.WriteStartArray(); - foreach (var item in Days) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(TimeAndCapacity)) - { - writer.WritePropertyName("timeAndCapacity"u8); - writer.WriteObjectValue(TimeAndCapacity); - } - writer.WriteEndObject(); - } - - internal static HDInsightAutoScaleSchedule DeserializeHDInsightAutoScaleSchedule(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> days = default; - Optional timeAndCapacity = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("days"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new HDInsightDayOfWeek(item.GetString())); - } - days = array; - continue; - } - if (property.NameEquals("timeAndCapacity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeAndCapacity = HDInsightAutoScaleTimeAndCapacity.DeserializeHDInsightAutoScaleTimeAndCapacity(property.Value); - continue; - } - } - return new HDInsightAutoScaleSchedule(Optional.ToList(days), timeAndCapacity.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleSchedule.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleSchedule.cs deleted file mode 100644 index 43d3876c390f..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleSchedule.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// Parameters for a schedule-based autoscale rule, consisting of an array of days + a time and capacity. - public partial class HDInsightAutoScaleSchedule - { - /// Initializes a new instance of HDInsightAutoScaleSchedule. - public HDInsightAutoScaleSchedule() - { - Days = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightAutoScaleSchedule. - /// Days of the week for a schedule-based autoscale rule. - /// Time and capacity for a schedule-based autoscale rule. - internal HDInsightAutoScaleSchedule(IList days, HDInsightAutoScaleTimeAndCapacity timeAndCapacity) - { - Days = days; - TimeAndCapacity = timeAndCapacity; - } - - /// Days of the week for a schedule-based autoscale rule. - public IList Days { get; } - /// Time and capacity for a schedule-based autoscale rule. - public HDInsightAutoScaleTimeAndCapacity TimeAndCapacity { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleTimeAndCapacity.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleTimeAndCapacity.Serialization.cs deleted file mode 100644 index 80669525ce6a..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleTimeAndCapacity.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightAutoScaleTimeAndCapacity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Time)) - { - writer.WritePropertyName("time"u8); - writer.WriteStringValue(Time); - } - if (Optional.IsDefined(MinInstanceCount)) - { - writer.WritePropertyName("minInstanceCount"u8); - writer.WriteNumberValue(MinInstanceCount.Value); - } - if (Optional.IsDefined(MaxInstanceCount)) - { - writer.WritePropertyName("maxInstanceCount"u8); - writer.WriteNumberValue(MaxInstanceCount.Value); - } - writer.WriteEndObject(); - } - - internal static HDInsightAutoScaleTimeAndCapacity DeserializeHDInsightAutoScaleTimeAndCapacity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional time = default; - Optional minInstanceCount = default; - Optional maxInstanceCount = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("time"u8)) - { - time = property.Value.GetString(); - continue; - } - if (property.NameEquals("minInstanceCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - minInstanceCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxInstanceCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxInstanceCount = property.Value.GetInt32(); - continue; - } - } - return new HDInsightAutoScaleTimeAndCapacity(time.Value, Optional.ToNullable(minInstanceCount), Optional.ToNullable(maxInstanceCount)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleTimeAndCapacity.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleTimeAndCapacity.cs deleted file mode 100644 index 49f4c4c10894..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleTimeAndCapacity.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// Time and capacity request parameters. - public partial class HDInsightAutoScaleTimeAndCapacity - { - /// Initializes a new instance of HDInsightAutoScaleTimeAndCapacity. - public HDInsightAutoScaleTimeAndCapacity() - { - } - - /// Initializes a new instance of HDInsightAutoScaleTimeAndCapacity. - /// 24-hour time in the form xx:xx. - /// The minimum instance count of the cluster. - /// The maximum instance count of the cluster. - internal HDInsightAutoScaleTimeAndCapacity(string time, int? minInstanceCount, int? maxInstanceCount) - { - Time = time; - MinInstanceCount = minInstanceCount; - MaxInstanceCount = maxInstanceCount; - } - - /// 24-hour time in the form xx:xx. - public string Time { get; set; } - /// The minimum instance count of the cluster. - public int? MinInstanceCount { get; set; } - /// The maximum instance count of the cluster. - public int? MaxInstanceCount { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionEnableContent.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionEnableContent.Serialization.cs deleted file mode 100644 index fc81c299b133..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionEnableContent.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightAzureMonitorExtensionEnableContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(WorkspaceId)) - { - writer.WritePropertyName("workspaceId"u8); - writer.WriteStringValue(WorkspaceId); - } - if (Optional.IsDefined(PrimaryKey)) - { - writer.WritePropertyName("primaryKey"u8); - writer.WriteStringValue(PrimaryKey); - } - if (Optional.IsDefined(SelectedConfigurations)) - { - writer.WritePropertyName("selectedConfigurations"u8); - writer.WriteObjectValue(SelectedConfigurations); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionEnableContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionEnableContent.cs deleted file mode 100644 index aaf307c18d2d..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionEnableContent.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The azure monitor parameters. - public partial class HDInsightAzureMonitorExtensionEnableContent - { - /// Initializes a new instance of HDInsightAzureMonitorExtensionEnableContent. - public HDInsightAzureMonitorExtensionEnableContent() - { - } - - /// The Log Analytics workspace ID. - public string WorkspaceId { get; set; } - /// The Log Analytics workspace key. - public string PrimaryKey { get; set; } - /// The selected configurations. - public HDInsightAzureMonitorSelectedConfigurations SelectedConfigurations { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionStatus.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionStatus.Serialization.cs deleted file mode 100644 index a91b758cbe9d..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionStatus.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightAzureMonitorExtensionStatus - { - internal static HDInsightAzureMonitorExtensionStatus DeserializeHDInsightAzureMonitorExtensionStatus(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional clusterMonitoringEnabled = default; - Optional workspaceId = default; - Optional selectedConfigurations = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("clusterMonitoringEnabled"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clusterMonitoringEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("workspaceId"u8)) - { - workspaceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("selectedConfigurations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - selectedConfigurations = HDInsightAzureMonitorSelectedConfigurations.DeserializeHDInsightAzureMonitorSelectedConfigurations(property.Value); - continue; - } - } - return new HDInsightAzureMonitorExtensionStatus(Optional.ToNullable(clusterMonitoringEnabled), workspaceId.Value, selectedConfigurations.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionStatus.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionStatus.cs deleted file mode 100644 index 8cef490cc5f3..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorExtensionStatus.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The azure monitor status response. - public partial class HDInsightAzureMonitorExtensionStatus - { - /// Initializes a new instance of HDInsightAzureMonitorExtensionStatus. - internal HDInsightAzureMonitorExtensionStatus() - { - } - - /// Initializes a new instance of HDInsightAzureMonitorExtensionStatus. - /// The status of the monitor on the HDInsight cluster. - /// The workspace ID of the monitor on the HDInsight cluster. - /// The selected configurations. - internal HDInsightAzureMonitorExtensionStatus(bool? isClusterMonitoringEnabled, string workspaceId, HDInsightAzureMonitorSelectedConfigurations selectedConfigurations) - { - IsClusterMonitoringEnabled = isClusterMonitoringEnabled; - WorkspaceId = workspaceId; - SelectedConfigurations = selectedConfigurations; - } - - /// The status of the monitor on the HDInsight cluster. - public bool? IsClusterMonitoringEnabled { get; } - /// The workspace ID of the monitor on the HDInsight cluster. - public string WorkspaceId { get; } - /// The selected configurations. - public HDInsightAzureMonitorSelectedConfigurations SelectedConfigurations { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorSelectedConfigurations.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorSelectedConfigurations.Serialization.cs deleted file mode 100644 index 3ff6fbeb226d..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorSelectedConfigurations.Serialization.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightAzureMonitorSelectedConfigurations : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ConfigurationVersion)) - { - writer.WritePropertyName("configurationVersion"u8); - writer.WriteStringValue(ConfigurationVersion); - } - if (Optional.IsCollectionDefined(GlobalConfigurations)) - { - writer.WritePropertyName("globalConfigurations"u8); - writer.WriteStartObject(); - foreach (var item in GlobalConfigurations) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(TableList)) - { - writer.WritePropertyName("tableList"u8); - writer.WriteStartArray(); - foreach (var item in TableList) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static HDInsightAzureMonitorSelectedConfigurations DeserializeHDInsightAzureMonitorSelectedConfigurations(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional configurationVersion = default; - Optional> globalConfigurations = default; - Optional> tableList = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("configurationVersion"u8)) - { - configurationVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("globalConfigurations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - globalConfigurations = dictionary; - continue; - } - if (property.NameEquals("tableList"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightAzureMonitorTableConfiguration.DeserializeHDInsightAzureMonitorTableConfiguration(item)); - } - tableList = array; - continue; - } - } - return new HDInsightAzureMonitorSelectedConfigurations(configurationVersion.Value, Optional.ToDictionary(globalConfigurations), Optional.ToList(tableList)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorSelectedConfigurations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorSelectedConfigurations.cs deleted file mode 100644 index 57a96a9d5766..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorSelectedConfigurations.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The selected configurations for azure monitor. - public partial class HDInsightAzureMonitorSelectedConfigurations - { - /// Initializes a new instance of HDInsightAzureMonitorSelectedConfigurations. - public HDInsightAzureMonitorSelectedConfigurations() - { - GlobalConfigurations = new ChangeTrackingDictionary(); - TableList = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightAzureMonitorSelectedConfigurations. - /// The configuration version. - /// The global configurations of selected configurations. - /// The table list. - internal HDInsightAzureMonitorSelectedConfigurations(string configurationVersion, IDictionary globalConfigurations, IList tableList) - { - ConfigurationVersion = configurationVersion; - GlobalConfigurations = globalConfigurations; - TableList = tableList; - } - - /// The configuration version. - public string ConfigurationVersion { get; set; } - /// The global configurations of selected configurations. - public IDictionary GlobalConfigurations { get; } - /// The table list. - public IList TableList { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorTableConfiguration.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorTableConfiguration.cs deleted file mode 100644 index 6c6e491f7472..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAzureMonitorTableConfiguration.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The table configuration for the Log Analytics integration. - public partial class HDInsightAzureMonitorTableConfiguration - { - /// Initializes a new instance of HDInsightAzureMonitorTableConfiguration. - public HDInsightAzureMonitorTableConfiguration() - { - } - - /// Initializes a new instance of HDInsightAzureMonitorTableConfiguration. - /// The name. - internal HDInsightAzureMonitorTableConfiguration(string name) - { - Name = name; - } - - /// The name. - public string Name { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingMeters.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingMeters.Serialization.cs deleted file mode 100644 index de188ec59a0c..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingMeters.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightBillingMeters - { - internal static HDInsightBillingMeters DeserializeHDInsightBillingMeters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional meterParameter = default; - Optional meter = default; - Optional unit = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("meterParameter"u8)) - { - meterParameter = property.Value.GetString(); - continue; - } - if (property.NameEquals("meter"u8)) - { - meter = property.Value.GetString(); - continue; - } - if (property.NameEquals("unit"u8)) - { - unit = property.Value.GetString(); - continue; - } - } - return new HDInsightBillingMeters(meterParameter.Value, meter.Value, unit.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingMeters.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingMeters.cs deleted file mode 100644 index f703ac7cde0b..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingMeters.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The billing meters. - public partial class HDInsightBillingMeters - { - /// Initializes a new instance of HDInsightBillingMeters. - internal HDInsightBillingMeters() - { - } - - /// Initializes a new instance of HDInsightBillingMeters. - /// The virtual machine sizes. - /// The HDInsight meter guid. - /// The unit of meter, VMHours or CoreHours. - internal HDInsightBillingMeters(string meterParameter, string meter, string unit) - { - MeterParameter = meterParameter; - Meter = meter; - Unit = unit; - } - - /// The virtual machine sizes. - public string MeterParameter { get; } - /// The HDInsight meter guid. - public string Meter { get; } - /// The unit of meter, VMHours or CoreHours. - public string Unit { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingResources.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingResources.Serialization.cs deleted file mode 100644 index ffe7e290660f..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingResources.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightBillingResources - { - internal static HDInsightBillingResources DeserializeHDInsightBillingResources(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional region = default; - Optional> billingMeters = default; - Optional> diskBillingMeters = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("region"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - region = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("billingMeters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightBillingMeters.DeserializeHDInsightBillingMeters(item)); - } - billingMeters = array; - continue; - } - if (property.NameEquals("diskBillingMeters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightDiskBillingMeters.DeserializeHDInsightDiskBillingMeters(item)); - } - diskBillingMeters = array; - continue; - } - } - return new HDInsightBillingResources(Optional.ToNullable(region), Optional.ToList(billingMeters), Optional.ToList(diskBillingMeters)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingResources.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingResources.cs deleted file mode 100644 index ff51f49a25e8..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingResources.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The billing resources. - public partial class HDInsightBillingResources - { - /// Initializes a new instance of HDInsightBillingResources. - internal HDInsightBillingResources() - { - BillingMeters = new ChangeTrackingList(); - DiskBillingMeters = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightBillingResources. - /// The region or location. - /// The billing meter information. - /// The managed disk billing information. - internal HDInsightBillingResources(AzureLocation? region, IReadOnlyList billingMeters, IReadOnlyList diskBillingMeters) - { - Region = region; - BillingMeters = billingMeters; - DiskBillingMeters = diskBillingMeters; - } - - /// The region or location. - public AzureLocation? Region { get; } - /// The billing meter information. - public IReadOnlyList BillingMeters { get; } - /// The managed disk billing information. - public IReadOnlyList DiskBillingMeters { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingSpecsListResult.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingSpecsListResult.Serialization.cs deleted file mode 100644 index a2701ca3fc1c..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingSpecsListResult.Serialization.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightBillingSpecsListResult - { - internal static HDInsightBillingSpecsListResult DeserializeHDInsightBillingSpecsListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> vmSizes = default; - Optional> vmSizesWithEncryptionAtHost = default; - Optional> vmSizeFilters = default; - Optional> vmSizeProperties = default; - Optional> billingResources = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vmSizes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - vmSizes = array; - continue; - } - if (property.NameEquals("vmSizesWithEncryptionAtHost"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - vmSizesWithEncryptionAtHost = array; - continue; - } - if (property.NameEquals("vmSizeFilters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightVmSizeCompatibilityFilterV2.DeserializeHDInsightVmSizeCompatibilityFilterV2(item)); - } - vmSizeFilters = array; - continue; - } - if (property.NameEquals("vmSizeProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightVmSizeProperty.DeserializeHDInsightVmSizeProperty(item)); - } - vmSizeProperties = array; - continue; - } - if (property.NameEquals("billingResources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightBillingResources.DeserializeHDInsightBillingResources(item)); - } - billingResources = array; - continue; - } - } - return new HDInsightBillingSpecsListResult(Optional.ToList(vmSizes), Optional.ToList(vmSizesWithEncryptionAtHost), Optional.ToList(vmSizeFilters), Optional.ToList(vmSizeProperties), Optional.ToList(billingResources)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingSpecsListResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingSpecsListResult.cs deleted file mode 100644 index 123a52a59f70..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightBillingSpecsListResult.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The response for the operation to get regional billingSpecs for a subscription. - public partial class HDInsightBillingSpecsListResult - { - /// Initializes a new instance of HDInsightBillingSpecsListResult. - internal HDInsightBillingSpecsListResult() - { - VmSizes = new ChangeTrackingList(); - VmSizesWithEncryptionAtHost = new ChangeTrackingList(); - VmSizeFilters = new ChangeTrackingList(); - VmSizeProperties = new ChangeTrackingList(); - BillingResources = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightBillingSpecsListResult. - /// The virtual machine sizes to include or exclude. - /// The vm sizes which enable encryption at host. - /// The virtual machine filtering mode. Effectively this can enabling or disabling the virtual machine sizes in a particular set. - /// The vm size properties. - /// The billing and managed disk billing resources for a region. - internal HDInsightBillingSpecsListResult(IReadOnlyList vmSizes, IReadOnlyList vmSizesWithEncryptionAtHost, IReadOnlyList vmSizeFilters, IReadOnlyList vmSizeProperties, IReadOnlyList billingResources) - { - VmSizes = vmSizes; - VmSizesWithEncryptionAtHost = vmSizesWithEncryptionAtHost; - VmSizeFilters = vmSizeFilters; - VmSizeProperties = vmSizeProperties; - BillingResources = billingResources; - } - - /// The virtual machine sizes to include or exclude. - public IReadOnlyList VmSizes { get; } - /// The vm sizes which enable encryption at host. - public IReadOnlyList VmSizesWithEncryptionAtHost { get; } - /// The virtual machine filtering mode. Effectively this can enabling or disabling the virtual machine sizes in a particular set. - public IReadOnlyList VmSizeFilters { get; } - /// The vm size properties. - public IReadOnlyList VmSizeProperties { get; } - /// The billing and managed disk billing resources for a region. - public IReadOnlyList BillingResources { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightCapabilitiesResult.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightCapabilitiesResult.Serialization.cs deleted file mode 100644 index 2f8fbecf3ddf..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightCapabilitiesResult.Serialization.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightCapabilitiesResult - { - internal static HDInsightCapabilitiesResult DeserializeHDInsightCapabilitiesResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> versions = default; - Optional> regions = default; - Optional> features = default; - Optional quota = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("versions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, HDInsightVersionsCapability.DeserializeHDInsightVersionsCapability(property0.Value)); - } - versions = dictionary; - continue; - } - if (property.NameEquals("regions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, RegionsCapability.DeserializeRegionsCapability(property0.Value)); - } - regions = dictionary; - continue; - } - if (property.NameEquals("features"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - features = array; - continue; - } - if (property.NameEquals("quota"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - quota = QuotaCapability.DeserializeQuotaCapability(property.Value); - continue; - } - } - return new HDInsightCapabilitiesResult(Optional.ToDictionary(versions), Optional.ToDictionary(regions), Optional.ToList(features), quota.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightCapabilitiesResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightCapabilitiesResult.cs deleted file mode 100644 index 5e6bbbd07ef1..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightCapabilitiesResult.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The Get Capabilities operation response. - public partial class HDInsightCapabilitiesResult - { - /// Initializes a new instance of HDInsightCapabilitiesResult. - internal HDInsightCapabilitiesResult() - { - Versions = new ChangeTrackingDictionary(); - Regions = new ChangeTrackingDictionary(); - Features = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightCapabilitiesResult. - /// The version capability. - /// The virtual machine size compatibility features. - /// The capability features. - /// The quota capability. - internal HDInsightCapabilitiesResult(IReadOnlyDictionary versions, IReadOnlyDictionary regions, IReadOnlyList features, QuotaCapability quota) - { - Versions = versions; - Regions = regions; - Features = features; - Quota = quota; - } - - /// The version capability. - public IReadOnlyDictionary Versions { get; } - /// The virtual machine size compatibility features. - public IReadOnlyDictionary Regions { get; } - /// The capability features. - public IReadOnlyList Features { get; } - /// The quota capability. - public QuotaCapability Quota { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.Serialization.cs deleted file mode 100644 index 7f9da2e232a3..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.Serialization.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterAaddsDetail - { - internal static HDInsightClusterAaddsDetail DeserializeHDInsightClusterAaddsDetail(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional domainName = default; - Optional initialSyncComplete = default; - Optional ldapsEnabled = default; - Optional ldapsPublicCertificateInBase64 = default; - Optional resourceId = default; - Optional subnetId = default; - Optional tenantId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("domainName"u8)) - { - domainName = property.Value.GetString(); - continue; - } - if (property.NameEquals("initialSyncComplete"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - initialSyncComplete = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("ldapsEnabled"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ldapsEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("ldapsPublicCertificateInBase64"u8)) - { - ldapsPublicCertificateInBase64 = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("subnetId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - subnetId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("tenantId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenantId = property.Value.GetGuid(); - continue; - } - } - return new HDInsightClusterAaddsDetail(domainName.Value, Optional.ToNullable(initialSyncComplete), Optional.ToNullable(ldapsEnabled), ldapsPublicCertificateInBase64.Value, resourceId.Value, subnetId.Value, Optional.ToNullable(tenantId)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.cs deleted file mode 100644 index a9907ccf45e7..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterAaddsDetail.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The Azure active directory domain service resource details. - public partial class HDInsightClusterAaddsDetail - { - /// Initializes a new instance of HDInsightClusterAaddsDetail. - internal HDInsightClusterAaddsDetail() - { - } - - /// Initializes a new instance of HDInsightClusterAaddsDetail. - /// The Azure active directory domain service name. - /// This indicates whether initial sync complete or not. - /// This indicates whether enable ldaps or not. - /// The base 64 format string of public ldap certificate. - /// The resource id of azure active directory domain service. - /// The subnet resource id. - /// The tenant id of azure active directory domain service . - internal HDInsightClusterAaddsDetail(string domainName, bool? isInitialSyncComplete, bool? isLdapsEnabled, string ldapsPublicCertificateInBase64, ResourceIdentifier resourceId, ResourceIdentifier subnetId, Guid? tenantId) - { - DomainName = domainName; - IsInitialSyncComplete = isInitialSyncComplete; - IsLdapsEnabled = isLdapsEnabled; - LdapsPublicCertificateInBase64 = ldapsPublicCertificateInBase64; - ResourceId = resourceId; - SubnetId = subnetId; - TenantId = tenantId; - } - - /// The Azure active directory domain service name. - public string DomainName { get; } - /// This indicates whether initial sync complete or not. - public bool? IsInitialSyncComplete { get; } - /// This indicates whether enable ldaps or not. - public bool? IsLdapsEnabled { get; } - /// The base 64 format string of public ldap certificate. - public string LdapsPublicCertificateInBase64 { get; } - /// The resource id of azure active directory domain service. - public ResourceIdentifier ResourceId { get; } - /// The subnet resource id. - public ResourceIdentifier SubnetId { get; } - /// The tenant id of azure active directory domain service . - public Guid? TenantId { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterConfigurations.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterConfigurations.Serialization.cs deleted file mode 100644 index d383c3bf90e3..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterConfigurations.Serialization.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterConfigurations - { - internal static HDInsightClusterConfigurations DeserializeHDInsightClusterConfigurations(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional>> configurations = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("configurations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary> dictionary = new Dictionary>(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - Dictionary dictionary0 = new Dictionary(); - foreach (var property1 in property0.Value.EnumerateObject()) - { - dictionary0.Add(property1.Name, property1.Value.GetString()); - } - dictionary.Add(property0.Name, dictionary0); - } - } - configurations = dictionary; - continue; - } - } - return new HDInsightClusterConfigurations(Optional.ToDictionary(configurations)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterConfigurations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterConfigurations.cs deleted file mode 100644 index ccc27624abac..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterConfigurations.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The configuration object for the specified cluster. - public partial class HDInsightClusterConfigurations - { - /// Initializes a new instance of HDInsightClusterConfigurations. - internal HDInsightClusterConfigurations() - { - Configurations = new ChangeTrackingDictionary>(); - } - - /// Initializes a new instance of HDInsightClusterConfigurations. - /// The configuration object for the specified configuration for the specified cluster. - internal HDInsightClusterConfigurations(IReadOnlyDictionary> configurations) - { - Configurations = configurations; - } - - /// The configuration object for the specified configuration for the specified cluster. - public IReadOnlyDictionary> Configurations { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateExtensionContent.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateExtensionContent.Serialization.cs deleted file mode 100644 index 5c97c90524e4..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateExtensionContent.Serialization.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterCreateExtensionContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(WorkspaceId)) - { - writer.WritePropertyName("workspaceId"u8); - writer.WriteStringValue(WorkspaceId); - } - if (Optional.IsDefined(PrimaryKey)) - { - writer.WritePropertyName("primaryKey"u8); - writer.WriteStringValue(PrimaryKey); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateExtensionContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateExtensionContent.cs deleted file mode 100644 index 9c2fc86a32da..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateExtensionContent.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// Cluster monitoring extensions. - public partial class HDInsightClusterCreateExtensionContent - { - /// Initializes a new instance of HDInsightClusterCreateExtensionContent. - public HDInsightClusterCreateExtensionContent() - { - } - - /// The workspace ID for the cluster monitoring extension. - public string WorkspaceId { get; set; } - /// The certificate for the cluster monitoring extensions. - public string PrimaryKey { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateContent.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateContent.Serialization.cs deleted file mode 100644 index cc0c166eed7b..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateContent.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterCreateOrUpdateContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Zones)) - { - writer.WritePropertyName("zones"u8); - writer.WriteStartArray(); - foreach (var item in Zones) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - JsonSerializer.Serialize(writer, Identity); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateContent.cs deleted file mode 100644 index c5419976403e..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateContent.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The CreateCluster request parameters. - public partial class HDInsightClusterCreateOrUpdateContent - { - /// Initializes a new instance of HDInsightClusterCreateOrUpdateContent. - public HDInsightClusterCreateOrUpdateContent() - { - Tags = new ChangeTrackingDictionary(); - Zones = new ChangeTrackingList(); - } - - /// The location of the cluster. - public AzureLocation? Location { get; set; } - /// The resource tags. - public IDictionary Tags { get; } - /// The availability zones. - public IList Zones { get; } - /// The cluster create parameters. - public HDInsightClusterCreateOrUpdateProperties Properties { get; set; } - /// The identity of the cluster, if configured. - public ManagedServiceIdentity Identity { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateProperties.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateProperties.Serialization.cs deleted file mode 100644 index 72bcc8ff2ec7..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateProperties.Serialization.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterCreateOrUpdateProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ClusterVersion)) - { - writer.WritePropertyName("clusterVersion"u8); - writer.WriteStringValue(ClusterVersion); - } - if (Optional.IsDefined(OSType)) - { - writer.WritePropertyName("osType"u8); - writer.WriteStringValue(OSType.Value.ToString()); - } - if (Optional.IsDefined(Tier)) - { - writer.WritePropertyName("tier"u8); - writer.WriteStringValue(Tier.Value.ToString()); - } - if (Optional.IsDefined(ClusterDefinition)) - { - writer.WritePropertyName("clusterDefinition"u8); - writer.WriteObjectValue(ClusterDefinition); - } - if (Optional.IsDefined(KafkaRestProperties)) - { - writer.WritePropertyName("kafkaRestProperties"u8); - writer.WriteObjectValue(KafkaRestProperties); - } - if (Optional.IsDefined(SecurityProfile)) - { - writer.WritePropertyName("securityProfile"u8); - writer.WriteObjectValue(SecurityProfile); - } - if (Optional.IsDefined(ComputeProfile)) - { - writer.WritePropertyName("computeProfile"u8); - writer.WriteObjectValue(ComputeProfile); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile); - } - if (Optional.IsDefined(DiskEncryptionProperties)) - { - writer.WritePropertyName("diskEncryptionProperties"u8); - writer.WriteObjectValue(DiskEncryptionProperties); - } - if (Optional.IsDefined(EncryptionInTransitProperties)) - { - writer.WritePropertyName("encryptionInTransitProperties"u8); - writer.WriteObjectValue(EncryptionInTransitProperties); - } - if (Optional.IsDefined(MinSupportedTlsVersion)) - { - writer.WritePropertyName("minSupportedTlsVersion"u8); - writer.WriteStringValue(MinSupportedTlsVersion); - } - if (Optional.IsDefined(NetworkProperties)) - { - writer.WritePropertyName("networkProperties"u8); - writer.WriteObjectValue(NetworkProperties); - } - if (Optional.IsDefined(ComputeIsolationProperties)) - { - writer.WritePropertyName("computeIsolationProperties"u8); - writer.WriteObjectValue(ComputeIsolationProperties); - } - if (Optional.IsCollectionDefined(PrivateLinkConfigurations)) - { - writer.WritePropertyName("privateLinkConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in PrivateLinkConfigurations) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateProperties.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateProperties.cs deleted file mode 100644 index 4cf0e718987b..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreateOrUpdateProperties.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The cluster create parameters. - public partial class HDInsightClusterCreateOrUpdateProperties - { - /// Initializes a new instance of HDInsightClusterCreateOrUpdateProperties. - public HDInsightClusterCreateOrUpdateProperties() - { - PrivateLinkConfigurations = new ChangeTrackingList(); - } - - /// The version of the cluster. - public string ClusterVersion { get; set; } - /// The type of operating system. - public HDInsightOSType? OSType { get; set; } - /// The cluster tier. - public HDInsightTier? Tier { get; set; } - /// The cluster definition. - public HDInsightClusterDefinition ClusterDefinition { get; set; } - /// The cluster kafka rest proxy configuration. - public KafkaRestProperties KafkaRestProperties { get; set; } - /// The security profile. - public HDInsightSecurityProfile SecurityProfile { get; set; } - /// The compute profile. - internal ComputeProfile ComputeProfile { get; set; } - /// The list of roles in the cluster. - public IList ComputeRoles - { - get - { - if (ComputeProfile is null) - ComputeProfile = new ComputeProfile(); - return ComputeProfile.Roles; - } - } - - /// The storage profile. - internal StorageProfile StorageProfile { get; set; } - /// The list of storage accounts in the cluster. - public IList StorageAccounts - { - get - { - if (StorageProfile is null) - StorageProfile = new StorageProfile(); - return StorageProfile.StorageAccounts; - } - } - - /// The disk encryption properties. - public HDInsightDiskEncryptionProperties DiskEncryptionProperties { get; set; } - /// The encryption-in-transit properties. - internal EncryptionInTransitProperties EncryptionInTransitProperties { get; set; } - /// Indicates whether or not inter cluster node communication is encrypted in transit. - public bool? IsEncryptionInTransitEnabled - { - get => EncryptionInTransitProperties is null ? default : EncryptionInTransitProperties.IsEncryptionInTransitEnabled; - set - { - if (EncryptionInTransitProperties is null) - EncryptionInTransitProperties = new EncryptionInTransitProperties(); - EncryptionInTransitProperties.IsEncryptionInTransitEnabled = value; - } - } - - /// The minimal supported tls version. - public string MinSupportedTlsVersion { get; set; } - /// The network properties. - public HDInsightClusterNetworkProperties NetworkProperties { get; set; } - /// The compute isolation properties. - public HDInsightComputeIsolationProperties ComputeIsolationProperties { get; set; } - /// The private link configurations. - public IList PrivateLinkConfigurations { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateContent.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateContent.Serialization.cs deleted file mode 100644 index 10583187d739..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateContent.Serialization.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterCreationValidateContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ClusterCreateRequestValidationParametersType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ClusterCreateRequestValidationParametersType); - } - if (Optional.IsDefined(TenantId)) - { - writer.WritePropertyName("tenantId"u8); - writer.WriteStringValue(TenantId.Value); - } - if (Optional.IsDefined(FetchAaddsResource)) - { - writer.WritePropertyName("fetchAaddsResource"u8); - writer.WriteBooleanValue(FetchAaddsResource.Value); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Zones)) - { - writer.WritePropertyName("zones"u8); - writer.WriteStartArray(); - foreach (var item in Zones) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - JsonSerializer.Serialize(writer, Identity); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateContent.cs deleted file mode 100644 index 448293ecb3bf..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateContent.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The cluster create request specification. - public partial class HDInsightClusterCreationValidateContent : HDInsightClusterCreateOrUpdateContent - { - /// Initializes a new instance of HDInsightClusterCreationValidateContent. - public HDInsightClusterCreationValidateContent() - { - } - - /// The cluster name. - public string Name { get; set; } - /// The resource type. - public string ClusterCreateRequestValidationParametersType { get; set; } - /// The tenant id. - public Guid? TenantId { get; set; } - /// This indicates whether fetch Aadds resource or not. - public bool? FetchAaddsResource { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateResult.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateResult.Serialization.cs deleted file mode 100644 index 135af974f45d..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateResult.Serialization.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterCreationValidateResult - { - internal static HDInsightClusterCreationValidateResult DeserializeHDInsightClusterCreationValidateResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> validationErrors = default; - Optional> validationWarnings = default; - Optional estimatedCreationDuration = default; - Optional> aaddsResourcesDetails = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("validationErrors"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightClusterValidationErrorInfo.DeserializeHDInsightClusterValidationErrorInfo(item)); - } - validationErrors = array; - continue; - } - if (property.NameEquals("validationWarnings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightClusterValidationErrorInfo.DeserializeHDInsightClusterValidationErrorInfo(item)); - } - validationWarnings = array; - continue; - } - if (property.NameEquals("estimatedCreationDuration"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - estimatedCreationDuration = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("aaddsResourcesDetails"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightClusterAaddsDetail.DeserializeHDInsightClusterAaddsDetail(item)); - } - aaddsResourcesDetails = array; - continue; - } - } - return new HDInsightClusterCreationValidateResult(Optional.ToList(validationErrors), Optional.ToList(validationWarnings), Optional.ToNullable(estimatedCreationDuration), Optional.ToList(aaddsResourcesDetails)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateResult.cs deleted file mode 100644 index 18d36b6ec569..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterCreationValidateResult.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The response of cluster create request validation. - public partial class HDInsightClusterCreationValidateResult - { - /// Initializes a new instance of HDInsightClusterCreationValidateResult. - internal HDInsightClusterCreationValidateResult() - { - ValidationErrors = new ChangeTrackingList(); - ValidationWarnings = new ChangeTrackingList(); - AaddsResourcesDetails = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightClusterCreationValidateResult. - /// The validation errors. - /// The validation warnings. - /// The estimated creation duration. - /// The Azure active directory domain service resource details. - internal HDInsightClusterCreationValidateResult(IReadOnlyList validationErrors, IReadOnlyList validationWarnings, TimeSpan? estimatedCreationDuration, IReadOnlyList aaddsResourcesDetails) - { - ValidationErrors = validationErrors; - ValidationWarnings = validationWarnings; - EstimatedCreationDuration = estimatedCreationDuration; - AaddsResourcesDetails = aaddsResourcesDetails; - } - - /// The validation errors. - public IReadOnlyList ValidationErrors { get; } - /// The validation warnings. - public IReadOnlyList ValidationWarnings { get; } - /// The estimated creation duration. - public TimeSpan? EstimatedCreationDuration { get; } - /// The Azure active directory domain service resource details. - public IReadOnlyList AaddsResourcesDetails { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterData.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterData.Serialization.cs index 2a8983be2169..0c7f627b0429 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterData.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterData.Serialization.cs @@ -7,7 +7,6 @@ using System.Collections.Generic; using System.Text.Json; -using Azure; using Azure.Core; using Azure.ResourceManager.HDInsight.Models; using Azure.ResourceManager.Models; @@ -19,31 +18,6 @@ public partial class HDInsightClusterData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } - if (Optional.IsCollectionDefined(Zones)) - { - writer.WritePropertyName("zones"u8); - writer.WriteStartArray(); - foreach (var item in Zones) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - JsonSerializer.Serialize(writer, Identity); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -57,6 +31,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("location"u8); writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ClusterType)) + { + writer.WritePropertyName("clusterType"u8); + writer.WriteStringValue(ClusterType); + } + if (Optional.IsDefined(ComputeProfile)) + { + writer.WritePropertyName("computeProfile"u8); + writer.WriteObjectValue(ComputeProfile); + } + if (Optional.IsDefined(ClusterProfile)) + { + writer.WritePropertyName("clusterProfile"u8); + writer.WriteObjectValue(ClusterProfile); + } + writer.WriteEndObject(); writer.WriteEndObject(); } @@ -66,59 +58,20 @@ internal static HDInsightClusterData DeserializeHDInsightClusterData(JsonElement { return null; } - Optional etag = default; - Optional> zones = default; - Optional properties = default; - Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional systemData = default; + Optional provisioningState = default; + Optional clusterType = default; + Optional deploymentId = default; + Optional computeProfile = default; + Optional clusterProfile = default; + Optional status = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); - continue; - } - if (property.NameEquals("zones"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - zones = array; - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = HDInsightClusterProperties.DeserializeHDInsightClusterProperties(property.Value); - continue; - } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - identity = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -162,8 +115,62 @@ internal static HDInsightClusterData DeserializeHDInsightClusterData(JsonElement systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("clusterType"u8)) + { + clusterType = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("deploymentId"u8)) + { + deploymentId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("computeProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeProfile = ComputeProfile.DeserializeComputeProfile(property0.Value); + continue; + } + if (property0.NameEquals("clusterProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterProfile = ClusterProfile.DeserializeClusterProfile(property0.Value); + continue; + } + if (property0.NameEquals("status"u8)) + { + status = property0.Value.GetString(); + continue; + } + } + continue; + } } - return new HDInsightClusterData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(etag), Optional.ToList(zones), properties.Value, identity); + return new HDInsightClusterData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(provisioningState), clusterType.Value, deploymentId.Value, computeProfile.Value, clusterProfile.Value, status.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDataDiskGroup.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDataDiskGroup.Serialization.cs deleted file mode 100644 index 5d7291fb5050..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDataDiskGroup.Serialization.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterDataDiskGroup : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DisksPerNode)) - { - writer.WritePropertyName("disksPerNode"u8); - writer.WriteNumberValue(DisksPerNode.Value); - } - writer.WriteEndObject(); - } - - internal static HDInsightClusterDataDiskGroup DeserializeHDInsightClusterDataDiskGroup(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional disksPerNode = default; - Optional storageAccountType = default; - Optional diskSizeGB = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("disksPerNode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - disksPerNode = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("storageAccountType"u8)) - { - storageAccountType = property.Value.GetString(); - continue; - } - if (property.NameEquals("diskSizeGB"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - diskSizeGB = property.Value.GetInt32(); - continue; - } - } - return new HDInsightClusterDataDiskGroup(Optional.ToNullable(disksPerNode), storageAccountType.Value, Optional.ToNullable(diskSizeGB)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDataDiskGroup.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDataDiskGroup.cs deleted file mode 100644 index 7e424401e0db..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDataDiskGroup.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The data disks groups for the role. - public partial class HDInsightClusterDataDiskGroup - { - /// Initializes a new instance of HDInsightClusterDataDiskGroup. - public HDInsightClusterDataDiskGroup() - { - } - - /// Initializes a new instance of HDInsightClusterDataDiskGroup. - /// The number of disks per node. - /// ReadOnly. The storage account type. Do not set this value. - /// ReadOnly. The DiskSize in GB. Do not set this value. - internal HDInsightClusterDataDiskGroup(int? disksPerNode, string storageAccountType, int? diskSizeInGB) - { - DisksPerNode = disksPerNode; - StorageAccountType = storageAccountType; - DiskSizeInGB = diskSizeInGB; - } - - /// The number of disks per node. - public int? DisksPerNode { get; set; } - /// ReadOnly. The storage account type. Do not set this value. - public string StorageAccountType { get; } - /// ReadOnly. The DiskSize in GB. Do not set this value. - public int? DiskSizeInGB { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDefinition.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDefinition.Serialization.cs deleted file mode 100644 index b35809f15345..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDefinition.Serialization.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterDefinition : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Blueprint)) - { - writer.WritePropertyName("blueprint"u8); - writer.WriteStringValue(Blueprint); - } - if (Optional.IsDefined(Kind)) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - } - if (Optional.IsCollectionDefined(ComponentVersion)) - { - writer.WritePropertyName("componentVersion"u8); - writer.WriteStartObject(); - foreach (var item in ComponentVersion) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Configurations)) - { - writer.WritePropertyName("configurations"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Configurations); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Configurations.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - - internal static HDInsightClusterDefinition DeserializeHDInsightClusterDefinition(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional blueprint = default; - Optional kind = default; - Optional> componentVersion = default; - Optional configurations = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("blueprint"u8)) - { - blueprint = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = property.Value.GetString(); - continue; - } - if (property.NameEquals("componentVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - componentVersion = dictionary; - continue; - } - if (property.NameEquals("configurations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - configurations = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - } - return new HDInsightClusterDefinition(blueprint.Value, kind.Value, Optional.ToDictionary(componentVersion), configurations.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDefinition.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDefinition.cs deleted file mode 100644 index 82d683e02817..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDefinition.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The cluster definition. - public partial class HDInsightClusterDefinition - { - /// Initializes a new instance of HDInsightClusterDefinition. - public HDInsightClusterDefinition() - { - ComponentVersion = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of HDInsightClusterDefinition. - /// The link to the blueprint. - /// The type of cluster. - /// The versions of different services in the cluster. - /// The cluster configurations. - internal HDInsightClusterDefinition(string blueprint, string kind, IDictionary componentVersion, BinaryData configurations) - { - Blueprint = blueprint; - Kind = kind; - ComponentVersion = componentVersion; - Configurations = configurations; - } - - /// The link to the blueprint. - public string Blueprint { get; set; } - /// The type of cluster. - public string Kind { get; set; } - /// The versions of different services in the cluster. - public IDictionary ComponentVersion { get; } - /// - /// The cluster configurations. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Configurations { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDiskEncryptionContent.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDiskEncryptionContent.Serialization.cs deleted file mode 100644 index 6c08bab001c3..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDiskEncryptionContent.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterDiskEncryptionContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(VaultUri)) - { - writer.WritePropertyName("vaultUri"u8); - writer.WriteStringValue(VaultUri.AbsoluteUri); - } - if (Optional.IsDefined(KeyName)) - { - writer.WritePropertyName("keyName"u8); - writer.WriteStringValue(KeyName); - } - if (Optional.IsDefined(KeyVersion)) - { - writer.WritePropertyName("keyVersion"u8); - writer.WriteStringValue(KeyVersion); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDiskEncryptionContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDiskEncryptionContent.cs deleted file mode 100644 index 3e4e64547e25..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterDiskEncryptionContent.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The Disk Encryption Cluster request parameters. - public partial class HDInsightClusterDiskEncryptionContent - { - /// Initializes a new instance of HDInsightClusterDiskEncryptionContent. - public HDInsightClusterDiskEncryptionContent() - { - } - - /// Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net. - public Uri VaultUri { get; set; } - /// Key name that is used for enabling disk encryption. - public string KeyName { get; set; } - /// Specific key version that is used for enabling disk encryption. - public string KeyVersion { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterEnableClusterMonitoringContent.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterEnableClusterMonitoringContent.Serialization.cs deleted file mode 100644 index bc86ca75c542..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterEnableClusterMonitoringContent.Serialization.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterEnableClusterMonitoringContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(WorkspaceId)) - { - writer.WritePropertyName("workspaceId"u8); - writer.WriteStringValue(WorkspaceId); - } - if (Optional.IsDefined(PrimaryKey)) - { - writer.WritePropertyName("primaryKey"u8); - writer.WriteStringValue(PrimaryKey); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterEnableClusterMonitoringContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterEnableClusterMonitoringContent.cs deleted file mode 100644 index fbd8769554ab..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterEnableClusterMonitoringContent.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The cluster monitor parameters. - public partial class HDInsightClusterEnableClusterMonitoringContent - { - /// Initializes a new instance of HDInsightClusterEnableClusterMonitoringContent. - public HDInsightClusterEnableClusterMonitoringContent() - { - } - - /// The cluster monitor workspace ID. - public string WorkspaceId { get; set; } - /// The cluster monitor workspace key. - public string PrimaryKey { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterExtensionStatus.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterExtensionStatus.Serialization.cs deleted file mode 100644 index 191422b30d62..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterExtensionStatus.Serialization.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterExtensionStatus - { - internal static HDInsightClusterExtensionStatus DeserializeHDInsightClusterExtensionStatus(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional clusterMonitoringEnabled = default; - Optional workspaceId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("clusterMonitoringEnabled"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clusterMonitoringEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("workspaceId"u8)) - { - workspaceId = property.Value.GetString(); - continue; - } - } - return new HDInsightClusterExtensionStatus(Optional.ToNullable(clusterMonitoringEnabled), workspaceId.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterExtensionStatus.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterExtensionStatus.cs deleted file mode 100644 index 47e17112b29b..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterExtensionStatus.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The cluster monitoring status response. - public partial class HDInsightClusterExtensionStatus - { - /// Initializes a new instance of HDInsightClusterExtensionStatus. - internal HDInsightClusterExtensionStatus() - { - } - - /// Initializes a new instance of HDInsightClusterExtensionStatus. - /// The status of the monitor on the HDInsight cluster. - /// The workspace ID of the monitor on the HDInsight cluster. - internal HDInsightClusterExtensionStatus(bool? isClusterMonitoringEnabled, string workspaceId) - { - IsClusterMonitoringEnabled = isClusterMonitoringEnabled; - WorkspaceId = workspaceId; - } - - /// The status of the monitor on the HDInsight cluster. - public bool? IsClusterMonitoringEnabled { get; } - /// The workspace ID of the monitor on the HDInsight cluster. - public string WorkspaceId { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterHostInfo.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterHostInfo.Serialization.cs deleted file mode 100644 index 2a6c1082ca5e..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterHostInfo.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterHostInfo - { - internal static HDInsightClusterHostInfo DeserializeHDInsightClusterHostInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional fqdn = default; - Optional effectiveDiskEncryptionKeyUrl = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("fqdn"u8)) - { - fqdn = property.Value.GetString(); - continue; - } - if (property.NameEquals("effectiveDiskEncryptionKeyUrl"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - effectiveDiskEncryptionKeyUrl = new Uri(property.Value.GetString()); - continue; - } - } - return new HDInsightClusterHostInfo(name.Value, fqdn.Value, effectiveDiskEncryptionKeyUrl.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterHostInfo.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterHostInfo.cs deleted file mode 100644 index 85457c012452..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterHostInfo.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The cluster host information. - public partial class HDInsightClusterHostInfo - { - /// Initializes a new instance of HDInsightClusterHostInfo. - internal HDInsightClusterHostInfo() - { - } - - /// Initializes a new instance of HDInsightClusterHostInfo. - /// The host name. - /// The Fully Qualified Domain Name of host. - /// The effective disk encryption key URL used by the host. - internal HDInsightClusterHostInfo(string name, string fqdn, Uri effectiveDiskEncryptionKeyUri) - { - Name = name; - Fqdn = fqdn; - EffectiveDiskEncryptionKeyUri = effectiveDiskEncryptionKeyUri; - } - - /// The host name. - public string Name { get; } - /// The Fully Qualified Domain Name of host. - public string Fqdn { get; } - /// The effective disk encryption key URL used by the host. - public Uri EffectiveDiskEncryptionKeyUri { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterNetworkProperties.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterNetworkProperties.Serialization.cs deleted file mode 100644 index 1f05553c9da3..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterNetworkProperties.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterNetworkProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceProviderConnection)) - { - writer.WritePropertyName("resourceProviderConnection"u8); - writer.WriteStringValue(ResourceProviderConnection.Value.ToString()); - } - if (Optional.IsDefined(PrivateLink)) - { - writer.WritePropertyName("privateLink"u8); - writer.WriteStringValue(PrivateLink.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static HDInsightClusterNetworkProperties DeserializeHDInsightClusterNetworkProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional resourceProviderConnection = default; - Optional privateLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("resourceProviderConnection"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resourceProviderConnection = new HDInsightResourceProviderConnection(property.Value.GetString()); - continue; - } - if (property.NameEquals("privateLink"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateLink = new HDInsightPrivateLinkState(property.Value.GetString()); - continue; - } - } - return new HDInsightClusterNetworkProperties(Optional.ToNullable(resourceProviderConnection), Optional.ToNullable(privateLink)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterNetworkProperties.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterNetworkProperties.cs deleted file mode 100644 index fbadff9303bf..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterNetworkProperties.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The network properties. - public partial class HDInsightClusterNetworkProperties - { - /// Initializes a new instance of HDInsightClusterNetworkProperties. - public HDInsightClusterNetworkProperties() - { - } - - /// Initializes a new instance of HDInsightClusterNetworkProperties. - /// The direction for the resource provider connection. - /// Indicates whether or not private link is enabled. - internal HDInsightClusterNetworkProperties(HDInsightResourceProviderConnection? resourceProviderConnection, HDInsightPrivateLinkState? privateLink) - { - ResourceProviderConnection = resourceProviderConnection; - PrivateLink = privateLink; - } - - /// The direction for the resource provider connection. - public HDInsightResourceProviderConnection? ResourceProviderConnection { get; set; } - /// Indicates whether or not private link is enabled. - public HDInsightPrivateLinkState? PrivateLink { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterPatch.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterPatch.Serialization.cs index c3d0f5f16035..0003d66795f0 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterPatch.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterPatch.Serialization.cs @@ -5,8 +5,10 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.HDInsight.Models { @@ -17,23 +19,109 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); if (Optional.IsCollectionDefined(Tags)) { - if (Tags != null) + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ClusterProfile)) + { + writer.WritePropertyName("clusterProfile"u8); + writer.WriteObjectValue(ClusterProfile); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static HDInsightClusterPatch DeserializeHDInsightClusterPatch(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional clusterProfile = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + dictionary.Add(property0.Name, property0.Value.GetString()); } - writer.WriteEndObject(); + tags = dictionary; + continue; } - else + if (property.NameEquals("location"u8)) { - writer.WriteNull("tags"); + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("clusterProfile"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterProfile = UpdatableClusterProfile.DeserializeUpdatableClusterProfile(property0.Value); + continue; + } + } + continue; } } - writer.WriteEndObject(); + return new HDInsightClusterPatch(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, clusterProfile.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterPatch.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterPatch.cs index b98ecc6e6d92..8af2354355fc 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterPatch.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterPatch.cs @@ -7,19 +7,33 @@ using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.HDInsight.Models { - /// The PatchCluster request parameters. - public partial class HDInsightClusterPatch + /// The patch for a cluster. + public partial class HDInsightClusterPatch : TrackedResourceData { /// Initializes a new instance of HDInsightClusterPatch. - public HDInsightClusterPatch() + /// The location. + public HDInsightClusterPatch(AzureLocation location) : base(location) { - Tags = new ChangeTrackingDictionary(); } - /// The resource tags. - public IDictionary Tags { get; set; } + /// Initializes a new instance of HDInsightClusterPatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Cluster resource patch properties. + internal HDInsightClusterPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, UpdatableClusterProfile clusterProfile) : base(id, name, resourceType, systemData, tags, location) + { + ClusterProfile = clusterProfile; + } + + /// Cluster resource patch properties. + public UpdatableClusterProfile ClusterProfile { get; set; } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterProperties.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterProperties.Serialization.cs deleted file mode 100644 index 323f5fac9962..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterProperties.Serialization.cs +++ /dev/null @@ -1,400 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure; -using Azure.Core; -using Azure.ResourceManager.HDInsight; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ClusterVersion)) - { - writer.WritePropertyName("clusterVersion"u8); - writer.WriteStringValue(ClusterVersion); - } - if (Optional.IsDefined(ClusterHdpVersion)) - { - writer.WritePropertyName("clusterHdpVersion"u8); - writer.WriteStringValue(ClusterHdpVersion); - } - if (Optional.IsDefined(OSType)) - { - writer.WritePropertyName("osType"u8); - writer.WriteStringValue(OSType.Value.ToString()); - } - if (Optional.IsDefined(Tier)) - { - writer.WritePropertyName("tier"u8); - writer.WriteStringValue(Tier.Value.ToString()); - } - if (Optional.IsDefined(ClusterId)) - { - writer.WritePropertyName("clusterId"u8); - writer.WriteStringValue(ClusterId); - } - writer.WritePropertyName("clusterDefinition"u8); - writer.WriteObjectValue(ClusterDefinition); - if (Optional.IsDefined(KafkaRestProperties)) - { - writer.WritePropertyName("kafkaRestProperties"u8); - writer.WriteObjectValue(KafkaRestProperties); - } - if (Optional.IsDefined(SecurityProfile)) - { - writer.WritePropertyName("securityProfile"u8); - writer.WriteObjectValue(SecurityProfile); - } - if (Optional.IsDefined(ComputeProfile)) - { - writer.WritePropertyName("computeProfile"u8); - writer.WriteObjectValue(ComputeProfile); - } - if (Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("createdDate"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - if (Optional.IsDefined(ClusterState)) - { - writer.WritePropertyName("clusterState"u8); - writer.WriteStringValue(ClusterState); - } - if (Optional.IsDefined(QuotaInfo)) - { - writer.WritePropertyName("quotaInfo"u8); - writer.WriteObjectValue(QuotaInfo); - } - if (Optional.IsCollectionDefined(Errors)) - { - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ConnectivityEndpoints)) - { - writer.WritePropertyName("connectivityEndpoints"u8); - writer.WriteStartArray(); - foreach (var item in ConnectivityEndpoints) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(DiskEncryptionProperties)) - { - writer.WritePropertyName("diskEncryptionProperties"u8); - writer.WriteObjectValue(DiskEncryptionProperties); - } - if (Optional.IsDefined(EncryptionInTransitProperties)) - { - writer.WritePropertyName("encryptionInTransitProperties"u8); - writer.WriteObjectValue(EncryptionInTransitProperties); - } - if (Optional.IsDefined(StorageProfile)) - { - writer.WritePropertyName("storageProfile"u8); - writer.WriteObjectValue(StorageProfile); - } - if (Optional.IsDefined(MinSupportedTlsVersion)) - { - writer.WritePropertyName("minSupportedTlsVersion"u8); - writer.WriteStringValue(MinSupportedTlsVersion); - } - if (Optional.IsDefined(ExcludedServicesConfig)) - { - writer.WritePropertyName("excludedServicesConfig"u8); - writer.WriteObjectValue(ExcludedServicesConfig); - } - if (Optional.IsDefined(NetworkProperties)) - { - writer.WritePropertyName("networkProperties"u8); - writer.WriteObjectValue(NetworkProperties); - } - if (Optional.IsDefined(ComputeIsolationProperties)) - { - writer.WritePropertyName("computeIsolationProperties"u8); - writer.WriteObjectValue(ComputeIsolationProperties); - } - if (Optional.IsCollectionDefined(PrivateLinkConfigurations)) - { - writer.WritePropertyName("privateLinkConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in PrivateLinkConfigurations) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static HDInsightClusterProperties DeserializeHDInsightClusterProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional clusterVersion = default; - Optional clusterHdpVersion = default; - Optional osType = default; - Optional tier = default; - Optional clusterId = default; - HDInsightClusterDefinition clusterDefinition = default; - Optional kafkaRestProperties = default; - Optional securityProfile = default; - Optional computeProfile = default; - Optional provisioningState = default; - Optional createdDate = default; - Optional clusterState = default; - Optional quotaInfo = default; - Optional> errors = default; - Optional> connectivityEndpoints = default; - Optional diskEncryptionProperties = default; - Optional encryptionInTransitProperties = default; - Optional storageProfile = default; - Optional minSupportedTlsVersion = default; - Optional excludedServicesConfig = default; - Optional networkProperties = default; - Optional computeIsolationProperties = default; - Optional> privateLinkConfigurations = default; - Optional> privateEndpointConnections = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("clusterVersion"u8)) - { - clusterVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("clusterHdpVersion"u8)) - { - clusterHdpVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("osType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - osType = new HDInsightOSType(property.Value.GetString()); - continue; - } - if (property.NameEquals("tier"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tier = new HDInsightTier(property.Value.GetString()); - continue; - } - if (property.NameEquals("clusterId"u8)) - { - clusterId = property.Value.GetString(); - continue; - } - if (property.NameEquals("clusterDefinition"u8)) - { - clusterDefinition = HDInsightClusterDefinition.DeserializeHDInsightClusterDefinition(property.Value); - continue; - } - if (property.NameEquals("kafkaRestProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - kafkaRestProperties = KafkaRestProperties.DeserializeKafkaRestProperties(property.Value); - continue; - } - if (property.NameEquals("securityProfile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - securityProfile = HDInsightSecurityProfile.DeserializeHDInsightSecurityProfile(property.Value); - continue; - } - if (property.NameEquals("computeProfile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - computeProfile = ComputeProfile.DeserializeComputeProfile(property.Value); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new HDInsightClusterProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("createdDate"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createdDate = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("clusterState"u8)) - { - clusterState = property.Value.GetString(); - continue; - } - if (property.NameEquals("quotaInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - quotaInfo = QuotaInfo.DeserializeQuotaInfo(property.Value); - continue; - } - if (property.NameEquals("errors"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); - } - errors = array; - continue; - } - if (property.NameEquals("connectivityEndpoints"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConnectivityEndpoint.DeserializeConnectivityEndpoint(item)); - } - connectivityEndpoints = array; - continue; - } - if (property.NameEquals("diskEncryptionProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - diskEncryptionProperties = HDInsightDiskEncryptionProperties.DeserializeHDInsightDiskEncryptionProperties(property.Value); - continue; - } - if (property.NameEquals("encryptionInTransitProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - encryptionInTransitProperties = EncryptionInTransitProperties.DeserializeEncryptionInTransitProperties(property.Value); - continue; - } - if (property.NameEquals("storageProfile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storageProfile = StorageProfile.DeserializeStorageProfile(property.Value); - continue; - } - if (property.NameEquals("minSupportedTlsVersion"u8)) - { - minSupportedTlsVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("excludedServicesConfig"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - excludedServicesConfig = ExcludedServicesConfig.DeserializeExcludedServicesConfig(property.Value); - continue; - } - if (property.NameEquals("networkProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - networkProperties = HDInsightClusterNetworkProperties.DeserializeHDInsightClusterNetworkProperties(property.Value); - continue; - } - if (property.NameEquals("computeIsolationProperties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - computeIsolationProperties = HDInsightComputeIsolationProperties.DeserializeHDInsightComputeIsolationProperties(property.Value); - continue; - } - if (property.NameEquals("privateLinkConfigurations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightPrivateLinkConfiguration.DeserializeHDInsightPrivateLinkConfiguration(item)); - } - privateLinkConfigurations = array; - continue; - } - if (property.NameEquals("privateEndpointConnections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightPrivateEndpointConnectionData.DeserializeHDInsightPrivateEndpointConnectionData(item)); - } - privateEndpointConnections = array; - continue; - } - } - return new HDInsightClusterProperties(clusterVersion.Value, clusterHdpVersion.Value, Optional.ToNullable(osType), Optional.ToNullable(tier), clusterId.Value, clusterDefinition, kafkaRestProperties.Value, securityProfile.Value, computeProfile.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(createdDate), clusterState.Value, quotaInfo.Value, Optional.ToList(errors), Optional.ToList(connectivityEndpoints), diskEncryptionProperties.Value, encryptionInTransitProperties.Value, storageProfile.Value, minSupportedTlsVersion.Value, excludedServicesConfig.Value, networkProperties.Value, computeIsolationProperties.Value, Optional.ToList(privateLinkConfigurations), Optional.ToList(privateEndpointConnections)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterProperties.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterProperties.cs deleted file mode 100644 index 3ad9e63ee811..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterProperties.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure; -using Azure.Core; -using Azure.ResourceManager.HDInsight; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The properties of cluster. - public partial class HDInsightClusterProperties - { - /// Initializes a new instance of HDInsightClusterProperties. - /// The cluster definition. - /// is null. - public HDInsightClusterProperties(HDInsightClusterDefinition clusterDefinition) - { - Argument.AssertNotNull(clusterDefinition, nameof(clusterDefinition)); - - ClusterDefinition = clusterDefinition; - Errors = new ChangeTrackingList(); - ConnectivityEndpoints = new ChangeTrackingList(); - PrivateLinkConfigurations = new ChangeTrackingList(); - PrivateEndpointConnections = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightClusterProperties. - /// The version of the cluster. - /// The hdp version of the cluster. - /// The type of operating system. - /// The cluster tier. - /// The cluster id. - /// The cluster definition. - /// The cluster kafka rest proxy configuration. - /// The security profile. - /// The compute profile. - /// The provisioning state, which only appears in the response. - /// The date on which the cluster was created. - /// The state of the cluster. - /// The quota information. - /// The list of errors. - /// The list of connectivity endpoints. - /// The disk encryption properties. - /// The encryption-in-transit properties. - /// The storage profile. - /// The minimal supported tls version. - /// The excluded services config. - /// The network properties. - /// The compute isolation properties. - /// The private link configurations. - /// The list of private endpoint connections. - internal HDInsightClusterProperties(string clusterVersion, string clusterHdpVersion, HDInsightOSType? osType, HDInsightTier? tier, string clusterId, HDInsightClusterDefinition clusterDefinition, KafkaRestProperties kafkaRestProperties, HDInsightSecurityProfile securityProfile, ComputeProfile computeProfile, HDInsightClusterProvisioningState? provisioningState, DateTimeOffset? createdOn, string clusterState, QuotaInfo quotaInfo, IList errors, IList connectivityEndpoints, HDInsightDiskEncryptionProperties diskEncryptionProperties, EncryptionInTransitProperties encryptionInTransitProperties, StorageProfile storageProfile, string minSupportedTlsVersion, ExcludedServicesConfig excludedServicesConfig, HDInsightClusterNetworkProperties networkProperties, HDInsightComputeIsolationProperties computeIsolationProperties, IList privateLinkConfigurations, IReadOnlyList privateEndpointConnections) - { - ClusterVersion = clusterVersion; - ClusterHdpVersion = clusterHdpVersion; - OSType = osType; - Tier = tier; - ClusterId = clusterId; - ClusterDefinition = clusterDefinition; - KafkaRestProperties = kafkaRestProperties; - SecurityProfile = securityProfile; - ComputeProfile = computeProfile; - ProvisioningState = provisioningState; - CreatedOn = createdOn; - ClusterState = clusterState; - QuotaInfo = quotaInfo; - Errors = errors; - ConnectivityEndpoints = connectivityEndpoints; - DiskEncryptionProperties = diskEncryptionProperties; - EncryptionInTransitProperties = encryptionInTransitProperties; - StorageProfile = storageProfile; - MinSupportedTlsVersion = minSupportedTlsVersion; - ExcludedServicesConfig = excludedServicesConfig; - NetworkProperties = networkProperties; - ComputeIsolationProperties = computeIsolationProperties; - PrivateLinkConfigurations = privateLinkConfigurations; - PrivateEndpointConnections = privateEndpointConnections; - } - - /// The version of the cluster. - public string ClusterVersion { get; set; } - /// The hdp version of the cluster. - public string ClusterHdpVersion { get; set; } - /// The type of operating system. - public HDInsightOSType? OSType { get; set; } - /// The cluster tier. - public HDInsightTier? Tier { get; set; } - /// The cluster id. - public string ClusterId { get; set; } - /// The cluster definition. - public HDInsightClusterDefinition ClusterDefinition { get; set; } - /// The cluster kafka rest proxy configuration. - public KafkaRestProperties KafkaRestProperties { get; set; } - /// The security profile. - public HDInsightSecurityProfile SecurityProfile { get; set; } - /// The compute profile. - internal ComputeProfile ComputeProfile { get; set; } - /// The list of roles in the cluster. - public IList ComputeRoles - { - get - { - if (ComputeProfile is null) - ComputeProfile = new ComputeProfile(); - return ComputeProfile.Roles; - } - } - - /// The provisioning state, which only appears in the response. - public HDInsightClusterProvisioningState? ProvisioningState { get; set; } - /// The date on which the cluster was created. - public DateTimeOffset? CreatedOn { get; set; } - /// The state of the cluster. - public string ClusterState { get; set; } - /// The quota information. - internal QuotaInfo QuotaInfo { get; set; } - /// The cores used by the cluster. - public int? QuotaInfoCoresUsed - { - get => QuotaInfo is null ? default : QuotaInfo.CoresUsed; - set - { - if (QuotaInfo is null) - QuotaInfo = new QuotaInfo(); - QuotaInfo.CoresUsed = value; - } - } - - /// The list of errors. - public IList Errors { get; } - /// The list of connectivity endpoints. - public IList ConnectivityEndpoints { get; } - /// The disk encryption properties. - public HDInsightDiskEncryptionProperties DiskEncryptionProperties { get; set; } - /// The encryption-in-transit properties. - internal EncryptionInTransitProperties EncryptionInTransitProperties { get; set; } - /// Indicates whether or not inter cluster node communication is encrypted in transit. - public bool? IsEncryptionInTransitEnabled - { - get => EncryptionInTransitProperties is null ? default : EncryptionInTransitProperties.IsEncryptionInTransitEnabled; - set - { - if (EncryptionInTransitProperties is null) - EncryptionInTransitProperties = new EncryptionInTransitProperties(); - EncryptionInTransitProperties.IsEncryptionInTransitEnabled = value; - } - } - - /// The storage profile. - internal StorageProfile StorageProfile { get; set; } - /// The list of storage accounts in the cluster. - public IList StorageAccounts - { - get - { - if (StorageProfile is null) - StorageProfile = new StorageProfile(); - return StorageProfile.StorageAccounts; - } - } - - /// The minimal supported tls version. - public string MinSupportedTlsVersion { get; set; } - /// The excluded services config. - public ExcludedServicesConfig ExcludedServicesConfig { get; set; } - /// The network properties. - public HDInsightClusterNetworkProperties NetworkProperties { get; set; } - /// The compute isolation properties. - public HDInsightComputeIsolationProperties ComputeIsolationProperties { get; set; } - /// The private link configurations. - public IList PrivateLinkConfigurations { get; } - /// The list of private endpoint connections. - public IReadOnlyList PrivateEndpointConnections { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterProvisioningState.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterProvisioningState.cs deleted file mode 100644 index 8872ca1d9d68..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterProvisioningState.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The provisioning state, which only appears in the response. - public readonly partial struct HDInsightClusterProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightClusterProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "InProgress"; - private const string FailedValue = "Failed"; - private const string SucceededValue = "Succeeded"; - private const string CanceledValue = "Canceled"; - private const string DeletingValue = "Deleting"; - - /// InProgress. - public static HDInsightClusterProvisioningState InProgress { get; } = new HDInsightClusterProvisioningState(InProgressValue); - /// Failed. - public static HDInsightClusterProvisioningState Failed { get; } = new HDInsightClusterProvisioningState(FailedValue); - /// Succeeded. - public static HDInsightClusterProvisioningState Succeeded { get; } = new HDInsightClusterProvisioningState(SucceededValue); - /// Canceled. - public static HDInsightClusterProvisioningState Canceled { get; } = new HDInsightClusterProvisioningState(CanceledValue); - /// Deleting. - public static HDInsightClusterProvisioningState Deleting { get; } = new HDInsightClusterProvisioningState(DeletingValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightClusterProvisioningState left, HDInsightClusterProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightClusterProvisioningState left, HDInsightClusterProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightClusterProvisioningState(string value) => new HDInsightClusterProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightClusterProvisioningState other && Equals(other); - /// - public bool Equals(HDInsightClusterProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterResizeContent.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterResizeContent.Serialization.cs deleted file mode 100644 index 6d294b25a51d..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterResizeContent.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterResizeContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(TargetInstanceCount)) - { - writer.WritePropertyName("targetInstanceCount"u8); - writer.WriteNumberValue(TargetInstanceCount.Value); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterResizeContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterResizeContent.cs deleted file mode 100644 index 26097f7ab192..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterResizeContent.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The Resize Cluster request parameters. - public partial class HDInsightClusterResizeContent - { - /// Initializes a new instance of HDInsightClusterResizeContent. - public HDInsightClusterResizeContent() - { - } - - /// The target instance count for the operation. - public int? TargetInstanceCount { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterRole.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterRole.Serialization.cs deleted file mode 100644 index 9e54f3b1b537..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterRole.Serialization.cs +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterRole : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(MinInstanceCount)) - { - writer.WritePropertyName("minInstanceCount"u8); - writer.WriteNumberValue(MinInstanceCount.Value); - } - if (Optional.IsDefined(TargetInstanceCount)) - { - writer.WritePropertyName("targetInstanceCount"u8); - writer.WriteNumberValue(TargetInstanceCount.Value); - } - if (Optional.IsDefined(VmGroupName)) - { - writer.WritePropertyName("VMGroupName"u8); - writer.WriteStringValue(VmGroupName); - } - if (Optional.IsDefined(AutoScaleConfiguration)) - { - writer.WritePropertyName("autoscale"u8); - writer.WriteObjectValue(AutoScaleConfiguration); - } - if (Optional.IsDefined(HardwareProfile)) - { - writer.WritePropertyName("hardwareProfile"u8); - writer.WriteObjectValue(HardwareProfile); - } - if (Optional.IsDefined(OSProfile)) - { - writer.WritePropertyName("osProfile"u8); - writer.WriteObjectValue(OSProfile); - } - if (Optional.IsDefined(VirtualNetworkProfile)) - { - writer.WritePropertyName("virtualNetworkProfile"u8); - writer.WriteObjectValue(VirtualNetworkProfile); - } - if (Optional.IsCollectionDefined(DataDisksGroups)) - { - writer.WritePropertyName("dataDisksGroups"u8); - writer.WriteStartArray(); - foreach (var item in DataDisksGroups) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ScriptActions)) - { - writer.WritePropertyName("scriptActions"u8); - writer.WriteStartArray(); - foreach (var item in ScriptActions) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(EncryptDataDisks)) - { - writer.WritePropertyName("encryptDataDisks"u8); - writer.WriteBooleanValue(EncryptDataDisks.Value); - } - writer.WriteEndObject(); - } - - internal static HDInsightClusterRole DeserializeHDInsightClusterRole(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional minInstanceCount = default; - Optional targetInstanceCount = default; - Optional vmGroupName = default; - Optional autoScale = default; - Optional hardwareProfile = default; - Optional osProfile = default; - Optional virtualNetworkProfile = default; - Optional> dataDisksGroups = default; - Optional> scriptActions = default; - Optional encryptDataDisks = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("minInstanceCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - minInstanceCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("targetInstanceCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - targetInstanceCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("VMGroupName"u8)) - { - vmGroupName = property.Value.GetString(); - continue; - } - if (property.NameEquals("autoscale"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - autoScale = HDInsightAutoScaleConfiguration.DeserializeHDInsightAutoScaleConfiguration(property.Value); - continue; - } - if (property.NameEquals("hardwareProfile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hardwareProfile = HardwareProfile.DeserializeHardwareProfile(property.Value); - continue; - } - if (property.NameEquals("osProfile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - osProfile = OSProfile.DeserializeOSProfile(property.Value); - continue; - } - if (property.NameEquals("virtualNetworkProfile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - virtualNetworkProfile = HDInsightVirtualNetworkProfile.DeserializeHDInsightVirtualNetworkProfile(property.Value); - continue; - } - if (property.NameEquals("dataDisksGroups"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightClusterDataDiskGroup.DeserializeHDInsightClusterDataDiskGroup(item)); - } - dataDisksGroups = array; - continue; - } - if (property.NameEquals("scriptActions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ScriptAction.DeserializeScriptAction(item)); - } - scriptActions = array; - continue; - } - if (property.NameEquals("encryptDataDisks"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - encryptDataDisks = property.Value.GetBoolean(); - continue; - } - } - return new HDInsightClusterRole(name.Value, Optional.ToNullable(minInstanceCount), Optional.ToNullable(targetInstanceCount), vmGroupName.Value, autoScale.Value, hardwareProfile.Value, osProfile.Value, virtualNetworkProfile.Value, Optional.ToList(dataDisksGroups), Optional.ToList(scriptActions), Optional.ToNullable(encryptDataDisks)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterRole.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterRole.cs deleted file mode 100644 index d0ad11edc9b0..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterRole.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// Describes a role on the cluster. - public partial class HDInsightClusterRole - { - /// Initializes a new instance of HDInsightClusterRole. - public HDInsightClusterRole() - { - DataDisksGroups = new ChangeTrackingList(); - ScriptActions = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightClusterRole. - /// The name of the role. - /// The minimum instance count of the cluster. - /// The instance count of the cluster. - /// The name of the virtual machine group. - /// The autoscale configurations. - /// The hardware profile. - /// The operating system profile. - /// The virtual network profile. - /// The data disks groups for the role. - /// The list of script actions on the role. - /// Indicates whether encrypt the data disks. - internal HDInsightClusterRole(string name, int? minInstanceCount, int? targetInstanceCount, string vmGroupName, HDInsightAutoScaleConfiguration autoScaleConfiguration, HardwareProfile hardwareProfile, OSProfile osProfile, HDInsightVirtualNetworkProfile virtualNetworkProfile, IList dataDisksGroups, IList scriptActions, bool? encryptDataDisks) - { - Name = name; - MinInstanceCount = minInstanceCount; - TargetInstanceCount = targetInstanceCount; - VmGroupName = vmGroupName; - AutoScaleConfiguration = autoScaleConfiguration; - HardwareProfile = hardwareProfile; - OSProfile = osProfile; - VirtualNetworkProfile = virtualNetworkProfile; - DataDisksGroups = dataDisksGroups; - ScriptActions = scriptActions; - EncryptDataDisks = encryptDataDisks; - } - - /// The name of the role. - public string Name { get; set; } - /// The minimum instance count of the cluster. - public int? MinInstanceCount { get; set; } - /// The instance count of the cluster. - public int? TargetInstanceCount { get; set; } - /// The name of the virtual machine group. - public string VmGroupName { get; set; } - /// The autoscale configurations. - public HDInsightAutoScaleConfiguration AutoScaleConfiguration { get; set; } - /// The hardware profile. - internal HardwareProfile HardwareProfile { get; set; } - /// The size of the VM. - public string HardwareVmSize - { - get => HardwareProfile is null ? default : HardwareProfile.VmSize; - set - { - if (HardwareProfile is null) - HardwareProfile = new HardwareProfile(); - HardwareProfile.VmSize = value; - } - } - - /// The operating system profile. - internal OSProfile OSProfile { get; set; } - /// The Linux OS profile. - public HDInsightLinuxOSProfile OSLinuxProfile - { - get => OSProfile is null ? default : OSProfile.LinuxProfile; - set - { - if (OSProfile is null) - OSProfile = new OSProfile(); - OSProfile.LinuxProfile = value; - } - } - - /// The virtual network profile. - public HDInsightVirtualNetworkProfile VirtualNetworkProfile { get; set; } - /// The data disks groups for the role. - public IList DataDisksGroups { get; } - /// The list of script actions on the role. - public IList ScriptActions { get; } - /// Indicates whether encrypt the data disks. - public bool? EncryptDataDisks { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateGatewaySettingsContent.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateGatewaySettingsContent.Serialization.cs deleted file mode 100644 index b74c44762b8e..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateGatewaySettingsContent.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterUpdateGatewaySettingsContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IsCredentialEnabled)) - { - writer.WritePropertyName("restAuthCredential.isEnabled"u8); - writer.WriteBooleanValue(IsCredentialEnabled.Value); - } - if (Optional.IsDefined(UserName)) - { - writer.WritePropertyName("restAuthCredential.username"u8); - writer.WriteStringValue(UserName); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("restAuthCredential.password"u8); - writer.WriteStringValue(Password); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateGatewaySettingsContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateGatewaySettingsContent.cs deleted file mode 100644 index 275fb236f1a1..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateGatewaySettingsContent.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The update gateway settings request parameters. - public partial class HDInsightClusterUpdateGatewaySettingsContent - { - /// Initializes a new instance of HDInsightClusterUpdateGatewaySettingsContent. - public HDInsightClusterUpdateGatewaySettingsContent() - { - } - - /// Indicates whether or not the gateway settings based authorization is enabled. - public bool? IsCredentialEnabled { get; set; } - /// The gateway settings user name. - public string UserName { get; set; } - /// The gateway settings user password. - public string Password { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateIdentityCertificateContent.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateIdentityCertificateContent.Serialization.cs deleted file mode 100644 index cfe91ca6db4e..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateIdentityCertificateContent.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterUpdateIdentityCertificateContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ApplicationId)) - { - writer.WritePropertyName("applicationId"u8); - writer.WriteStringValue(ApplicationId); - } - if (Optional.IsDefined(Certificate)) - { - writer.WritePropertyName("certificate"u8); - writer.WriteStringValue(Certificate); - } - if (Optional.IsDefined(CertificatePassword)) - { - writer.WritePropertyName("certificatePassword"u8); - writer.WriteStringValue(CertificatePassword); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateIdentityCertificateContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateIdentityCertificateContent.cs deleted file mode 100644 index e838b53d57e2..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterUpdateIdentityCertificateContent.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The update cluster identity certificate request parameters. - public partial class HDInsightClusterUpdateIdentityCertificateContent - { - /// Initializes a new instance of HDInsightClusterUpdateIdentityCertificateContent. - public HDInsightClusterUpdateIdentityCertificateContent() - { - } - - /// The application id. - public string ApplicationId { get; set; } - /// The certificate in base64 encoded format. - public string Certificate { get; set; } - /// The password of the certificate. - public string CertificatePassword { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterValidationErrorInfo.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterValidationErrorInfo.Serialization.cs deleted file mode 100644 index 1ea35f7e1f9d..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterValidationErrorInfo.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightClusterValidationErrorInfo - { - internal static HDInsightClusterValidationErrorInfo DeserializeHDInsightClusterValidationErrorInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional code = default; - Optional message = default; - Optional errorResource = default; - Optional> messageArguments = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code"u8)) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - if (property.NameEquals("errorResource"u8)) - { - errorResource = property.Value.GetString(); - continue; - } - if (property.NameEquals("messageArguments"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - messageArguments = array; - continue; - } - } - return new HDInsightClusterValidationErrorInfo(code.Value, message.Value, errorResource.Value, Optional.ToList(messageArguments)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterValidationErrorInfo.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterValidationErrorInfo.cs deleted file mode 100644 index cdb5041ee49e..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightClusterValidationErrorInfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The validation error information. - public partial class HDInsightClusterValidationErrorInfo - { - /// Initializes a new instance of HDInsightClusterValidationErrorInfo. - internal HDInsightClusterValidationErrorInfo() - { - MessageArguments = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightClusterValidationErrorInfo. - /// The error code. - /// The error message. - /// The error resource. - /// The message arguments. - internal HDInsightClusterValidationErrorInfo(string code, string message, string errorResource, IReadOnlyList messageArguments) - { - Code = code; - Message = message; - ErrorResource = errorResource; - MessageArguments = messageArguments; - } - - /// The error code. - public string Code { get; } - /// The error message. - public string Message { get; } - /// The error resource. - public string ErrorResource { get; } - /// The message arguments. - public IReadOnlyList MessageArguments { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightComputeIsolationProperties.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightComputeIsolationProperties.Serialization.cs deleted file mode 100644 index da58805233a8..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightComputeIsolationProperties.Serialization.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightComputeIsolationProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(EnableComputeIsolation)) - { - writer.WritePropertyName("enableComputeIsolation"u8); - writer.WriteBooleanValue(EnableComputeIsolation.Value); - } - if (Optional.IsDefined(HostSku)) - { - writer.WritePropertyName("hostSku"u8); - writer.WriteStringValue(HostSku); - } - writer.WriteEndObject(); - } - - internal static HDInsightComputeIsolationProperties DeserializeHDInsightComputeIsolationProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional enableComputeIsolation = default; - Optional hostSku = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("enableComputeIsolation"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableComputeIsolation = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("hostSku"u8)) - { - hostSku = property.Value.GetString(); - continue; - } - } - return new HDInsightComputeIsolationProperties(Optional.ToNullable(enableComputeIsolation), hostSku.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightComputeIsolationProperties.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightComputeIsolationProperties.cs deleted file mode 100644 index a1a739779fd5..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightComputeIsolationProperties.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The compute isolation properties. - public partial class HDInsightComputeIsolationProperties - { - /// Initializes a new instance of HDInsightComputeIsolationProperties. - public HDInsightComputeIsolationProperties() - { - } - - /// Initializes a new instance of HDInsightComputeIsolationProperties. - /// The flag indicates whether enable compute isolation or not. - /// The host sku. - internal HDInsightComputeIsolationProperties(bool? enableComputeIsolation, string hostSku) - { - EnableComputeIsolation = enableComputeIsolation; - HostSku = hostSku; - } - - /// The flag indicates whether enable compute isolation or not. - public bool? EnableComputeIsolation { get; set; } - /// The host sku. - public string HostSku { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDayOfWeek.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDayOfWeek.cs deleted file mode 100644 index cec30da9f0e5..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDayOfWeek.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The HDInsightDayOfWeek. - public readonly partial struct HDInsightDayOfWeek : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightDayOfWeek(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MondayValue = "Monday"; - private const string TuesdayValue = "Tuesday"; - private const string WednesdayValue = "Wednesday"; - private const string ThursdayValue = "Thursday"; - private const string FridayValue = "Friday"; - private const string SaturdayValue = "Saturday"; - private const string SundayValue = "Sunday"; - - /// Monday. - public static HDInsightDayOfWeek Monday { get; } = new HDInsightDayOfWeek(MondayValue); - /// Tuesday. - public static HDInsightDayOfWeek Tuesday { get; } = new HDInsightDayOfWeek(TuesdayValue); - /// Wednesday. - public static HDInsightDayOfWeek Wednesday { get; } = new HDInsightDayOfWeek(WednesdayValue); - /// Thursday. - public static HDInsightDayOfWeek Thursday { get; } = new HDInsightDayOfWeek(ThursdayValue); - /// Friday. - public static HDInsightDayOfWeek Friday { get; } = new HDInsightDayOfWeek(FridayValue); - /// Saturday. - public static HDInsightDayOfWeek Saturday { get; } = new HDInsightDayOfWeek(SaturdayValue); - /// Sunday. - public static HDInsightDayOfWeek Sunday { get; } = new HDInsightDayOfWeek(SundayValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightDayOfWeek left, HDInsightDayOfWeek right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightDayOfWeek left, HDInsightDayOfWeek right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightDayOfWeek(string value) => new HDInsightDayOfWeek(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightDayOfWeek other && Equals(other); - /// - public bool Equals(HDInsightDayOfWeek other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskBillingMeters.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskBillingMeters.Serialization.cs deleted file mode 100644 index 957d5731ae1e..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskBillingMeters.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightDiskBillingMeters - { - internal static HDInsightDiskBillingMeters DeserializeHDInsightDiskBillingMeters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional diskRpMeter = default; - Optional sku = default; - Optional tier = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("diskRpMeter"u8)) - { - diskRpMeter = property.Value.GetString(); - continue; - } - if (property.NameEquals("sku"u8)) - { - sku = property.Value.GetString(); - continue; - } - if (property.NameEquals("tier"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tier = new HDInsightTier(property.Value.GetString()); - continue; - } - } - return new HDInsightDiskBillingMeters(diskRpMeter.Value, sku.Value, Optional.ToNullable(tier)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskBillingMeters.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskBillingMeters.cs deleted file mode 100644 index 56f3ffafbcf4..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskBillingMeters.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The disk billing meters. - public partial class HDInsightDiskBillingMeters - { - /// Initializes a new instance of HDInsightDiskBillingMeters. - internal HDInsightDiskBillingMeters() - { - } - - /// Initializes a new instance of HDInsightDiskBillingMeters. - /// The managed disk meter guid. - /// The managed disk billing sku, P30 or S30. - /// The managed disk billing tier, Standard or Premium. - internal HDInsightDiskBillingMeters(string diskRpMeter, string sku, HDInsightTier? tier) - { - DiskRpMeter = diskRpMeter; - Sku = sku; - Tier = tier; - } - - /// The managed disk meter guid. - public string DiskRpMeter { get; } - /// The managed disk billing sku, P30 or S30. - public string Sku { get; } - /// The managed disk billing tier, Standard or Premium. - public HDInsightTier? Tier { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.Serialization.cs deleted file mode 100644 index 847573783229..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.Serialization.cs +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightDiskEncryptionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(VaultUri)) - { - writer.WritePropertyName("vaultUri"u8); - writer.WriteStringValue(VaultUri.AbsoluteUri); - } - if (Optional.IsDefined(KeyName)) - { - writer.WritePropertyName("keyName"u8); - writer.WriteStringValue(KeyName); - } - if (Optional.IsDefined(KeyVersion)) - { - writer.WritePropertyName("keyVersion"u8); - writer.WriteStringValue(KeyVersion); - } - if (Optional.IsDefined(EncryptionAlgorithm)) - { - if (EncryptionAlgorithm != null) - { - writer.WritePropertyName("encryptionAlgorithm"u8); - writer.WriteStringValue(EncryptionAlgorithm.Value.ToString()); - } - else - { - writer.WriteNull("encryptionAlgorithm"); - } - } - if (Optional.IsDefined(MsiResourceId)) - { - if (MsiResourceId != null) - { - writer.WritePropertyName("msiResourceId"u8); - writer.WriteStringValue(MsiResourceId); - } - else - { - writer.WriteNull("msiResourceId"); - } - } - if (Optional.IsDefined(IsEncryptionAtHostEnabled)) - { - writer.WritePropertyName("encryptionAtHost"u8); - writer.WriteBooleanValue(IsEncryptionAtHostEnabled.Value); - } - writer.WriteEndObject(); - } - - internal static HDInsightDiskEncryptionProperties DeserializeHDInsightDiskEncryptionProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional vaultUri = default; - Optional keyName = default; - Optional keyVersion = default; - Optional encryptionAlgorithm = default; - Optional msiResourceId = default; - Optional encryptionAtHost = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vaultUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - vaultUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("keyName"u8)) - { - keyName = property.Value.GetString(); - continue; - } - if (property.NameEquals("keyVersion"u8)) - { - keyVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("encryptionAlgorithm"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - encryptionAlgorithm = null; - continue; - } - encryptionAlgorithm = new JsonWebKeyEncryptionAlgorithm(property.Value.GetString()); - continue; - } - if (property.NameEquals("msiResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - msiResourceId = null; - continue; - } - msiResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("encryptionAtHost"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - encryptionAtHost = property.Value.GetBoolean(); - continue; - } - } - return new HDInsightDiskEncryptionProperties(vaultUri.Value, keyName.Value, keyVersion.Value, Optional.ToNullable(encryptionAlgorithm), msiResourceId.Value, Optional.ToNullable(encryptionAtHost)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.cs deleted file mode 100644 index 258a3c46383f..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightDiskEncryptionProperties.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The disk encryption properties. - public partial class HDInsightDiskEncryptionProperties - { - /// Initializes a new instance of HDInsightDiskEncryptionProperties. - public HDInsightDiskEncryptionProperties() - { - } - - /// Initializes a new instance of HDInsightDiskEncryptionProperties. - /// Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net. - /// Key name that is used for enabling disk encryption. - /// Specific key version that is used for enabling disk encryption. - /// Algorithm identifier for encryption, default RSA-OAEP. - /// Resource ID of Managed Identity that is used to access the key vault. - /// Indicates whether or not resource disk encryption is enabled. - internal HDInsightDiskEncryptionProperties(Uri vaultUri, string keyName, string keyVersion, JsonWebKeyEncryptionAlgorithm? encryptionAlgorithm, ResourceIdentifier msiResourceId, bool? isEncryptionAtHostEnabled) - { - VaultUri = vaultUri; - KeyName = keyName; - KeyVersion = keyVersion; - EncryptionAlgorithm = encryptionAlgorithm; - MsiResourceId = msiResourceId; - IsEncryptionAtHostEnabled = isEncryptionAtHostEnabled; - } - - /// Base key vault URI where the customers key is located eg. https://myvault.vault.azure.net. - public Uri VaultUri { get; set; } - /// Key name that is used for enabling disk encryption. - public string KeyName { get; set; } - /// Specific key version that is used for enabling disk encryption. - public string KeyVersion { get; set; } - /// Algorithm identifier for encryption, default RSA-OAEP. - public JsonWebKeyEncryptionAlgorithm? EncryptionAlgorithm { get; set; } - /// Resource ID of Managed Identity that is used to access the key vault. - public ResourceIdentifier MsiResourceId { get; set; } - /// Indicates whether or not resource disk encryption is enabled. - public bool? IsEncryptionAtHostEnabled { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightFilterMode.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightFilterMode.cs deleted file mode 100644 index da8216ca3204..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightFilterMode.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. - public readonly partial struct HDInsightFilterMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightFilterMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ExcludeValue = "Exclude"; - private const string IncludeValue = "Include"; - private const string RecommendValue = "Recommend"; - private const string DefaultValue = "Default"; - - /// Exclude. - public static HDInsightFilterMode Exclude { get; } = new HDInsightFilterMode(ExcludeValue); - /// Include. - public static HDInsightFilterMode Include { get; } = new HDInsightFilterMode(IncludeValue); - /// Recommend. - public static HDInsightFilterMode Recommend { get; } = new HDInsightFilterMode(RecommendValue); - /// Default. - public static HDInsightFilterMode Default { get; } = new HDInsightFilterMode(DefaultValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightFilterMode left, HDInsightFilterMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightFilterMode left, HDInsightFilterMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightFilterMode(string value) => new HDInsightFilterMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightFilterMode other && Equals(other); - /// - public bool Equals(HDInsightFilterMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightIPConfiguration.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightIPConfiguration.Serialization.cs deleted file mode 100644 index a344ef79f29a..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightIPConfiguration.Serialization.cs +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Net; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightIPConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(IsPrimary)) - { - writer.WritePropertyName("primary"u8); - writer.WriteBooleanValue(IsPrimary.Value); - } - if (Optional.IsDefined(PrivateIPAddress)) - { - writer.WritePropertyName("privateIPAddress"u8); - writer.WriteStringValue(PrivateIPAddress.ToString()); - } - if (Optional.IsDefined(PrivateIPAllocationMethod)) - { - writer.WritePropertyName("privateIPAllocationMethod"u8); - writer.WriteStringValue(PrivateIPAllocationMethod.Value.ToString()); - } - if (Optional.IsDefined(Subnet)) - { - writer.WritePropertyName("subnet"u8); - JsonSerializer.Serialize(writer, Subnet); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static HDInsightIPConfiguration DeserializeHDInsightIPConfiguration(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional id = default; - string name = default; - Optional type = default; - Optional provisioningState = default; - Optional primary = default; - Optional privateIPAddress = default; - Optional privateIPAllocationMethod = default; - Optional subnet = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new HDInsightPrivateLinkConfigurationProvisioningState(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("primary"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - primary = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("privateIPAddress"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateIPAddress = IPAddress.Parse(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("privateIPAllocationMethod"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateIPAllocationMethod = new HDInsightPrivateIPAllocationMethod(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("subnet"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - subnet = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - } - continue; - } - } - return new HDInsightIPConfiguration(id.Value, name, Optional.ToNullable(type), Optional.ToNullable(provisioningState), Optional.ToNullable(primary), privateIPAddress.Value, Optional.ToNullable(privateIPAllocationMethod), subnet); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightIPConfiguration.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightIPConfiguration.cs deleted file mode 100644 index 034ba1a2a5bf..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightIPConfiguration.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Net; -using Azure.Core; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The ip configurations for the private link service. - public partial class HDInsightIPConfiguration - { - /// Initializes a new instance of HDInsightIPConfiguration. - /// The name of private link IP configuration. - /// is null. - public HDInsightIPConfiguration(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - } - - /// Initializes a new instance of HDInsightIPConfiguration. - /// The private link IP configuration id. - /// The name of private link IP configuration. - /// The type of the private link IP configuration. - /// The private link configuration provisioning state, which only appears in the response. - /// Indicates whether this IP configuration is primary for the corresponding NIC. - /// The IP address. - /// The method that private IP address is allocated. - /// The subnet resource id. - internal HDInsightIPConfiguration(ResourceIdentifier id, string name, ResourceType? resourceType, HDInsightPrivateLinkConfigurationProvisioningState? provisioningState, bool? isPrimary, IPAddress privateIPAddress, HDInsightPrivateIPAllocationMethod? privateIPAllocationMethod, WritableSubResource subnet) - { - Id = id; - Name = name; - ResourceType = resourceType; - ProvisioningState = provisioningState; - IsPrimary = isPrimary; - PrivateIPAddress = privateIPAddress; - PrivateIPAllocationMethod = privateIPAllocationMethod; - Subnet = subnet; - } - - /// The private link IP configuration id. - public ResourceIdentifier Id { get; } - /// The name of private link IP configuration. - public string Name { get; set; } - /// The type of the private link IP configuration. - public ResourceType? ResourceType { get; } - /// The private link configuration provisioning state, which only appears in the response. - public HDInsightPrivateLinkConfigurationProvisioningState? ProvisioningState { get; } - /// Indicates whether this IP configuration is primary for the corresponding NIC. - public bool? IsPrimary { get; set; } - /// The IP address. - public IPAddress PrivateIPAddress { get; set; } - /// The method that private IP address is allocated. - public HDInsightPrivateIPAllocationMethod? PrivateIPAllocationMethod { get; set; } - /// The subnet resource id. - internal WritableSubResource Subnet { get; set; } - /// Gets or sets Id. - public ResourceIdentifier SubnetId - { - get => Subnet is null ? default : Subnet.Id; - set - { - if (Subnet is null) - Subnet = new WritableSubResource(); - Subnet.Id = value; - } - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLinuxOSProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLinuxOSProfile.Serialization.cs deleted file mode 100644 index 4623be7e0dac..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLinuxOSProfile.Serialization.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightLinuxOSProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - writer.WriteStringValue(Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - writer.WriteStringValue(Password); - } - if (Optional.IsDefined(SshProfile)) - { - writer.WritePropertyName("sshProfile"u8); - writer.WriteObjectValue(SshProfile); - } - writer.WriteEndObject(); - } - - internal static HDInsightLinuxOSProfile DeserializeHDInsightLinuxOSProfile(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional username = default; - Optional password = default; - Optional sshProfile = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("username"u8)) - { - username = property.Value.GetString(); - continue; - } - if (property.NameEquals("password"u8)) - { - password = property.Value.GetString(); - continue; - } - if (property.NameEquals("sshProfile"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sshProfile = SshProfile.DeserializeSshProfile(property.Value); - continue; - } - } - return new HDInsightLinuxOSProfile(username.Value, password.Value, sshProfile.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLinuxOSProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLinuxOSProfile.cs deleted file mode 100644 index 33a910574e9f..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLinuxOSProfile.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The ssh username, password, and ssh public key. - public partial class HDInsightLinuxOSProfile - { - /// Initializes a new instance of HDInsightLinuxOSProfile. - public HDInsightLinuxOSProfile() - { - } - - /// Initializes a new instance of HDInsightLinuxOSProfile. - /// The username. - /// The password. - /// The SSH profile. - internal HDInsightLinuxOSProfile(string username, string password, SshProfile sshProfile) - { - Username = username; - Password = password; - SshProfile = sshProfile; - } - - /// The username. - public string Username { get; set; } - /// The password. - public string Password { get; set; } - /// The SSH profile. - internal SshProfile SshProfile { get; set; } - /// The list of SSH public keys. - public IList SshPublicKeys - { - get - { - if (SshProfile is null) - SshProfile = new SshProfile(); - return SshProfile.PublicKeys; - } - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLocalizedName.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLocalizedName.cs deleted file mode 100644 index f75dcbfb4b88..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLocalizedName.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The details about the localizable name of a type of usage. - public partial class HDInsightLocalizedName - { - /// Initializes a new instance of HDInsightLocalizedName. - internal HDInsightLocalizedName() - { - } - - /// Initializes a new instance of HDInsightLocalizedName. - /// The name of the used resource. - /// The localized name of the used resource. - internal HDInsightLocalizedName(string value, string localizedValue) - { - Value = value; - LocalizedValue = localizedValue; - } - - /// The name of the used resource. - public string Value { get; } - /// The localized name of the used resource. - public string LocalizedValue { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityContent.cs deleted file mode 100644 index d76ee98ad4a3..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityContent.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The request spec of checking name availability. - public partial class HDInsightNameAvailabilityContent - { - /// Initializes a new instance of HDInsightNameAvailabilityContent. - public HDInsightNameAvailabilityContent() - { - } - - /// The resource name. - public string Name { get; set; } - /// The resource type. - public ResourceType? ResourceType { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityResult.cs deleted file mode 100644 index 757d2274b1a9..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityResult.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The response spec of checking name availability. - public partial class HDInsightNameAvailabilityResult - { - /// Initializes a new instance of HDInsightNameAvailabilityResult. - internal HDInsightNameAvailabilityResult() - { - } - - /// Initializes a new instance of HDInsightNameAvailabilityResult. - /// This indicates whether the name is available. - /// The reason of the result. - /// The related message. - internal HDInsightNameAvailabilityResult(bool? isNameAvailable, string reason, string message) - { - IsNameAvailable = isNameAvailable; - Reason = reason; - Message = message; - } - - /// This indicates whether the name is available. - public bool? IsNameAvailable { get; } - /// The reason of the result. - public string Reason { get; } - /// The related message. - public string Message { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightOSType.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightOSType.cs deleted file mode 100644 index 86efe9373b21..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightOSType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The type of operating system. - public readonly partial struct HDInsightOSType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightOSType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string WindowsValue = "Windows"; - private const string LinuxValue = "Linux"; - - /// Windows. - public static HDInsightOSType Windows { get; } = new HDInsightOSType(WindowsValue); - /// Linux. - public static HDInsightOSType Linux { get; } = new HDInsightOSType(LinuxValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightOSType left, HDInsightOSType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightOSType left, HDInsightOSType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightOSType(string value) => new HDInsightOSType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightOSType other && Equals(other); - /// - public bool Equals(HDInsightOSType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionData.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionData.Serialization.cs deleted file mode 100644 index c302e039891c..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionData.Serialization.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.HDInsight.Models; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.HDInsight -{ - public partial class HDInsightPrivateEndpointConnectionData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("privateLinkServiceConnectionState"u8); - writer.WriteObjectValue(ConnectionState); - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static HDInsightPrivateEndpointConnectionData DeserializeHDInsightPrivateEndpointConnectionData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional privateEndpoint = default; - HDInsightPrivateLinkServiceConnectionState privateLinkServiceConnectionState = default; - Optional linkIdentifier = default; - Optional provisioningState = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("privateEndpoint"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateEndpoint = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - if (property0.NameEquals("privateLinkServiceConnectionState"u8)) - { - privateLinkServiceConnectionState = HDInsightPrivateLinkServiceConnectionState.DeserializeHDInsightPrivateLinkServiceConnectionState(property0.Value); - continue; - } - if (property0.NameEquals("linkIdentifier"u8)) - { - linkIdentifier = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new HDInsightPrivateEndpointConnectionProvisioningState(property0.Value.GetString()); - continue; - } - } - continue; - } - } - return new HDInsightPrivateEndpointConnectionData(id, name, type, systemData.Value, privateEndpoint, privateLinkServiceConnectionState, linkIdentifier.Value, Optional.ToNullable(provisioningState)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionListResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionListResult.cs deleted file mode 100644 index dac9185a8dd4..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.HDInsight; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The list private endpoint connections response. - internal partial class HDInsightPrivateEndpointConnectionListResult - { - /// Initializes a new instance of HDInsightPrivateEndpointConnectionListResult. - internal HDInsightPrivateEndpointConnectionListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightPrivateEndpointConnectionListResult. - /// The list of private endpoint connections. - /// The link (url) to the next page of results. - internal HDInsightPrivateEndpointConnectionListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// The list of private endpoint connections. - public IReadOnlyList Value { get; } - /// The link (url) to the next page of results. - public string NextLink { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionProvisioningState.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionProvisioningState.cs deleted file mode 100644 index 21053cc594d3..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateEndpointConnectionProvisioningState.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The provisioning state, which only appears in the response. - public readonly partial struct HDInsightPrivateEndpointConnectionProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightPrivateEndpointConnectionProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "InProgress"; - private const string UpdatingValue = "Updating"; - private const string FailedValue = "Failed"; - private const string SucceededValue = "Succeeded"; - private const string CanceledValue = "Canceled"; - private const string DeletingValue = "Deleting"; - - /// InProgress. - public static HDInsightPrivateEndpointConnectionProvisioningState InProgress { get; } = new HDInsightPrivateEndpointConnectionProvisioningState(InProgressValue); - /// Updating. - public static HDInsightPrivateEndpointConnectionProvisioningState Updating { get; } = new HDInsightPrivateEndpointConnectionProvisioningState(UpdatingValue); - /// Failed. - public static HDInsightPrivateEndpointConnectionProvisioningState Failed { get; } = new HDInsightPrivateEndpointConnectionProvisioningState(FailedValue); - /// Succeeded. - public static HDInsightPrivateEndpointConnectionProvisioningState Succeeded { get; } = new HDInsightPrivateEndpointConnectionProvisioningState(SucceededValue); - /// Canceled. - public static HDInsightPrivateEndpointConnectionProvisioningState Canceled { get; } = new HDInsightPrivateEndpointConnectionProvisioningState(CanceledValue); - /// Deleting. - public static HDInsightPrivateEndpointConnectionProvisioningState Deleting { get; } = new HDInsightPrivateEndpointConnectionProvisioningState(DeletingValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightPrivateEndpointConnectionProvisioningState left, HDInsightPrivateEndpointConnectionProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightPrivateEndpointConnectionProvisioningState left, HDInsightPrivateEndpointConnectionProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightPrivateEndpointConnectionProvisioningState(string value) => new HDInsightPrivateEndpointConnectionProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightPrivateEndpointConnectionProvisioningState other && Equals(other); - /// - public bool Equals(HDInsightPrivateEndpointConnectionProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateIPAllocationMethod.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateIPAllocationMethod.cs deleted file mode 100644 index bcb584605d81..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateIPAllocationMethod.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The method that private IP address is allocated. - public readonly partial struct HDInsightPrivateIPAllocationMethod : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightPrivateIPAllocationMethod(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DynamicValue = "dynamic"; - private const string StaticValue = "static"; - - /// dynamic. - public static HDInsightPrivateIPAllocationMethod Dynamic { get; } = new HDInsightPrivateIPAllocationMethod(DynamicValue); - /// static. - public static HDInsightPrivateIPAllocationMethod Static { get; } = new HDInsightPrivateIPAllocationMethod(StaticValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightPrivateIPAllocationMethod left, HDInsightPrivateIPAllocationMethod right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightPrivateIPAllocationMethod left, HDInsightPrivateIPAllocationMethod right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightPrivateIPAllocationMethod(string value) => new HDInsightPrivateIPAllocationMethod(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightPrivateIPAllocationMethod other && Equals(other); - /// - public bool Equals(HDInsightPrivateIPAllocationMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkConfiguration.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkConfiguration.Serialization.cs deleted file mode 100644 index fc6162ea6639..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkConfiguration.Serialization.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightPrivateLinkConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("groupId"u8); - writer.WriteStringValue(GroupId); - writer.WritePropertyName("ipConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in IPConfigurations) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static HDInsightPrivateLinkConfiguration DeserializeHDInsightPrivateLinkConfiguration(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional id = default; - string name = default; - Optional type = default; - string groupId = default; - Optional provisioningState = default; - IList ipConfigurations = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("groupId"u8)) - { - groupId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new HDInsightPrivateLinkConfigurationProvisioningState(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("ipConfigurations"u8)) - { - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(HDInsightIPConfiguration.DeserializeHDInsightIPConfiguration(item)); - } - ipConfigurations = array; - continue; - } - } - continue; - } - } - return new HDInsightPrivateLinkConfiguration(id.Value, name, Optional.ToNullable(type), groupId, Optional.ToNullable(provisioningState), ipConfigurations); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkConfiguration.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkConfiguration.cs deleted file mode 100644 index 3541b4825b40..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkConfiguration.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The private link configuration. - public partial class HDInsightPrivateLinkConfiguration - { - /// Initializes a new instance of HDInsightPrivateLinkConfiguration. - /// The name of private link configuration. - /// The HDInsight private linkable sub-resource name to apply the private link configuration to. For example, 'headnode', 'gateway', 'edgenode'. - /// The IP configurations for the private link service. - /// , or is null. - public HDInsightPrivateLinkConfiguration(string name, string groupId, IEnumerable ipConfigurations) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(groupId, nameof(groupId)); - Argument.AssertNotNull(ipConfigurations, nameof(ipConfigurations)); - - Name = name; - GroupId = groupId; - IPConfigurations = ipConfigurations.ToList(); - } - - /// Initializes a new instance of HDInsightPrivateLinkConfiguration. - /// The private link configuration id. - /// The name of private link configuration. - /// The type of the private link configuration. - /// The HDInsight private linkable sub-resource name to apply the private link configuration to. For example, 'headnode', 'gateway', 'edgenode'. - /// The private link configuration provisioning state, which only appears in the response. - /// The IP configurations for the private link service. - internal HDInsightPrivateLinkConfiguration(string id, string name, ResourceType? resourceType, string groupId, HDInsightPrivateLinkConfigurationProvisioningState? provisioningState, IList ipConfigurations) - { - Id = id; - Name = name; - ResourceType = resourceType; - GroupId = groupId; - ProvisioningState = provisioningState; - IPConfigurations = ipConfigurations; - } - - /// The private link configuration id. - public string Id { get; } - /// The name of private link configuration. - public string Name { get; set; } - /// The type of the private link configuration. - public ResourceType? ResourceType { get; } - /// The HDInsight private linkable sub-resource name to apply the private link configuration to. For example, 'headnode', 'gateway', 'edgenode'. - public string GroupId { get; set; } - /// The private link configuration provisioning state, which only appears in the response. - public HDInsightPrivateLinkConfigurationProvisioningState? ProvisioningState { get; } - /// The IP configurations for the private link service. - public IList IPConfigurations { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkConfigurationProvisioningState.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkConfigurationProvisioningState.cs deleted file mode 100644 index 7d669aa872fc..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkConfigurationProvisioningState.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The private link configuration provisioning state, which only appears in the response. - public readonly partial struct HDInsightPrivateLinkConfigurationProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightPrivateLinkConfigurationProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "InProgress"; - private const string FailedValue = "Failed"; - private const string SucceededValue = "Succeeded"; - private const string CanceledValue = "Canceled"; - private const string DeletingValue = "Deleting"; - - /// InProgress. - public static HDInsightPrivateLinkConfigurationProvisioningState InProgress { get; } = new HDInsightPrivateLinkConfigurationProvisioningState(InProgressValue); - /// Failed. - public static HDInsightPrivateLinkConfigurationProvisioningState Failed { get; } = new HDInsightPrivateLinkConfigurationProvisioningState(FailedValue); - /// Succeeded. - public static HDInsightPrivateLinkConfigurationProvisioningState Succeeded { get; } = new HDInsightPrivateLinkConfigurationProvisioningState(SucceededValue); - /// Canceled. - public static HDInsightPrivateLinkConfigurationProvisioningState Canceled { get; } = new HDInsightPrivateLinkConfigurationProvisioningState(CanceledValue); - /// Deleting. - public static HDInsightPrivateLinkConfigurationProvisioningState Deleting { get; } = new HDInsightPrivateLinkConfigurationProvisioningState(DeletingValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightPrivateLinkConfigurationProvisioningState left, HDInsightPrivateLinkConfigurationProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightPrivateLinkConfigurationProvisioningState left, HDInsightPrivateLinkConfigurationProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightPrivateLinkConfigurationProvisioningState(string value) => new HDInsightPrivateLinkConfigurationProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightPrivateLinkConfigurationProvisioningState other && Equals(other); - /// - public bool Equals(HDInsightPrivateLinkConfigurationProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkResourceListResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkResourceListResult.cs deleted file mode 100644 index 2a213ae60b0c..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkResourceListResult.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.HDInsight; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// A list of private link resources. - internal partial class HDInsightPrivateLinkResourceListResult - { - /// Initializes a new instance of HDInsightPrivateLinkResourceListResult. - internal HDInsightPrivateLinkResourceListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightPrivateLinkResourceListResult. - /// Array of private link resources. - internal HDInsightPrivateLinkResourceListResult(IReadOnlyList value) - { - Value = value; - } - - /// Array of private link resources. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkServiceConnectionState.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkServiceConnectionState.Serialization.cs deleted file mode 100644 index 0d1d0a69f362..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkServiceConnectionState.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightPrivateLinkServiceConnectionState : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(ActionsRequired)) - { - writer.WritePropertyName("actionsRequired"u8); - writer.WriteStringValue(ActionsRequired); - } - writer.WriteEndObject(); - } - - internal static HDInsightPrivateLinkServiceConnectionState DeserializeHDInsightPrivateLinkServiceConnectionState(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - HDInsightPrivateLinkServiceConnectionStatus status = default; - Optional description = default; - Optional actionsRequired = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status"u8)) - { - status = new HDInsightPrivateLinkServiceConnectionStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("actionsRequired"u8)) - { - actionsRequired = property.Value.GetString(); - continue; - } - } - return new HDInsightPrivateLinkServiceConnectionState(status, description.Value, actionsRequired.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkServiceConnectionState.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkServiceConnectionState.cs deleted file mode 100644 index e067a581da3a..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkServiceConnectionState.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The private link service connection state. - public partial class HDInsightPrivateLinkServiceConnectionState - { - /// Initializes a new instance of HDInsightPrivateLinkServiceConnectionState. - /// The concrete private link service connection. - public HDInsightPrivateLinkServiceConnectionState(HDInsightPrivateLinkServiceConnectionStatus status) - { - Status = status; - } - - /// Initializes a new instance of HDInsightPrivateLinkServiceConnectionState. - /// The concrete private link service connection. - /// The optional description of the status. - /// Whether there is further actions. - internal HDInsightPrivateLinkServiceConnectionState(HDInsightPrivateLinkServiceConnectionStatus status, string description, string actionsRequired) - { - Status = status; - Description = description; - ActionsRequired = actionsRequired; - } - - /// The concrete private link service connection. - public HDInsightPrivateLinkServiceConnectionStatus Status { get; set; } - /// The optional description of the status. - public string Description { get; set; } - /// Whether there is further actions. - public string ActionsRequired { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkServiceConnectionStatus.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkServiceConnectionStatus.cs deleted file mode 100644 index 84a7f7600e03..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkServiceConnectionStatus.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The concrete private link service connection. - public readonly partial struct HDInsightPrivateLinkServiceConnectionStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightPrivateLinkServiceConnectionStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ApprovedValue = "Approved"; - private const string RejectedValue = "Rejected"; - private const string PendingValue = "Pending"; - private const string RemovedValue = "Removed"; - - /// Approved. - public static HDInsightPrivateLinkServiceConnectionStatus Approved { get; } = new HDInsightPrivateLinkServiceConnectionStatus(ApprovedValue); - /// Rejected. - public static HDInsightPrivateLinkServiceConnectionStatus Rejected { get; } = new HDInsightPrivateLinkServiceConnectionStatus(RejectedValue); - /// Pending. - public static HDInsightPrivateLinkServiceConnectionStatus Pending { get; } = new HDInsightPrivateLinkServiceConnectionStatus(PendingValue); - /// Removed. - public static HDInsightPrivateLinkServiceConnectionStatus Removed { get; } = new HDInsightPrivateLinkServiceConnectionStatus(RemovedValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightPrivateLinkServiceConnectionStatus left, HDInsightPrivateLinkServiceConnectionStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightPrivateLinkServiceConnectionStatus left, HDInsightPrivateLinkServiceConnectionStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightPrivateLinkServiceConnectionStatus(string value) => new HDInsightPrivateLinkServiceConnectionStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightPrivateLinkServiceConnectionStatus other && Equals(other); - /// - public bool Equals(HDInsightPrivateLinkServiceConnectionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkState.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkState.cs deleted file mode 100644 index bd2cfc479d91..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightPrivateLinkState.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// Indicates whether or not private link is enabled. - public readonly partial struct HDInsightPrivateLinkState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightPrivateLinkState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DisabledValue = "Disabled"; - private const string EnabledValue = "Enabled"; - - /// Disabled. - public static HDInsightPrivateLinkState Disabled { get; } = new HDInsightPrivateLinkState(DisabledValue); - /// Enabled. - public static HDInsightPrivateLinkState Enabled { get; } = new HDInsightPrivateLinkState(EnabledValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightPrivateLinkState left, HDInsightPrivateLinkState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightPrivateLinkState left, HDInsightPrivateLinkState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightPrivateLinkState(string value) => new HDInsightPrivateLinkState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightPrivateLinkState other && Equals(other); - /// - public bool Equals(HDInsightPrivateLinkState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightResourceProviderConnection.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightResourceProviderConnection.cs deleted file mode 100644 index 1f628b971ab0..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightResourceProviderConnection.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The direction for the resource provider connection. - public readonly partial struct HDInsightResourceProviderConnection : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightResourceProviderConnection(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InboundValue = "Inbound"; - private const string OutboundValue = "Outbound"; - - /// Inbound. - public static HDInsightResourceProviderConnection Inbound { get; } = new HDInsightResourceProviderConnection(InboundValue); - /// Outbound. - public static HDInsightResourceProviderConnection Outbound { get; } = new HDInsightResourceProviderConnection(OutboundValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightResourceProviderConnection left, HDInsightResourceProviderConnection right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightResourceProviderConnection left, HDInsightResourceProviderConnection right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightResourceProviderConnection(string value) => new HDInsightResourceProviderConnection(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightResourceProviderConnection other && Equals(other); - /// - public bool Equals(HDInsightResourceProviderConnection other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightRoleName.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightRoleName.cs deleted file mode 100644 index 913da36ed9fb..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightRoleName.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The HDInsightRoleName. - public readonly partial struct HDInsightRoleName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightRoleName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string WorkernodeValue = "workernode"; - - /// workernode. - public static HDInsightRoleName Workernode { get; } = new HDInsightRoleName(WorkernodeValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightRoleName left, HDInsightRoleName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightRoleName left, HDInsightRoleName right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightRoleName(string value) => new HDInsightRoleName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightRoleName other && Equals(other); - /// - public bool Equals(HDInsightRoleName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.Serialization.cs deleted file mode 100644 index 2d306c53d317..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.Serialization.cs +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightSecurityProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DirectoryType)) - { - writer.WritePropertyName("directoryType"u8); - writer.WriteStringValue(DirectoryType.Value.ToString()); - } - if (Optional.IsDefined(Domain)) - { - writer.WritePropertyName("domain"u8); - writer.WriteStringValue(Domain); - } - if (Optional.IsDefined(OrganizationalUnitDN)) - { - writer.WritePropertyName("organizationalUnitDN"u8); - writer.WriteStringValue(OrganizationalUnitDN); - } - if (Optional.IsCollectionDefined(LdapUris)) - { - writer.WritePropertyName("ldapsUrls"u8); - writer.WriteStartArray(); - foreach (var item in LdapUris) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStringValue(item.AbsoluteUri); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(DomainUsername)) - { - writer.WritePropertyName("domainUsername"u8); - writer.WriteStringValue(DomainUsername); - } - if (Optional.IsDefined(DomainUserPassword)) - { - writer.WritePropertyName("domainUserPassword"u8); - writer.WriteStringValue(DomainUserPassword); - } - if (Optional.IsCollectionDefined(ClusterUsersGroupDNs)) - { - writer.WritePropertyName("clusterUsersGroupDNs"u8); - writer.WriteStartArray(); - foreach (var item in ClusterUsersGroupDNs) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(AaddsResourceId)) - { - writer.WritePropertyName("aaddsResourceId"u8); - writer.WriteStringValue(AaddsResourceId); - } - if (Optional.IsDefined(MsiResourceId)) - { - writer.WritePropertyName("msiResourceId"u8); - writer.WriteStringValue(MsiResourceId); - } - writer.WriteEndObject(); - } - - internal static HDInsightSecurityProfile DeserializeHDInsightSecurityProfile(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional directoryType = default; - Optional domain = default; - Optional organizationalUnitDN = default; - Optional> ldapsUrls = default; - Optional domainUsername = default; - Optional domainUserPassword = default; - Optional> clusterUsersGroupDNs = default; - Optional aaddsResourceId = default; - Optional msiResourceId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("directoryType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - directoryType = new AuthenticationDirectoryType(property.Value.GetString()); - continue; - } - if (property.NameEquals("domain"u8)) - { - domain = property.Value.GetString(); - continue; - } - if (property.NameEquals("organizationalUnitDN"u8)) - { - organizationalUnitDN = property.Value.GetString(); - continue; - } - if (property.NameEquals("ldapsUrls"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(new Uri(item.GetString())); - } - } - ldapsUrls = array; - continue; - } - if (property.NameEquals("domainUsername"u8)) - { - domainUsername = property.Value.GetString(); - continue; - } - if (property.NameEquals("domainUserPassword"u8)) - { - domainUserPassword = property.Value.GetString(); - continue; - } - if (property.NameEquals("clusterUsersGroupDNs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - clusterUsersGroupDNs = array; - continue; - } - if (property.NameEquals("aaddsResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - aaddsResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("msiResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - msiResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - } - return new HDInsightSecurityProfile(Optional.ToNullable(directoryType), domain.Value, organizationalUnitDN.Value, Optional.ToList(ldapsUrls), domainUsername.Value, domainUserPassword.Value, Optional.ToList(clusterUsersGroupDNs), aaddsResourceId.Value, msiResourceId.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.cs deleted file mode 100644 index d0c8fef4a145..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSecurityProfile.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The security profile which contains Ssh public key for the HDInsight cluster. - public partial class HDInsightSecurityProfile - { - /// Initializes a new instance of HDInsightSecurityProfile. - public HDInsightSecurityProfile() - { - LdapUris = new ChangeTrackingList(); - ClusterUsersGroupDNs = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightSecurityProfile. - /// The directory type. - /// The organization's active directory domain. - /// The organizational unit within the Active Directory to place the cluster and service accounts. - /// The LDAPS protocol URLs to communicate with the Active Directory. - /// The domain user account that will have admin privileges on the cluster. - /// The domain admin password. - /// Optional. The Distinguished Names for cluster user groups. - /// The resource ID of the user's Azure Active Directory Domain Service. - /// User assigned identity that has permissions to read and create cluster-related artifacts in the user's AADDS. - internal HDInsightSecurityProfile(AuthenticationDirectoryType? directoryType, string domain, string organizationalUnitDN, IList ldapUris, string domainUsername, string domainUserPassword, IList clusterUsersGroupDNs, ResourceIdentifier aaddsResourceId, ResourceIdentifier msiResourceId) - { - DirectoryType = directoryType; - Domain = domain; - OrganizationalUnitDN = organizationalUnitDN; - LdapUris = ldapUris; - DomainUsername = domainUsername; - DomainUserPassword = domainUserPassword; - ClusterUsersGroupDNs = clusterUsersGroupDNs; - AaddsResourceId = aaddsResourceId; - MsiResourceId = msiResourceId; - } - - /// The directory type. - public AuthenticationDirectoryType? DirectoryType { get; set; } - /// The organization's active directory domain. - public string Domain { get; set; } - /// The organizational unit within the Active Directory to place the cluster and service accounts. - public string OrganizationalUnitDN { get; set; } - /// The LDAPS protocol URLs to communicate with the Active Directory. - public IList LdapUris { get; } - /// The domain user account that will have admin privileges on the cluster. - public string DomainUsername { get; set; } - /// The domain admin password. - public string DomainUserPassword { get; set; } - /// Optional. The Distinguished Names for cluster user groups. - public IList ClusterUsersGroupDNs { get; } - /// The resource ID of the user's Azure Active Directory Domain Service. - public ResourceIdentifier AaddsResourceId { get; set; } - /// User assigned identity that has permissions to read and create cluster-related artifacts in the user's AADDS. - public ResourceIdentifier MsiResourceId { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSshPublicKey.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSshPublicKey.cs deleted file mode 100644 index 2dc88579ff88..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightSshPublicKey.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The SSH public key for the cluster nodes. - public partial class HDInsightSshPublicKey - { - /// Initializes a new instance of HDInsightSshPublicKey. - public HDInsightSshPublicKey() - { - } - - /// Initializes a new instance of HDInsightSshPublicKey. - /// The certificate for SSH. - internal HDInsightSshPublicKey(string certificateData) - { - CertificateData = certificateData; - } - - /// The certificate for SSH. - public string CertificateData { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightStorageAccountInfo.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightStorageAccountInfo.Serialization.cs deleted file mode 100644 index b8aff0c6ef5c..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightStorageAccountInfo.Serialization.cs +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightStorageAccountInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(IsDefault)) - { - writer.WritePropertyName("isDefault"u8); - writer.WriteBooleanValue(IsDefault.Value); - } - if (Optional.IsDefined(Container)) - { - writer.WritePropertyName("container"u8); - writer.WriteStringValue(Container); - } - if (Optional.IsDefined(FileSystem)) - { - writer.WritePropertyName("fileSystem"u8); - writer.WriteStringValue(FileSystem); - } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(MsiResourceId)) - { - if (MsiResourceId != null) - { - writer.WritePropertyName("msiResourceId"u8); - writer.WriteStringValue(MsiResourceId); - } - else - { - writer.WriteNull("msiResourceId"); - } - } - if (Optional.IsDefined(SasKey)) - { - writer.WritePropertyName("saskey"u8); - writer.WriteStringValue(SasKey); - } - if (Optional.IsDefined(Fileshare)) - { - writer.WritePropertyName("fileshare"u8); - writer.WriteStringValue(Fileshare); - } - if (Optional.IsDefined(EnableSecureChannel)) - { - writer.WritePropertyName("enableSecureChannel"u8); - writer.WriteBooleanValue(EnableSecureChannel.Value); - } - writer.WriteEndObject(); - } - - internal static HDInsightStorageAccountInfo DeserializeHDInsightStorageAccountInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional isDefault = default; - Optional container = default; - Optional fileSystem = default; - Optional key = default; - Optional resourceId = default; - Optional msiResourceId = default; - Optional saskey = default; - Optional fileshare = default; - Optional enableSecureChannel = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("isDefault"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isDefault = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("container"u8)) - { - container = property.Value.GetString(); - continue; - } - if (property.NameEquals("fileSystem"u8)) - { - fileSystem = property.Value.GetString(); - continue; - } - if (property.NameEquals("key"u8)) - { - key = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("msiResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - msiResourceId = null; - continue; - } - msiResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("saskey"u8)) - { - saskey = property.Value.GetString(); - continue; - } - if (property.NameEquals("fileshare"u8)) - { - fileshare = property.Value.GetString(); - continue; - } - if (property.NameEquals("enableSecureChannel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableSecureChannel = property.Value.GetBoolean(); - continue; - } - } - return new HDInsightStorageAccountInfo(name.Value, Optional.ToNullable(isDefault), container.Value, fileSystem.Value, key.Value, resourceId.Value, msiResourceId.Value, saskey.Value, fileshare.Value, Optional.ToNullable(enableSecureChannel)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightStorageAccountInfo.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightStorageAccountInfo.cs deleted file mode 100644 index 867b28d00b43..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightStorageAccountInfo.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The storage Account. - public partial class HDInsightStorageAccountInfo - { - /// Initializes a new instance of HDInsightStorageAccountInfo. - public HDInsightStorageAccountInfo() - { - } - - /// Initializes a new instance of HDInsightStorageAccountInfo. - /// The name of the storage account. - /// Whether or not the storage account is the default storage account. - /// The container in the storage account, only to be specified for WASB storage accounts. - /// The filesystem, only to be specified for Azure Data Lake Storage Gen 2. - /// The storage account access key. - /// The resource ID of storage account, only to be specified for Azure Data Lake Storage Gen 2. - /// The managed identity (MSI) that is allowed to access the storage account, only to be specified for Azure Data Lake Storage Gen 2. - /// The shared access signature key. - /// The file share name. - /// Enable secure channel or not, it's an optional field. Default value is false when cluster version < 5.1 and true when cluster version >= 5.1 ,. - internal HDInsightStorageAccountInfo(string name, bool? isDefault, string container, string fileSystem, string key, ResourceIdentifier resourceId, ResourceIdentifier msiResourceId, string sasKey, string fileshare, bool? enableSecureChannel) - { - Name = name; - IsDefault = isDefault; - Container = container; - FileSystem = fileSystem; - Key = key; - ResourceId = resourceId; - MsiResourceId = msiResourceId; - SasKey = sasKey; - Fileshare = fileshare; - EnableSecureChannel = enableSecureChannel; - } - - /// The name of the storage account. - public string Name { get; set; } - /// Whether or not the storage account is the default storage account. - public bool? IsDefault { get; set; } - /// The container in the storage account, only to be specified for WASB storage accounts. - public string Container { get; set; } - /// The filesystem, only to be specified for Azure Data Lake Storage Gen 2. - public string FileSystem { get; set; } - /// The storage account access key. - public string Key { get; set; } - /// The resource ID of storage account, only to be specified for Azure Data Lake Storage Gen 2. - public ResourceIdentifier ResourceId { get; set; } - /// The managed identity (MSI) that is allowed to access the storage account, only to be specified for Azure Data Lake Storage Gen 2. - public ResourceIdentifier MsiResourceId { get; set; } - /// The shared access signature key. - public string SasKey { get; set; } - /// The file share name. - public string Fileshare { get; set; } - /// Enable secure channel or not, it's an optional field. Default value is false when cluster version < 5.1 and true when cluster version >= 5.1 ,. - public bool? EnableSecureChannel { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightTier.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightTier.cs deleted file mode 100644 index d6e57a51d18d..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightTier.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The cluster tier. - public readonly partial struct HDInsightTier : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HDInsightTier(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StandardValue = "Standard"; - private const string PremiumValue = "Premium"; - - /// Standard. - public static HDInsightTier Standard { get; } = new HDInsightTier(StandardValue); - /// Premium. - public static HDInsightTier Premium { get; } = new HDInsightTier(PremiumValue); - /// Determines if two values are the same. - public static bool operator ==(HDInsightTier left, HDInsightTier right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HDInsightTier left, HDInsightTier right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HDInsightTier(string value) => new HDInsightTier(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HDInsightTier other && Equals(other); - /// - public bool Equals(HDInsightTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightUsage.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightUsage.Serialization.cs deleted file mode 100644 index c49f63ecc7d1..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightUsage.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightUsage - { - internal static HDInsightUsage DeserializeHDInsightUsage(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional unit = default; - Optional currentValue = default; - Optional limit = default; - Optional name = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("unit"u8)) - { - unit = property.Value.GetString(); - continue; - } - if (property.NameEquals("currentValue"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - currentValue = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("limit"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - limit = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("name"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - name = HDInsightLocalizedName.DeserializeHDInsightLocalizedName(property.Value); - continue; - } - } - return new HDInsightUsage(unit.Value, Optional.ToNullable(currentValue), Optional.ToNullable(limit), name.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightUsage.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightUsage.cs deleted file mode 100644 index 29f128c43df0..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightUsage.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The details about the usage of a particular limited resource. - public partial class HDInsightUsage - { - /// Initializes a new instance of HDInsightUsage. - internal HDInsightUsage() - { - } - - /// Initializes a new instance of HDInsightUsage. - /// The type of measurement for usage. - /// The current usage. - /// The maximum allowed usage. - /// The details about the localizable name of the used resource. - internal HDInsightUsage(string unit, long? currentValue, long? limit, HDInsightLocalizedName name) - { - Unit = unit; - CurrentValue = currentValue; - Limit = limit; - Name = name; - } - - /// The type of measurement for usage. - public string Unit { get; } - /// The current usage. - public long? CurrentValue { get; } - /// The maximum allowed usage. - public long? Limit { get; } - /// The details about the localizable name of the used resource. - public HDInsightLocalizedName Name { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionSpec.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionSpec.Serialization.cs deleted file mode 100644 index 7164074811c4..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionSpec.Serialization.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightVersionSpec - { - internal static HDInsightVersionSpec DeserializeHDInsightVersionSpec(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional friendlyName = default; - Optional displayName = default; - Optional isDefault = default; - Optional> componentVersions = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("friendlyName"u8)) - { - friendlyName = property.Value.GetString(); - continue; - } - if (property.NameEquals("displayName"u8)) - { - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("isDefault"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isDefault = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("componentVersions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - componentVersions = dictionary; - continue; - } - } - return new HDInsightVersionSpec(friendlyName.Value, displayName.Value, Optional.ToNullable(isDefault), Optional.ToDictionary(componentVersions)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionSpec.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionSpec.cs deleted file mode 100644 index 8d2a91d527a5..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionSpec.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The version properties. - public partial class HDInsightVersionSpec - { - /// Initializes a new instance of HDInsightVersionSpec. - internal HDInsightVersionSpec() - { - ComponentVersions = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of HDInsightVersionSpec. - /// The friendly name. - /// The display name. - /// Whether or not the version is the default version. - /// The component version property. - internal HDInsightVersionSpec(string friendlyName, string displayName, bool? isDefault, IReadOnlyDictionary componentVersions) - { - FriendlyName = friendlyName; - DisplayName = displayName; - IsDefault = isDefault; - ComponentVersions = componentVersions; - } - - /// The friendly name. - public string FriendlyName { get; } - /// The display name. - public string DisplayName { get; } - /// Whether or not the version is the default version. - public bool? IsDefault { get; } - /// The component version property. - public IReadOnlyDictionary ComponentVersions { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionsCapability.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionsCapability.Serialization.cs deleted file mode 100644 index e9e8d09e2004..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionsCapability.Serialization.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightVersionsCapability - { - internal static HDInsightVersionsCapability DeserializeHDInsightVersionsCapability(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> available = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("available"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightVersionSpec.DeserializeHDInsightVersionSpec(item)); - } - available = array; - continue; - } - } - return new HDInsightVersionsCapability(Optional.ToList(available)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionsCapability.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionsCapability.cs deleted file mode 100644 index b0387588aa6b..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVersionsCapability.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The version capability. - public partial class HDInsightVersionsCapability - { - /// Initializes a new instance of HDInsightVersionsCapability. - internal HDInsightVersionsCapability() - { - Available = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightVersionsCapability. - /// The list of version capabilities. - internal HDInsightVersionsCapability(IReadOnlyList available) - { - Available = available; - } - - /// The list of version capabilities. - public IReadOnlyList Available { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVirtualNetworkProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVirtualNetworkProfile.cs deleted file mode 100644 index 739039ffbec9..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVirtualNetworkProfile.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The virtual network properties. - public partial class HDInsightVirtualNetworkProfile - { - /// Initializes a new instance of HDInsightVirtualNetworkProfile. - public HDInsightVirtualNetworkProfile() - { - } - - /// Initializes a new instance of HDInsightVirtualNetworkProfile. - /// The ID of the virtual network. - /// The name of the subnet. - internal HDInsightVirtualNetworkProfile(ResourceIdentifier id, string subnet) - { - Id = id; - Subnet = subnet; - } - - /// The ID of the virtual network. - public ResourceIdentifier Id { get; set; } - /// The name of the subnet. - public string Subnet { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeCompatibilityFilterV2.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeCompatibilityFilterV2.Serialization.cs deleted file mode 100644 index 76d82c10c622..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeCompatibilityFilterV2.Serialization.cs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightVmSizeCompatibilityFilterV2 - { - internal static HDInsightVmSizeCompatibilityFilterV2 DeserializeHDInsightVmSizeCompatibilityFilterV2(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional filterMode = default; - Optional> regions = default; - Optional> clusterFlavors = default; - Optional> nodeTypes = default; - Optional> clusterVersions = default; - Optional> osType = default; - Optional> vmSizes = default; - Optional espApplied = default; - Optional computeIsolationSupported = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("filterMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - filterMode = new HDInsightFilterMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("regions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - regions = array; - continue; - } - if (property.NameEquals("clusterFlavors"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - clusterFlavors = array; - continue; - } - if (property.NameEquals("nodeTypes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - nodeTypes = array; - continue; - } - if (property.NameEquals("clusterVersions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - clusterVersions = array; - continue; - } - if (property.NameEquals("osType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new HDInsightOSType(item.GetString())); - } - osType = array; - continue; - } - if (property.NameEquals("vmSizes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - vmSizes = array; - continue; - } - if (property.NameEquals("espApplied"u8)) - { - espApplied = property.Value.GetString(); - continue; - } - if (property.NameEquals("computeIsolationSupported"u8)) - { - computeIsolationSupported = property.Value.GetString(); - continue; - } - } - return new HDInsightVmSizeCompatibilityFilterV2(Optional.ToNullable(filterMode), Optional.ToList(regions), Optional.ToList(clusterFlavors), Optional.ToList(nodeTypes), Optional.ToList(clusterVersions), Optional.ToList(osType), Optional.ToList(vmSizes), espApplied.Value, computeIsolationSupported.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeCompatibilityFilterV2.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeCompatibilityFilterV2.cs deleted file mode 100644 index 9e12815f8bf7..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeCompatibilityFilterV2.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// This class represent a single filter object that defines a multidimensional set. The dimensions of this set are Regions, ClusterFlavors, NodeTypes and ClusterVersions. The constraint should be defined based on the following: FilterMode (Exclude vs Include), VMSizes (the vm sizes in affect of exclusion/inclusion) and the ordering of the Filters. Later filters override previous settings if conflicted. - public partial class HDInsightVmSizeCompatibilityFilterV2 - { - /// Initializes a new instance of HDInsightVmSizeCompatibilityFilterV2. - internal HDInsightVmSizeCompatibilityFilterV2() - { - Regions = new ChangeTrackingList(); - ClusterFlavors = new ChangeTrackingList(); - NodeTypes = new ChangeTrackingList(); - ClusterVersions = new ChangeTrackingList(); - OSType = new ChangeTrackingList(); - VmSizes = new ChangeTrackingList(); - } - - /// Initializes a new instance of HDInsightVmSizeCompatibilityFilterV2. - /// The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. - /// The list of regions under the effect of the filter. - /// The list of cluster flavors under the effect of the filter. - /// The list of node types affected by the filter. - /// The list of cluster versions affected in Major.Minor format. - /// The OSType affected, Windows or Linux. - /// The list of virtual machine sizes to include or exclude. - /// Whether apply for ESP cluster. 'true' means only for ESP, 'false' means only for non-ESP, null or empty string or others mean for both. - /// Whether support compute isolation. 'true' means only for ComputeIsolationEnabled, 'false' means only for regular cluster. - internal HDInsightVmSizeCompatibilityFilterV2(HDInsightFilterMode? filterMode, IReadOnlyList regions, IReadOnlyList clusterFlavors, IReadOnlyList nodeTypes, IReadOnlyList clusterVersions, IReadOnlyList osType, IReadOnlyList vmSizes, string espApplied, string isComputeIsolationSupported) - { - FilterMode = filterMode; - Regions = regions; - ClusterFlavors = clusterFlavors; - NodeTypes = nodeTypes; - ClusterVersions = clusterVersions; - OSType = osType; - VmSizes = vmSizes; - EspApplied = espApplied; - IsComputeIsolationSupported = isComputeIsolationSupported; - } - - /// The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. - public HDInsightFilterMode? FilterMode { get; } - /// The list of regions under the effect of the filter. - public IReadOnlyList Regions { get; } - /// The list of cluster flavors under the effect of the filter. - public IReadOnlyList ClusterFlavors { get; } - /// The list of node types affected by the filter. - public IReadOnlyList NodeTypes { get; } - /// The list of cluster versions affected in Major.Minor format. - public IReadOnlyList ClusterVersions { get; } - /// The OSType affected, Windows or Linux. - public IReadOnlyList OSType { get; } - /// The list of virtual machine sizes to include or exclude. - public IReadOnlyList VmSizes { get; } - /// Whether apply for ESP cluster. 'true' means only for ESP, 'false' means only for non-ESP, null or empty string or others mean for both. - public string EspApplied { get; } - /// Whether support compute isolation. 'true' means only for ComputeIsolationEnabled, 'false' means only for regular cluster. - public string IsComputeIsolationSupported { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeProperty.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeProperty.Serialization.cs deleted file mode 100644 index 70a8abc873ff..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeProperty.Serialization.cs +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class HDInsightVmSizeProperty - { - internal static HDInsightVmSizeProperty DeserializeHDInsightVmSizeProperty(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional name = default; - Optional cores = default; - Optional dataDiskStorageTier = default; - Optional label = default; - Optional maxDataDiskCount = default; - Optional memoryInMB = default; - Optional supportedByVirtualMachines = default; - Optional supportedByWebWorkerRoles = default; - Optional virtualMachineResourceDiskSizeInMB = default; - Optional webWorkerResourceDiskSizeInMB = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("cores"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - cores = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("dataDiskStorageTier"u8)) - { - dataDiskStorageTier = property.Value.GetString(); - continue; - } - if (property.NameEquals("label"u8)) - { - label = property.Value.GetString(); - continue; - } - if (property.NameEquals("maxDataDiskCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxDataDiskCount = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("memoryInMb"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - memoryInMB = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("supportedByVirtualMachines"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - supportedByVirtualMachines = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("supportedByWebWorkerRoles"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - supportedByWebWorkerRoles = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("virtualMachineResourceDiskSizeInMb"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - virtualMachineResourceDiskSizeInMB = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("webWorkerResourceDiskSizeInMb"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - webWorkerResourceDiskSizeInMB = property.Value.GetInt64(); - continue; - } - } - return new HDInsightVmSizeProperty(name.Value, Optional.ToNullable(cores), dataDiskStorageTier.Value, label.Value, Optional.ToNullable(maxDataDiskCount), Optional.ToNullable(memoryInMB), Optional.ToNullable(supportedByVirtualMachines), Optional.ToNullable(supportedByWebWorkerRoles), Optional.ToNullable(virtualMachineResourceDiskSizeInMB), Optional.ToNullable(webWorkerResourceDiskSizeInMB)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeProperty.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeProperty.cs deleted file mode 100644 index ba23f8fa69fb..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightVmSizeProperty.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The vm size property. - public partial class HDInsightVmSizeProperty - { - /// Initializes a new instance of HDInsightVmSizeProperty. - internal HDInsightVmSizeProperty() - { - } - - /// Initializes a new instance of HDInsightVmSizeProperty. - /// The vm size name. - /// The number of cores that the vm size has. - /// The data disk storage tier of the vm size. - /// The label of the vm size. - /// The max data disk count of the vm size. - /// The memory whose unit is MB of the vm size. - /// This indicates this vm size is supported by virtual machines or not. - /// The indicates this vm size is supported by web worker roles or not. - /// The virtual machine resource disk size whose unit is MB of the vm size. - /// The web worker resource disk size whose unit is MB of the vm size. - internal HDInsightVmSizeProperty(string name, int? cores, string dataDiskStorageTier, string label, long? maxDataDiskCount, long? memoryInMB, bool? isSupportedByVirtualMachines, bool? isSupportedByWebWorkerRoles, long? virtualMachineResourceDiskSizeInMB, long? webWorkerResourceDiskSizeInMB) - { - Name = name; - Cores = cores; - DataDiskStorageTier = dataDiskStorageTier; - Label = label; - MaxDataDiskCount = maxDataDiskCount; - MemoryInMB = memoryInMB; - IsSupportedByVirtualMachines = isSupportedByVirtualMachines; - IsSupportedByWebWorkerRoles = isSupportedByWebWorkerRoles; - VirtualMachineResourceDiskSizeInMB = virtualMachineResourceDiskSizeInMB; - WebWorkerResourceDiskSizeInMB = webWorkerResourceDiskSizeInMB; - } - - /// The vm size name. - public string Name { get; } - /// The number of cores that the vm size has. - public int? Cores { get; } - /// The data disk storage tier of the vm size. - public string DataDiskStorageTier { get; } - /// The label of the vm size. - public string Label { get; } - /// The max data disk count of the vm size. - public long? MaxDataDiskCount { get; } - /// The memory whose unit is MB of the vm size. - public long? MemoryInMB { get; } - /// This indicates this vm size is supported by virtual machines or not. - public bool? IsSupportedByVirtualMachines { get; } - /// The indicates this vm size is supported by web worker roles or not. - public bool? IsSupportedByWebWorkerRoles { get; } - /// The virtual machine resource disk size whose unit is MB of the vm size. - public long? VirtualMachineResourceDiskSizeInMB { get; } - /// The web worker resource disk size whose unit is MB of the vm size. - public long? WebWorkerResourceDiskSizeInMB { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HardwareProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HardwareProfile.cs deleted file mode 100644 index d765f5c3a01a..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HardwareProfile.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The hardware profile. - internal partial class HardwareProfile - { - /// Initializes a new instance of HardwareProfile. - public HardwareProfile() - { - } - - /// Initializes a new instance of HardwareProfile. - /// The size of the VM. - internal HardwareProfile(string vmSize) - { - VmSize = vmSize; - } - - /// The size of the VM. - public string VmSize { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HiveCatalogOption.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HiveCatalogOption.Serialization.cs new file mode 100644 index 000000000000..be2f20b1085c --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HiveCatalogOption.Serialization.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class HiveCatalogOption : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("catalogName"u8); + writer.WriteStringValue(CatalogName); + writer.WritePropertyName("metastoreDbConnectionPasswordSecret"u8); + writer.WriteStringValue(MetastoreDbConnectionPasswordSecret); + writer.WritePropertyName("metastoreDbConnectionURL"u8); + writer.WriteStringValue(MetastoreDbConnectionURL); + writer.WritePropertyName("metastoreDbConnectionUserName"u8); + writer.WriteStringValue(MetastoreDbConnectionUserName); + writer.WritePropertyName("metastoreWarehouseDir"u8); + writer.WriteStringValue(MetastoreWarehouseDir); + writer.WriteEndObject(); + } + + internal static HiveCatalogOption DeserializeHiveCatalogOption(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string catalogName = default; + string metastoreDbConnectionPasswordSecret = default; + string metastoreDbConnectionURL = default; + string metastoreDbConnectionUserName = default; + string metastoreWarehouseDir = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("catalogName"u8)) + { + catalogName = property.Value.GetString(); + continue; + } + if (property.NameEquals("metastoreDbConnectionPasswordSecret"u8)) + { + metastoreDbConnectionPasswordSecret = property.Value.GetString(); + continue; + } + if (property.NameEquals("metastoreDbConnectionURL"u8)) + { + metastoreDbConnectionURL = property.Value.GetString(); + continue; + } + if (property.NameEquals("metastoreDbConnectionUserName"u8)) + { + metastoreDbConnectionUserName = property.Value.GetString(); + continue; + } + if (property.NameEquals("metastoreWarehouseDir"u8)) + { + metastoreWarehouseDir = property.Value.GetString(); + continue; + } + } + return new HiveCatalogOption(catalogName, metastoreDbConnectionPasswordSecret, metastoreDbConnectionURL, metastoreDbConnectionUserName, metastoreWarehouseDir); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HiveCatalogOption.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HiveCatalogOption.cs new file mode 100644 index 000000000000..c932d1bfa442 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HiveCatalogOption.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Hive Catalog Option. + public partial class HiveCatalogOption + { + /// Initializes a new instance of HiveCatalogOption. + /// Name of trino catalog which should use specified hive metastore. + /// Secret reference name from secretsProfile.secrets containing password for database connection. + /// Connection string for hive metastore database. + /// User name for database connection. + /// 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. + /// , , , or is null. + public HiveCatalogOption(string catalogName, string metastoreDbConnectionPasswordSecret, string metastoreDbConnectionURL, string metastoreDbConnectionUserName, string metastoreWarehouseDir) + { + Argument.AssertNotNull(catalogName, nameof(catalogName)); + Argument.AssertNotNull(metastoreDbConnectionPasswordSecret, nameof(metastoreDbConnectionPasswordSecret)); + Argument.AssertNotNull(metastoreDbConnectionURL, nameof(metastoreDbConnectionURL)); + Argument.AssertNotNull(metastoreDbConnectionUserName, nameof(metastoreDbConnectionUserName)); + Argument.AssertNotNull(metastoreWarehouseDir, nameof(metastoreWarehouseDir)); + + CatalogName = catalogName; + MetastoreDbConnectionPasswordSecret = metastoreDbConnectionPasswordSecret; + MetastoreDbConnectionURL = metastoreDbConnectionURL; + MetastoreDbConnectionUserName = metastoreDbConnectionUserName; + MetastoreWarehouseDir = metastoreWarehouseDir; + } + + /// Name of trino catalog which should use specified hive metastore. + public string CatalogName { get; set; } + /// Secret reference name from secretsProfile.secrets containing password for database connection. + public string MetastoreDbConnectionPasswordSecret { get; set; } + /// Connection string for hive metastore database. + public string MetastoreDbConnectionURL { get; set; } + /// User name for database connection. + public string MetastoreDbConnectionUserName { get; set; } + /// 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. + public string MetastoreWarehouseDir { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/IdentityProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/IdentityProfile.Serialization.cs new file mode 100644 index 000000000000..b3efad7c1932 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/IdentityProfile.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class IdentityProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("msiResourceId"u8); + writer.WriteStringValue(MsiResourceId); + writer.WritePropertyName("msiClientId"u8); + writer.WriteStringValue(MsiClientId); + writer.WritePropertyName("msiObjectId"u8); + writer.WriteStringValue(MsiObjectId); + writer.WriteEndObject(); + } + + internal static IdentityProfile DeserializeIdentityProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier msiResourceId = default; + string msiClientId = default; + string msiObjectId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("msiResourceId"u8)) + { + msiResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("msiClientId"u8)) + { + msiClientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("msiObjectId"u8)) + { + msiObjectId = property.Value.GetString(); + continue; + } + } + return new IdentityProfile(msiResourceId, msiClientId, msiObjectId); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/IdentityProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/IdentityProfile.cs new file mode 100644 index 000000000000..143f5dfb9cdc --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/IdentityProfile.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Identity Profile with details of an MSI. + public partial class IdentityProfile + { + /// Initializes a new instance of IdentityProfile. + /// ResourceId of the MSI. + /// ClientId of the MSI. + /// ObjectId of the MSI. + /// , or is null. + public IdentityProfile(ResourceIdentifier msiResourceId, string msiClientId, string msiObjectId) + { + Argument.AssertNotNull(msiResourceId, nameof(msiResourceId)); + Argument.AssertNotNull(msiClientId, nameof(msiClientId)); + Argument.AssertNotNull(msiObjectId, nameof(msiObjectId)); + + MsiResourceId = msiResourceId; + MsiClientId = msiClientId; + MsiObjectId = msiObjectId; + } + + /// ResourceId of the MSI. + public ResourceIdentifier MsiResourceId { get; set; } + /// ClientId of the MSI. + public string MsiClientId { get; set; } + /// ObjectId of the MSI. + public string MsiObjectId { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/JobType.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/JobType.cs new file mode 100644 index 000000000000..79ba6e8294c5 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/JobType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Type of cluster job. + internal readonly partial struct JobType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public JobType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FlinkJobValue = "FlinkJob"; + + /// FlinkJob. + public static JobType FlinkJob { get; } = new JobType(FlinkJobValue); + /// Determines if two values are the same. + public static bool operator ==(JobType left, JobType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobType left, JobType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator JobType(string value) => new JobType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobType other && Equals(other); + /// + public bool Equals(JobType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/JsonWebKeyEncryptionAlgorithm.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/JsonWebKeyEncryptionAlgorithm.cs deleted file mode 100644 index b26567681025..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/JsonWebKeyEncryptionAlgorithm.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// Algorithm identifier for encryption, default RSA-OAEP. - public readonly partial struct JsonWebKeyEncryptionAlgorithm : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public JsonWebKeyEncryptionAlgorithm(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string RsaOaepValue = "RSA-OAEP"; - private const string RsaOaep256Value = "RSA-OAEP-256"; - private const string Rsa15Value = "RSA1_5"; - - /// RSA-OAEP. - public static JsonWebKeyEncryptionAlgorithm RsaOaep { get; } = new JsonWebKeyEncryptionAlgorithm(RsaOaepValue); - /// RSA-OAEP-256. - public static JsonWebKeyEncryptionAlgorithm RsaOaep256 { get; } = new JsonWebKeyEncryptionAlgorithm(RsaOaep256Value); - /// RSA1_5. - public static JsonWebKeyEncryptionAlgorithm Rsa15 { get; } = new JsonWebKeyEncryptionAlgorithm(Rsa15Value); - /// Determines if two values are the same. - public static bool operator ==(JsonWebKeyEncryptionAlgorithm left, JsonWebKeyEncryptionAlgorithm right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(JsonWebKeyEncryptionAlgorithm left, JsonWebKeyEncryptionAlgorithm right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator JsonWebKeyEncryptionAlgorithm(string value) => new JsonWebKeyEncryptionAlgorithm(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is JsonWebKeyEncryptionAlgorithm other && Equals(other); - /// - public bool Equals(JsonWebKeyEncryptionAlgorithm other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/KafkaRestProperties.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/KafkaRestProperties.Serialization.cs deleted file mode 100644 index 4f3e876b1883..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/KafkaRestProperties.Serialization.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class KafkaRestProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ClientGroupInfo)) - { - writer.WritePropertyName("clientGroupInfo"u8); - writer.WriteObjectValue(ClientGroupInfo); - } - if (Optional.IsCollectionDefined(ConfigurationOverride)) - { - writer.WritePropertyName("configurationOverride"u8); - writer.WriteStartObject(); - foreach (var item in ConfigurationOverride) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static KafkaRestProperties DeserializeKafkaRestProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional clientGroupInfo = default; - Optional> configurationOverride = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("clientGroupInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clientGroupInfo = ClientGroupInfo.DeserializeClientGroupInfo(property.Value); - continue; - } - if (property.NameEquals("configurationOverride"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - configurationOverride = dictionary; - continue; - } - } - return new KafkaRestProperties(clientGroupInfo.Value, Optional.ToDictionary(configurationOverride)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/KafkaRestProperties.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/KafkaRestProperties.cs deleted file mode 100644 index 0a8c27b91706..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/KafkaRestProperties.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The kafka rest proxy configuration which contains AAD security group information. - public partial class KafkaRestProperties - { - /// Initializes a new instance of KafkaRestProperties. - public KafkaRestProperties() - { - ConfigurationOverride = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of KafkaRestProperties. - /// The information of AAD security group. - /// The configurations that need to be overriden. - internal KafkaRestProperties(ClientGroupInfo clientGroupInfo, IDictionary configurationOverride) - { - ClientGroupInfo = clientGroupInfo; - ConfigurationOverride = configurationOverride; - } - - /// The information of AAD security group. - public ClientGroupInfo ClientGroupInfo { get; set; } - /// The configurations that need to be overriden. - public IDictionary ConfigurationOverride { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/KeyVaultObjectType.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/KeyVaultObjectType.cs new file mode 100644 index 000000000000..d59049e70a5b --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/KeyVaultObjectType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Type of key vault object: secret, key or certificate. + public readonly partial struct KeyVaultObjectType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KeyVaultObjectType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string KeyValue = "Key"; + private const string SecretValue = "Secret"; + private const string CertificateValue = "Certificate"; + + /// Key. + public static KeyVaultObjectType Key { get; } = new KeyVaultObjectType(KeyValue); + /// Secret. + public static KeyVaultObjectType Secret { get; } = new KeyVaultObjectType(SecretValue); + /// Certificate. + public static KeyVaultObjectType Certificate { get; } = new KeyVaultObjectType(CertificateValue); + /// Determines if two values are the same. + public static bool operator ==(KeyVaultObjectType left, KeyVaultObjectType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KeyVaultObjectType left, KeyVaultObjectType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator KeyVaultObjectType(string value) => new KeyVaultObjectType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KeyVaultObjectType other && Equals(other); + /// + public bool Equals(KeyVaultObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/LoadBasedConfig.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/LoadBasedConfig.Serialization.cs new file mode 100644 index 000000000000..8e3bd87c85d1 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/LoadBasedConfig.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class LoadBasedConfig : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("minNodes"u8); + writer.WriteNumberValue(MinNodes); + writer.WritePropertyName("maxNodes"u8); + writer.WriteNumberValue(MaxNodes); + if (Optional.IsDefined(PollInterval)) + { + writer.WritePropertyName("pollInterval"u8); + writer.WriteNumberValue(PollInterval.Value); + } + if (Optional.IsDefined(CooldownPeriod)) + { + writer.WritePropertyName("cooldownPeriod"u8); + writer.WriteNumberValue(CooldownPeriod.Value); + } + writer.WritePropertyName("scalingRules"u8); + writer.WriteStartArray(); + foreach (var item in ScalingRules) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static LoadBasedConfig DeserializeLoadBasedConfig(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int minNodes = default; + int maxNodes = default; + Optional pollInterval = default; + Optional cooldownPeriod = default; + IList scalingRules = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minNodes"u8)) + { + minNodes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxNodes"u8)) + { + maxNodes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("pollInterval"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pollInterval = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("cooldownPeriod"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cooldownPeriod = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scalingRules"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ScalingRule.DeserializeScalingRule(item)); + } + scalingRules = array; + continue; + } + } + return new LoadBasedConfig(minNodes, maxNodes, Optional.ToNullable(pollInterval), Optional.ToNullable(cooldownPeriod), scalingRules); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/LoadBasedConfig.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/LoadBasedConfig.cs new file mode 100644 index 000000000000..692e721761cf --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/LoadBasedConfig.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Profile of load based Autoscale. + public partial class LoadBasedConfig + { + /// Initializes a new instance of LoadBasedConfig. + /// 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. + /// 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. + /// The scaling rules. + /// is null. + public LoadBasedConfig(int minNodes, int maxNodes, IEnumerable scalingRules) + { + Argument.AssertNotNull(scalingRules, nameof(scalingRules)); + + MinNodes = minNodes; + MaxNodes = maxNodes; + ScalingRules = scalingRules.ToList(); + } + + /// Initializes a new instance of LoadBasedConfig. + /// 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. + /// 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. + /// User can specify the poll interval, this is the time period (in seconds) after which scaling metrics are polled for triggering a scaling operation. + /// 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. + /// The scaling rules. + internal LoadBasedConfig(int minNodes, int maxNodes, int? pollInterval, int? cooldownPeriod, IList scalingRules) + { + MinNodes = minNodes; + MaxNodes = maxNodes; + PollInterval = pollInterval; + CooldownPeriod = cooldownPeriod; + ScalingRules = scalingRules; + } + + /// 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. + public int MinNodes { get; set; } + /// 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. + public int MaxNodes { get; set; } + /// User can specify the poll interval, this is the time period (in seconds) after which scaling metrics are polled for triggering a scaling operation. + public int? PollInterval { get; set; } + /// 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. + public int? CooldownPeriod { get; set; } + /// The scaling rules. + public IList ScalingRules { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityContent.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityContent.Serialization.cs similarity index 83% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityContent.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityContent.Serialization.cs index 4a9a927a081b..5e2cf2fd78a2 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityContent.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityContent.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.HDInsight.Models { - public partial class HDInsightNameAvailabilityContent : IUtf8JsonSerializable + public partial class NameAvailabilityContent : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -23,7 +23,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(ResourceType)) { writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType.Value); + writer.WriteStringValue(ResourceType); } writer.WriteEndObject(); } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityContent.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityContent.cs new file mode 100644 index 000000000000..7989f4abef2f --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityContent.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Details of check name availability request body. + public partial class NameAvailabilityContent + { + /// Initializes a new instance of NameAvailabilityContent. + public NameAvailabilityContent() + { + } + + /// Name for checking availability. + public string Name { get; set; } + /// The resource type in Microsoft.HDInsight. + public string ResourceType { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityResult.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityResult.Serialization.cs similarity index 81% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityResult.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityResult.Serialization.cs index 624fe83662c0..cfb1544bf451 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightNameAvailabilityResult.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityResult.Serialization.cs @@ -10,9 +10,9 @@ namespace Azure.ResourceManager.HDInsight.Models { - public partial class HDInsightNameAvailabilityResult + public partial class NameAvailabilityResult { - internal static HDInsightNameAvailabilityResult DeserializeHDInsightNameAvailabilityResult(JsonElement element) + internal static NameAvailabilityResult DeserializeNameAvailabilityResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -43,7 +43,7 @@ internal static HDInsightNameAvailabilityResult DeserializeHDInsightNameAvailabi continue; } } - return new HDInsightNameAvailabilityResult(Optional.ToNullable(nameAvailable), reason.Value, message.Value); + return new NameAvailabilityResult(Optional.ToNullable(nameAvailable), reason.Value, message.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityResult.cs new file mode 100644 index 000000000000..a52cd8b22046 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NameAvailabilityResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Result of check name availability. + public partial class NameAvailabilityResult + { + /// Initializes a new instance of NameAvailabilityResult. + internal NameAvailabilityResult() + { + } + + /// Initializes a new instance of NameAvailabilityResult. + /// Indicator of availability of the Microsoft.HDInsight resource name. + /// The reason of unavailability. + /// The error message of unavailability. + internal NameAvailabilityResult(bool? nameAvailable, string reason, string message) + { + NameAvailable = nameAvailable; + Reason = reason; + Message = message; + } + + /// Indicator of availability of the Microsoft.HDInsight resource name. + public bool? NameAvailable { get; } + /// The reason of unavailability. + public string Reason { get; } + /// The error message of unavailability. + public string Message { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NodeProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NodeProfile.Serialization.cs new file mode 100644 index 000000000000..67208232dbcd --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NodeProfile.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class NodeProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(NodeProfileType); + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count); + writer.WriteEndObject(); + } + + internal static NodeProfile DeserializeNodeProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = default; + string vmSize = default; + int count = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("count"u8)) + { + count = property.Value.GetInt32(); + continue; + } + } + return new NodeProfile(type, vmSize, count); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NodeProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NodeProfile.cs new file mode 100644 index 000000000000..8e919e7a545d --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/NodeProfile.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The node profile. + public partial class NodeProfile + { + /// Initializes a new instance of NodeProfile. + /// The node type. + /// The virtual machine SKU. + /// The number of virtual machines. + /// or is null. + public NodeProfile(string nodeProfileType, string vmSize, int count) + { + Argument.AssertNotNull(nodeProfileType, nameof(nodeProfileType)); + Argument.AssertNotNull(vmSize, nameof(vmSize)); + + NodeProfileType = nodeProfileType; + VmSize = vmSize; + Count = count; + } + + /// The node type. + public string NodeProfileType { get; set; } + /// The virtual machine SKU. + public string VmSize { get; set; } + /// The number of virtual machines. + public int Count { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/OSProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/OSProfile.cs deleted file mode 100644 index 972c1142db16..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/OSProfile.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The Linux operation systems profile. - internal partial class OSProfile - { - /// Initializes a new instance of OSProfile. - public OSProfile() - { - } - - /// Initializes a new instance of OSProfile. - /// The Linux OS profile. - internal OSProfile(HDInsightLinuxOSProfile linuxProfile) - { - LinuxProfile = linuxProfile; - } - - /// The Linux OS profile. - public HDInsightLinuxOSProfile LinuxProfile { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ProvisioningStatus.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ProvisioningStatus.cs new file mode 100644 index 000000000000..313a0e5914d2 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ProvisioningStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Provisioning state of the resource. + public readonly partial struct ProvisioningStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProvisioningStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AcceptedValue = "Accepted"; + private const string SucceededValue = "Succeeded"; + private const string CanceledValue = "Canceled"; + private const string FailedValue = "Failed"; + + /// Accepted. + public static ProvisioningStatus Accepted { get; } = new ProvisioningStatus(AcceptedValue); + /// Succeeded. + public static ProvisioningStatus Succeeded { get; } = new ProvisioningStatus(SucceededValue); + /// Canceled. + public static ProvisioningStatus Canceled { get; } = new ProvisioningStatus(CanceledValue); + /// Failed. + public static ProvisioningStatus Failed { get; } = new ProvisioningStatus(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(ProvisioningStatus left, ProvisioningStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProvisioningStatus left, ProvisioningStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ProvisioningStatus(string value) => new ProvisioningStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProvisioningStatus other && Equals(other); + /// + public bool Equals(ProvisioningStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaCapability.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaCapability.Serialization.cs deleted file mode 100644 index bb9845b8414c..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaCapability.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class QuotaCapability - { - internal static QuotaCapability DeserializeQuotaCapability(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional coresUsed = default; - Optional maxCoresAllowed = default; - Optional> regionalQuotas = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("coresUsed"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - coresUsed = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("maxCoresAllowed"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxCoresAllowed = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("regionalQuotas"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RegionalQuotaCapability.DeserializeRegionalQuotaCapability(item)); - } - regionalQuotas = array; - continue; - } - } - return new QuotaCapability(Optional.ToNullable(coresUsed), Optional.ToNullable(maxCoresAllowed), Optional.ToList(regionalQuotas)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaCapability.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaCapability.cs deleted file mode 100644 index fba5d0117e47..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaCapability.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The regional quota capability. - public partial class QuotaCapability - { - /// Initializes a new instance of QuotaCapability. - internal QuotaCapability() - { - RegionalQuotas = new ChangeTrackingList(); - } - - /// Initializes a new instance of QuotaCapability. - /// The number of cores used in the subscription. - /// The number of cores that the subscription allowed. - /// The list of region quota capabilities. - internal QuotaCapability(long? coresUsed, long? maxCoresAllowed, IReadOnlyList regionalQuotas) - { - CoresUsed = coresUsed; - MaxCoresAllowed = maxCoresAllowed; - RegionalQuotas = regionalQuotas; - } - - /// The number of cores used in the subscription. - public long? CoresUsed { get; } - /// The number of cores that the subscription allowed. - public long? MaxCoresAllowed { get; } - /// The list of region quota capabilities. - public IReadOnlyList RegionalQuotas { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaInfo.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaInfo.cs deleted file mode 100644 index 223ed04b4d97..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/QuotaInfo.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The quota properties for the cluster. - internal partial class QuotaInfo - { - /// Initializes a new instance of QuotaInfo. - public QuotaInfo() - { - } - - /// Initializes a new instance of QuotaInfo. - /// The cores used by the cluster. - internal QuotaInfo(int? coresUsed) - { - CoresUsed = coresUsed; - } - - /// The cores used by the cluster. - public int? CoresUsed { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionalQuotaCapability.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionalQuotaCapability.Serialization.cs deleted file mode 100644 index 70135c37f1f7..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionalQuotaCapability.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class RegionalQuotaCapability - { - internal static RegionalQuotaCapability DeserializeRegionalQuotaCapability(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional regionName = default; - Optional coresUsed = default; - Optional coresAvailable = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("regionName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - regionName = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("coresUsed"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - coresUsed = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("coresAvailable"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - coresAvailable = property.Value.GetInt64(); - continue; - } - } - return new RegionalQuotaCapability(Optional.ToNullable(regionName), Optional.ToNullable(coresUsed), Optional.ToNullable(coresAvailable)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionalQuotaCapability.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionalQuotaCapability.cs deleted file mode 100644 index 2b84a79ce139..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionalQuotaCapability.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The regional quota capacity. - public partial class RegionalQuotaCapability - { - /// Initializes a new instance of RegionalQuotaCapability. - internal RegionalQuotaCapability() - { - } - - /// Initializes a new instance of RegionalQuotaCapability. - /// The region name. - /// The number of cores used in the region. - /// The number of cores available in the region. - internal RegionalQuotaCapability(AzureLocation? region, long? coresUsed, long? coresAvailable) - { - Region = region; - CoresUsed = coresUsed; - CoresAvailable = coresAvailable; - } - - /// The region name. - public AzureLocation? Region { get; } - /// The number of cores used in the region. - public long? CoresUsed { get; } - /// The number of cores available in the region. - public long? CoresAvailable { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionsCapability.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionsCapability.Serialization.cs deleted file mode 100644 index 2b93e18dc820..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionsCapability.Serialization.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class RegionsCapability - { - internal static RegionsCapability DeserializeRegionsCapability(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> available = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("available"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - available = array; - continue; - } - } - return new RegionsCapability(Optional.ToList(available)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionsCapability.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionsCapability.cs deleted file mode 100644 index 10ef2eba31e1..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RegionsCapability.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The regions capability. - public partial class RegionsCapability - { - /// Initializes a new instance of RegionsCapability. - internal RegionsCapability() - { - Available = new ChangeTrackingList(); - } - - /// Initializes a new instance of RegionsCapability. - /// The list of region capabilities. - internal RegionsCapability(IReadOnlyList available) - { - Available = available; - } - - /// The list of region capabilities. - public IReadOnlyList Available { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptAction.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptAction.Serialization.cs deleted file mode 100644 index 19258fba743b..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptAction.Serialization.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class RuntimeScriptAction : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); - if (Optional.IsDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStringValue(Parameters); - } - writer.WritePropertyName("roles"u8); - writer.WriteStartArray(); - foreach (var item in Roles) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - - internal static RuntimeScriptAction DeserializeRuntimeScriptAction(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - Uri uri = default; - Optional parameters = default; - IList roles = default; - Optional applicationName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("uri"u8)) - { - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - parameters = property.Value.GetString(); - continue; - } - if (property.NameEquals("roles"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - roles = array; - continue; - } - if (property.NameEquals("applicationName"u8)) - { - applicationName = property.Value.GetString(); - continue; - } - } - return new RuntimeScriptAction(name, uri, parameters.Value, roles, applicationName.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptAction.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptAction.cs deleted file mode 100644 index 643632424df7..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptAction.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// Describes a script action on a running cluster. - public partial class RuntimeScriptAction - { - /// Initializes a new instance of RuntimeScriptAction. - /// The name of the script action. - /// The URI to the script. - /// The list of roles where script will be executed. - /// , or is null. - public RuntimeScriptAction(string name, Uri uri, IEnumerable roles) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(uri, nameof(uri)); - Argument.AssertNotNull(roles, nameof(roles)); - - Name = name; - Uri = uri; - Roles = roles.ToList(); - } - - /// Initializes a new instance of RuntimeScriptAction. - /// The name of the script action. - /// The URI to the script. - /// The parameters for the script. - /// The list of roles where script will be executed. - /// The application name of the script action, if any. - internal RuntimeScriptAction(string name, Uri uri, string parameters, IList roles, string applicationName) - { - Name = name; - Uri = uri; - Parameters = parameters; - Roles = roles; - ApplicationName = applicationName; - } - - /// The name of the script action. - public string Name { get; set; } - /// The URI to the script. - public Uri Uri { get; set; } - /// The parameters for the script. - public string Parameters { get; set; } - /// The list of roles where script will be executed. - public IList Roles { get; } - /// The application name of the script action, if any. - public string ApplicationName { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptActionDetail.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptActionDetail.Serialization.cs deleted file mode 100644 index d18dd52a73df..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptActionDetail.Serialization.cs +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class RuntimeScriptActionDetail : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); - if (Optional.IsDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteStringValue(Parameters); - } - writer.WritePropertyName("roles"u8); - writer.WriteStartArray(); - foreach (var item in Roles) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - - internal static RuntimeScriptActionDetail DeserializeRuntimeScriptActionDetail(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional scriptExecutionId = default; - Optional startTime = default; - Optional endTime = default; - Optional status = default; - Optional operation = default; - Optional> executionSummary = default; - Optional debugInformation = default; - string name = default; - Uri uri = default; - Optional parameters = default; - IList roles = default; - Optional applicationName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("scriptExecutionId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scriptExecutionId = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("endTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("operation"u8)) - { - operation = property.Value.GetString(); - continue; - } - if (property.NameEquals("executionSummary"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ScriptActionExecutionSummary.DeserializeScriptActionExecutionSummary(item)); - } - executionSummary = array; - continue; - } - if (property.NameEquals("debugInformation"u8)) - { - debugInformation = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("uri"u8)) - { - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - parameters = property.Value.GetString(); - continue; - } - if (property.NameEquals("roles"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - roles = array; - continue; - } - if (property.NameEquals("applicationName"u8)) - { - applicationName = property.Value.GetString(); - continue; - } - } - return new RuntimeScriptActionDetail(name, uri, parameters.Value, roles, applicationName.Value, Optional.ToNullable(scriptExecutionId), Optional.ToNullable(startTime), Optional.ToNullable(endTime), status.Value, operation.Value, Optional.ToList(executionSummary), debugInformation.Value); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptActionDetail.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptActionDetail.cs deleted file mode 100644 index bdecaad58da6..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/RuntimeScriptActionDetail.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The execution details of a script action. - public partial class RuntimeScriptActionDetail : RuntimeScriptAction - { - /// Initializes a new instance of RuntimeScriptActionDetail. - /// The name of the script action. - /// The URI to the script. - /// The list of roles where script will be executed. - /// , or is null. - public RuntimeScriptActionDetail(string name, Uri uri, IEnumerable roles) : base(name, uri, roles) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(uri, nameof(uri)); - Argument.AssertNotNull(roles, nameof(roles)); - - ExecutionSummary = new ChangeTrackingList(); - } - - /// Initializes a new instance of RuntimeScriptActionDetail. - /// The name of the script action. - /// The URI to the script. - /// The parameters for the script. - /// The list of roles where script will be executed. - /// The application name of the script action, if any. - /// The execution id of the script action. - /// The start time of script action execution. - /// The end time of script action execution. - /// The current execution status of the script action. - /// The reason why the script action was executed. - /// The summary of script action execution result. - /// The script action execution debug information. - internal RuntimeScriptActionDetail(string name, Uri uri, string parameters, IList roles, string applicationName, long? scriptExecutionId, DateTimeOffset? startOn, DateTimeOffset? endOn, string status, string operation, IReadOnlyList executionSummary, string debugInformation) : base(name, uri, parameters, roles, applicationName) - { - ScriptExecutionId = scriptExecutionId; - StartOn = startOn; - EndOn = endOn; - Status = status; - Operation = operation; - ExecutionSummary = executionSummary; - DebugInformation = debugInformation; - } - - /// The execution id of the script action. - public long? ScriptExecutionId { get; } - /// The start time of script action execution. - public DateTimeOffset? StartOn { get; } - /// The end time of script action execution. - public DateTimeOffset? EndOn { get; } - /// The current execution status of the script action. - public string Status { get; } - /// The reason why the script action was executed. - public string Operation { get; } - /// The summary of script action execution result. - public IReadOnlyList ExecutionSummary { get; } - /// The script action execution debug information. - public string DebugInformation { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScaleActionType.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScaleActionType.cs new file mode 100644 index 000000000000..b59fe5f85adc --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScaleActionType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The action type. + public readonly partial struct ScaleActionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScaleActionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ScaleupValue = "scaleup"; + private const string ScaledownValue = "scaledown"; + + /// scaleup. + public static ScaleActionType Scaleup { get; } = new ScaleActionType(ScaleupValue); + /// scaledown. + public static ScaleActionType Scaledown { get; } = new ScaleActionType(ScaledownValue); + /// Determines if two values are the same. + public static bool operator ==(ScaleActionType left, ScaleActionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScaleActionType left, ScaleActionType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ScaleActionType(string value) => new ScaleActionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScaleActionType other && Equals(other); + /// + public bool Equals(ScaleActionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScalingRule.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScalingRule.Serialization.cs new file mode 100644 index 000000000000..a87659e57ed5 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScalingRule.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ScalingRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("actionType"u8); + writer.WriteStringValue(ActionType.ToString()); + writer.WritePropertyName("evaluationCount"u8); + writer.WriteNumberValue(EvaluationCount); + writer.WritePropertyName("scalingMetric"u8); + writer.WriteStringValue(ScalingMetric); + writer.WritePropertyName("comparisonRule"u8); + writer.WriteObjectValue(ComparisonRule); + writer.WriteEndObject(); + } + + internal static ScalingRule DeserializeScalingRule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ScaleActionType actionType = default; + int evaluationCount = default; + string scalingMetric = default; + ComparisonRule comparisonRule = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("actionType"u8)) + { + actionType = new ScaleActionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationCount"u8)) + { + evaluationCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scalingMetric"u8)) + { + scalingMetric = property.Value.GetString(); + continue; + } + if (property.NameEquals("comparisonRule"u8)) + { + comparisonRule = ComparisonRule.DeserializeComparisonRule(property.Value); + continue; + } + } + return new ScalingRule(actionType, evaluationCount, scalingMetric, comparisonRule); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScalingRule.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScalingRule.cs new file mode 100644 index 000000000000..d80e82b2f468 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScalingRule.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The scaling rule. + public partial class ScalingRule + { + /// Initializes a new instance of ScalingRule. + /// The action type. + /// This is an evaluation count for a scaling condition, the number of times a trigger condition should be successful, before scaling activity is triggered. + /// Metrics name for individual workloads. For example: cpu. + /// The comparison rule. + /// or is null. + public ScalingRule(ScaleActionType actionType, int evaluationCount, string scalingMetric, ComparisonRule comparisonRule) + { + Argument.AssertNotNull(scalingMetric, nameof(scalingMetric)); + Argument.AssertNotNull(comparisonRule, nameof(comparisonRule)); + + ActionType = actionType; + EvaluationCount = evaluationCount; + ScalingMetric = scalingMetric; + ComparisonRule = comparisonRule; + } + + /// The action type. + public ScaleActionType ActionType { get; set; } + /// This is an evaluation count for a scaling condition, the number of times a trigger condition should be successful, before scaling activity is triggered. + public int EvaluationCount { get; set; } + /// Metrics name for individual workloads. For example: cpu. + public string ScalingMetric { get; set; } + /// The comparison rule. + public ComparisonRule ComparisonRule { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/Schedule.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/Schedule.Serialization.cs new file mode 100644 index 000000000000..c1d182a3971e --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/Schedule.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class Schedule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime); + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime); + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count); + writer.WritePropertyName("days"u8); + writer.WriteStartArray(); + foreach (var item in Days) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static Schedule DeserializeSchedule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string startTime = default; + string endTime = default; + int count = default; + IList days = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("endTime"u8)) + { + endTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("count"u8)) + { + count = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("days"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ScheduleDay(item.GetString())); + } + days = array; + continue; + } + } + return new Schedule(startTime, endTime, count, days); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/Schedule.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/Schedule.cs new file mode 100644 index 000000000000..387ce8eb656e --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/Schedule.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Schedule definition. + public partial class Schedule + { + /// Initializes a new instance of Schedule. + /// User has to set the start time of current schedule configuration, format like 10:30 (HH:MM). + /// User has to set the end time of current schedule configuration, format like 10:30 (HH:MM). + /// User has to set the node count anticipated at end of the scaling operation of the set current schedule configuration, format is integer. + /// User has to set the days where schedule has to be set for autoscale operation. + /// , or is null. + public Schedule(string startTime, string endTime, int count, IEnumerable days) + { + Argument.AssertNotNull(startTime, nameof(startTime)); + Argument.AssertNotNull(endTime, nameof(endTime)); + Argument.AssertNotNull(days, nameof(days)); + + StartTime = startTime; + EndTime = endTime; + Count = count; + Days = days.ToList(); + } + + /// Initializes a new instance of Schedule. + /// User has to set the start time of current schedule configuration, format like 10:30 (HH:MM). + /// User has to set the end time of current schedule configuration, format like 10:30 (HH:MM). + /// User has to set the node count anticipated at end of the scaling operation of the set current schedule configuration, format is integer. + /// User has to set the days where schedule has to be set for autoscale operation. + internal Schedule(string startTime, string endTime, int count, IList days) + { + StartTime = startTime; + EndTime = endTime; + Count = count; + Days = days; + } + + /// User has to set the start time of current schedule configuration, format like 10:30 (HH:MM). + public string StartTime { get; set; } + /// User has to set the end time of current schedule configuration, format like 10:30 (HH:MM). + public string EndTime { get; set; } + /// User has to set the node count anticipated at end of the scaling operation of the set current schedule configuration, format is integer. + public int Count { get; set; } + /// User has to set the days where schedule has to be set for autoscale operation. + public IList Days { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScheduleBasedConfig.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScheduleBasedConfig.Serialization.cs new file mode 100644 index 000000000000..dc83d1c7a25f --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScheduleBasedConfig.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ScheduleBasedConfig : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + writer.WritePropertyName("defaultCount"u8); + writer.WriteNumberValue(DefaultCount); + writer.WritePropertyName("schedules"u8); + writer.WriteStartArray(); + foreach (var item in Schedules) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static ScheduleBasedConfig DeserializeScheduleBasedConfig(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string timeZone = default; + int defaultCount = default; + IList schedules = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timeZone"u8)) + { + timeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("defaultCount"u8)) + { + defaultCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("schedules"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Schedule.DeserializeSchedule(item)); + } + schedules = array; + continue; + } + } + return new ScheduleBasedConfig(timeZone, defaultCount, schedules); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScheduleBasedConfig.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScheduleBasedConfig.cs new file mode 100644 index 000000000000..4a96dcf1caaa --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScheduleBasedConfig.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Profile of schedule based Autoscale. + public partial class ScheduleBasedConfig + { + /// Initializes a new instance of ScheduleBasedConfig. + /// User has to specify the timezone on which the schedule has to be set for schedule based autoscale configuration. + /// 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). + /// 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). + /// or is null. + public ScheduleBasedConfig(string timeZone, int defaultCount, IEnumerable schedules) + { + Argument.AssertNotNull(timeZone, nameof(timeZone)); + Argument.AssertNotNull(schedules, nameof(schedules)); + + TimeZone = timeZone; + DefaultCount = defaultCount; + Schedules = schedules.ToList(); + } + + /// Initializes a new instance of ScheduleBasedConfig. + /// User has to specify the timezone on which the schedule has to be set for schedule based autoscale configuration. + /// 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). + /// 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). + internal ScheduleBasedConfig(string timeZone, int defaultCount, IList schedules) + { + TimeZone = timeZone; + DefaultCount = defaultCount; + Schedules = schedules; + } + + /// User has to specify the timezone on which the schedule has to be set for schedule based autoscale configuration. + public string TimeZone { get; set; } + /// 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). + public int DefaultCount { get; set; } + /// 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). + public IList Schedules { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScheduleDay.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScheduleDay.cs new file mode 100644 index 000000000000..06c0aa5a12d3 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScheduleDay.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The ScheduleDay. + public readonly partial struct ScheduleDay : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ScheduleDay(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SundayValue = "Sunday"; + private const string MondayValue = "Monday"; + private const string TuesdayValue = "Tuesday"; + private const string WednesdayValue = "Wednesday"; + private const string ThursdayValue = "Thursday"; + private const string FridayValue = "Friday"; + private const string SaturdayValue = "Saturday"; + + /// Sunday. + public static ScheduleDay Sunday { get; } = new ScheduleDay(SundayValue); + /// Monday. + public static ScheduleDay Monday { get; } = new ScheduleDay(MondayValue); + /// Tuesday. + public static ScheduleDay Tuesday { get; } = new ScheduleDay(TuesdayValue); + /// Wednesday. + public static ScheduleDay Wednesday { get; } = new ScheduleDay(WednesdayValue); + /// Thursday. + public static ScheduleDay Thursday { get; } = new ScheduleDay(ThursdayValue); + /// Friday. + public static ScheduleDay Friday { get; } = new ScheduleDay(FridayValue); + /// Saturday. + public static ScheduleDay Saturday { get; } = new ScheduleDay(SaturdayValue); + /// Determines if two values are the same. + public static bool operator ==(ScheduleDay left, ScheduleDay right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScheduleDay left, ScheduleDay right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ScheduleDay(string value) => new ScheduleDay(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ScheduleDay other && Equals(other); + /// + public bool Equals(ScheduleDay other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptAction.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptAction.Serialization.cs deleted file mode 100644 index c1953305d367..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptAction.Serialization.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class ScriptAction : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); - writer.WritePropertyName("parameters"u8); - writer.WriteStringValue(Parameters); - writer.WriteEndObject(); - } - - internal static ScriptAction DeserializeScriptAction(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - Uri uri = default; - string parameters = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("uri"u8)) - { - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("parameters"u8)) - { - parameters = property.Value.GetString(); - continue; - } - } - return new ScriptAction(name, uri, parameters); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptAction.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptAction.cs deleted file mode 100644 index 7f114fdc9af4..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptAction.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// Describes a script action on role on the cluster. - public partial class ScriptAction - { - /// Initializes a new instance of ScriptAction. - /// The name of the script action. - /// The URI to the script. - /// The parameters for the script provided. - /// , or is null. - public ScriptAction(string name, Uri uri, string parameters) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(uri, nameof(uri)); - Argument.AssertNotNull(parameters, nameof(parameters)); - - Name = name; - Uri = uri; - Parameters = parameters; - } - - /// The name of the script action. - public string Name { get; set; } - /// The URI to the script. - public Uri Uri { get; set; } - /// The parameters for the script provided. - public string Parameters { get; set; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionHistoryList.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionHistoryList.cs deleted file mode 100644 index 120df2d0c856..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionHistoryList.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The list script execution history response. - internal partial class ScriptActionExecutionHistoryList - { - /// Initializes a new instance of ScriptActionExecutionHistoryList. - internal ScriptActionExecutionHistoryList() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of ScriptActionExecutionHistoryList. - /// The list of persisted script action details for the cluster. - /// The link (url) to the next page of results. - internal ScriptActionExecutionHistoryList(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// The list of persisted script action details for the cluster. - public IReadOnlyList Value { get; } - /// The link (url) to the next page of results. - public string NextLink { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionSummary.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionSummary.Serialization.cs deleted file mode 100644 index aa98ea6472c9..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionSummary.Serialization.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - public partial class ScriptActionExecutionSummary - { - internal static ScriptActionExecutionSummary DeserializeScriptActionExecutionSummary(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional status = default; - Optional instanceCount = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("instanceCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - instanceCount = property.Value.GetInt32(); - continue; - } - } - return new ScriptActionExecutionSummary(status.Value, Optional.ToNullable(instanceCount)); - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionSummary.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionSummary.cs deleted file mode 100644 index 72590f157679..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionExecutionSummary.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The execution summary of a script action. - public partial class ScriptActionExecutionSummary - { - /// Initializes a new instance of ScriptActionExecutionSummary. - internal ScriptActionExecutionSummary() - { - } - - /// Initializes a new instance of ScriptActionExecutionSummary. - /// The status of script action execution. - /// The instance count for a given script action execution status. - internal ScriptActionExecutionSummary(string status, int? instanceCount) - { - Status = status; - InstanceCount = instanceCount; - } - - /// The status of script action execution. - public string Status { get; } - /// The instance count for a given script action execution status. - public int? InstanceCount { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionProfile.Serialization.cs new file mode 100644 index 000000000000..2b1d04c76863 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionProfile.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ScriptActionProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ScriptActionProfileType); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStringValue(Parameters); + } + writer.WritePropertyName("services"u8); + writer.WriteStartArray(); + foreach (var item in Services) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(TimeoutInMinutes)) + { + writer.WritePropertyName("timeoutInMinutes"u8); + writer.WriteNumberValue(TimeoutInMinutes.Value); + } + if (Optional.IsDefined(ShouldPersist)) + { + writer.WritePropertyName("shouldPersist"u8); + writer.WriteBooleanValue(ShouldPersist.Value); + } + writer.WriteEndObject(); + } + + internal static ScriptActionProfile DeserializeScriptActionProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = default; + string name = default; + Uri url = default; + Optional parameters = default; + IList services = default; + Optional timeoutInMinutes = default; + Optional shouldPersist = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("url"u8)) + { + url = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("parameters"u8)) + { + parameters = property.Value.GetString(); + continue; + } + if (property.NameEquals("services"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + services = array; + continue; + } + if (property.NameEquals("timeoutInMinutes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeoutInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("shouldPersist"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + shouldPersist = property.Value.GetBoolean(); + continue; + } + } + return new ScriptActionProfile(type, name, url, parameters.Value, services, Optional.ToNullable(timeoutInMinutes), Optional.ToNullable(shouldPersist)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionProfile.cs new file mode 100644 index 000000000000..86661de92259 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionProfile.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The script action profile. + public partial class ScriptActionProfile + { + /// Initializes a new instance of ScriptActionProfile. + /// Type of the script action. Supported type is bash scripts. + /// Script name. + /// Url of the script file. + /// List of services to apply the script action. + /// , , or is null. + public ScriptActionProfile(string scriptActionProfileType, string name, Uri uri, IEnumerable services) + { + Argument.AssertNotNull(scriptActionProfileType, nameof(scriptActionProfileType)); + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(uri, nameof(uri)); + Argument.AssertNotNull(services, nameof(services)); + + ScriptActionProfileType = scriptActionProfileType; + Name = name; + Uri = uri; + Services = services.ToList(); + } + + /// Initializes a new instance of ScriptActionProfile. + /// Type of the script action. Supported type is bash scripts. + /// Script name. + /// Url of the script file. + /// Additional parameters for the script action. It should be space-separated list of arguments required for script execution. + /// List of services to apply the script action. + /// Timeout duration for the script action in minutes. + /// Specify if the script should persist on the cluster. + internal ScriptActionProfile(string scriptActionProfileType, string name, Uri uri, string parameters, IList services, int? timeoutInMinutes, bool? shouldPersist) + { + ScriptActionProfileType = scriptActionProfileType; + Name = name; + Uri = uri; + Parameters = parameters; + Services = services; + TimeoutInMinutes = timeoutInMinutes; + ShouldPersist = shouldPersist; + } + + /// Type of the script action. Supported type is bash scripts. + public string ScriptActionProfileType { get; set; } + /// Script name. + public string Name { get; set; } + /// Url of the script file. + public Uri Uri { get; set; } + /// Additional parameters for the script action. It should be space-separated list of arguments required for script execution. + public string Parameters { get; set; } + /// List of services to apply the script action. + public IList Services { get; } + /// Timeout duration for the script action in minutes. + public int? TimeoutInMinutes { get; set; } + /// Specify if the script should persist on the cluster. + public bool? ShouldPersist { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionsList.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionsList.cs deleted file mode 100644 index afc03c545004..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ScriptActionsList.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The persisted script action for the cluster. - internal partial class ScriptActionsList - { - /// Initializes a new instance of ScriptActionsList. - internal ScriptActionsList() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of ScriptActionsList. - /// The list of persisted script action details for the cluster. - /// The link (url) to the next page of results. - internal ScriptActionsList(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// The list of persisted script action details for the cluster. - public IReadOnlyList Value { get; } - /// The link (url) to the next page of results. - public string NextLink { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretReference.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretReference.Serialization.cs new file mode 100644 index 000000000000..a141f817917e --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretReference.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class SecretReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("referenceName"u8); + writer.WriteStringValue(ReferenceName); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(KeyVaultObjectType.ToString()); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + writer.WritePropertyName("keyVaultObjectName"u8); + writer.WriteStringValue(KeyVaultObjectName); + writer.WriteEndObject(); + } + + internal static SecretReference DeserializeSecretReference(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string referenceName = default; + KeyVaultObjectType type = default; + Optional version = default; + string keyVaultObjectName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("referenceName"u8)) + { + referenceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new KeyVaultObjectType(property.Value.GetString()); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyVaultObjectName"u8)) + { + keyVaultObjectName = property.Value.GetString(); + continue; + } + } + return new SecretReference(referenceName, type, version.Value, keyVaultObjectName); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretReference.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretReference.cs new file mode 100644 index 000000000000..f33b4aa44a76 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretReference.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Secret reference and corresponding properties of a key vault secret. + public partial class SecretReference + { + /// Initializes a new instance of SecretReference. + /// Reference name of the secret to be used in service configs. + /// Type of key vault object: secret, key or certificate. + /// Object identifier name of the secret in key vault. + /// or is null. + public SecretReference(string referenceName, KeyVaultObjectType keyVaultObjectType, string keyVaultObjectName) + { + Argument.AssertNotNull(referenceName, nameof(referenceName)); + Argument.AssertNotNull(keyVaultObjectName, nameof(keyVaultObjectName)); + + ReferenceName = referenceName; + KeyVaultObjectType = keyVaultObjectType; + KeyVaultObjectName = keyVaultObjectName; + } + + /// Initializes a new instance of SecretReference. + /// Reference name of the secret to be used in service configs. + /// Type of key vault object: secret, key or certificate. + /// Version of the secret in key vault. + /// Object identifier name of the secret in key vault. + internal SecretReference(string referenceName, KeyVaultObjectType keyVaultObjectType, string version, string keyVaultObjectName) + { + ReferenceName = referenceName; + KeyVaultObjectType = keyVaultObjectType; + Version = version; + KeyVaultObjectName = keyVaultObjectName; + } + + /// Reference name of the secret to be used in service configs. + public string ReferenceName { get; set; } + /// Type of key vault object: secret, key or certificate. + public KeyVaultObjectType KeyVaultObjectType { get; set; } + /// Version of the secret in key vault. + public string Version { get; set; } + /// Object identifier name of the secret in key vault. + public string KeyVaultObjectName { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleRecurrence.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretsProfile.Serialization.cs similarity index 51% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleRecurrence.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretsProfile.Serialization.cs index 93ef55d8b4ea..54918d5a6550 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightAutoScaleRecurrence.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretsProfile.Serialization.cs @@ -11,21 +11,18 @@ namespace Azure.ResourceManager.HDInsight.Models { - public partial class HDInsightAutoScaleRecurrence : IUtf8JsonSerializable + public partial class SecretsProfile : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(TimeZone)) + writer.WritePropertyName("keyVaultResourceId"u8); + writer.WriteStringValue(KeyVaultResourceId); + if (Optional.IsCollectionDefined(Secrets)) { - writer.WritePropertyName("timeZone"u8); - writer.WriteStringValue(TimeZone); - } - if (Optional.IsCollectionDefined(Schedule)) - { - writer.WritePropertyName("schedule"u8); + writer.WritePropertyName("secrets"u8); writer.WriteStartArray(); - foreach (var item in Schedule) + foreach (var item in Secrets) { writer.WriteObjectValue(item); } @@ -34,37 +31,37 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static HDInsightAutoScaleRecurrence DeserializeHDInsightAutoScaleRecurrence(JsonElement element) + internal static SecretsProfile DeserializeSecretsProfile(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional timeZone = default; - Optional> schedule = default; + ResourceIdentifier keyVaultResourceId = default; + Optional> secrets = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("timeZone"u8)) + if (property.NameEquals("keyVaultResourceId"u8)) { - timeZone = property.Value.GetString(); + keyVaultResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("schedule"u8)) + if (property.NameEquals("secrets"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HDInsightAutoScaleSchedule.DeserializeHDInsightAutoScaleSchedule(item)); + array.Add(SecretReference.DeserializeSecretReference(item)); } - schedule = array; + secrets = array; continue; } } - return new HDInsightAutoScaleRecurrence(timeZone.Value, Optional.ToList(schedule)); + return new SecretsProfile(keyVaultResourceId, Optional.ToList(secrets)); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretsProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretsProfile.cs new file mode 100644 index 000000000000..913cb3b17532 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SecretsProfile.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The cluster secret profile. + public partial class SecretsProfile + { + /// Initializes a new instance of SecretsProfile. + /// Name of the user Key Vault where all the cluster specific user secrets are stored. + /// is null. + public SecretsProfile(ResourceIdentifier keyVaultResourceId) + { + Argument.AssertNotNull(keyVaultResourceId, nameof(keyVaultResourceId)); + + KeyVaultResourceId = keyVaultResourceId; + Secrets = new ChangeTrackingList(); + } + + /// Initializes a new instance of SecretsProfile. + /// Name of the user Key Vault where all the cluster specific user secrets are stored. + /// Properties of Key Vault secret. + internal SecretsProfile(ResourceIdentifier keyVaultResourceId, IList secrets) + { + KeyVaultResourceId = keyVaultResourceId; + Secrets = secrets; + } + + /// Name of the user Key Vault where all the cluster specific user secrets are stored. + public ResourceIdentifier KeyVaultResourceId { get; set; } + /// Properties of Key Vault secret. + public IList Secrets { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResult.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResult.Serialization.cs new file mode 100644 index 000000000000..8db19857d8a0 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResult.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + internal partial class ServiceConfigListResult + { + internal static ServiceConfigListResult DeserializeServiceConfigListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ServiceConfigResult.DeserializeServiceConfigResult(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ServiceConfigListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResult.cs new file mode 100644 index 000000000000..b25f5c14c6b5 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster instance service configs api response. + internal partial class ServiceConfigListResult + { + /// Initializes a new instance of ServiceConfigListResult. + internal ServiceConfigListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ServiceConfigListResult. + /// Cluster instance service config array. + /// The link (url) to the next page of results. + internal ServiceConfigListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Cluster instance service config array. + public IReadOnlyList Value { get; } + /// The link (url) to the next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLocalizedName.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResultValueEntity.Serialization.cs similarity index 59% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLocalizedName.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResultValueEntity.Serialization.cs index 9755c4889784..d4d293da92c2 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/HDInsightLocalizedName.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResultValueEntity.Serialization.cs @@ -10,16 +10,16 @@ namespace Azure.ResourceManager.HDInsight.Models { - public partial class HDInsightLocalizedName + public partial class ServiceConfigListResultValueEntity { - internal static HDInsightLocalizedName DeserializeHDInsightLocalizedName(JsonElement element) + internal static ServiceConfigListResultValueEntity DeserializeServiceConfigListResultValueEntity(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional value = default; - Optional localizedValue = default; + string value = default; + Optional description = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) @@ -27,13 +27,13 @@ internal static HDInsightLocalizedName DeserializeHDInsightLocalizedName(JsonEle value = property.Value.GetString(); continue; } - if (property.NameEquals("localizedValue"u8)) + if (property.NameEquals("description"u8)) { - localizedValue = property.Value.GetString(); + description = property.Value.GetString(); continue; } } - return new HDInsightLocalizedName(value.Value, localizedValue.Value); + return new ServiceConfigListResultValueEntity(value, description.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResultValueEntity.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResultValueEntity.cs new file mode 100644 index 000000000000..c6c106175d1a --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigListResultValueEntity.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Default config details. + public partial class ServiceConfigListResultValueEntity + { + /// Initializes a new instance of ServiceConfigListResultValueEntity. + /// Config value. + /// is null. + internal ServiceConfigListResultValueEntity(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value; + } + + /// Initializes a new instance of ServiceConfigListResultValueEntity. + /// Config value. + /// Config description. + internal ServiceConfigListResultValueEntity(string value, string description) + { + Value = value; + Description = description; + } + + /// Config value. + public string Value { get; } + /// Config description. + public string Description { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigResult.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigResult.Serialization.cs new file mode 100644 index 000000000000..f63a885eb7a0 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigResult.Serialization.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ServiceConfigResult + { + internal static ServiceConfigResult DeserializeServiceConfigResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional serviceName = default; + Optional fileName = default; + Optional content = default; + Optional componentName = default; + Optional type = default; + Optional path = default; + Optional> customKeys = default; + Optional> defaultKeys = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("serviceName"u8)) + { + serviceName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("fileName"u8)) + { + fileName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("content"u8)) + { + content = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("componentName"u8)) + { + componentName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("type"u8)) + { + type = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("path"u8)) + { + path = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("customKeys"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + customKeys = dictionary; + continue; + } + if (property0.NameEquals("defaultKeys"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, ServiceConfigListResultValueEntity.DeserializeServiceConfigListResultValueEntity(property1.Value)); + } + defaultKeys = dictionary; + continue; + } + } + continue; + } + } + return new ServiceConfigResult(serviceName.Value, fileName.Value, content.Value, componentName.Value, type.Value, path.Value, Optional.ToDictionary(customKeys), Optional.ToDictionary(defaultKeys)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigResult.cs new file mode 100644 index 000000000000..0439d0f54a32 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceConfigResult.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster instance service config. + public partial class ServiceConfigResult + { + /// Initializes a new instance of ServiceConfigResult. + internal ServiceConfigResult() + { + CustomKeys = new ChangeTrackingDictionary(); + DefaultKeys = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ServiceConfigResult. + /// Service Config Name. + /// File Name. + /// Content in the service config file. + /// Component Name. + /// Config type. + /// Config file path. + /// The custom keys. + /// The default keys. + internal ServiceConfigResult(string serviceName, string fileName, string content, string componentName, string serviceConfigListResultPropertiesType, string path, IReadOnlyDictionary customKeys, IReadOnlyDictionary defaultKeys) + { + ServiceName = serviceName; + FileName = fileName; + Content = content; + ComponentName = componentName; + ServiceConfigListResultPropertiesType = serviceConfigListResultPropertiesType; + Path = path; + CustomKeys = customKeys; + DefaultKeys = defaultKeys; + } + + /// Service Config Name. + public string ServiceName { get; } + /// File Name. + public string FileName { get; } + /// Content in the service config file. + public string Content { get; } + /// Component Name. + public string ComponentName { get; } + /// Config type. + public string ServiceConfigListResultPropertiesType { get; } + /// Config file path. + public string Path { get; } + /// The custom keys. + public IReadOnlyDictionary CustomKeys { get; } + /// The default keys. + public IReadOnlyDictionary DefaultKeys { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceStatus.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceStatus.Serialization.cs new file mode 100644 index 000000000000..90ba9719fbe8 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceStatus.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class ServiceStatus + { + internal static ServiceStatus DeserializeServiceStatus(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + string ready = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("ready"u8)) + { + ready = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + } + return new ServiceStatus(kind, ready, message.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceStatus.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceStatus.cs new file mode 100644 index 000000000000..35a8943ef629 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/ServiceStatus.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Describes the status of a service of a HDInsight on aks cluster. + public partial class ServiceStatus + { + /// Initializes a new instance of ServiceStatus. + /// Kind of the service. E.g. "Zookeeper". + /// Indicates if the service is ready / healthy. Values can be "true", "false", "unknown" or anything else. + /// or is null. + internal ServiceStatus(string kind, string ready) + { + Argument.AssertNotNull(kind, nameof(kind)); + Argument.AssertNotNull(ready, nameof(ready)); + + Kind = kind; + Ready = ready; + } + + /// Initializes a new instance of ServiceStatus. + /// Kind of the service. E.g. "Zookeeper". + /// Indicates if the service is ready / healthy. Values can be "true", "false", "unknown" or anything else. + /// A message describing the error if any. + internal ServiceStatus(string kind, string ready, string message) + { + Kind = kind; + Ready = ready; + Message = message; + } + + /// Kind of the service. E.g. "Zookeeper". + public string Kind { get; } + /// Indicates if the service is ready / healthy. Values can be "true", "false", "unknown" or anything else. + public string Ready { get; } + /// A message describing the error if any. + public string Message { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkMetastoreSpec.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkMetastoreSpec.Serialization.cs new file mode 100644 index 000000000000..34eed63b8b88 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkMetastoreSpec.Serialization.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class SparkMetastoreSpec : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("dbServerHost"u8); + writer.WriteStringValue(DbServerHost); + writer.WritePropertyName("dbName"u8); + writer.WriteStringValue(DbName); + writer.WritePropertyName("dbUserName"u8); + writer.WriteStringValue(DbUserName); + writer.WritePropertyName("dbPasswordSecretName"u8); + writer.WriteStringValue(DbPasswordSecretName); + writer.WritePropertyName("keyVaultId"u8); + writer.WriteStringValue(KeyVaultId); + if (Optional.IsDefined(ThriftUri)) + { + writer.WritePropertyName("thriftUrl"u8); + writer.WriteStringValue(ThriftUri.AbsoluteUri); + } + writer.WriteEndObject(); + } + + internal static SparkMetastoreSpec DeserializeSparkMetastoreSpec(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string dbServerHost = default; + string dbName = default; + string dbUserName = default; + string dbPasswordSecretName = default; + string keyVaultId = default; + Optional thriftUrl = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dbServerHost"u8)) + { + dbServerHost = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbName"u8)) + { + dbName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbUserName"u8)) + { + dbUserName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbPasswordSecretName"u8)) + { + dbPasswordSecretName = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyVaultId"u8)) + { + keyVaultId = property.Value.GetString(); + continue; + } + if (property.NameEquals("thriftUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + thriftUrl = new Uri(property.Value.GetString()); + continue; + } + } + return new SparkMetastoreSpec(dbServerHost, dbName, dbUserName, dbPasswordSecretName, keyVaultId, thriftUrl.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkMetastoreSpec.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkMetastoreSpec.cs new file mode 100644 index 000000000000..6d9bb5ce097e --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkMetastoreSpec.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The metastore specification for Spark cluster. + public partial class SparkMetastoreSpec + { + /// Initializes a new instance of SparkMetastoreSpec. + /// The database server host. + /// The database name. + /// The database user name. + /// The secret name which contains the database user password. + /// The key vault resource id. + /// , , , or is null. + public SparkMetastoreSpec(string dbServerHost, string dbName, string dbUserName, string dbPasswordSecretName, string keyVaultId) + { + Argument.AssertNotNull(dbServerHost, nameof(dbServerHost)); + Argument.AssertNotNull(dbName, nameof(dbName)); + Argument.AssertNotNull(dbUserName, nameof(dbUserName)); + Argument.AssertNotNull(dbPasswordSecretName, nameof(dbPasswordSecretName)); + Argument.AssertNotNull(keyVaultId, nameof(keyVaultId)); + + DbServerHost = dbServerHost; + DbName = dbName; + DbUserName = dbUserName; + DbPasswordSecretName = dbPasswordSecretName; + KeyVaultId = keyVaultId; + } + + /// Initializes a new instance of SparkMetastoreSpec. + /// The database server host. + /// The database name. + /// The database user name. + /// The secret name which contains the database user password. + /// The key vault resource id. + /// The thrift url. + internal SparkMetastoreSpec(string dbServerHost, string dbName, string dbUserName, string dbPasswordSecretName, string keyVaultId, Uri thriftUri) + { + DbServerHost = dbServerHost; + DbName = dbName; + DbUserName = dbUserName; + DbPasswordSecretName = dbPasswordSecretName; + KeyVaultId = keyVaultId; + ThriftUri = thriftUri; + } + + /// The database server host. + public string DbServerHost { get; set; } + /// The database name. + public string DbName { get; set; } + /// The database user name. + public string DbUserName { get; set; } + /// The secret name which contains the database user password. + public string DbPasswordSecretName { get; set; } + /// The key vault resource id. + public string KeyVaultId { get; set; } + /// The thrift url. + public Uri ThriftUri { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkProfile.Serialization.cs new file mode 100644 index 000000000000..596fd70ee786 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkProfile.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class SparkProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DefaultStorageUri)) + { + writer.WritePropertyName("defaultStorageUrl"u8); + writer.WriteStringValue(DefaultStorageUri.AbsoluteUri); + } + if (Optional.IsDefined(MetastoreSpec)) + { + writer.WritePropertyName("metastoreSpec"u8); + writer.WriteObjectValue(MetastoreSpec); + } + if (Optional.IsDefined(UserPluginsSpec)) + { + writer.WritePropertyName("userPluginsSpec"u8); + writer.WriteObjectValue(UserPluginsSpec); + } + writer.WriteEndObject(); + } + + internal static SparkProfile DeserializeSparkProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional defaultStorageUrl = default; + Optional metastoreSpec = default; + Optional userPluginsSpec = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("defaultStorageUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultStorageUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("metastoreSpec"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metastoreSpec = SparkMetastoreSpec.DeserializeSparkMetastoreSpec(property.Value); + continue; + } + if (property.NameEquals("userPluginsSpec"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userPluginsSpec = SparkUserPlugins.DeserializeSparkUserPlugins(property.Value); + continue; + } + } + return new SparkProfile(defaultStorageUrl.Value, metastoreSpec.Value, userPluginsSpec.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkProfile.cs new file mode 100644 index 000000000000..743350ef4ae3 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkProfile.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The spark cluster profile. + public partial class SparkProfile + { + /// Initializes a new instance of SparkProfile. + public SparkProfile() + { + } + + /// Initializes a new instance of SparkProfile. + /// The default storage URL. + /// The metastore specification for Spark cluster. + /// Spark user plugins spec. + internal SparkProfile(Uri defaultStorageUri, SparkMetastoreSpec metastoreSpec, SparkUserPlugins userPluginsSpec) + { + DefaultStorageUri = defaultStorageUri; + MetastoreSpec = metastoreSpec; + UserPluginsSpec = userPluginsSpec; + } + + /// The default storage URL. + public Uri DefaultStorageUri { get; set; } + /// The metastore specification for Spark cluster. + public SparkMetastoreSpec MetastoreSpec { get; set; } + /// Spark user plugins spec. + internal SparkUserPlugins UserPluginsSpec { get; set; } + /// Spark user plugins. + public IList Plugins + { + get + { + if (UserPluginsSpec is null) + UserPluginsSpec = new SparkUserPlugins(); + return UserPluginsSpec.Plugins; + } + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugin.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugin.Serialization.cs new file mode 100644 index 000000000000..e091d43ec50b --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugin.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class SparkUserPlugin : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + writer.WriteEndObject(); + } + + internal static SparkUserPlugin DeserializeSparkUserPlugin(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string path = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + } + return new SparkUserPlugin(path); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugin.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugin.cs new file mode 100644 index 000000000000..99e546a43113 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugin.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Spark user plugin. + public partial class SparkUserPlugin + { + /// Initializes a new instance of SparkUserPlugin. + /// Fully qualified path to the folder containing the plugins. + /// is null. + public SparkUserPlugin(string path) + { + Argument.AssertNotNull(path, nameof(path)); + + Path = path; + } + + /// Fully qualified path to the folder containing the plugins. + public string Path { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugins.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugins.Serialization.cs new file mode 100644 index 000000000000..bc6dd60854e5 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugins.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + internal partial class SparkUserPlugins : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Plugins)) + { + writer.WritePropertyName("plugins"u8); + writer.WriteStartArray(); + foreach (var item in Plugins) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static SparkUserPlugins DeserializeSparkUserPlugins(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> plugins = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("plugins"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SparkUserPlugin.DeserializeSparkUserPlugin(item)); + } + plugins = array; + continue; + } + } + return new SparkUserPlugins(Optional.ToList(plugins)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugins.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugins.cs new file mode 100644 index 000000000000..292432ecf69e --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SparkUserPlugins.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Spark user plugins spec. + internal partial class SparkUserPlugins + { + /// Initializes a new instance of SparkUserPlugins. + public SparkUserPlugins() + { + Plugins = new ChangeTrackingList(); + } + + /// Initializes a new instance of SparkUserPlugins. + /// Spark user plugins. + internal SparkUserPlugins(IList plugins) + { + Plugins = plugins; + } + + /// Spark user plugins. + public IList Plugins { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshConnectivityEndpoint.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshConnectivityEndpoint.Serialization.cs new file mode 100644 index 000000000000..693c0401543a --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshConnectivityEndpoint.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class SshConnectivityEndpoint + { + internal static SshConnectivityEndpoint DeserializeSshConnectivityEndpoint(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string endpoint = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpoint"u8)) + { + endpoint = property.Value.GetString(); + continue; + } + } + return new SshConnectivityEndpoint(endpoint); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshConnectivityEndpoint.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshConnectivityEndpoint.cs new file mode 100644 index 000000000000..e26124ecf80b --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshConnectivityEndpoint.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// SSH connectivity endpoint details. + public partial class SshConnectivityEndpoint + { + /// Initializes a new instance of SshConnectivityEndpoint. + /// SSH connectivity endpoint. + /// is null. + internal SshConnectivityEndpoint(string endpoint) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + + Endpoint = endpoint; + } + + /// SSH connectivity endpoint. + public string Endpoint { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshProfile.Serialization.cs index 230a8b745d30..8082746c90c6 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshProfile.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshProfile.Serialization.cs @@ -5,27 +5,18 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; namespace Azure.ResourceManager.HDInsight.Models { - internal partial class SshProfile : IUtf8JsonSerializable + public partial class SshProfile : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsCollectionDefined(PublicKeys)) - { - writer.WritePropertyName("publicKeys"u8); - writer.WriteStartArray(); - foreach (var item in PublicKeys) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count); writer.WriteEndObject(); } @@ -35,25 +26,22 @@ internal static SshProfile DeserializeSshProfile(JsonElement element) { return null; } - Optional> publicKeys = default; + int count = default; + Optional podPrefix = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("publicKeys"u8)) + if (property.NameEquals("count"u8)) + { + count = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("podPrefix"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HDInsightSshPublicKey.DeserializeHDInsightSshPublicKey(item)); - } - publicKeys = array; + podPrefix = property.Value.GetString(); continue; } } - return new SshProfile(Optional.ToList(publicKeys)); + return new SshProfile(count, podPrefix.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshProfile.cs index 1f9eee99478f..866556704101 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshProfile.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/SshProfile.cs @@ -5,28 +5,30 @@ #nullable disable -using System.Collections.Generic; -using Azure.Core; - namespace Azure.ResourceManager.HDInsight.Models { - /// The list of SSH public keys. - internal partial class SshProfile + /// Ssh profile for the cluster. + public partial class SshProfile { /// Initializes a new instance of SshProfile. - public SshProfile() + /// Number of ssh pods per cluster. + public SshProfile(int count) { - PublicKeys = new ChangeTrackingList(); + Count = count; } /// Initializes a new instance of SshProfile. - /// The list of SSH public keys. - internal SshProfile(IList publicKeys) + /// Number of ssh pods per cluster. + /// 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>. + internal SshProfile(int count, string podPrefix) { - PublicKeys = publicKeys; + Count = count; + PodPrefix = podPrefix; } - /// The list of SSH public keys. - public IList PublicKeys { get; } + /// Number of ssh pods per cluster. + public int Count { get; set; } + /// 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>. + public string PodPrefix { get; } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/StorageProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/StorageProfile.cs deleted file mode 100644 index 498fbd5634b9..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/StorageProfile.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The storage profile. - internal partial class StorageProfile - { - /// Initializes a new instance of StorageProfile. - public StorageProfile() - { - StorageAccounts = new ChangeTrackingList(); - } - - /// Initializes a new instance of StorageProfile. - /// The list of storage accounts in the cluster. - internal StorageProfile(IList storageAccounts) - { - StorageAccounts = storageAccounts; - } - - /// The list of storage accounts in the cluster. - public IList StorageAccounts { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoCoordinator.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoCoordinator.Serialization.cs new file mode 100644 index 000000000000..c213c4f41489 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoCoordinator.Serialization.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class TrinoCoordinator : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(HighAvailabilityEnabled)) + { + writer.WritePropertyName("highAvailabilityEnabled"u8); + writer.WriteBooleanValue(HighAvailabilityEnabled.Value); + } + writer.WritePropertyName("debug"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Enable)) + { + writer.WritePropertyName("enable"u8); + writer.WriteBooleanValue(Enable.Value); + } + if (Optional.IsDefined(Port)) + { + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port.Value); + } + if (Optional.IsDefined(Suspend)) + { + writer.WritePropertyName("suspend"u8); + writer.WriteBooleanValue(Suspend.Value); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static TrinoCoordinator DeserializeTrinoCoordinator(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional highAvailabilityEnabled = default; + Optional enable = default; + Optional port = default; + Optional suspend = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("highAvailabilityEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilityEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("debug"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("enable"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enable = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("port"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("suspend"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + suspend = property0.Value.GetBoolean(); + continue; + } + } + continue; + } + } + return new TrinoCoordinator(Optional.ToNullable(highAvailabilityEnabled), Optional.ToNullable(enable), Optional.ToNullable(port), Optional.ToNullable(suspend)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoCoordinator.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoCoordinator.cs new file mode 100644 index 000000000000..fe8aed21b865 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoCoordinator.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Trino Coordinator. + public partial class TrinoCoordinator + { + /// Initializes a new instance of TrinoCoordinator. + public TrinoCoordinator() + { + } + + /// Initializes a new instance of TrinoCoordinator. + /// The flag that if enable coordinator HA, uses multiple coordinator replicas with auto failover, one per each head node. Default: true. + /// The flag that if enable debug or not. + /// The debug port. + /// The flag that if suspend debug or not. + internal TrinoCoordinator(bool? highAvailabilityEnabled, bool? enable, int? port, bool? suspend) + { + HighAvailabilityEnabled = highAvailabilityEnabled; + Enable = enable; + Port = port; + Suspend = suspend; + } + + /// The flag that if enable coordinator HA, uses multiple coordinator replicas with auto failover, one per each head node. Default: true. + public bool? HighAvailabilityEnabled { get; set; } + /// The flag that if enable debug or not. + public bool? Enable { get; set; } + /// The debug port. + public int? Port { get; set; } + /// The flag that if suspend debug or not. + public bool? Suspend { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoProfile.Serialization.cs new file mode 100644 index 000000000000..46aa205a8dcc --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoProfile.Serialization.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class TrinoProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CatalogOptions)) + { + writer.WritePropertyName("catalogOptions"u8); + writer.WriteObjectValue(CatalogOptions); + } + if (Optional.IsDefined(Coordinator)) + { + writer.WritePropertyName("coordinator"u8); + writer.WriteObjectValue(Coordinator); + } + if (Optional.IsDefined(UserPluginsSpec)) + { + writer.WritePropertyName("userPluginsSpec"u8); + writer.WriteObjectValue(UserPluginsSpec); + } + if (Optional.IsDefined(UserTelemetrySpec)) + { + writer.WritePropertyName("userTelemetrySpec"u8); + writer.WriteObjectValue(UserTelemetrySpec); + } + if (Optional.IsDefined(Worker)) + { + writer.WritePropertyName("worker"u8); + writer.WriteObjectValue(Worker); + } + writer.WriteEndObject(); + } + + internal static TrinoProfile DeserializeTrinoProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional catalogOptions = default; + Optional coordinator = default; + Optional userPluginsSpec = default; + Optional userTelemetrySpec = default; + Optional worker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("catalogOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + catalogOptions = CatalogOptions.DeserializeCatalogOptions(property.Value); + continue; + } + if (property.NameEquals("coordinator"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + coordinator = TrinoCoordinator.DeserializeTrinoCoordinator(property.Value); + continue; + } + if (property.NameEquals("userPluginsSpec"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userPluginsSpec = TrinoUserPlugins.DeserializeTrinoUserPlugins(property.Value); + continue; + } + if (property.NameEquals("userTelemetrySpec"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userTelemetrySpec = TrinoUserTelemetry.DeserializeTrinoUserTelemetry(property.Value); + continue; + } + if (property.NameEquals("worker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + worker = TrinoWorker.DeserializeTrinoWorker(property.Value); + continue; + } + } + return new TrinoProfile(catalogOptions.Value, coordinator.Value, userPluginsSpec.Value, userTelemetrySpec.Value, worker.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoProfile.cs new file mode 100644 index 000000000000..927d86e6f698 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoProfile.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Trino Cluster profile. + public partial class TrinoProfile + { + /// Initializes a new instance of TrinoProfile. + public TrinoProfile() + { + } + + /// Initializes a new instance of TrinoProfile. + /// Trino cluster catalog options. + /// Trino Coordinator. + /// Trino user plugins spec. + /// User telemetry. + /// Trino worker. + internal TrinoProfile(CatalogOptions catalogOptions, TrinoCoordinator coordinator, TrinoUserPlugins userPluginsSpec, TrinoUserTelemetry userTelemetrySpec, TrinoWorker worker) + { + CatalogOptions = catalogOptions; + Coordinator = coordinator; + UserPluginsSpec = userPluginsSpec; + UserTelemetrySpec = userTelemetrySpec; + Worker = worker; + } + + /// Trino cluster catalog options. + internal CatalogOptions CatalogOptions { get; set; } + /// hive catalog options. + public IList CatalogOptionsHive + { + get + { + if (CatalogOptions is null) + CatalogOptions = new CatalogOptions(); + return CatalogOptions.Hive; + } + } + + /// Trino Coordinator. + public TrinoCoordinator Coordinator { get; set; } + /// Trino user plugins spec. + internal TrinoUserPlugins UserPluginsSpec { get; set; } + /// Trino user plugins. + public IList Plugins + { + get + { + if (UserPluginsSpec is null) + UserPluginsSpec = new TrinoUserPlugins(); + return UserPluginsSpec.Plugins; + } + } + + /// User telemetry. + internal TrinoUserTelemetry UserTelemetrySpec { get; set; } + /// Trino user telemetry definition. + public TrinoTelemetryConfig UserTelemetrySpecStorage + { + get => UserTelemetrySpec is null ? default : UserTelemetrySpec.Storage; + set + { + if (UserTelemetrySpec is null) + UserTelemetrySpec = new TrinoUserTelemetry(); + UserTelemetrySpec.Storage = value; + } + } + + /// Trino worker. + public TrinoWorker Worker { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoTelemetryConfig.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoTelemetryConfig.Serialization.cs new file mode 100644 index 000000000000..154e02538c70 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoTelemetryConfig.Serialization.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class TrinoTelemetryConfig : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(HivecatalogName)) + { + writer.WritePropertyName("hivecatalogName"u8); + writer.WriteStringValue(HivecatalogName); + } + if (Optional.IsDefined(HivecatalogSchema)) + { + writer.WritePropertyName("hivecatalogSchema"u8); + writer.WriteStringValue(HivecatalogSchema); + } + if (Optional.IsDefined(PartitionRetentionInDays)) + { + writer.WritePropertyName("partitionRetentionInDays"u8); + writer.WriteNumberValue(PartitionRetentionInDays.Value); + } + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + writer.WriteEndObject(); + } + + internal static TrinoTelemetryConfig DeserializeTrinoTelemetryConfig(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional hivecatalogName = default; + Optional hivecatalogSchema = default; + Optional partitionRetentionInDays = default; + Optional path = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hivecatalogName"u8)) + { + hivecatalogName = property.Value.GetString(); + continue; + } + if (property.NameEquals("hivecatalogSchema"u8)) + { + hivecatalogSchema = property.Value.GetString(); + continue; + } + if (property.NameEquals("partitionRetentionInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partitionRetentionInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + } + return new TrinoTelemetryConfig(hivecatalogName.Value, hivecatalogSchema.Value, Optional.ToNullable(partitionRetentionInDays), path.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoTelemetryConfig.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoTelemetryConfig.cs new file mode 100644 index 000000000000..72a19e424efb --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoTelemetryConfig.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Trino user telemetry definition. + public partial class TrinoTelemetryConfig + { + /// Initializes a new instance of TrinoTelemetryConfig. + public TrinoTelemetryConfig() + { + } + + /// Initializes a new instance of TrinoTelemetryConfig. + /// Hive Catalog name used to mount external tables on the logs written by trino, if not specified there tables are not created. + /// Schema of the above catalog to use, to mount query logs as external tables, if not specified tables will be mounted under schema trinologs. + /// Retention period for query log table partitions, this doesn't have any affect on actual data. + /// Azure storage location of the blobs. + internal TrinoTelemetryConfig(string hivecatalogName, string hivecatalogSchema, int? partitionRetentionInDays, string path) + { + HivecatalogName = hivecatalogName; + HivecatalogSchema = hivecatalogSchema; + PartitionRetentionInDays = partitionRetentionInDays; + Path = path; + } + + /// Hive Catalog name used to mount external tables on the logs written by trino, if not specified there tables are not created. + public string HivecatalogName { get; set; } + /// Schema of the above catalog to use, to mount query logs as external tables, if not specified tables will be mounted under schema trinologs. + public string HivecatalogSchema { get; set; } + /// Retention period for query log table partitions, this doesn't have any affect on actual data. + public int? PartitionRetentionInDays { get; set; } + /// Azure storage location of the blobs. + public string Path { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugin.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugin.Serialization.cs new file mode 100644 index 000000000000..4908e56cac56 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugin.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class TrinoUserPlugin : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Enabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(Enabled.Value); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + writer.WriteEndObject(); + } + + internal static TrinoUserPlugin DeserializeTrinoUserPlugin(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional enabled = default; + Optional name = default; + Optional path = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + } + return new TrinoUserPlugin(Optional.ToNullable(enabled), name.Value, path.Value); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugin.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugin.cs new file mode 100644 index 000000000000..7f265ba5b1c8 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugin.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Trino user plugin. + public partial class TrinoUserPlugin + { + /// Initializes a new instance of TrinoUserPlugin. + public TrinoUserPlugin() + { + } + + /// Initializes a new instance of TrinoUserPlugin. + /// Denotes whether the plugin is active or not. + /// This field maps to the sub-directory in trino plugins location, that will contain all the plugins under path. + /// Fully qualified path to the folder containing the plugins. + internal TrinoUserPlugin(bool? enabled, string name, string path) + { + Enabled = enabled; + Name = name; + Path = path; + } + + /// Denotes whether the plugin is active or not. + public bool? Enabled { get; set; } + /// This field maps to the sub-directory in trino plugins location, that will contain all the plugins under path. + public string Name { get; set; } + /// Fully qualified path to the folder containing the plugins. + public string Path { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugins.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugins.Serialization.cs new file mode 100644 index 000000000000..48bd8398a663 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugins.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + internal partial class TrinoUserPlugins : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Plugins)) + { + writer.WritePropertyName("plugins"u8); + writer.WriteStartArray(); + foreach (var item in Plugins) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static TrinoUserPlugins DeserializeTrinoUserPlugins(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> plugins = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("plugins"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TrinoUserPlugin.DeserializeTrinoUserPlugin(item)); + } + plugins = array; + continue; + } + } + return new TrinoUserPlugins(Optional.ToList(plugins)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugins.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugins.cs new file mode 100644 index 000000000000..4835f608deec --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserPlugins.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Trino user plugins spec. + internal partial class TrinoUserPlugins + { + /// Initializes a new instance of TrinoUserPlugins. + public TrinoUserPlugins() + { + Plugins = new ChangeTrackingList(); + } + + /// Initializes a new instance of TrinoUserPlugins. + /// Trino user plugins. + internal TrinoUserPlugins(IList plugins) + { + Plugins = plugins; + } + + /// Trino user plugins. + public IList Plugins { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/OSProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserTelemetry.Serialization.cs similarity index 56% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/OSProfile.Serialization.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserTelemetry.Serialization.cs index dc72c7b44a54..e56b048a6141 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/OSProfile.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserTelemetry.Serialization.cs @@ -10,39 +10,39 @@ namespace Azure.ResourceManager.HDInsight.Models { - internal partial class OSProfile : IUtf8JsonSerializable + internal partial class TrinoUserTelemetry : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(LinuxProfile)) + if (Optional.IsDefined(Storage)) { - writer.WritePropertyName("linuxOperatingSystemProfile"u8); - writer.WriteObjectValue(LinuxProfile); + writer.WritePropertyName("storage"u8); + writer.WriteObjectValue(Storage); } writer.WriteEndObject(); } - internal static OSProfile DeserializeOSProfile(JsonElement element) + internal static TrinoUserTelemetry DeserializeTrinoUserTelemetry(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional linuxOperatingSystemProfile = default; + Optional storage = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("linuxOperatingSystemProfile"u8)) + if (property.NameEquals("storage"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - linuxOperatingSystemProfile = HDInsightLinuxOSProfile.DeserializeHDInsightLinuxOSProfile(property.Value); + storage = TrinoTelemetryConfig.DeserializeTrinoTelemetryConfig(property.Value); continue; } } - return new OSProfile(linuxOperatingSystemProfile.Value); + return new TrinoUserTelemetry(storage.Value); } } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserTelemetry.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserTelemetry.cs new file mode 100644 index 000000000000..290353555844 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoUserTelemetry.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// User telemetry. + internal partial class TrinoUserTelemetry + { + /// Initializes a new instance of TrinoUserTelemetry. + public TrinoUserTelemetry() + { + } + + /// Initializes a new instance of TrinoUserTelemetry. + /// Trino user telemetry definition. + internal TrinoUserTelemetry(TrinoTelemetryConfig storage) + { + Storage = storage; + } + + /// Trino user telemetry definition. + public TrinoTelemetryConfig Storage { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoWorker.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoWorker.Serialization.cs new file mode 100644 index 000000000000..b949bd3ae229 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoWorker.Serialization.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class TrinoWorker : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("debug"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Enable)) + { + writer.WritePropertyName("enable"u8); + writer.WriteBooleanValue(Enable.Value); + } + if (Optional.IsDefined(Port)) + { + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port.Value); + } + if (Optional.IsDefined(Suspend)) + { + writer.WritePropertyName("suspend"u8); + writer.WriteBooleanValue(Suspend.Value); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static TrinoWorker DeserializeTrinoWorker(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional enable = default; + Optional port = default; + Optional suspend = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("debug"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("enable"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enable = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("port"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("suspend"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + suspend = property0.Value.GetBoolean(); + continue; + } + } + continue; + } + } + return new TrinoWorker(Optional.ToNullable(enable), Optional.ToNullable(port), Optional.ToNullable(suspend)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoWorker.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoWorker.cs new file mode 100644 index 000000000000..39bedbe65967 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/TrinoWorker.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Trino worker. + public partial class TrinoWorker + { + /// Initializes a new instance of TrinoWorker. + public TrinoWorker() + { + } + + /// Initializes a new instance of TrinoWorker. + /// The flag that if enable debug or not. + /// The debug port. + /// The flag that if suspend debug or not. + internal TrinoWorker(bool? enable, int? port, bool? suspend) + { + Enable = enable; + Port = port; + Suspend = suspend; + } + + /// The flag that if enable debug or not. + public bool? Enable { get; set; } + /// The debug port. + public int? Port { get; set; } + /// The flag that if suspend debug or not. + public bool? Suspend { get; set; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UnknownClusterJobProperties.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UnknownClusterJobProperties.Serialization.cs new file mode 100644 index 000000000000..c998c9faa3ac --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UnknownClusterJobProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + internal partial class UnknownClusterJobProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownClusterJobProperties DeserializeUnknownClusterJobProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + JobType jobType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobType"u8)) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + } + return new UnknownClusterJobProperties(jobType); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UnknownClusterJobProperties.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UnknownClusterJobProperties.cs new file mode 100644 index 000000000000..5f840e25aab0 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UnknownClusterJobProperties.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// The UnknownClusterJobProperties. + internal partial class UnknownClusterJobProperties : ClusterJobProperties + { + /// Initializes a new instance of UnknownClusterJobProperties. + /// Type of cluster job. + internal UnknownClusterJobProperties(JobType jobType) : base(jobType) + { + JobType = jobType; + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UpdatableClusterProfile.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UpdatableClusterProfile.Serialization.cs new file mode 100644 index 000000000000..affbe0645b94 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UpdatableClusterProfile.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + public partial class UpdatableClusterProfile : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ServiceConfigsProfiles)) + { + writer.WritePropertyName("serviceConfigsProfiles"u8); + writer.WriteStartArray(); + foreach (var item in ServiceConfigsProfiles) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SshProfile)) + { + writer.WritePropertyName("sshProfile"u8); + writer.WriteObjectValue(SshProfile); + } + if (Optional.IsDefined(AutoScaleProfile)) + { + writer.WritePropertyName("autoscaleProfile"u8); + writer.WriteObjectValue(AutoScaleProfile); + } + if (Optional.IsDefined(AuthorizationProfile)) + { + writer.WritePropertyName("authorizationProfile"u8); + writer.WriteObjectValue(AuthorizationProfile); + } + if (Optional.IsDefined(LogAnalyticsProfile)) + { + writer.WritePropertyName("logAnalyticsProfile"u8); + writer.WriteObjectValue(LogAnalyticsProfile); + } + if (Optional.IsDefined(PrometheusProfile)) + { + writer.WritePropertyName("prometheusProfile"u8); + writer.WriteObjectValue(PrometheusProfile); + } + if (Optional.IsCollectionDefined(ScriptActionProfiles)) + { + writer.WritePropertyName("scriptActionProfiles"u8); + writer.WriteStartArray(); + foreach (var item in ScriptActionProfiles) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static UpdatableClusterProfile DeserializeUpdatableClusterProfile(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> serviceConfigsProfiles = default; + Optional sshProfile = default; + Optional autoScaleProfile = default; + Optional authorizationProfile = default; + Optional logAnalyticsProfile = default; + Optional prometheusProfile = default; + Optional> scriptActionProfiles = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceConfigsProfiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ClusterServiceConfigsProfile.DeserializeClusterServiceConfigsProfile(item)); + } + serviceConfigsProfiles = array; + continue; + } + if (property.NameEquals("sshProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sshProfile = SshProfile.DeserializeSshProfile(property.Value); + continue; + } + if (property.NameEquals("autoscaleProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoScaleProfile = AutoScaleProfile.DeserializeAutoScaleProfile(property.Value); + continue; + } + if (property.NameEquals("authorizationProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authorizationProfile = AuthorizationProfile.DeserializeAuthorizationProfile(property.Value); + continue; + } + if (property.NameEquals("logAnalyticsProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logAnalyticsProfile = ClusterLogAnalyticsProfile.DeserializeClusterLogAnalyticsProfile(property.Value); + continue; + } + if (property.NameEquals("prometheusProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + prometheusProfile = ClusterPrometheusProfile.DeserializeClusterPrometheusProfile(property.Value); + continue; + } + if (property.NameEquals("scriptActionProfiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ScriptActionProfile.DeserializeScriptActionProfile(item)); + } + scriptActionProfiles = array; + continue; + } + } + return new UpdatableClusterProfile(Optional.ToList(serviceConfigsProfiles), sshProfile.Value, autoScaleProfile.Value, authorizationProfile.Value, logAnalyticsProfile.Value, prometheusProfile.Value, Optional.ToList(scriptActionProfiles)); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UpdatableClusterProfile.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UpdatableClusterProfile.cs new file mode 100644 index 000000000000..47bdfd85a7b7 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UpdatableClusterProfile.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Cluster resource patch properties. + public partial class UpdatableClusterProfile + { + /// Initializes a new instance of UpdatableClusterProfile. + public UpdatableClusterProfile() + { + ServiceConfigsProfiles = new ChangeTrackingList(); + ScriptActionProfiles = new ChangeTrackingList(); + } + + /// Initializes a new instance of UpdatableClusterProfile. + /// The service configs profiles. + /// Ssh profile for the cluster. + /// This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. + /// Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. + /// Cluster log analytics profile to enable or disable OMS agent for cluster. + /// Cluster Prometheus profile. + /// The script action profile list. + internal UpdatableClusterProfile(IList serviceConfigsProfiles, SshProfile sshProfile, AutoScaleProfile autoScaleProfile, AuthorizationProfile authorizationProfile, ClusterLogAnalyticsProfile logAnalyticsProfile, ClusterPrometheusProfile prometheusProfile, IList scriptActionProfiles) + { + ServiceConfigsProfiles = serviceConfigsProfiles; + SshProfile = sshProfile; + AutoScaleProfile = autoScaleProfile; + AuthorizationProfile = authorizationProfile; + LogAnalyticsProfile = logAnalyticsProfile; + PrometheusProfile = prometheusProfile; + ScriptActionProfiles = scriptActionProfiles; + } + + /// The service configs profiles. + public IList ServiceConfigsProfiles { get; } + /// Ssh profile for the cluster. + public SshProfile SshProfile { get; set; } + /// This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. + public AutoScaleProfile AutoScaleProfile { get; set; } + /// Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. + public AuthorizationProfile AuthorizationProfile { get; set; } + /// Cluster log analytics profile to enable or disable OMS agent for cluster. + public ClusterLogAnalyticsProfile LogAnalyticsProfile { get; set; } + /// Cluster Prometheus profile. + internal ClusterPrometheusProfile PrometheusProfile { get; set; } + /// Enable Prometheus for cluster or not. + public bool? PrometheusProfileEnabled + { + get => PrometheusProfile is null ? default(bool?) : PrometheusProfile.Enabled; + set + { + PrometheusProfile = value.HasValue ? new ClusterPrometheusProfile(value.Value) : null; + } + } + + /// The script action profile list. + public IList ScriptActionProfiles { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UsagesListResult.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UsagesListResult.cs deleted file mode 100644 index a1ca120f8651..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/UsagesListResult.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.HDInsight.Models -{ - /// The response for the operation to get regional usages for a subscription. - internal partial class UsagesListResult - { - /// Initializes a new instance of UsagesListResult. - internal UsagesListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of UsagesListResult. - /// The list of usages. - internal UsagesListResult(IReadOnlyList value) - { - Value = value; - } - - /// The list of usages. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/WebConnectivityEndpoint.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/WebConnectivityEndpoint.Serialization.cs new file mode 100644 index 000000000000..110fc21e9eb7 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/WebConnectivityEndpoint.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + internal partial class WebConnectivityEndpoint + { + internal static WebConnectivityEndpoint DeserializeWebConnectivityEndpoint(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fqdn = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fqdn"u8)) + { + fqdn = property.Value.GetString(); + continue; + } + } + return new WebConnectivityEndpoint(fqdn); + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/WebConnectivityEndpoint.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/WebConnectivityEndpoint.cs new file mode 100644 index 000000000000..8fa9cc7ff5e8 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/Models/WebConnectivityEndpoint.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.HDInsight.Models +{ + /// Web connectivity endpoint details. + internal partial class WebConnectivityEndpoint + { + /// Initializes a new instance of WebConnectivityEndpoint. + /// Web connectivity endpoint. + /// is null. + internal WebConnectivityEndpoint(string fqdn) + { + Argument.AssertNotNull(fqdn, nameof(fqdn)); + + Fqdn = fqdn; + } + + /// Web connectivity endpoint. + public string Fqdn { get; } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ApplicationsRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ApplicationsRestOperations.cs deleted file mode 100644 index 4de37b26751a..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ApplicationsRestOperations.cs +++ /dev/null @@ -1,533 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.HDInsight.Models; - -namespace Azure.ResourceManager.HDInsight -{ - internal partial class ApplicationsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ApplicationsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ApplicationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-15-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByClusterRequest(string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/applications", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all of the applications for the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByClusterAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterRequest(subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ApplicationListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ApplicationListResult.DeserializeApplicationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all of the applications for the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByCluster(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterRequest(subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ApplicationListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ApplicationListResult.DeserializeApplicationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/applications/", false); - uri.AppendPath(applicationName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets properties of the specified application. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The constant value for the application name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightApplicationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightApplicationData.DeserializeHDInsightApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HDInsightApplicationData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets properties of the specified application. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The constant value for the application name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightApplicationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightApplicationData.DeserializeHDInsightApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HDInsightApplicationData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, HDInsightApplicationData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/applications/", false); - uri.AppendPath(applicationName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates applications for the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The constant value for the application name. - /// The application create request. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, HDInsightApplicationData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates applications for the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The constant value for the application name. - /// The application create request. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, HDInsightApplicationData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/applications/", false); - uri.AppendPath(applicationName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes the specified application on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The constant value for the application name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes the specified application on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The constant value for the application name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetAzureAsyncOperationStatusRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/applications/", false); - uri.AppendPath(applicationName, true); - uri.AppendPath("/azureasyncoperations/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the async operation status. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The constant value for the application name. - /// The long running operation id. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAzureAsyncOperationStatusAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetAzureAsyncOperationStatusRequest(subscriptionId, resourceGroupName, clusterName, applicationName, operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightAsyncOperationResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightAsyncOperationResult.DeserializeHDInsightAsyncOperationResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the async operation status. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The constant value for the application name. - /// The long running operation id. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response GetAzureAsyncOperationStatus(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetAzureAsyncOperationStatusRequest(subscriptionId, resourceGroupName, clusterName, applicationName, operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightAsyncOperationResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightAsyncOperationResult.DeserializeHDInsightAsyncOperationResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByClusterNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all of the applications for the HDInsight cluster. - /// The URL to the next page of results. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByClusterNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ApplicationListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ApplicationListResult.DeserializeApplicationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all of the applications for the HDInsight cluster. - /// The URL to the next page of results. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByClusterNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ApplicationListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ApplicationListResult.DeserializeApplicationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/AvailableClusterPoolVersionsRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/AvailableClusterPoolVersionsRestOperations.cs new file mode 100644 index 000000000000..001ce1bbbec1 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/AvailableClusterPoolVersionsRestOperations.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.HDInsight.Models; + +namespace Azure.ResourceManager.HDInsight +{ + internal partial class AvailableClusterPoolVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AvailableClusterPoolVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AvailableClusterPoolVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.HDInsight/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/availableClusterPoolVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns a list of available cluster pool versions. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolVersionsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClusterPoolVersionsListResult.DeserializeClusterPoolVersionsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns a list of available cluster pool versions. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocation(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolVersionsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClusterPoolVersionsListResult.DeserializeClusterPoolVersionsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns a list of available cluster pool versions. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolVersionsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClusterPoolVersionsListResult.DeserializeClusterPoolVersionsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns a list of available cluster pool versions. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolVersionsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClusterPoolVersionsListResult.DeserializeClusterPoolVersionsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/AvailableClusterVersionsRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/AvailableClusterVersionsRestOperations.cs new file mode 100644 index 000000000000..d872e31d0a16 --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/AvailableClusterVersionsRestOperations.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.HDInsight.Models; + +namespace Azure.ResourceManager.HDInsight +{ + internal partial class AvailableClusterVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AvailableClusterVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AvailableClusterVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.HDInsight/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/availableClusterVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns a list of available cluster versions. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ClusterVersionsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClusterVersionsListResult.DeserializeClusterVersionsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns a list of available cluster versions. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocation(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ClusterVersionsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClusterVersionsListResult.DeserializeClusterVersionsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns a list of available cluster versions. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ClusterVersionsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClusterVersionsListResult.DeserializeClusterVersionsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns a list of available cluster versions. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ClusterVersionsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClusterVersionsListResult.DeserializeClusterVersionsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ScriptExecutionHistoryRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ClusterJobsRestOperations.cs similarity index 52% rename from sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ScriptExecutionHistoryRestOperations.cs rename to sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ClusterJobsRestOperations.cs index add16134dd69..d472f07084cc 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ScriptExecutionHistoryRestOperations.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ClusterJobsRestOperations.cs @@ -16,122 +16,128 @@ namespace Azure.ResourceManager.HDInsight { - internal partial class ScriptExecutionHistoryRestOperations + internal partial class ClusterJobsRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of ScriptExecutionHistoryRestOperations. + /// Initializes a new instance of ClusterJobsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. /// server parameter. /// Api Version. /// or is null. - public ScriptExecutionHistoryRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + public ClusterJobsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-15-preview"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListByClusterRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateRunJobRequest(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, ClusterJob clusterJob) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendPath("/clusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/scriptExecutionHistory", false); + uri.AppendPath("/runJob", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(clusterJob); + request.Content = content; _userAgent.Apply(message); return message; } - /// Lists all scripts' execution history for the specified cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. + /// Operations on jobs of HDInsight on AKS cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. + /// The Cluster job. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByClusterAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task RunJobAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, ClusterJob clusterJob, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(clusterJob, nameof(clusterJob)); - using var message = CreateListByClusterRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateRunJobRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName, clusterJob); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - ScriptActionExecutionHistoryList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ScriptActionExecutionHistoryList.DeserializeScriptActionExecutionHistoryList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists all scripts' execution history for the specified cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. + /// Operations on jobs of HDInsight on AKS cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. + /// The Cluster job. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByCluster(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response RunJob(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, ClusterJob clusterJob, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(clusterJob, nameof(clusterJob)); - using var message = CreateListByClusterRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateRunJobRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName, clusterJob); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - ScriptActionExecutionHistoryList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ScriptActionExecutionHistoryList.DeserializeScriptActionExecutionHistoryList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreatePromoteRequest(string subscriptionId, string resourceGroupName, string clusterName, string scriptExecutionId) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendPath("/clusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/scriptExecutionHistory/", false); - uri.AppendPath(scriptExecutionId, true); - uri.AppendPath("/promote", false); + uri.AppendPath("/jobs", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -139,59 +145,69 @@ internal HttpMessage CreatePromoteRequest(string subscriptionId, string resource return message; } - /// Promotes the specified ad-hoc script execution to a persisted script. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The script execution Id. + /// Get jobs of HDInsight on AKS cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task PromoteAsync(string subscriptionId, string resourceGroupName, string clusterName, string scriptExecutionId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(scriptExecutionId, nameof(scriptExecutionId)); - using var message = CreatePromoteRequest(subscriptionId, resourceGroupName, clusterName, scriptExecutionId); + using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - return message.Response; + { + ClusterJobList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClusterJobList.DeserializeClusterJobList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Promotes the specified ad-hoc script execution to a persisted script. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The script execution Id. + /// Get jobs of HDInsight on AKS cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Promote(string subscriptionId, string resourceGroupName, string clusterName, string scriptExecutionId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(scriptExecutionId, nameof(scriptExecutionId)); - using var message = CreatePromoteRequest(subscriptionId, resourceGroupName, clusterName, scriptExecutionId); + using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - return message.Response; + { + ClusterJobList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClusterJobList.DeserializeClusterJobList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateListByClusterNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -205,30 +221,32 @@ internal HttpMessage CreateListByClusterNextPageRequest(string nextLink, string return message; } - /// Lists all scripts' execution history for the specified cluster. + /// Get jobs of HDInsight on AKS cluster. /// The URL to the next page of results. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByClusterNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateListByClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterPoolName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ScriptActionExecutionHistoryList value = default; + ClusterJobList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ScriptActionExecutionHistoryList.DeserializeScriptActionExecutionHistoryList(document.RootElement); + value = ClusterJobList.DeserializeClusterJobList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -236,30 +254,32 @@ public async Task> ListByClusterNextP } } - /// Lists all scripts' execution history for the specified cluster. + /// Get jobs of HDInsight on AKS cluster. /// The URL to the next page of results. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByClusterNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateListByClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterPoolName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ScriptActionExecutionHistoryList value = default; + ClusterJobList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ScriptActionExecutionHistoryList.DeserializeScriptActionExecutionHistoryList(document.RootElement); + value = ClusterJobList.DeserializeClusterJobList(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ClusterPoolsRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ClusterPoolsRestOperations.cs new file mode 100644 index 000000000000..3f2819d9050f --- /dev/null +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ClusterPoolsRestOperations.cs @@ -0,0 +1,630 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.HDInsight.Models; + +namespace Azure.ResourceManager.HDInsight +{ + internal partial class ClusterPoolsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ClusterPoolsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ClusterPoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterPoolName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a cluster pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterPoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClusterPoolData.DeserializeClusterPoolData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ClusterPoolData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a cluster pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string clusterPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterPoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClusterPoolData.DeserializeClusterPoolData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ClusterPoolData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterPoolName, ClusterPoolData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a cluster pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The Cluster Pool to create. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, ClusterPoolData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterPoolName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a cluster pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The Cluster Pool to create. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterPoolName, ClusterPoolData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterPoolName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateTagsRequest(string subscriptionId, string resourceGroupName, string clusterPoolName, ClusterPoolPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates an existing Cluster Pool Tags. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// Parameters supplied to update tags. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateTagsAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, ClusterPoolPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateTagsRequest(subscriptionId, resourceGroupName, clusterPoolName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates an existing Cluster Pool Tags. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// Parameters supplied to update tags. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response UpdateTags(string subscriptionId, string resourceGroupName, string clusterPoolName, ClusterPoolPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateTagsRequest(subscriptionId, resourceGroupName, clusterPoolName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterPoolName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a Cluster Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterPoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a Cluster Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string clusterPoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterPoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of Cluster Pools within a Subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClusterPoolListResult.DeserializeClusterPoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of Cluster Pools within a Subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClusterPoolListResult.DeserializeClusterPoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the HDInsight cluster pools under a resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClusterPoolListResult.DeserializeClusterPoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the HDInsight cluster pools under a resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClusterPoolListResult.DeserializeClusterPoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of Cluster Pools within a Subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClusterPoolListResult.DeserializeClusterPoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of Cluster Pools within a Subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClusterPoolListResult.DeserializeClusterPoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the HDInsight cluster pools under a resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClusterPoolListResult.DeserializeClusterPoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the HDInsight cluster pools under a resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ClusterPoolListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClusterPoolListResult.DeserializeClusterPoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ClustersRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ClustersRestOperations.cs index 5b70dd0751fe..9c24604d9725 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ClustersRestOperations.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ClustersRestOperations.cs @@ -33,134 +33,53 @@ public ClustersRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-15-preview"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterCreateOrUpdateContent content) + internal HttpMessage CreateListByClusterPoolNameRequest(string subscriptionId, string resourceGroupName, string clusterPoolName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Creates a new HDInsight cluster with the specified parameters. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cluster create request. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, clusterName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a new HDInsight cluster with the specified parameters. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cluster create request. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterCreateOrUpdateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, clusterName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterPatch patch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendPath("/clusters", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch); - request.Content = content; _userAgent.Apply(message); return message; } - /// Patch HDInsight cluster with the specified parameters. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cluster patch request. + /// Lists the HDInsight cluster pools under a resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterPatch patch, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByClusterPoolNameAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + using var message = CreateListByClusterPoolNameRequest(subscriptionId, resourceGroupName, clusterPoolName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - HDInsightClusterData value = default; + ClusterListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightClusterData.DeserializeHDInsightClusterData(document.RootElement); + value = ClusterListResult.DeserializeClusterListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -168,30 +87,28 @@ public async Task> UpdateAsync(string subscriptio } } - /// Patch HDInsight cluster with the specified parameters. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cluster patch request. + /// Lists the HDInsight cluster pools under a resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterPatch patch, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByClusterPoolName(string subscriptionId, string resourceGroupName, string clusterPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + using var message = CreateListByClusterPoolNameRequest(subscriptionId, resourceGroupName, clusterPoolName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - HDInsightClusterData value = default; + ClusterListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightClusterData.DeserializeHDInsightClusterData(document.RootElement); + value = ClusterListResult.DeserializeClusterListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -199,79 +116,92 @@ public Response Update(string subscriptionId, string resou } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateResizeRequest(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, ClusterResizeData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendPath("/clusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/resize", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes the specified HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. + /// Resize an existing Cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. + /// Resize a cluster. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ResizeAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, ClusterResizeData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateResizeRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Deletes the specified HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. + /// Resize an existing Cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. + /// Resize a cluster. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Resize(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, ClusterResizeData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateResizeRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -282,7 +212,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendPath("/clusters/", false); uri.AppendPath(clusterName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -291,20 +223,22 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Gets the specified cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. + /// Gets a HDInsight cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -322,20 +256,22 @@ public async Task> GetAsync(string subscriptionId } } - /// Gets the specified cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. + /// Gets a HDInsight cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -353,206 +289,134 @@ public Response Get(string subscriptionId, string resource } } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the HDInsight clusters in a resource group. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ClusterListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ClusterListResult.DeserializeClusterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the HDInsight clusters in a resource group. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ClusterListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ClusterListResult.DeserializeClusterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateResizeRequest(string subscriptionId, string resourceGroupName, string clusterName, HDInsightRoleName roleName, HDInsightClusterResizeContent content) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, HDInsightClusterData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendPath("/clusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/roles/", false); - uri.AppendPath(roleName.ToString(), true); - uri.AppendPath("/resize", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; _userAgent.Apply(message); return message; } - /// Resizes the specified HDInsight cluster to the specified size. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The constant value for the roleName. - /// The parameters for the resize operation. + /// Creates a cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. + /// The cluster to create. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task ResizeAsync(string subscriptionId, string resourceGroupName, string clusterName, HDInsightRoleName roleName, HDInsightClusterResizeContent content, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, HDInsightClusterData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateResizeRequest(subscriptionId, resourceGroupName, clusterName, roleName, content); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Resizes the specified HDInsight cluster to the specified size. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The constant value for the roleName. - /// The parameters for the resize operation. + /// Creates a cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. + /// The cluster to create. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Resize(string subscriptionId, string resourceGroupName, string clusterName, HDInsightRoleName roleName, HDInsightClusterResizeContent content, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, HDInsightClusterData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateResizeRequest(subscriptionId, resourceGroupName, clusterName, roleName, content); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: + case 201: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateAutoScaleConfigurationRequest(string subscriptionId, string resourceGroupName, string clusterName, HDInsightRoleName roleName, HDInsightAutoScaleConfigurationUpdateContent content) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, HDInsightClusterPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendPath("/clusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/roles/", false); - uri.AppendPath(roleName.ToString(), true); - uri.AppendPath("/autoscale", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; _userAgent.Apply(message); return message; } - /// Updates the Autoscale Configuration for HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The constant value for the roleName. - /// The parameters for the update autoscale configuration operation. + /// Updates an existing Cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. + /// Patch a cluster. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAutoScaleConfigurationAsync(string subscriptionId, string resourceGroupName, string clusterName, HDInsightRoleName roleName, HDInsightAutoScaleConfigurationUpdateContent content, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, HDInsightClusterPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateAutoScaleConfigurationRequest(subscriptionId, resourceGroupName, clusterName, roleName, content); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -564,23 +428,24 @@ public async Task UpdateAutoScaleConfigurationAsync(string subscriptio } } - /// Updates the Autoscale Configuration for HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The constant value for the roleName. - /// The parameters for the update autoscale configuration operation. + /// Updates an existing Cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. + /// Patch a cluster. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response UpdateAutoScaleConfiguration(string subscriptionId, string resourceGroupName, string clusterName, HDInsightRoleName roleName, HDInsightAutoScaleConfigurationUpdateContent content, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, HDInsightClusterPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateAutoScaleConfigurationRequest(subscriptionId, resourceGroupName, clusterName, roleName, content); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -592,166 +457,100 @@ public Response UpdateAutoScaleConfiguration(string subscriptionId, string resou } } - internal HttpMessage CreateListRequest(string subscriptionId) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all the HDInsight clusters under the subscription. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ClusterListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ClusterListResult.DeserializeClusterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the HDInsight clusters under the subscription. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ClusterListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ClusterListResult.DeserializeClusterListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateRotateDiskEncryptionKeyRequest(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterDiskEncryptionContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendPath("/clusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/rotatediskencryptionkey", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Rotate disk encryption key of the specified HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The parameters for the disk encryption operation. + /// Deletes a cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task RotateDiskEncryptionKeyAsync(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterDiskEncryptionContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRotateDiskEncryptionKeyRequest(subscriptionId, resourceGroupName, clusterName, content); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Rotate disk encryption key of the specified HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The parameters for the disk encryption operation. + /// Deletes a cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response RotateDiskEncryptionKey(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterDiskEncryptionContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRotateDiskEncryptionKeyRequest(subscriptionId, resourceGroupName, clusterName, content); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateGetGatewaySettingsRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateListServiceConfigsRequest(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendPath("/clusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/getGatewaySettings", false); + uri.AppendPath("/serviceConfigs", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -759,28 +558,30 @@ internal HttpMessage CreateGetGatewaySettingsRequest(string subscriptionId, stri return message; } - /// Gets the gateway settings for the specified cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. + /// Lists the config dump of all services running in cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetGatewaySettingsAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListServiceConfigsAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateGetGatewaySettingsRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateListServiceConfigsRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - HDInsightClusterGatewaySettings value = default; + ServiceConfigListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightClusterGatewaySettings.DeserializeHDInsightClusterGatewaySettings(document.RootElement); + value = ServiceConfigListResult.DeserializeServiceConfigListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -788,28 +589,30 @@ public async Task> GetGatewaySettingsA } } - /// Gets the gateway settings for the specified cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. + /// Lists the config dump of all services running in cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetGatewaySettings(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListServiceConfigs(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateGetGatewaySettingsRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateListServiceConfigsRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - HDInsightClusterGatewaySettings value = default; + ServiceConfigListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightClusterGatewaySettings.DeserializeHDInsightClusterGatewaySettings(document.RootElement); + value = ServiceConfigListResult.DeserializeServiceConfigListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -817,86 +620,7 @@ public Response GetGatewaySettings(string subsc } } - internal HttpMessage CreateUpdateGatewaySettingsRequest(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterUpdateGatewaySettingsContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/updateGatewaySettings", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Configures the gateway settings on the specified cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cluster configurations. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateGatewaySettingsAsync(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterUpdateGatewaySettingsContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateUpdateGatewaySettingsRequest(subscriptionId, resourceGroupName, clusterName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Configures the gateway settings on the specified cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cluster configurations. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response UpdateGatewaySettings(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterUpdateGatewaySettingsContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateUpdateGatewaySettingsRequest(subscriptionId, resourceGroupName, clusterName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetAzureAsyncOperationStatusRequest(string subscriptionId, string resourceGroupName, string clusterName, string operationId) + internal HttpMessage CreateListInstanceViewsRequest(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -907,10 +631,11 @@ internal HttpMessage CreateGetAzureAsyncOperationStatusRequest(string subscripti uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendPath("/clusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/azureasyncoperations/", false); - uri.AppendPath(operationId, true); + uri.AppendPath("/instanceViews", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -918,30 +643,30 @@ internal HttpMessage CreateGetAzureAsyncOperationStatusRequest(string subscripti return message; } - /// The the async operation status. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The long running operation id. + /// Lists the lists of instance views. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAzureAsyncOperationStatusAsync(string subscriptionId, string resourceGroupName, string clusterName, string operationId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListInstanceViewsAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - using var message = CreateGetAzureAsyncOperationStatusRequest(subscriptionId, resourceGroupName, clusterName, operationId); + using var message = CreateListInstanceViewsRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - HDInsightAsyncOperationResult value = default; + ClusterInstanceViewsResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightAsyncOperationResult.DeserializeHDInsightAsyncOperationResult(document.RootElement); + value = ClusterInstanceViewsResult.DeserializeClusterInstanceViewsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -949,30 +674,30 @@ public async Task> GetAzureAsyncOperatio } } - /// The the async operation status. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The long running operation id. + /// Lists the lists of instance views. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetAzureAsyncOperationStatus(string subscriptionId, string resourceGroupName, string clusterName, string operationId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListInstanceViews(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - using var message = CreateGetAzureAsyncOperationStatusRequest(subscriptionId, resourceGroupName, clusterName, operationId); + using var message = CreateListInstanceViewsRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - HDInsightAsyncOperationResult value = default; + ClusterInstanceViewsResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightAsyncOperationResult.DeserializeHDInsightAsyncOperationResult(document.RootElement); + value = ClusterInstanceViewsResult.DeserializeClusterInstanceViewsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -980,165 +705,168 @@ public Response GetAzureAsyncOperationStatus(stri } } - internal HttpMessage CreateUpdateIdentityCertificateRequest(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterUpdateIdentityCertificateContent content) + internal HttpMessage CreateGetInstanceViewRequest(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); + uri.AppendPath("/providers/Microsoft.HDInsight/clusterpools/", false); + uri.AppendPath(clusterPoolName, true); + uri.AppendPath("/clusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/updateClusterIdentityCertificate", false); + uri.AppendPath("/instanceViews/default", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Updates the cluster identity certificate. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cluster configurations. + /// Gets the status of a cluster instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateIdentityCertificateAsync(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterUpdateIdentityCertificateContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetInstanceViewAsync(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateIdentityCertificateRequest(subscriptionId, resourceGroupName, clusterName, content); + using var message = CreateGetInstanceViewRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ClusterInstanceViewResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClusterInstanceViewResult.DeserializeClusterInstanceViewResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Updates the cluster identity certificate. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cluster configurations. + /// Gets the status of a cluster instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response UpdateIdentityCertificate(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterUpdateIdentityCertificateContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetInstanceView(string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateIdentityCertificateRequest(subscriptionId, resourceGroupName, clusterName, content); + using var message = CreateGetInstanceViewRequest(subscriptionId, resourceGroupName, clusterPoolName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ClusterInstanceViewResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClusterInstanceViewResult.DeserializeClusterInstanceViewResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateExecuteScriptActionsRequest(string subscriptionId, string resourceGroupName, string clusterName, ExecuteScriptActionContent content) + internal HttpMessage CreateListByClusterPoolNameNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterPoolName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/executeScriptActions", false); - uri.AppendQuery("api-version", _apiVersion, true); + uri.AppendRawNextLink(nextLink, false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Executes script actions on the specified HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The parameters for executing script actions. + /// Lists the HDInsight cluster pools under a resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task ExecuteScriptActionsAsync(string subscriptionId, string resourceGroupName, string clusterName, ExecuteScriptActionContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByClusterPoolNameNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterPoolName, CancellationToken cancellationToken = default) { + Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); - using var message = CreateExecuteScriptActionsRequest(subscriptionId, resourceGroupName, clusterName, content); + using var message = CreateListByClusterPoolNameNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterPoolName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ClusterListResult.DeserializeClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Executes script actions on the specified HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The parameters for executing script actions. + /// Lists the HDInsight cluster pools under a resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ExecuteScriptActions(string subscriptionId, string resourceGroupName, string clusterName, ExecuteScriptActionContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByClusterPoolNameNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterPoolName, CancellationToken cancellationToken = default) { + Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); - using var message = CreateExecuteScriptActionsRequest(subscriptionId, resourceGroupName, clusterName, content); + using var message = CreateListByClusterPoolNameNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterPoolName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ClusterListResult.DeserializeClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListServiceConfigsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1152,28 +880,32 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// Lists the HDInsight clusters in a resource group. + /// Lists the config dump of all services running in cluster. /// The URL to the next page of results. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListServiceConfigsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListServiceConfigsNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterPoolName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ClusterListResult value = default; + ServiceConfigListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ClusterListResult.DeserializeClusterListResult(document.RootElement); + value = ServiceConfigListResult.DeserializeServiceConfigListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1181,28 +913,32 @@ public async Task> ListByResourceGroupNextPageAsync( } } - /// Lists the HDInsight clusters in a resource group. + /// Lists the config dump of all services running in cluster. /// The URL to the next page of results. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListServiceConfigsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListServiceConfigsNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterPoolName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ClusterListResult value = default; + ServiceConfigListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ClusterListResult.DeserializeClusterListResult(document.RootElement); + value = ServiceConfigListResult.DeserializeServiceConfigListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1210,7 +946,7 @@ public Response ListByResourceGroupNextPage(string nextLink, } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListInstanceViewsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1224,26 +960,32 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// Lists all the HDInsight clusters under the subscription. + /// Lists the lists of instance views. /// The URL to the next page of results. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListInstanceViewsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListInstanceViewsNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterPoolName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ClusterListResult value = default; + ClusterInstanceViewsResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ClusterListResult.DeserializeClusterListResult(document.RootElement); + value = ClusterInstanceViewsResult.DeserializeClusterInstanceViewsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1251,26 +993,32 @@ public async Task> ListNextPageAsync(string nextLink } } - /// Lists all the HDInsight clusters under the subscription. + /// Lists the lists of instance views. /// The URL to the next page of results. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster pool. + /// The name of the HDInsight cluster. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListInstanceViewsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterPoolName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterPoolName, nameof(clusterPoolName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListInstanceViewsNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterPoolName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ClusterListResult value = default; + ClusterInstanceViewsResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ClusterListResult.DeserializeClusterListResult(document.RootElement); + value = ClusterInstanceViewsResult.DeserializeClusterInstanceViewsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ConfigurationsRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ConfigurationsRestOperations.cs deleted file mode 100644 index ef09f6573202..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ConfigurationsRestOperations.cs +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.HDInsight.Models; - -namespace Azure.ResourceManager.HDInsight -{ - internal partial class ConfigurationsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ConfigurationsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ConfigurationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-15-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/configurations", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets all configuration information for an HDI cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightClusterConfigurations value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightClusterConfigurations.DeserializeHDInsightClusterConfigurations(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets all configuration information for an HDI cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightClusterConfigurations value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightClusterConfigurations.DeserializeHDInsightClusterConfigurations(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string configurationName, IDictionary clusterConfiguration) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/configurations/", false); - uri.AppendPath(configurationName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartObject(); - foreach (var item in clusterConfiguration) - { - content.JsonWriter.WritePropertyName(item.Key); - content.JsonWriter.WriteStringValue(item.Value); - } - content.JsonWriter.WriteEndObject(); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings in cluster endpoint instead. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the cluster configuration. - /// The cluster configurations. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string configurationName, IDictionary clusterConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(clusterConfiguration, nameof(clusterConfiguration)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, configurationName, clusterConfiguration); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings in cluster endpoint instead. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the cluster configuration. - /// The cluster configurations. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string configurationName, IDictionary clusterConfiguration, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(clusterConfiguration, nameof(clusterConfiguration)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, configurationName, clusterConfiguration); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string configurationName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/configurations/", false); - uri.AppendPath(configurationName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// The configuration object for the specified cluster. This API is not recommended and might be removed in the future. Please consider using List configurations API instead. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the cluster configuration. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task>> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string configurationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, configurationName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyDictionary value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - Dictionary dictionary = new Dictionary(); - foreach (var property in document.RootElement.EnumerateObject()) - { - dictionary.Add(property.Name, property.Value.GetString()); - } - value = dictionary; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// The configuration object for the specified cluster. This API is not recommended and might be removed in the future. Please consider using List configurations API instead. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the cluster configuration. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response> Get(string subscriptionId, string resourceGroupName, string clusterName, string configurationName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, configurationName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyDictionary value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - Dictionary dictionary = new Dictionary(); - foreach (var property in document.RootElement.EnumerateObject()) - { - dictionary.Add(property.Name, property.Value.GetString()); - } - value = dictionary; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ExtensionsRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ExtensionsRestOperations.cs deleted file mode 100644 index a4c18500cfc2..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ExtensionsRestOperations.cs +++ /dev/null @@ -1,838 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.HDInsight.Models; - -namespace Azure.ResourceManager.HDInsight -{ - internal partial class ExtensionsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ExtensionsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ExtensionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-15-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateEnableMonitoringRequest(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterEnableClusterMonitoringContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/extensions/clustermonitoring", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Enables the Operations Management Suite (OMS) on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The Operations Management Suite (OMS) workspace parameters. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task EnableMonitoringAsync(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterEnableClusterMonitoringContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateEnableMonitoringRequest(subscriptionId, resourceGroupName, clusterName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Enables the Operations Management Suite (OMS) on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The Operations Management Suite (OMS) workspace parameters. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response EnableMonitoring(string subscriptionId, string resourceGroupName, string clusterName, HDInsightClusterEnableClusterMonitoringContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateEnableMonitoringRequest(subscriptionId, resourceGroupName, clusterName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetMonitoringStatusRequest(string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/extensions/clustermonitoring", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the status of Operations Management Suite (OMS) on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetMonitoringStatusAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateGetMonitoringStatusRequest(subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightClusterExtensionStatus value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightClusterExtensionStatus.DeserializeHDInsightClusterExtensionStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the status of Operations Management Suite (OMS) on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetMonitoringStatus(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateGetMonitoringStatusRequest(subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightClusterExtensionStatus value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightClusterExtensionStatus.DeserializeHDInsightClusterExtensionStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDisableMonitoringRequest(string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/extensions/clustermonitoring", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Disables the Operations Management Suite (OMS) on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DisableMonitoringAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateDisableMonitoringRequest(subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Disables the Operations Management Suite (OMS) on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response DisableMonitoring(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateDisableMonitoringRequest(subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateEnableAzureMonitorRequest(string subscriptionId, string resourceGroupName, string clusterName, HDInsightAzureMonitorExtensionEnableContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/extensions/azureMonitor", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Enables the Azure Monitor on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The Log Analytics workspace parameters. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task EnableAzureMonitorAsync(string subscriptionId, string resourceGroupName, string clusterName, HDInsightAzureMonitorExtensionEnableContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateEnableAzureMonitorRequest(subscriptionId, resourceGroupName, clusterName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Enables the Azure Monitor on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The Log Analytics workspace parameters. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response EnableAzureMonitor(string subscriptionId, string resourceGroupName, string clusterName, HDInsightAzureMonitorExtensionEnableContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateEnableAzureMonitorRequest(subscriptionId, resourceGroupName, clusterName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetAzureMonitorStatusRequest(string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/extensions/azureMonitor", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the status of Azure Monitor on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAzureMonitorStatusAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateGetAzureMonitorStatusRequest(subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightAzureMonitorExtensionStatus value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightAzureMonitorExtensionStatus.DeserializeHDInsightAzureMonitorExtensionStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the status of Azure Monitor on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetAzureMonitorStatus(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateGetAzureMonitorStatusRequest(subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightAzureMonitorExtensionStatus value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightAzureMonitorExtensionStatus.DeserializeHDInsightAzureMonitorExtensionStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDisableAzureMonitorRequest(string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/extensions/azureMonitor", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Disables the Azure Monitor on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DisableAzureMonitorAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateDisableAzureMonitorRequest(subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Disables the Azure Monitor on the HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response DisableAzureMonitor(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateDisableAzureMonitorRequest(subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string clusterName, string extensionName, HDInsightClusterCreateExtensionContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/extensions/", false); - uri.AppendPath(extensionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Creates an HDInsight cluster extension. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the cluster extension. - /// The cluster extensions create request. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string clusterName, string extensionName, HDInsightClusterCreateExtensionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, clusterName, extensionName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates an HDInsight cluster extension. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the cluster extension. - /// The cluster extensions create request. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string clusterName, string extensionName, HDInsightClusterCreateExtensionContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, clusterName, extensionName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string extensionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/extensions/", false); - uri.AppendPath(extensionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the extension properties for the specified HDInsight cluster extension. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the cluster extension. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string extensionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, extensionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightClusterExtensionStatus value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightClusterExtensionStatus.DeserializeHDInsightClusterExtensionStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the extension properties for the specified HDInsight cluster extension. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the cluster extension. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string extensionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, extensionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightClusterExtensionStatus value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightClusterExtensionStatus.DeserializeHDInsightClusterExtensionStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string extensionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/extensions/", false); - uri.AppendPath(extensionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes the specified extension for HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the cluster extension. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string extensionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, extensionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes the specified extension for HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the cluster extension. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string extensionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, extensionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetAzureAsyncOperationStatusRequest(string subscriptionId, string resourceGroupName, string clusterName, string extensionName, string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/extensions/", false); - uri.AppendPath(extensionName, true); - uri.AppendPath("/azureAsyncOperations/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the async operation status. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the cluster extension. - /// The long running operation id. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAzureAsyncOperationStatusAsync(string subscriptionId, string resourceGroupName, string clusterName, string extensionName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetAzureAsyncOperationStatusRequest(subscriptionId, resourceGroupName, clusterName, extensionName, operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightAsyncOperationResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightAsyncOperationResult.DeserializeHDInsightAsyncOperationResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the async operation status. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the cluster extension. - /// The long running operation id. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response GetAzureAsyncOperationStatus(string subscriptionId, string resourceGroupName, string clusterName, string extensionName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetAzureAsyncOperationStatusRequest(subscriptionId, resourceGroupName, clusterName, extensionName, operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightAsyncOperationResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightAsyncOperationResult.DeserializeHDInsightAsyncOperationResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/LocationsRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/LocationsRestOperations.cs index 70743fe7262d..dadb91c883ee 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/LocationsRestOperations.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/LocationsRestOperations.cs @@ -33,224 +33,11 @@ public LocationsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-15-preview"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateGetCapabilitiesRequest(string subscriptionId, AzureLocation location) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.HDInsight/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/capabilities", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the capabilities for the specified location. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> GetCapabilitiesAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateGetCapabilitiesRequest(subscriptionId, location); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightCapabilitiesResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightCapabilitiesResult.DeserializeHDInsightCapabilitiesResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the capabilities for the specified location. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response GetCapabilities(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateGetCapabilitiesRequest(subscriptionId, location); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightCapabilitiesResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightCapabilitiesResult.DeserializeHDInsightCapabilitiesResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListUsagesRequest(string subscriptionId, AzureLocation location) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.HDInsight/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/usages", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the usages for the specified location. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListUsagesAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListUsagesRequest(subscriptionId, location); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - UsagesListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = UsagesListResult.DeserializeUsagesListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the usages for the specified location. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListUsages(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListUsagesRequest(subscriptionId, location); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - UsagesListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = UsagesListResult.DeserializeUsagesListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListBillingSpecsRequest(string subscriptionId, AzureLocation location) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.HDInsight/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/billingSpecs", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the billingSpecs for the specified subscription and location. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBillingSpecsAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBillingSpecsRequest(subscriptionId, location); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightBillingSpecsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightBillingSpecsListResult.DeserializeHDInsightBillingSpecsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the billingSpecs for the specified subscription and location. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The Azure location (region) for which to make the request. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBillingSpecs(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBillingSpecsRequest(subscriptionId, location); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightBillingSpecsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightBillingSpecsListResult.DeserializeHDInsightBillingSpecsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, HDInsightNameAvailabilityContent content) + internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, NameAvailabilityContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -273,14 +60,14 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, A return message; } - /// Check the cluster name is available or not. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The Azure location (region) for which to make the request. - /// The HDInsightNameAvailabilityContent to use. + /// Check the availability of the resource name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The name and type of the resource. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, HDInsightNameAvailabilityContent content, CancellationToken cancellationToken = default) + public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(content, nameof(content)); @@ -291,9 +78,9 @@ public async Task> CheckNameAvailabili { case 200: { - HDInsightNameAvailabilityResult value = default; + NameAvailabilityResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightNameAvailabilityResult.DeserializeHDInsightNameAvailabilityResult(document.RootElement); + value = NameAvailabilityResult.DeserializeNameAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -301,14 +88,14 @@ public async Task> CheckNameAvailabili } } - /// Check the cluster name is available or not. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The Azure location (region) for which to make the request. - /// The HDInsightNameAvailabilityContent to use. + /// Check the availability of the resource name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The name and type of the resource. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response CheckNameAvailability(string subscriptionId, AzureLocation location, HDInsightNameAvailabilityContent content, CancellationToken cancellationToken = default) + public Response CheckNameAvailability(string subscriptionId, AzureLocation location, NameAvailabilityContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(content, nameof(content)); @@ -319,88 +106,9 @@ public Response CheckNameAvailability(string su { case 200: { - HDInsightNameAvailabilityResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightNameAvailabilityResult.DeserializeHDInsightNameAvailabilityResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateValidateClusterCreateRequestRequest(string subscriptionId, AzureLocation location, HDInsightClusterCreationValidateContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.HDInsight/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/validateCreateRequest", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Validate the cluster create request spec is valid or not. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The Azure location (region) for which to make the request. - /// The HDInsightClusterCreationValidateContent to use. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ValidateClusterCreateRequestAsync(string subscriptionId, AzureLocation location, HDInsightClusterCreationValidateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateValidateClusterCreateRequestRequest(subscriptionId, location, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightClusterCreationValidateResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightClusterCreationValidateResult.DeserializeHDInsightClusterCreationValidateResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Validate the cluster create request spec is valid or not. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The Azure location (region) for which to make the request. - /// The HDInsightClusterCreationValidateContent to use. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ValidateClusterCreateRequest(string subscriptionId, AzureLocation location, HDInsightClusterCreationValidateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateValidateClusterCreateRequestRequest(subscriptionId, location, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightClusterCreationValidateResult value = default; + NameAvailabilityResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightClusterCreationValidateResult.DeserializeHDInsightClusterCreationValidateResult(document.RootElement); + value = NameAvailabilityResult.DeserializeNameAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs deleted file mode 100644 index 618b03c22c78..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ /dev/null @@ -1,445 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.HDInsight.Models; - -namespace Azure.ResourceManager.HDInsight -{ - internal partial class PrivateEndpointConnectionsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of PrivateEndpointConnectionsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-15-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByClusterRequest(string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/privateEndpointConnections", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the private endpoint connections for a HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByClusterAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterRequest(subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightPrivateEndpointConnectionListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightPrivateEndpointConnectionListResult.DeserializeHDInsightPrivateEndpointConnectionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the private endpoint connections for a HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByCluster(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterRequest(subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightPrivateEndpointConnectionListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightPrivateEndpointConnectionListResult.DeserializeHDInsightPrivateEndpointConnectionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string privateEndpointConnectionName, HDInsightPrivateEndpointConnectionData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Approve or reject a private endpoint connection manually. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the private endpoint connection. - /// The private endpoint connection create or update request. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string privateEndpointConnectionName, HDInsightPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, privateEndpointConnectionName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Approve or reject a private endpoint connection manually. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the private endpoint connection. - /// The private endpoint connection create or update request. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string privateEndpointConnectionName, HDInsightPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, privateEndpointConnectionName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string privateEndpointConnectionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the specific private endpoint connection. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the private endpoint connection. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, privateEndpointConnectionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightPrivateEndpointConnectionData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightPrivateEndpointConnectionData.DeserializeHDInsightPrivateEndpointConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HDInsightPrivateEndpointConnectionData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the specific private endpoint connection. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the private endpoint connection. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, privateEndpointConnectionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightPrivateEndpointConnectionData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightPrivateEndpointConnectionData.DeserializeHDInsightPrivateEndpointConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HDInsightPrivateEndpointConnectionData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string privateEndpointConnectionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes the specific private endpoint connection. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the private endpoint connection. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, privateEndpointConnectionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes the specific private endpoint connection. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the private endpoint connection. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, privateEndpointConnectionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByClusterNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the private endpoint connections for a HDInsight cluster. - /// The URL to the next page of results. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByClusterNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightPrivateEndpointConnectionListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightPrivateEndpointConnectionListResult.DeserializeHDInsightPrivateEndpointConnectionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the private endpoint connections for a HDInsight cluster. - /// The URL to the next page of results. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByClusterNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightPrivateEndpointConnectionListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightPrivateEndpointConnectionListResult.DeserializeHDInsightPrivateEndpointConnectionListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs deleted file mode 100644 index fdc2969b78ab..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.HDInsight.Models; - -namespace Azure.ResourceManager.HDInsight -{ - internal partial class PrivateLinkResourcesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of PrivateLinkResourcesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-15-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByClusterRequest(string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/privateLinkResources", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the private link resources in a HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByClusterAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterRequest(subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightPrivateLinkResourceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightPrivateLinkResourceListResult.DeserializeHDInsightPrivateLinkResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the private link resources in a HDInsight cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByCluster(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterRequest(subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightPrivateLinkResourceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightPrivateLinkResourceListResult.DeserializeHDInsightPrivateLinkResourceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string privateLinkResourceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/privateLinkResources/", false); - uri.AppendPath(privateLinkResourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the specific private link resource. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the private link resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string privateLinkResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, privateLinkResourceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightPrivateLinkResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightPrivateLinkResourceData.DeserializeHDInsightPrivateLinkResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HDInsightPrivateLinkResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the specific private link resource. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the private link resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string privateLinkResourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, privateLinkResourceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightPrivateLinkResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightPrivateLinkResourceData.DeserializeHDInsightPrivateLinkResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((HDInsightPrivateLinkResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ScriptActionsRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ScriptActionsRestOperations.cs deleted file mode 100644 index ec51a5cdabdb..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/ScriptActionsRestOperations.cs +++ /dev/null @@ -1,439 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.HDInsight.Models; - -namespace Azure.ResourceManager.HDInsight -{ - internal partial class ScriptActionsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ScriptActionsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ScriptActionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-15-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string scriptName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/scriptActions/", false); - uri.AppendPath(scriptName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes a specified persisted script action of the cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the script. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string scriptName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(scriptName, nameof(scriptName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, scriptName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a specified persisted script action of the cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The name of the script. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string scriptName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(scriptName, nameof(scriptName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, scriptName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByClusterRequest(string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/scriptActions", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all the persisted script actions for the specified cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByClusterAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterRequest(subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ScriptActionsList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ScriptActionsList.DeserializeScriptActionsList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the persisted script actions for the specified cluster. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByCluster(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterRequest(subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ScriptActionsList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ScriptActionsList.DeserializeScriptActionsList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetExecutionDetailRequest(string subscriptionId, string resourceGroupName, string clusterName, string scriptExecutionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/scriptExecutionHistory/", false); - uri.AppendPath(scriptExecutionId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the script execution detail for the given script execution ID. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The script execution Id. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetExecutionDetailAsync(string subscriptionId, string resourceGroupName, string clusterName, string scriptExecutionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(scriptExecutionId, nameof(scriptExecutionId)); - - using var message = CreateGetExecutionDetailRequest(subscriptionId, resourceGroupName, clusterName, scriptExecutionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RuntimeScriptActionDetail value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RuntimeScriptActionDetail.DeserializeRuntimeScriptActionDetail(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the script execution detail for the given script execution ID. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The script execution Id. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetExecutionDetail(string subscriptionId, string resourceGroupName, string clusterName, string scriptExecutionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(scriptExecutionId, nameof(scriptExecutionId)); - - using var message = CreateGetExecutionDetailRequest(subscriptionId, resourceGroupName, clusterName, scriptExecutionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RuntimeScriptActionDetail value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RuntimeScriptActionDetail.DeserializeRuntimeScriptActionDetail(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetExecutionAsyncOperationStatusRequest(string subscriptionId, string resourceGroupName, string clusterName, string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/executeScriptActions/azureasyncoperations/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the async operation status of execution operation. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The long running operation id. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetExecutionAsyncOperationStatusAsync(string subscriptionId, string resourceGroupName, string clusterName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetExecutionAsyncOperationStatusRequest(subscriptionId, resourceGroupName, clusterName, operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightAsyncOperationResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightAsyncOperationResult.DeserializeHDInsightAsyncOperationResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the async operation status of execution operation. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The long running operation id. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetExecutionAsyncOperationStatus(string subscriptionId, string resourceGroupName, string clusterName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetExecutionAsyncOperationStatusRequest(subscriptionId, resourceGroupName, clusterName, operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightAsyncOperationResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightAsyncOperationResult.DeserializeHDInsightAsyncOperationResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByClusterNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all the persisted script actions for the specified cluster. - /// The URL to the next page of results. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByClusterNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ScriptActionsList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ScriptActionsList.DeserializeScriptActionsList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the persisted script actions for the specified cluster. - /// The URL to the next page of results. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByClusterNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListByClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ScriptActionsList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ScriptActionsList.DeserializeScriptActionsList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/VirtualMachinesRestOperations.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/VirtualMachinesRestOperations.cs deleted file mode 100644 index 79903df52cd2..000000000000 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/RestOperations/VirtualMachinesRestOperations.cs +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.HDInsight.Models; - -namespace Azure.ResourceManager.HDInsight -{ - internal partial class VirtualMachinesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of VirtualMachinesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public VirtualMachinesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-04-15-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListHostsRequest(string subscriptionId, string resourceGroupName, string clusterName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/listHosts", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists the HDInsight clusters hosts. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task>> ListHostsAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListHostsRequest(subscriptionId, resourceGroupName, clusterName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(HDInsightClusterHostInfo.DeserializeHDInsightClusterHostInfo(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists the HDInsight clusters hosts. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response> ListHosts(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - - using var message = CreateListHostsRequest(subscriptionId, resourceGroupName, clusterName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - IReadOnlyList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(HDInsightClusterHostInfo.DeserializeHDInsightClusterHostInfo(item)); - } - value = array; - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateRestartHostsRequest(string subscriptionId, string resourceGroupName, string clusterName, IEnumerable content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/restartHosts", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteStartArray(); - foreach (var item in content) - { - content0.JsonWriter.WriteStringValue(item); - } - content0.JsonWriter.WriteEndArray(); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Restarts the specified HDInsight cluster hosts. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The list of hosts to restart. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task RestartHostsAsync(string subscriptionId, string resourceGroupName, string clusterName, IEnumerable content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateRestartHostsRequest(subscriptionId, resourceGroupName, clusterName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Restarts the specified HDInsight cluster hosts. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The list of hosts to restart. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response RestartHosts(string subscriptionId, string resourceGroupName, string clusterName, IEnumerable content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateRestartHostsRequest(subscriptionId, resourceGroupName, clusterName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetAsyncOperationStatusRequest(string subscriptionId, string resourceGroupName, string clusterName, string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.HDInsight/clusters/", false); - uri.AppendPath(clusterName, true); - uri.AppendPath("/restartHosts/azureasyncoperations/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the async operation status. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The long running operation id. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsyncOperationStatusAsync(string subscriptionId, string resourceGroupName, string clusterName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetAsyncOperationStatusRequest(subscriptionId, resourceGroupName, clusterName, operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - HDInsightAsyncOperationResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = HDInsightAsyncOperationResult.DeserializeHDInsightAsyncOperationResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the async operation status. - /// The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the cluster. - /// The long running operation id. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetAsyncOperationStatus(string subscriptionId, string resourceGroupName, string clusterName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetAsyncOperationStatusRequest(subscriptionId, resourceGroupName, clusterName, operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - HDInsightAsyncOperationResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = HDInsightAsyncOperationResult.DeserializeHDInsightAsyncOperationResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/autorest.md b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/autorest.md index 0269b554c177..354fd9a7bdbf 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/autorest.md +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: HDInsight namespace: Azure.ResourceManager.HDInsight -require: https://github.com/Azure/azure-rest-api-specs/blob/de37c47a625de64c0ac5bf76cf531527ba2feb77/specification/hdinsight/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true