// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.

package armhdinsight_test

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hdinsight/armhdinsight/v2"
	"log"
)

// Generated from example definition: 2025-01-15-preview/CreateHDInsightClusterWithADLSGen2Msi.json
func ExampleClustersClient_BeginCreate_createClusterWithStorageAdlsGen2Msi() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Identity: &armhdinsight.ClusterIdentity{
			Type: to.Ptr(armhdinsight.ResourceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armhdinsight.UserAssignedIdentity{
				"/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi": {},
			},
		},
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("Hadoop"),
			},
			ClusterVersion: to.Ptr("5.1"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_E8_V3"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						ScriptActions:       []*armhdinsight.ScriptAction{},
						TargetInstanceCount: to.Ptr[int32](2),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_E8_V3"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						ScriptActions:       []*armhdinsight.ScriptAction{},
						TargetInstanceCount: to.Ptr[int32](3),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
					{
						Name: to.Ptr("zookeepernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_E8_V3"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						ScriptActions:       []*armhdinsight.ScriptAction{},
						TargetInstanceCount: to.Ptr[int32](3),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
				},
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:          to.Ptr("mystorage.blob.core.windows.net"),
						FileSystem:    to.Ptr("default"),
						IsDefault:     to.Ptr(true),
						MsiResourceID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi"),
						ResourceID:    to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/mystorage"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierStandard),
		},
		Tags: map[string]*string{
			"key1": to.Ptr("val1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("ebd7702e-21a6-4968-aba6-f0a3c028b30e"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("East Asia"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-5.1.3000.0.2504170544.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Hadoop": to.Ptr("3.3"),
	// 				},
	// 				Kind: to.Ptr("Hadoop"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("5.1.3000.0"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_E8_V3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_E8_V3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_E8_V3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2025-05-08T08:07:09.813"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](40),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateHDInsightClusterWithAutoscaleConfig.json
func ExampleClustersClient_BeginCreate_createHdInsightClusterWithAutoscaleConfiguration() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				ComponentVersion: map[string]*string{
					"Hadoop": to.Ptr("2.7"),
				},
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("hadoop"),
			},
			ClusterVersion: to.Ptr("3.6"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("workernode"),
						AutoscaleConfiguration: &armhdinsight.Autoscale{
							Recurrence: &armhdinsight.AutoscaleRecurrence{
								Schedule: []*armhdinsight.AutoscaleSchedule{
									{
										Days: []*armhdinsight.DaysOfWeek{
											to.Ptr(armhdinsight.DaysOfWeekMonday),
											to.Ptr(armhdinsight.DaysOfWeekTuesday),
											to.Ptr(armhdinsight.DaysOfWeekWednesday),
											to.Ptr(armhdinsight.DaysOfWeekThursday),
											to.Ptr(armhdinsight.DaysOfWeekFriday),
										},
										TimeAndCapacity: &armhdinsight.AutoscaleTimeAndCapacity{
											MaxInstanceCount: to.Ptr[int32](3),
											MinInstanceCount: to.Ptr[int32](3),
											Time:             to.Ptr("09:00"),
										},
									},
									{
										Days: []*armhdinsight.DaysOfWeek{
											to.Ptr(armhdinsight.DaysOfWeekMonday),
											to.Ptr(armhdinsight.DaysOfWeekTuesday),
											to.Ptr(armhdinsight.DaysOfWeekWednesday),
											to.Ptr(armhdinsight.DaysOfWeekThursday),
											to.Ptr(armhdinsight.DaysOfWeekFriday),
										},
										TimeAndCapacity: &armhdinsight.AutoscaleTimeAndCapacity{
											MaxInstanceCount: to.Ptr[int32](6),
											MinInstanceCount: to.Ptr[int32](6),
											Time:             to.Ptr("18:00"),
										},
									},
									{
										Days: []*armhdinsight.DaysOfWeek{
											to.Ptr(armhdinsight.DaysOfWeekSaturday),
											to.Ptr(armhdinsight.DaysOfWeekSunday),
										},
										TimeAndCapacity: &armhdinsight.AutoscaleTimeAndCapacity{
											MaxInstanceCount: to.Ptr[int32](2),
											MinInstanceCount: to.Ptr[int32](2),
											Time:             to.Ptr("09:00"),
										},
									},
									{
										Days: []*armhdinsight.DaysOfWeek{
											to.Ptr(armhdinsight.DaysOfWeekSaturday),
											to.Ptr(armhdinsight.DaysOfWeekSunday),
										},
										TimeAndCapacity: &armhdinsight.AutoscaleTimeAndCapacity{
											MaxInstanceCount: to.Ptr[int32](4),
											MinInstanceCount: to.Ptr[int32](4),
											Time:             to.Ptr("18:00"),
										},
									},
								},
								TimeZone: to.Ptr("China Standard Time"),
							},
						},
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_D4_V2"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						ScriptActions:       []*armhdinsight.ScriptAction{},
						TargetInstanceCount: to.Ptr[int32](4),
					},
				},
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage.blob.core.windows.net"),
						Container:           to.Ptr("hdinsight-autoscale-tes-2019-06-18t05-49-16-591z"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storagekey"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierStandard),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("East US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-4.0.1000.1.1910270459.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Hadoop": to.Ptr("3.1"),
	// 				},
	// 				Kind: to.Ptr("HADOOP"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("4.0.1000.1"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d12_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d4_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](4),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a2_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2019-11-18T12:25:43.48"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](40),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateHDInsightClusterWithAvailabilityZones.json
func ExampleClustersClient_BeginCreate_createClusterWithAvailabilityZones() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"ambari-conf": map[string]any{
						"database-name":          "{ambari database name}",
						"database-server":        "{sql server name}.database.windows.net",
						"database-user-name":     "**********",
						"database-user-password": "**********",
					},
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
					"hive-env": map[string]any{
						"hive_database":                       "Existing MSSQL Server database with SQL authentication",
						"hive_database_name":                  "{hive metastore name}",
						"hive_database_type":                  "mssql",
						"hive_existing_mssql_server_database": "{hive metastore name}",
						"hive_existing_mssql_server_host":     "{sql server name}.database.windows.net",
						"hive_hostname":                       "{sql server name}.database.windows.net",
					},
					"hive-site": map[string]any{
						"javax.jdo.option.ConnectionDriverName": "com.microsoft.sqlserver.jdbc.SQLServerDriver",
						"javax.jdo.option.ConnectionPassword":   "**********!",
						"javax.jdo.option.ConnectionURL":        "jdbc:sqlserver://{sql server name}.database.windows.net;database={hive metastore name};encrypt=true;trustServerCertificate=true;create=false;loginTimeout=300;sendStringParametersAsUnicode=true;prepareSQL=0",
						"javax.jdo.option.ConnectionUserName":   "**********",
					},
					"oozie-env": map[string]any{
						"oozie_database":                       "Existing MSSQL Server database with SQL authentication",
						"oozie_database_name":                  "{oozie metastore name}",
						"oozie_database_type":                  "mssql",
						"oozie_existing_mssql_server_database": "{oozie metastore name}",
						"oozie_existing_mssql_server_host":     "{sql server name}.database.windows.net",
						"oozie_hostname":                       "{sql server name}.database.windows.net",
					},
					"oozie-site": map[string]any{
						"oozie.db.schema.name":                   "oozie",
						"oozie.service.JPAService.jdbc.driver":   "com.microsoft.sqlserver.jdbc.SQLServerDriver",
						"oozie.service.JPAService.jdbc.password": "**********",
						"oozie.service.JPAService.jdbc.url":      "jdbc:sqlserver://{sql server name}.database.windows.net;database={oozie metastore name};encrypt=true;trustServerCertificate=true;create=false;loginTimeout=300;sendStringParametersAsUnicode=true;prepareSQL=0",
						"oozie.service.JPAService.jdbc.username": "**********",
					},
				},
				Kind: to.Ptr("hadoop"),
			},
			ClusterVersion: to.Ptr("3.6"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("standard_d3"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								SSHProfile: &armhdinsight.SSHProfile{
									PublicKeys: []*armhdinsight.SSHPublicKey{
										{
											CertificateData: to.Ptr("**********"),
										},
									},
								},
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("standard_d3"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								SSHProfile: &armhdinsight.SSHProfile{
									PublicKeys: []*armhdinsight.SSHPublicKey{
										{
											CertificateData: to.Ptr("**********"),
										},
									},
								},
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
				},
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage"),
						Container:           to.Ptr("containername"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storage account key"),
					},
				},
			},
		},
		Zones: []*string{
			to.Ptr("1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("South Central US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.6.1000.67.2005040905.json"),
	// 				Kind: to.Ptr("hadoop"),
	// 			},
	// 			ClusterID: to.Ptr("8186508b6234470e9d16c9e8e13bd821"),
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("3.6.1000.67"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
	// 							ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"),
	// 							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
	// 							ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"),
	// 							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
	// 						},
	// 					},
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2020-06-09T12:25:43.48"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](16),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 		Zones: []*string{
	// 			to.Ptr("1"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateHDInsightClusterWithComputeIsolationProperties.json
func ExampleClustersClient_BeginCreate_createClusterWithComputeIsolationProperties() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("hadoop"),
			},
			ClusterVersion: to.Ptr("3.6"),
			ComputeIsolationProperties: &armhdinsight.ComputeIsolationProperties{
				EnableComputeIsolation: to.Ptr(true),
			},
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("standard_d3"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								SSHProfile: &armhdinsight.SSHProfile{
									PublicKeys: []*armhdinsight.SSHPublicKey{
										{
											CertificateData: to.Ptr("**********"),
										},
									},
								},
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("standard_d3"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								SSHProfile: &armhdinsight.SSHProfile{
									PublicKeys: []*armhdinsight.SSHPublicKey{
										{
											CertificateData: to.Ptr("**********"),
										},
									},
								},
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
					},
				},
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage"),
						Container:           to.Ptr("containername"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storage account key"),
					},
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("South Central US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.6.1000.67.2005040905.json"),
	// 				Kind: to.Ptr("hadoop"),
	// 			},
	// 			ClusterID: to.Ptr("8186508b6234470e9d16c9e8e13bd821"),
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("3.6.1000.67"),
	// 			ComputeIsolationProperties: &armhdinsight.ComputeIsolationProperties{
	// 				EnableComputeIsolation: to.Ptr(true),
	// 			},
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
	// 							ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"),
	// 							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2020-06-09T12:25:43.48"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](16),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateHDInsightClusterWithCustomNetworkProperties.json
func ExampleClustersClient_BeginCreate_createClusterWithNetworkProperties() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("hadoop"),
			},
			ClusterVersion: to.Ptr("3.6"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("standard_d3"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								SSHProfile: &armhdinsight.SSHProfile{
									PublicKeys: []*armhdinsight.SSHPublicKey{
										{
											CertificateData: to.Ptr("**********"),
										},
									},
								},
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("standard_d3"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								SSHProfile: &armhdinsight.SSHProfile{
									PublicKeys: []*armhdinsight.SSHPublicKey{
										{
											CertificateData: to.Ptr("**********"),
										},
									},
								},
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
				},
			},
			NetworkProperties: &armhdinsight.NetworkProperties{
				PrivateLink: to.Ptr(armhdinsight.PrivateLinkEnabled),
				PublicIPTag: &armhdinsight.IPTag{
					IPTagType: to.Ptr("FirstPartyUsage"),
					Tag:       to.Ptr("/<TagName>"),
				},
				ResourceProviderConnection: to.Ptr(armhdinsight.ResourceProviderConnectionOutbound),
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage"),
						Container:           to.Ptr("containername"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storage account key"),
					},
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("South Central US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.6.1000.67.2005040905.json"),
	// 				Kind: to.Ptr("hadoop"),
	// 			},
	// 			ClusterID: to.Ptr("8186508b6234470e9d16c9e8e13bd821"),
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("3.6.1000.67"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
	// 							ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"),
	// 							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
	// 							ID: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"),
	// 							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
	// 						},
	// 					},
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2020-06-09T12:25:43.48"),
	// 			NetworkProperties: &armhdinsight.NetworkProperties{
	// 				PrivateLink: to.Ptr(armhdinsight.PrivateLinkEnabled),
	// 				PublicIPTag: &armhdinsight.IPTag{
	// 					IPTagType: to.Ptr("FirstPartyUsage"),
	// 					Tag: to.Ptr("/<TagName>"),
	// 				},
	// 				ResourceProviderConnection: to.Ptr(armhdinsight.ResourceProviderConnectionOutbound),
	// 			},
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](16),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateHDInsightClusterWithEncryptionAtHost.json
func ExampleClustersClient_BeginCreate_createClusterWithEncryptionAtHost() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("Hadoop"),
			},
			ClusterVersion: to.Ptr("3.6"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_DS14_v2"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_DS14_v2"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
					{
						Name: to.Ptr("zookeepernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_DS14_v2"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
				},
			},
			DiskEncryptionProperties: &armhdinsight.DiskEncryptionProperties{
				EncryptionAtHost: to.Ptr(true),
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage.blob.core.windows.net"),
						Container:           to.Ptr("default8525"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storagekey"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierStandard),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("3b76ce3d-892c-4036-9d8b-8ade18ba7a4b"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("South Central US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.6.1000.67.2001080246.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Hadoop": to.Ptr("2.7"),
	// 				},
	// 				Kind: to.Ptr("Hadoop"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("3.6.1000.67"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_ds14_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_ds14_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_ds14_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2020-01-10T08:36:39.153"),
	// 			DiskEncryptionProperties: &armhdinsight.DiskEncryptionProperties{
	// 				EncryptionAtHost: to.Ptr(true),
	// 			},
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](20),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateHDInsightClusterWithEncryptionInTransit.json
func ExampleClustersClient_BeginCreate_createClusterWithEncryptionInTransit() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("Hadoop"),
			},
			ClusterVersion: to.Ptr("3.6"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Large"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Large"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
					{
						Name: to.Ptr("zookeepernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Small"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
				},
			},
			EncryptionInTransitProperties: &armhdinsight.EncryptionInTransitProperties{
				IsEncryptionInTransitEnabled: to.Ptr(true),
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage.blob.core.windows.net"),
						Container:           to.Ptr("default8525"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storagekey"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierStandard),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("3b76ce3d-892c-4036-9d8b-8ade18ba7a4b"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("South Central US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.6.1000.67.2001080246.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Hadoop": to.Ptr("2.7"),
	// 				},
	// 				Kind: to.Ptr("Hadoop"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("3.6.1000.67"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a4_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a4_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a2_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2020-01-10T08:36:39.153"),
	// 			EncryptionInTransitProperties: &armhdinsight.EncryptionInTransitProperties{
	// 				IsEncryptionInTransitEnabled: to.Ptr(true),
	// 			},
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](20),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateHDInsightClusterWithEntraUser.json
func ExampleClustersClient_BeginCreate_createClusterWithEntraUser() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": false,
						"restAuthEntraUsers": []any{
							map[string]any{
								"displayName": "displayName",
								"objectId":    "00000000-0000-0000-0000-000000000000",
								"upn":         "user@microsoft.com",
							},
						},
					},
				},
				Kind: to.Ptr("Hadoop"),
			},
			ClusterVersion: to.Ptr("5.1"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_E8_V3"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_E8_V3"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
					{
						Name: to.Ptr("zookeepernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_E8_V3"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
				},
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage.blob.core.windows.net"),
						Container:           to.Ptr("containername"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storagekey"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierStandard),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("ebd5623e-21a6-4968-aba6-f0a3c028b30e"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("East Asia"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-5.1.3000.0.2504170544.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Hadoop": to.Ptr("3.3"),
	// 				},
	// 				Kind: to.Ptr("Hadoop"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("5.1.3000.0"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_E8_V3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_E8_V3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_E8_V3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2025-05-08T08:07:09.813"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](40),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateHDInsightClusterWithTLS12.json
func ExampleClustersClient_BeginCreate_createClusterWithTls12() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("Hadoop"),
			},
			ClusterVersion: to.Ptr("3.6"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Large"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Large"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
					{
						Name: to.Ptr("zookeepernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Small"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
				},
			},
			MinSupportedTLSVersion: to.Ptr("1.2"),
			OSType:                 to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage.blob.core.windows.net"),
						Container:           to.Ptr("default8525"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storagekey"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierStandard),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("3b76ce3d-892c-4036-9d8b-8ade18ba7a4b"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("South Central US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.6.1000.67.2001080246.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Hadoop": to.Ptr("2.7"),
	// 				},
	// 				Kind: to.Ptr("Hadoop"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("3.6.1000.67"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a4_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a4_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a2_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2020-01-10T08:36:39.153"),
	// 			MinSupportedTLSVersion: to.Ptr("1.2"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](20),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateHDInsightClusterWithWasbMsi.json
func ExampleClustersClient_BeginCreate_createClusterWithStorageWasbMsi() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subId", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Identity: &armhdinsight.ClusterIdentity{
			Type: to.Ptr(armhdinsight.ResourceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armhdinsight.UserAssignedIdentity{
				"/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi": {},
			},
		},
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("Hadoop"),
			},
			ClusterVersion: to.Ptr("5.1"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_E8_V3"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						ScriptActions:       []*armhdinsight.ScriptAction{},
						TargetInstanceCount: to.Ptr[int32](2),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_E8_V3"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						ScriptActions:       []*armhdinsight.ScriptAction{},
						TargetInstanceCount: to.Ptr[int32](3),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
					{
						Name: to.Ptr("zookeepernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_E8_V3"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						ScriptActions:       []*armhdinsight.ScriptAction{},
						TargetInstanceCount: to.Ptr[int32](3),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
				},
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:          to.Ptr("mystorage.blob.core.windows.net"),
						Container:     to.Ptr("containername"),
						IsDefault:     to.Ptr(true),
						MsiResourceID: to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi"),
						ResourceID:    to.Ptr("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/mystorage"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierStandard),
		},
		Tags: map[string]*string{
			"key1": to.Ptr("val1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("ebd7702e-yr32-4968-aba6-f0a3c028b30e"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("East Asia"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-5.1.3000.0.2504170544.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Hadoop": to.Ptr("3.3"),
	// 				},
	// 				Kind: to.Ptr("Hadoop"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("5.1.3000.0"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_E8_V3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_E8_V3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_E8_V3"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2025-05-08T08:07:09.813"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](40),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateKafkaClusterWithKafkaRestProxy.json
func ExampleClustersClient_BeginCreate_createKafkaClusterWithKafkaRestProxy() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				ComponentVersion: map[string]*string{
					"Kafka": to.Ptr("2.1"),
				},
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("kafka"),
			},
			ClusterVersion: to.Ptr("4.0"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Large"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
					},
					{
						Name: to.Ptr("workernode"),
						DataDisksGroups: []*armhdinsight.DataDisksGroups{
							{
								DisksPerNode: to.Ptr[int32](8),
							},
						},
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Large"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
					{
						Name: to.Ptr("zookeepernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Small"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
					{
						Name: to.Ptr("kafkamanagementnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_D4_v2"),
						},
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("kafkauser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
					},
				},
			},
			KafkaRestProperties: &armhdinsight.KafkaRestProperties{
				ClientGroupInfo: &armhdinsight.ClientGroupInfo{
					GroupID:   to.Ptr("00000000-0000-0000-0000-111111111111"),
					GroupName: to.Ptr("Kafka security group name"),
				},
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage.blob.core.windows.net"),
						Container:           to.Ptr("containername"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storagekey"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierStandard),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("e1266b83-9bda-4797-a906-1bf82c8eb09a"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("South Central US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/kafka-4.0.1000.1.1911212244.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Kafka": to.Ptr("2.1"),
	// 				},
	// 				Kind: to.Ptr("KAFKA"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("4.0.1000.1"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d3_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						DataDisksGroups: []*armhdinsight.DataDisksGroups{
	// 							{
	// 								DiskSizeGB: to.Ptr[int32](1023),
	// 								DisksPerNode: to.Ptr[int32](2),
	// 								StorageAccountType: to.Ptr("Standard_LRS"),
	// 							},
	// 						},
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d3_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](4),
	// 					},
	// 					{
	// 						Name: to.Ptr("kafkamanagementnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d4_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a4_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("KafkaRestProxyPublicEndpoint"),
	// 					Location: to.Ptr("cluster1-kafkarest.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2019-11-25T03:43:23.663"),
	// 			KafkaRestProperties: &armhdinsight.KafkaRestProperties{
	// 				ClientGroupInfo: &armhdinsight.ClientGroupInfo{
	// 					GroupID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					GroupName: to.Ptr("security group name"),
	// 				},
	// 			},
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](52),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateLinuxHadoopAdlsGen2.json
func ExampleClustersClient_BeginCreate_createHadoopClusterWithAzureDataLakeStorageGen2() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": "true",
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("Hadoop"),
			},
			ClusterVersion: to.Ptr("3.6"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_D3_V2"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_D3_V2"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](4),
					},
					{
						Name: to.Ptr("zookeepernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Small"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
				},
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage.dfs.core.windows.net"),
						EnableSecureChannel: to.Ptr(true),
						FileSystem:          to.Ptr("default"),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storagekey"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierStandard),
		},
		Tags: map[string]*string{
			"key1": to.Ptr("val1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("East US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-4.0.1000.1.1910270459.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Hadoop": to.Ptr("3.1"),
	// 				},
	// 				Kind: to.Ptr("HADOOP"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("4.0.1000.1"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d12_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d4_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](4),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a2_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2019-11-18T12:25:43.48"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](40),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateLinuxHadoopSecureHadoop.json
func ExampleClustersClient_BeginCreate_createSecureHadoopCluster() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("Hadoop"),
			},
			ClusterVersion: to.Ptr("3.5"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_D3_V2"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								SSHProfile: &armhdinsight.SSHProfile{
									PublicKeys: []*armhdinsight.SSHPublicKey{
										{
											CertificateData: to.Ptr("**********"),
										},
									},
								},
								Username: to.Ptr("sshuser"),
							},
						},
						ScriptActions:       []*armhdinsight.ScriptAction{},
						TargetInstanceCount: to.Ptr[int32](2),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_D3_V2"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								SSHProfile: &armhdinsight.SSHProfile{
									PublicKeys: []*armhdinsight.SSHPublicKey{
										{
											CertificateData: to.Ptr("**********"),
										},
									},
								},
								Username: to.Ptr("sshuser"),
							},
						},
						ScriptActions:       []*armhdinsight.ScriptAction{},
						TargetInstanceCount: to.Ptr[int32](4),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
					{
						Name: to.Ptr("zookeepernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Small"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								SSHProfile: &armhdinsight.SSHProfile{
									PublicKeys: []*armhdinsight.SSHPublicKey{
										{
											CertificateData: to.Ptr("**********"),
										},
									},
								},
								Username: to.Ptr("sshuser"),
							},
						},
						ScriptActions:       []*armhdinsight.ScriptAction{},
						TargetInstanceCount: to.Ptr[int32](3),
						VirtualNetworkProfile: &armhdinsight.VirtualNetworkProfile{
							ID:     to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname"),
							Subnet: to.Ptr("/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/vnetsubnet"),
						},
					},
				},
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			SecurityProfile: &armhdinsight.SecurityProfile{
				ClusterUsersGroupDNs: []*string{
					to.Ptr("hdiusers"),
				},
				DirectoryType:      to.Ptr(armhdinsight.DirectoryTypeActiveDirectory),
				Domain:             to.Ptr("DomainName"),
				DomainUserPassword: to.Ptr("**********"),
				DomainUsername:     to.Ptr("DomainUsername"),
				LdapsUrls: []*string{
					to.Ptr("ldaps://10.10.0.4:636"),
				},
				OrganizationalUnitDN: to.Ptr("OU=Hadoop,DC=hdinsight,DC=test"),
			},
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage.blob.core.windows.net"),
						Container:           to.Ptr("containername"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storage account key"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierPremium),
		},
		Tags: map[string]*string{
			"key1": to.Ptr("val1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("East US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-4.0.1000.1.1910270459.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Hadoop": to.Ptr("3.1"),
	// 				},
	// 				Kind: to.Ptr("HADOOP"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("4.0.1000.1"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d12_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d4_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](4),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a2_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2019-11-18T12:25:43.48"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](40),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateLinuxHadoopSshPassword.json
func ExampleClustersClient_BeginCreate_createHadoopOnLinuxClusterWithSshPassword() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": "true",
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("Hadoop"),
			},
			ClusterVersion: to.Ptr("3.5"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_D3_V2"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_D3_V2"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](4),
					},
					{
						Name: to.Ptr("zookeepernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Small"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
				},
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage.blob.core.windows.net"),
						Container:           to.Ptr("containername"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storagekey"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierStandard),
		},
		Tags: map[string]*string{
			"key1": to.Ptr("val1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("East US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-4.0.1000.1.1910270459.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Hadoop": to.Ptr("3.1"),
	// 				},
	// 				Kind: to.Ptr("HADOOP"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("4.0.1000.1"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d12_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d4_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](4),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a2_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2019-11-18T12:25:43.48"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](40),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateLinuxHadoopSshPublicKey.json
func ExampleClustersClient_BeginCreate_createHadoopOnLinuxClusterWithSshPublicKey() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("Hadoop"),
			},
			ClusterVersion: to.Ptr("3.5"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_D3_V2"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								SSHProfile: &armhdinsight.SSHProfile{
									PublicKeys: []*armhdinsight.SSHPublicKey{
										{
											CertificateData: to.Ptr("**********"),
										},
									},
								},
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_D3_V2"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](4),
					},
					{
						Name: to.Ptr("zookeepernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Small"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](3),
					},
				},
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage.blob.core.windows.net"),
						Container:           to.Ptr("containername"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storagekey"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierStandard),
		},
		Tags: map[string]*string{
			"key1": to.Ptr("val1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("East US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-4.0.1000.1.1910270459.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Hadoop": to.Ptr("3.1"),
	// 				},
	// 				Kind: to.Ptr("HADOOP"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("4.0.1000.1"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d12_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d4_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](4),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a2_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2019-11-18T12:25:43.48"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](40),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/CreateLinuxSparkSshPassword.json
func ExampleClustersClient_BeginCreate_createSparkOnLinuxClusterWithSshPassword() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginCreate(ctx, "rg1", "cluster1", armhdinsight.ClusterCreateParametersExtended{
		Properties: &armhdinsight.ClusterCreateProperties{
			ClusterDefinition: &armhdinsight.ClusterDefinition{
				ComponentVersion: map[string]*string{
					"Spark": to.Ptr("2.0"),
				},
				Configurations: map[string]any{
					"gateway": map[string]any{
						"restAuthCredential.isEnabled": true,
						"restAuthCredential.password":  "**********",
						"restAuthCredential.username":  "admin",
					},
				},
				Kind: to.Ptr("Spark"),
			},
			ClusterVersion: to.Ptr("3.5"),
			ComputeProfile: &armhdinsight.ComputeProfile{
				Roles: []*armhdinsight.Role{
					{
						Name: to.Ptr("headnode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_D12_V2"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](2),
					},
					{
						Name: to.Ptr("workernode"),
						HardwareProfile: &armhdinsight.HardwareProfile{
							VMSize: to.Ptr("Standard_D4_V2"),
						},
						MinInstanceCount: to.Ptr[int32](1),
						OSProfile: &armhdinsight.OsProfile{
							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
								Password: to.Ptr("**********"),
								Username: to.Ptr("sshuser"),
							},
						},
						TargetInstanceCount: to.Ptr[int32](4),
					},
				},
			},
			OSType: to.Ptr(armhdinsight.OSTypeLinux),
			StorageProfile: &armhdinsight.StorageProfile{
				Storageaccounts: []*armhdinsight.StorageAccount{
					{
						Name:                to.Ptr("mystorage.blob.core.windows.net"),
						Container:           to.Ptr("containername"),
						EnableSecureChannel: to.Ptr(true),
						IsDefault:           to.Ptr(true),
						Key:                 to.Ptr("storageapikey*"),
					},
				},
			},
			Tier: to.Ptr(armhdinsight.TierStandard),
		},
		Tags: map[string]*string{
			"key1": to.Ptr("val1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientCreateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("fdf2a6e8-ce83-42cc-8c2d-0ceb11a370ff"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("East US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-4.0.1000.1.1910270459.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Hadoop": to.Ptr("3.1"),
	// 				},
	// 				Kind: to.Ptr("SPARK"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("4.0.1000.1"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d12_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_d4_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](4),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("standard_a2_v2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2019-11-18T12:25:43.48"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](40),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/DeleteLinuxHadoopCluster.json
func ExampleClustersClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginDelete(ctx, "rg1", "cluster1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientDeleteResponse{
	// }
}

// Generated from example definition: 2025-01-15-preview/PostExecuteScriptAction.json
func ExampleClustersClient_BeginExecuteScriptActions() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginExecuteScriptActions(ctx, "rg1", "cluster1", armhdinsight.ExecuteScriptActionParameters{
		PersistOnSuccess: to.Ptr(false),
		ScriptActions: []*armhdinsight.RuntimeScriptAction{
			{
				Name:       to.Ptr("Test"),
				Parameters: to.Ptr(""),
				Roles: []*string{
					to.Ptr("headnode"),
					to.Ptr("workernode"),
				},
				URI: to.Ptr("http://testurl.com/install.ssh"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientExecuteScriptActionsResponse{
	// }
}

// Generated from example definition: 2025-01-15-preview/GetLinuxHadoopCluster.json
func ExampleClustersClient_Get_getHadoopOnLinuxCluster() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().Get(ctx, "rg1", "cluster1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientGetResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"),
	// 		ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("West US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"),
	// 				Kind: to.Ptr("hadoop"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("3.5.1000.0"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_D3_V2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_D3_V2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](4),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Medium"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2017-01-11T18:58:26.187"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](24),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 		Tags: map[string]*string{
	// 			"key1": to.Ptr("val1"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/GetLinuxSparkCluster.json
func ExampleClustersClient_Get_getSparkOnLinuxCluster() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().Get(ctx, "rg1", "cluster1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientGetResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("4cd8b5a9-ca9c-4239-9e5b-3916032e994c"),
	// 		ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("West US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/spark-3.5.1000.0.9625065.json"),
	// 				ComponentVersion: map[string]*string{
	// 					"Spark": to.Ptr("2.0"),
	// 				},
	// 				Kind: to.Ptr("SPARK"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("3.5.1000.0"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_D12_V2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_D4_V2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](4),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Medium"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2017-03-03T08:35:07.323"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](40),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 		Tags: map[string]*string{
	// 			"key1": to.Ptr("val1"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/GetClusterCreatingAsyncOperationStatus.json
func ExampleClustersClient_GetAzureAsyncOperationStatus() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().GetAzureAsyncOperationStatus(ctx, "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientGetAzureAsyncOperationStatusResponse{
	// 	AsyncOperationResult: &armhdinsight.AsyncOperationResult{
	// 		Status: to.Ptr(armhdinsight.AsyncOperationStateInProgress),
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/HDI_Clusters_GetGatewaySettings.json
func ExampleClustersClient_GetGatewaySettings() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().GetGatewaySettings(ctx, "rg1", "cluster1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientGetGatewaySettingsResponse{
	// 	GatewaySettings: &armhdinsight.GatewaySettings{
	// 		IsCredentialEnabled: to.Ptr("true"),
	// 		Password: to.Ptr("**********"),
	// 		UserName: to.Ptr("hadoop"),
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/GetLinuxHadoopAllClusters.json
func ExampleClustersClient_NewListPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armhdinsight.ClustersClientListResponse{
		// 	ClusterListResult: armhdinsight.ClusterListResult{
		// 		Value: []*armhdinsight.Cluster{
		// 			{
		// 				Name: to.Ptr("cluster1"),
		// 				Type: to.Ptr("Microsoft.HDInsight/clusters"),
		// 				Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"),
		// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armhdinsight.ClusterGetProperties{
		// 					ClusterDefinition: &armhdinsight.ClusterDefinition{
		// 						Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"),
		// 						Kind: to.Ptr("hadoop"),
		// 					},
		// 					ClusterState: to.Ptr("Running"),
		// 					ClusterVersion: to.Ptr("3.5.1000.0"),
		// 					ComputeProfile: &armhdinsight.ComputeProfile{
		// 						Roles: []*armhdinsight.Role{
		// 							{
		// 								Name: to.Ptr("headnode"),
		// 								HardwareProfile: &armhdinsight.HardwareProfile{
		// 									VMSize: to.Ptr("Standard_D3_V2"),
		// 								},
		// 								OSProfile: &armhdinsight.OsProfile{
		// 									LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
		// 										Username: to.Ptr("pulkitssh"),
		// 									},
		// 								},
		// 								TargetInstanceCount: to.Ptr[int32](2),
		// 							},
		// 							{
		// 								Name: to.Ptr("workernode"),
		// 								HardwareProfile: &armhdinsight.HardwareProfile{
		// 									VMSize: to.Ptr("Standard_D3_V2"),
		// 								},
		// 								OSProfile: &armhdinsight.OsProfile{
		// 									LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
		// 										Username: to.Ptr("pulkitssh"),
		// 									},
		// 								},
		// 								TargetInstanceCount: to.Ptr[int32](4),
		// 							},
		// 							{
		// 								Name: to.Ptr("zookeepernode"),
		// 								HardwareProfile: &armhdinsight.HardwareProfile{
		// 									VMSize: to.Ptr("Medium"),
		// 								},
		// 								OSProfile: &armhdinsight.OsProfile{
		// 									LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
		// 										Username: to.Ptr("pulkitssh"),
		// 									},
		// 								},
		// 								TargetInstanceCount: to.Ptr[int32](3),
		// 							},
		// 						},
		// 					},
		// 					ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
		// 						{
		// 							Name: to.Ptr("SSH"),
		// 							Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
		// 							Port: to.Ptr[int32](22),
		// 							Protocol: to.Ptr("TCP"),
		// 						},
		// 						{
		// 							Name: to.Ptr("HTTPS"),
		// 							Location: to.Ptr("cluster1.azurehdinsight.net"),
		// 							Port: to.Ptr[int32](443),
		// 							Protocol: to.Ptr("TCP"),
		// 						},
		// 					},
		// 					CreatedDate: to.Ptr("2017-01-11T18:58:26.187"),
		// 					OSType: to.Ptr(armhdinsight.OSTypeLinux),
		// 					ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
		// 					QuotaInfo: &armhdinsight.QuotaInfo{
		// 						CoresUsed: to.Ptr[int32](24),
		// 					},
		// 					Tier: to.Ptr(armhdinsight.TierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 					"key1": to.Ptr("val1"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("cluster2"),
		// 				Type: to.Ptr("Microsoft.HDInsight/clusters"),
		// 				Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"),
		// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster2"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armhdinsight.ClusterGetProperties{
		// 					ClusterDefinition: &armhdinsight.ClusterDefinition{
		// 						Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"),
		// 						Kind: to.Ptr("hadoop"),
		// 					},
		// 					ClusterState: to.Ptr("Running"),
		// 					ClusterVersion: to.Ptr("3.5.1000.0"),
		// 					ComputeProfile: &armhdinsight.ComputeProfile{
		// 						Roles: []*armhdinsight.Role{
		// 							{
		// 								Name: to.Ptr("headnode"),
		// 								HardwareProfile: &armhdinsight.HardwareProfile{
		// 									VMSize: to.Ptr("Standard_D3_V2"),
		// 								},
		// 								OSProfile: &armhdinsight.OsProfile{
		// 									LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
		// 										Username: to.Ptr("pulkitssh"),
		// 									},
		// 								},
		// 								TargetInstanceCount: to.Ptr[int32](2),
		// 							},
		// 							{
		// 								Name: to.Ptr("workernode"),
		// 								HardwareProfile: &armhdinsight.HardwareProfile{
		// 									VMSize: to.Ptr("Standard_D3_V2"),
		// 								},
		// 								OSProfile: &armhdinsight.OsProfile{
		// 									LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
		// 										Username: to.Ptr("pulkitssh"),
		// 									},
		// 								},
		// 								TargetInstanceCount: to.Ptr[int32](4),
		// 							},
		// 							{
		// 								Name: to.Ptr("zookeepernode"),
		// 								HardwareProfile: &armhdinsight.HardwareProfile{
		// 									VMSize: to.Ptr("Medium"),
		// 								},
		// 								OSProfile: &armhdinsight.OsProfile{
		// 									LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
		// 										Username: to.Ptr("pulkitssh"),
		// 									},
		// 								},
		// 								TargetInstanceCount: to.Ptr[int32](3),
		// 							},
		// 						},
		// 					},
		// 					ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
		// 						{
		// 							Name: to.Ptr("SSH"),
		// 							Location: to.Ptr("cluster2-ssh.azurehdinsight.net"),
		// 							Port: to.Ptr[int32](22),
		// 							Protocol: to.Ptr("TCP"),
		// 						},
		// 						{
		// 							Name: to.Ptr("HTTPS"),
		// 							Location: to.Ptr("cluster2.azurehdinsight.net"),
		// 							Port: to.Ptr[int32](443),
		// 							Protocol: to.Ptr("TCP"),
		// 						},
		// 					},
		// 					CreatedDate: to.Ptr("2017-01-11T18:58:26.187"),
		// 					OSType: to.Ptr(armhdinsight.OSTypeLinux),
		// 					ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
		// 					QuotaInfo: &armhdinsight.QuotaInfo{
		// 						CoresUsed: to.Ptr[int32](24),
		// 					},
		// 					Tier: to.Ptr(armhdinsight.TierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 					"key1": to.Ptr("val1"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-01-15-preview/GetLinuxHadoopAllClustersInResourceGroup.json
func ExampleClustersClient_NewListByResourceGroupPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClustersClient().NewListByResourceGroupPager("rg1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armhdinsight.ClustersClientListByResourceGroupResponse{
		// 	ClusterListResult: armhdinsight.ClusterListResult{
		// 		Value: []*armhdinsight.Cluster{
		// 			{
		// 				Name: to.Ptr("cluster1"),
		// 				Type: to.Ptr("Microsoft.HDInsight/clusters"),
		// 				Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"),
		// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armhdinsight.ClusterGetProperties{
		// 					ClusterDefinition: &armhdinsight.ClusterDefinition{
		// 						Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"),
		// 						Kind: to.Ptr("hadoop"),
		// 					},
		// 					ClusterState: to.Ptr("Running"),
		// 					ClusterVersion: to.Ptr("3.5.1000.0"),
		// 					ComputeProfile: &armhdinsight.ComputeProfile{
		// 						Roles: []*armhdinsight.Role{
		// 							{
		// 								Name: to.Ptr("headnode"),
		// 								HardwareProfile: &armhdinsight.HardwareProfile{
		// 									VMSize: to.Ptr("Standard_D3_V2"),
		// 								},
		// 								OSProfile: &armhdinsight.OsProfile{
		// 									LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
		// 										Username: to.Ptr("pulkitssh"),
		// 									},
		// 								},
		// 								TargetInstanceCount: to.Ptr[int32](2),
		// 							},
		// 							{
		// 								Name: to.Ptr("workernode"),
		// 								HardwareProfile: &armhdinsight.HardwareProfile{
		// 									VMSize: to.Ptr("Standard_D3_V2"),
		// 								},
		// 								OSProfile: &armhdinsight.OsProfile{
		// 									LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
		// 										Username: to.Ptr("pulkitssh"),
		// 									},
		// 								},
		// 								TargetInstanceCount: to.Ptr[int32](4),
		// 							},
		// 							{
		// 								Name: to.Ptr("zookeepernode"),
		// 								HardwareProfile: &armhdinsight.HardwareProfile{
		// 									VMSize: to.Ptr("Medium"),
		// 								},
		// 								OSProfile: &armhdinsight.OsProfile{
		// 									LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
		// 										Username: to.Ptr("pulkitssh"),
		// 									},
		// 								},
		// 								TargetInstanceCount: to.Ptr[int32](3),
		// 							},
		// 						},
		// 					},
		// 					ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
		// 						{
		// 							Name: to.Ptr("SSH"),
		// 							Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
		// 							Port: to.Ptr[int32](22),
		// 							Protocol: to.Ptr("TCP"),
		// 						},
		// 						{
		// 							Name: to.Ptr("HTTPS"),
		// 							Location: to.Ptr("cluster1.azurehdinsight.net"),
		// 							Port: to.Ptr[int32](443),
		// 							Protocol: to.Ptr("TCP"),
		// 						},
		// 					},
		// 					CreatedDate: to.Ptr("2017-01-11T18:58:26.187"),
		// 					OSType: to.Ptr(armhdinsight.OSTypeLinux),
		// 					ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
		// 					QuotaInfo: &armhdinsight.QuotaInfo{
		// 						CoresUsed: to.Ptr[int32](24),
		// 					},
		// 					Tier: to.Ptr(armhdinsight.TierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 					"key1": to.Ptr("val1"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("cluster2"),
		// 				Type: to.Ptr("Microsoft.HDInsight/clusters"),
		// 				Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"),
		// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster2"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armhdinsight.ClusterGetProperties{
		// 					ClusterDefinition: &armhdinsight.ClusterDefinition{
		// 						Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"),
		// 						Kind: to.Ptr("hadoop"),
		// 					},
		// 					ClusterState: to.Ptr("Running"),
		// 					ClusterVersion: to.Ptr("3.5.1000.0"),
		// 					ComputeProfile: &armhdinsight.ComputeProfile{
		// 						Roles: []*armhdinsight.Role{
		// 							{
		// 								Name: to.Ptr("headnode"),
		// 								HardwareProfile: &armhdinsight.HardwareProfile{
		// 									VMSize: to.Ptr("Standard_D3_V2"),
		// 								},
		// 								OSProfile: &armhdinsight.OsProfile{
		// 									LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
		// 										Username: to.Ptr("pulkitssh"),
		// 									},
		// 								},
		// 								TargetInstanceCount: to.Ptr[int32](2),
		// 							},
		// 							{
		// 								Name: to.Ptr("workernode"),
		// 								HardwareProfile: &armhdinsight.HardwareProfile{
		// 									VMSize: to.Ptr("Standard_D3_V2"),
		// 								},
		// 								OSProfile: &armhdinsight.OsProfile{
		// 									LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
		// 										Username: to.Ptr("pulkitssh"),
		// 									},
		// 								},
		// 								TargetInstanceCount: to.Ptr[int32](4),
		// 							},
		// 							{
		// 								Name: to.Ptr("zookeepernode"),
		// 								HardwareProfile: &armhdinsight.HardwareProfile{
		// 									VMSize: to.Ptr("Medium"),
		// 								},
		// 								OSProfile: &armhdinsight.OsProfile{
		// 									LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
		// 										Username: to.Ptr("pulkitssh"),
		// 									},
		// 								},
		// 								TargetInstanceCount: to.Ptr[int32](3),
		// 							},
		// 						},
		// 					},
		// 					ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
		// 						{
		// 							Name: to.Ptr("SSH"),
		// 							Location: to.Ptr("cluster2-ssh.azurehdinsight.net"),
		// 							Port: to.Ptr[int32](22),
		// 							Protocol: to.Ptr("TCP"),
		// 						},
		// 						{
		// 							Name: to.Ptr("HTTPS"),
		// 							Location: to.Ptr("cluster2.azurehdinsight.net"),
		// 							Port: to.Ptr[int32](443),
		// 							Protocol: to.Ptr("TCP"),
		// 						},
		// 					},
		// 					CreatedDate: to.Ptr("2017-01-11T18:58:26.187"),
		// 					OSType: to.Ptr(armhdinsight.OSTypeLinux),
		// 					ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
		// 					QuotaInfo: &armhdinsight.QuotaInfo{
		// 						CoresUsed: to.Ptr[int32](24),
		// 					},
		// 					Tier: to.Ptr(armhdinsight.TierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 					"key1": to.Ptr("val1"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-01-15-preview/ResizeLinuxHadoopCluster.json
func ExampleClustersClient_BeginResize() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginResize(ctx, "rg1", "cluster1", armhdinsight.RoleNameWorkernode, armhdinsight.ClusterResizeParameters{
		TargetInstanceCount: to.Ptr[int32](10),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientResizeResponse{
	// }
}

// Generated from example definition: 2025-01-15-preview/RotateLinuxHadoopClusterDiskEncryptionKey.json
func ExampleClustersClient_BeginRotateDiskEncryptionKey() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginRotateDiskEncryptionKey(ctx, "rg1", "cluster1", armhdinsight.ClusterDiskEncryptionParameters{
		KeyName:    to.Ptr("newkeyname"),
		KeyVersion: to.Ptr("newkeyversion"),
		VaultURI:   to.Ptr("https://newkeyvault.vault.azure.net/"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientRotateDiskEncryptionKeyResponse{
	// }
}

// Generated from example definition: 2025-01-15-preview/PatchLinuxHadoopCluster.json
func ExampleClustersClient_Update_patchHdInsightLinuxClusters() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().Update(ctx, "rg1", "cluster1", armhdinsight.ClusterPatchParameters{
		Tags: map[string]*string{
			"key1": to.Ptr("val1"),
			"key2": to.Ptr("val2"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientUpdateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"),
	// 		ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Location: to.Ptr("West US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"),
	// 				Kind: to.Ptr("hadoop"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("3.5.1000.0"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_D3_V2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_D3_V2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](4),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Medium"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2017-01-11T18:58:26.187"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](24),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 		Tags: map[string]*string{
	// 			"key1": to.Ptr("val1"),
	// 			"key2": to.Ptr("val2"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/PatchLinuxHadoopClusterWithSystemMSI.json
func ExampleClustersClient_Update_patchHdInsightLinuxClustersWithSystemAssignedMsi() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClustersClient().Update(ctx, "rg1", "cluster1", armhdinsight.ClusterPatchParameters{
		Identity: &armhdinsight.ClusterIdentity{
			Type: to.Ptr(armhdinsight.ResourceIdentityTypeSystemAssigned),
		},
		Tags: map[string]*string{
			"key1": to.Ptr("val1"),
			"key2": to.Ptr("val2"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientUpdateResponse{
	// 	Cluster: &armhdinsight.Cluster{
	// 		Name: to.Ptr("cluster1"),
	// 		Type: to.Ptr("Microsoft.HDInsight/clusters"),
	// 		Etag: to.Ptr("f0212a39-b827-45e0-9ffa-4f5232e58851"),
	// 		ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.HDInsight/clusters/cluster1"),
	// 		Identity: &armhdinsight.ClusterIdentity{
	// 			Type: to.Ptr(armhdinsight.ResourceIdentityTypeSystemAssigned),
	// 			PrincipalID: to.Ptr("principalId"),
	// 			TenantID: to.Ptr("tenantId"),
	// 		},
	// 		Location: to.Ptr("West US"),
	// 		Properties: &armhdinsight.ClusterGetProperties{
	// 			ClusterDefinition: &armhdinsight.ClusterDefinition{
	// 				Blueprint: to.Ptr("https://blueprints.azurehdinsight.net/hadoop-3.5.1000.0.9243893.json"),
	// 				Kind: to.Ptr("hadoop"),
	// 			},
	// 			ClusterState: to.Ptr("Running"),
	// 			ClusterVersion: to.Ptr("3.5.1000.0"),
	// 			ComputeProfile: &armhdinsight.ComputeProfile{
	// 				Roles: []*armhdinsight.Role{
	// 					{
	// 						Name: to.Ptr("headnode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_D3_V2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](2),
	// 					},
	// 					{
	// 						Name: to.Ptr("workernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Standard_D3_V2"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](4),
	// 					},
	// 					{
	// 						Name: to.Ptr("zookeepernode"),
	// 						HardwareProfile: &armhdinsight.HardwareProfile{
	// 							VMSize: to.Ptr("Medium"),
	// 						},
	// 						OSProfile: &armhdinsight.OsProfile{
	// 							LinuxOperatingSystemProfile: &armhdinsight.LinuxOperatingSystemProfile{
	// 								Username: to.Ptr("sshuser"),
	// 							},
	// 						},
	// 						TargetInstanceCount: to.Ptr[int32](3),
	// 					},
	// 				},
	// 			},
	// 			ConnectivityEndpoints: []*armhdinsight.ConnectivityEndpoint{
	// 				{
	// 					Name: to.Ptr("SSH"),
	// 					Location: to.Ptr("cluster1-ssh.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](22),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 				{
	// 					Name: to.Ptr("HTTPS"),
	// 					Location: to.Ptr("cluster1.azurehdinsight.net"),
	// 					Port: to.Ptr[int32](443),
	// 					Protocol: to.Ptr("TCP"),
	// 				},
	// 			},
	// 			CreatedDate: to.Ptr("2017-01-11T18:58:26.187"),
	// 			OSType: to.Ptr(armhdinsight.OSTypeLinux),
	// 			ProvisioningState: to.Ptr(armhdinsight.HDInsightClusterProvisioningStateSucceeded),
	// 			QuotaInfo: &armhdinsight.QuotaInfo{
	// 				CoresUsed: to.Ptr[int32](24),
	// 			},
	// 			Tier: to.Ptr(armhdinsight.TierStandard),
	// 		},
	// 		Tags: map[string]*string{
	// 			"key1": to.Ptr("val1"),
	// 			"key2": to.Ptr("val2"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-01-15-preview/DisableClusterAutoScale.json
func ExampleClustersClient_BeginUpdateAutoScaleConfiguration_disableAutoscaleForTheHdInsightCluster() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginUpdateAutoScaleConfiguration(ctx, "rg1", "cluster1", armhdinsight.RoleNameWorkernode, armhdinsight.AutoscaleConfigurationUpdateParameter{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientUpdateAutoScaleConfigurationResponse{
	// }
}

// Generated from example definition: 2025-01-15-preview/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json
func ExampleClustersClient_BeginUpdateAutoScaleConfiguration_enableOrUpdateAutoscaleWithTheLoadBasedConfigurationForHdInsightCluster() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginUpdateAutoScaleConfiguration(ctx, "rg1", "cluster1", armhdinsight.RoleNameWorkernode, armhdinsight.AutoscaleConfigurationUpdateParameter{
		Autoscale: &armhdinsight.Autoscale{
			Capacity: &armhdinsight.AutoscaleCapacity{
				MaxInstanceCount: to.Ptr[int32](5),
				MinInstanceCount: to.Ptr[int32](3),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientUpdateAutoScaleConfigurationResponse{
	// }
}

// Generated from example definition: 2025-01-15-preview/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json
func ExampleClustersClient_BeginUpdateAutoScaleConfiguration_enableOrUpdateAutoscaleWithTheScheduleBasedConfigurationForHdInsightCluster() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginUpdateAutoScaleConfiguration(ctx, "rg1", "cluster1", armhdinsight.RoleNameWorkernode, armhdinsight.AutoscaleConfigurationUpdateParameter{
		Autoscale: &armhdinsight.Autoscale{
			Recurrence: &armhdinsight.AutoscaleRecurrence{
				Schedule: []*armhdinsight.AutoscaleSchedule{
					{
						Days: []*armhdinsight.DaysOfWeek{
							to.Ptr(armhdinsight.DaysOfWeekThursday),
						},
						TimeAndCapacity: &armhdinsight.AutoscaleTimeAndCapacity{
							MaxInstanceCount: to.Ptr[int32](4),
							MinInstanceCount: to.Ptr[int32](4),
							Time:             to.Ptr("16:00"),
						},
					},
				},
				TimeZone: to.Ptr("China Standard Time"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientUpdateAutoScaleConfigurationResponse{
	// }
}

// Generated from example definition: 2025-01-15-preview/HDI_Clusters_UpdateGatewaySettings_Enable.json
func ExampleClustersClient_BeginUpdateGatewaySettings_enableHttpConnectivity() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginUpdateGatewaySettings(ctx, "rg1", "cluster1", armhdinsight.UpdateGatewaySettingsParameters{
		IsCredentialEnabled: to.Ptr(true),
		Password:            to.Ptr("**********"),
		UserName:            to.Ptr("hadoop"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientUpdateGatewaySettingsResponse{
	// }
}

// Generated from example definition: 2025-01-15-preview/HDI_Clusters_UpdateGatewaySettings_EntraUser.json
func ExampleClustersClient_BeginUpdateGatewaySettings_updateEntraUserInHdInsight() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginUpdateGatewaySettings(ctx, "rg1", "cluster1", armhdinsight.UpdateGatewaySettingsParameters{
		IsCredentialEnabled: to.Ptr(false),
		RestAuthEntraUsers: []*armhdinsight.EntraUserInfo{
			{
				DisplayName: to.Ptr("displayName"),
				ObjectID:    to.Ptr("00000000-0000-0000-0000-000000000000"),
				Upn:         to.Ptr("user@microsoft.com"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientUpdateGatewaySettingsResponse{
	// }
}

// Generated from example definition: 2025-01-15-preview/HDI_Clusters_UpdateClusterIdentityCertificate.json
func ExampleClustersClient_BeginUpdateIdentityCertificate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhdinsight.NewClientFactory("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClustersClient().BeginUpdateIdentityCertificate(ctx, "rg1", "cluster1", armhdinsight.UpdateClusterIdentityCertificateParameters{
		ApplicationID:       to.Ptr("applicationId"),
		Certificate:         to.Ptr("base64encodedcertificate"),
		CertificatePassword: to.Ptr("**********"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armhdinsight.ClustersClientUpdateIdentityCertificateResponse{
	// }
}
