// 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 armservicefabricmanagedclusters_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/servicefabricmanagedclusters/armservicefabricmanagedclusters"
	"log"
)

// Generated from example definition: 2025-06-01-preview/ManagedClusterPutOperation_example_max.json
func ExampleManagedClustersClient_BeginCreateOrUpdate_putAClusterWithMaximumParameters() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicefabricmanagedclusters.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "resRg", "mycluster", armservicefabricmanagedclusters.ManagedCluster{
		Location: to.Ptr("eastus"),
		Properties: &armservicefabricmanagedclusters.ManagedClusterProperties{
			AddonFeatures: []*armservicefabricmanagedclusters.ManagedClusterAddOnFeature{
				to.Ptr(armservicefabricmanagedclusters.ManagedClusterAddOnFeatureDNSService),
				to.Ptr(armservicefabricmanagedclusters.ManagedClusterAddOnFeatureBackupRestoreService),
				to.Ptr(armservicefabricmanagedclusters.ManagedClusterAddOnFeatureResourceMonitorService),
			},
			AdminPassword:          to.Ptr("{vm-password}"),
			AdminUserName:          to.Ptr("vmadmin"),
			AllocatedOutboundPorts: to.Ptr[int32](0),
			AllowRdpAccess:         to.Ptr(true),
			ApplicationTypeVersionsCleanupPolicy: &armservicefabricmanagedclusters.ApplicationTypeVersionsCleanupPolicy{
				MaxUnusedVersionsToKeep: to.Ptr[int32](3),
			},
			AutoGeneratedDomainNameLabelScope: to.Ptr(armservicefabricmanagedclusters.AutoGeneratedDomainNameLabelScopeSubscriptionReuse),
			AuxiliarySubnets: []*armservicefabricmanagedclusters.Subnet{
				{
					Name:                              to.Ptr("testSubnet1"),
					EnableIPv6:                        to.Ptr(true),
					NetworkSecurityGroupID:            to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1"),
					PrivateEndpointNetworkPolicies:    to.Ptr(armservicefabricmanagedclusters.PrivateEndpointNetworkPoliciesEnabled),
					PrivateLinkServiceNetworkPolicies: to.Ptr(armservicefabricmanagedclusters.PrivateLinkServiceNetworkPoliciesEnabled),
				},
			},
			ClientConnectionPort:               to.Ptr[int32](19000),
			ClusterCodeVersion:                 to.Ptr("7.1.168.9494"),
			ClusterUpgradeMode:                 to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeModeManual),
			DdosProtectionPlanID:               to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan"),
			DNSName:                            to.Ptr("mycluster"),
			EnableAutoOSUpgrade:                to.Ptr(true),
			EnableHTTPGatewayExclusiveAuthMode: to.Ptr(true),
			EnableIPv6:                         to.Ptr(true),
			FabricSettings: []*armservicefabricmanagedclusters.SettingsSectionDescription{
				{
					Name: to.Ptr("ManagedIdentityTokenService"),
					Parameters: []*armservicefabricmanagedclusters.SettingsParameterDescription{
						{
							Name:  to.Ptr("IsEnabled"),
							Value: to.Ptr("true"),
						},
					},
				},
			},
			HTTPGatewayConnectionPort:          to.Ptr[int32](19080),
			HTTPGatewayTokenAuthConnectionPort: to.Ptr[int32](19081),
			IPTags: []*armservicefabricmanagedclusters.IPTag{
				{
					IPTagType: to.Ptr("FirstPartyUsage"),
					Tag:       to.Ptr("SQL"),
				},
			},
			LoadBalancingRules: []*armservicefabricmanagedclusters.LoadBalancingRule{
				{
					BackendPort:   to.Ptr[int32](80),
					FrontendPort:  to.Ptr[int32](80),
					ProbePort:     to.Ptr[int32](80),
					ProbeProtocol: to.Ptr(armservicefabricmanagedclusters.ProbeProtocolHTTP),
					Protocol:      to.Ptr(armservicefabricmanagedclusters.Protocol("http")),
				},
				{
					BackendPort:   to.Ptr[int32](443),
					FrontendPort:  to.Ptr[int32](443),
					ProbePort:     to.Ptr[int32](443),
					ProbeProtocol: to.Ptr(armservicefabricmanagedclusters.ProbeProtocolHTTP),
					Protocol:      to.Ptr(armservicefabricmanagedclusters.Protocol("http")),
				},
				{
					BackendPort:      to.Ptr[int32](10000),
					FrontendPort:     to.Ptr[int32](10000),
					LoadDistribution: to.Ptr("Default"),
					ProbePort:        to.Ptr[int32](10000),
					ProbeProtocol:    to.Ptr(armservicefabricmanagedclusters.ProbeProtocolHTTP),
					Protocol:         to.Ptr(armservicefabricmanagedclusters.ProtocolTCP),
				},
			},
			NetworkSecurityRules: []*armservicefabricmanagedclusters.NetworkSecurityRule{
				{
					Name:        to.Ptr("TestName"),
					Description: to.Ptr("Test description"),
					Access:      to.Ptr(armservicefabricmanagedclusters.AccessAllow),
					DestinationAddressPrefixes: []*string{
						to.Ptr("*"),
					},
					DestinationPortRanges: []*string{
						to.Ptr("*"),
					},
					Direction: to.Ptr(armservicefabricmanagedclusters.DirectionInbound),
					Priority:  to.Ptr[int32](1010),
					SourceAddressPrefixes: []*string{
						to.Ptr("*"),
					},
					SourcePortRanges: []*string{
						to.Ptr("*"),
					},
					Protocol: to.Ptr(armservicefabricmanagedclusters.NsgProtocolTCP),
				},
				{
					Name:                     to.Ptr("AllowARM"),
					Access:                   to.Ptr(armservicefabricmanagedclusters.AccessAllow),
					DestinationAddressPrefix: to.Ptr("*"),
					DestinationPortRange:     to.Ptr("33500-33699"),
					Direction:                to.Ptr(armservicefabricmanagedclusters.DirectionInbound),
					Priority:                 to.Ptr[int32](2002),
					SourceAddressPrefix:      to.Ptr("AzureResourceManager"),
					SourcePortRange:          to.Ptr("*"),
					Protocol:                 to.Ptr(armservicefabricmanagedclusters.NsgProtocol("*")),
				},
			},
			PublicIPPrefixID:   to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix"),
			PublicIPv6PrefixID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix"),
			ServiceEndpoints: []*armservicefabricmanagedclusters.ServiceEndpoint{
				{
					Locations: []*string{
						to.Ptr("eastus2"),
						to.Ptr("usnorth"),
					},
					Service:           to.Ptr("Microsoft.Storage"),
					NetworkIdentifier: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/publicIPAddresses/myPublicIP"),
				},
			},
			UpgradeDescription: &armservicefabricmanagedclusters.ClusterUpgradePolicy{
				DeltaHealthPolicy: &armservicefabricmanagedclusters.ClusterUpgradeDeltaHealthPolicy{
					MaxPercentDeltaUnhealthyApplications:       to.Ptr[int32](40),
					MaxPercentDeltaUnhealthyNodes:              to.Ptr[int32](20),
					MaxPercentUpgradeDomainDeltaUnhealthyNodes: to.Ptr[int32](40),
				},
				ForceRestart: to.Ptr(false),
				HealthPolicy: &armservicefabricmanagedclusters.ClusterHealthPolicy{
					MaxPercentUnhealthyApplications: to.Ptr[int32](30),
					MaxPercentUnhealthyNodes:        to.Ptr[int32](10),
				},
				MonitoringPolicy: &armservicefabricmanagedclusters.ClusterMonitoringPolicy{
					HealthCheckRetryTimeout:   to.Ptr("00:55:00"),
					HealthCheckStableDuration: to.Ptr("00:45:00"),
					HealthCheckWaitDuration:   to.Ptr("00:05:00"),
					UpgradeDomainTimeout:      to.Ptr("03:00:00"),
					UpgradeTimeout:            to.Ptr("12:00:00"),
				},
			},
			UseCustomVnet:               to.Ptr(true),
			ZonalResiliency:             to.Ptr(true),
			ZonalUpdateMode:             to.Ptr(armservicefabricmanagedclusters.ZonalUpdateModeFast),
			EnableOutboundOnlyNodeTypes: to.Ptr(true),
		},
		SKU: &armservicefabricmanagedclusters.SKU{
			Name: to.Ptr(armservicefabricmanagedclusters.SKUNameBasic),
		},
		Tags: map[string]*string{},
	}, 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 = armservicefabricmanagedclusters.ManagedClustersClientCreateOrUpdateResponse{
	// 	ManagedCluster: &armservicefabricmanagedclusters.ManagedCluster{
	// 		Name: to.Ptr("myCluster"),
	// 		Type: to.Ptr("Microsoft.ServiceFabric/managedClusters"),
	// 		Etag: to.Ptr("W/\"636462502169240745\""),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster"),
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armservicefabricmanagedclusters.ManagedClusterProperties{
	// 			AddonFeatures: []*armservicefabricmanagedclusters.ManagedClusterAddOnFeature{
	// 				to.Ptr(armservicefabricmanagedclusters.ManagedClusterAddOnFeatureDNSService),
	// 				to.Ptr(armservicefabricmanagedclusters.ManagedClusterAddOnFeatureBackupRestoreService),
	// 				to.Ptr(armservicefabricmanagedclusters.ManagedClusterAddOnFeatureResourceMonitorService),
	// 			},
	// 			AdminUserName: to.Ptr("vmadmin"),
	// 			AllocatedOutboundPorts: to.Ptr[int32](0),
	// 			AllowRdpAccess: to.Ptr(true),
	// 			ApplicationTypeVersionsCleanupPolicy: &armservicefabricmanagedclusters.ApplicationTypeVersionsCleanupPolicy{
	// 				MaxUnusedVersionsToKeep: to.Ptr[int32](3),
	// 			},
	// 			AutoGeneratedDomainNameLabelScope: to.Ptr(armservicefabricmanagedclusters.AutoGeneratedDomainNameLabelScopeSubscriptionReuse),
	// 			AuxiliarySubnets: []*armservicefabricmanagedclusters.Subnet{
	// 				{
	// 					Name: to.Ptr("testSubnet1"),
	// 					EnableIPv6: to.Ptr(true),
	// 					NetworkSecurityGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1"),
	// 					PrivateEndpointNetworkPolicies: to.Ptr(armservicefabricmanagedclusters.PrivateEndpointNetworkPoliciesEnabled),
	// 					PrivateLinkServiceNetworkPolicies: to.Ptr(armservicefabricmanagedclusters.PrivateLinkServiceNetworkPoliciesEnabled),
	// 				},
	// 			},
	// 			ClientConnectionPort: to.Ptr[int32](19000),
	// 			ClusterCertificateThumbprints: []*string{
	// 				to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"),
	// 			},
	// 			ClusterCodeVersion: to.Ptr("7.1.168.9494"),
	// 			ClusterID: to.Ptr("92584666-9889-4ae8-8d02-91902923d37f"),
	// 			ClusterState: to.Ptr(armservicefabricmanagedclusters.ClusterStateWaitingForNodes),
	// 			ClusterUpgradeMode: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeModeManual),
	// 			DdosProtectionPlanID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan"),
	// 			DNSName: to.Ptr("mycluster"),
	// 			EnableAutoOSUpgrade: to.Ptr(true),
	// 			EnableHTTPGatewayExclusiveAuthMode: to.Ptr(true),
	// 			EnableIPv6: to.Ptr(true),
	// 			EnableServicePublicIP: to.Ptr(true),
	// 			FabricSettings: []*armservicefabricmanagedclusters.SettingsSectionDescription{
	// 				{
	// 					Name: to.Ptr("ManagedIdentityTokenService"),
	// 					Parameters: []*armservicefabricmanagedclusters.SettingsParameterDescription{
	// 						{
	// 							Name: to.Ptr("IsEnabled"),
	// 							Value: to.Ptr("true"),
	// 						},
	// 					},
	// 				},
	// 			},
	// 			Fqdn: to.Ptr("mycluster.eastus.cloudapp.azure.com"),
	// 			HTTPGatewayConnectionPort: to.Ptr[int32](19080),
	// 			HTTPGatewayTokenAuthConnectionPort: to.Ptr[int32](19081),
	// 			IPTags: []*armservicefabricmanagedclusters.IPTag{
	// 				{
	// 					IPTagType: to.Ptr("FirstPartyUsage"),
	// 					Tag: to.Ptr("SQL"),
	// 				},
	// 			},
	// 			IPv6Address: to.Ptr("0000:0000:0000:0000:0000:0000:0000:0000"),
	// 			LoadBalancingRules: []*armservicefabricmanagedclusters.LoadBalancingRule{
	// 				{
	// 					BackendPort: to.Ptr[int32](80),
	// 					FrontendPort: to.Ptr[int32](80),
	// 					ProbePort: to.Ptr[int32](80),
	// 					ProbeProtocol: to.Ptr(armservicefabricmanagedclusters.ProbeProtocolHTTP),
	// 					Protocol: to.Ptr(armservicefabricmanagedclusters.Protocol("http")),
	// 				},
	// 				{
	// 					BackendPort: to.Ptr[int32](443),
	// 					FrontendPort: to.Ptr[int32](443),
	// 					ProbePort: to.Ptr[int32](443),
	// 					ProbeProtocol: to.Ptr(armservicefabricmanagedclusters.ProbeProtocolHTTP),
	// 					Protocol: to.Ptr(armservicefabricmanagedclusters.Protocol("http")),
	// 				},
	// 				{
	// 					BackendPort: to.Ptr[int32](10000),
	// 					FrontendPort: to.Ptr[int32](10000),
	// 					LoadDistribution: to.Ptr("Default"),
	// 					ProbePort: to.Ptr[int32](10000),
	// 					ProbeProtocol: to.Ptr(armservicefabricmanagedclusters.ProbeProtocolTCP),
	// 					Protocol: to.Ptr(armservicefabricmanagedclusters.ProtocolTCP),
	// 				},
	// 			},
	// 			NetworkSecurityRules: []*armservicefabricmanagedclusters.NetworkSecurityRule{
	// 				{
	// 					Name: to.Ptr("TestName"),
	// 					Description: to.Ptr("Test description"),
	// 					Access: to.Ptr(armservicefabricmanagedclusters.AccessAllow),
	// 					DestinationAddressPrefixes: []*string{
	// 						to.Ptr("*"),
	// 					},
	// 					DestinationPortRanges: []*string{
	// 						to.Ptr("*"),
	// 					},
	// 					Direction: to.Ptr(armservicefabricmanagedclusters.DirectionInbound),
	// 					Priority: to.Ptr[int32](1010),
	// 					SourceAddressPrefixes: []*string{
	// 						to.Ptr("*"),
	// 					},
	// 					SourcePortRanges: []*string{
	// 						to.Ptr("*"),
	// 					},
	// 					Protocol: to.Ptr(armservicefabricmanagedclusters.NsgProtocolTCP),
	// 				},
	// 				{
	// 					Name: to.Ptr("AllowARM"),
	// 					Access: to.Ptr(armservicefabricmanagedclusters.AccessAllow),
	// 					DestinationAddressPrefix: to.Ptr("*"),
	// 					DestinationPortRange: to.Ptr("33500-33699"),
	// 					Direction: to.Ptr(armservicefabricmanagedclusters.DirectionInbound),
	// 					Priority: to.Ptr[int32](2002),
	// 					SourceAddressPrefix: to.Ptr("AzureResourceManager"),
	// 					SourcePortRange: to.Ptr("*"),
	// 					Protocol: to.Ptr(armservicefabricmanagedclusters.NsgProtocol("*")),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armservicefabricmanagedclusters.ManagedResourceProvisioningStateCreating),
	// 			PublicIPPrefixID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix"),
	// 			PublicIPv6PrefixID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix"),
	// 			ServiceEndpoints: []*armservicefabricmanagedclusters.ServiceEndpoint{
	// 				{
	// 					Locations: []*string{
	// 						to.Ptr("eastus2"),
	// 						to.Ptr("usnorth"),
	// 					},
	// 					Service: to.Ptr("Microsoft.Storage"),
	// 					NetworkIdentifier: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/publicIPAddresses/myPublicIP"),
	// 				},
	// 			},
	// 			UpgradeDescription: &armservicefabricmanagedclusters.ClusterUpgradePolicy{
	// 				DeltaHealthPolicy: &armservicefabricmanagedclusters.ClusterUpgradeDeltaHealthPolicy{
	// 					MaxPercentDeltaUnhealthyApplications: to.Ptr[int32](40),
	// 					MaxPercentDeltaUnhealthyNodes: to.Ptr[int32](20),
	// 					MaxPercentUpgradeDomainDeltaUnhealthyNodes: to.Ptr[int32](40),
	// 				},
	// 				ForceRestart: to.Ptr(false),
	// 				HealthPolicy: &armservicefabricmanagedclusters.ClusterHealthPolicy{
	// 					MaxPercentUnhealthyApplications: to.Ptr[int32](30),
	// 					MaxPercentUnhealthyNodes: to.Ptr[int32](10),
	// 				},
	// 				MonitoringPolicy: &armservicefabricmanagedclusters.ClusterMonitoringPolicy{
	// 					HealthCheckRetryTimeout: to.Ptr("00:55:00"),
	// 					HealthCheckStableDuration: to.Ptr("00:45:00"),
	// 					HealthCheckWaitDuration: to.Ptr("00:05:00"),
	// 					UpgradeDomainTimeout: to.Ptr("03:00:00"),
	// 					UpgradeTimeout: to.Ptr("12:00:00"),
	// 				},
	// 				UpgradeReplicaSetCheckTimeout: to.Ptr("49710.06:28:16"),
	// 			},
	// 			UseCustomVnet: to.Ptr(true),
	// 			ZonalResiliency: to.Ptr(true),
	// 			ZonalUpdateMode: to.Ptr(armservicefabricmanagedclusters.ZonalUpdateModeFast),
	// 			EnableOutboundOnlyNodeTypes: to.Ptr(true),
	// 		},
	// 		SKU: &armservicefabricmanagedclusters.SKU{
	// 			Name: to.Ptr(armservicefabricmanagedclusters.SKUNameBasic),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-06-01-preview/ManagedClusterPutOperation_example_min.json
func ExampleManagedClustersClient_BeginCreateOrUpdate_putAClusterWithMinimumParameters() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicefabricmanagedclusters.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "resRg", "myCluster", armservicefabricmanagedclusters.ManagedCluster{
		Location: to.Ptr("eastus"),
		Properties: &armservicefabricmanagedclusters.ManagedClusterProperties{
			AdminPassword:         to.Ptr("{vm-password}"),
			AdminUserName:         to.Ptr("vmadmin"),
			ClusterUpgradeCadence: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeCadenceWave1),
			ClusterUpgradeMode:    to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeModeAutomatic),
			DNSName:               to.Ptr("myCluster"),
			FabricSettings: []*armservicefabricmanagedclusters.SettingsSectionDescription{
				{
					Name: to.Ptr("ManagedIdentityTokenService"),
					Parameters: []*armservicefabricmanagedclusters.SettingsParameterDescription{
						{
							Name:  to.Ptr("IsEnabled"),
							Value: to.Ptr("true"),
						},
					},
				},
			},
		},
		SKU: &armservicefabricmanagedclusters.SKU{
			Name: to.Ptr(armservicefabricmanagedclusters.SKUNameBasic),
		},
	}, 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 = armservicefabricmanagedclusters.ManagedClustersClientCreateOrUpdateResponse{
	// 	ManagedCluster: &armservicefabricmanagedclusters.ManagedCluster{
	// 		Name: to.Ptr("myCluster"),
	// 		Type: to.Ptr("Microsoft.ServiceFabric/managedClusters"),
	// 		Etag: to.Ptr("W/\"636462502169240745\""),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster"),
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armservicefabricmanagedclusters.ManagedClusterProperties{
	// 			AdminUserName: to.Ptr("vmadmin"),
	// 			ClientConnectionPort: to.Ptr[int32](19000),
	// 			ClusterCertificateThumbprints: []*string{
	// 				to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"),
	// 			},
	// 			ClusterID: to.Ptr("92584666-9889-4ae8-8d02-91902923d37f"),
	// 			ClusterState: to.Ptr(armservicefabricmanagedclusters.ClusterStateWaitingForNodes),
	// 			ClusterUpgradeCadence: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeCadenceWave1),
	// 			ClusterUpgradeMode: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeModeAutomatic),
	// 			DNSName: to.Ptr("myCluster"),
	// 			FabricSettings: []*armservicefabricmanagedclusters.SettingsSectionDescription{
	// 				{
	// 					Name: to.Ptr("ManagedIdentityTokenService"),
	// 					Parameters: []*armservicefabricmanagedclusters.SettingsParameterDescription{
	// 						{
	// 							Name: to.Ptr("IsEnabled"),
	// 							Value: to.Ptr("true"),
	// 						},
	// 					},
	// 				},
	// 			},
	// 			Fqdn: to.Ptr("MyCluster.eastus.cloudapp.azure.com"),
	// 			HTTPGatewayConnectionPort: to.Ptr[int32](19080),
	// 			LoadBalancingRules: []*armservicefabricmanagedclusters.LoadBalancingRule{
	// 			},
	// 			ProvisioningState: to.Ptr(armservicefabricmanagedclusters.ManagedResourceProvisioningStateCreating),
	// 		},
	// 		SKU: &armservicefabricmanagedclusters.SKU{
	// 			Name: to.Ptr(armservicefabricmanagedclusters.SKUNameBasic),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-06-01-preview/ManagedClusterDeleteOperation_example.json
func ExampleManagedClustersClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicefabricmanagedclusters.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewManagedClustersClient().BeginDelete(ctx, "resRg", "myCluster", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

// Generated from example definition: 2025-06-01-preview/ManagedClusterGetOperation_example.json
func ExampleManagedClustersClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicefabricmanagedclusters.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewManagedClustersClient().Get(ctx, "resRg", "myCluster", 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 = armservicefabricmanagedclusters.ManagedClustersClientGetResponse{
	// 	ManagedCluster: &armservicefabricmanagedclusters.ManagedCluster{
	// 		Name: to.Ptr("myCluster"),
	// 		Type: to.Ptr("Microsoft.ServiceFabric/managedClusters"),
	// 		Etag: to.Ptr("W/\"636462502169240745\""),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster"),
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armservicefabricmanagedclusters.ManagedClusterProperties{
	// 			AdminUserName: to.Ptr("vmadmin"),
	// 			ClientConnectionPort: to.Ptr[int32](19000),
	// 			ClusterCertificateThumbprints: []*string{
	// 				to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"),
	// 			},
	// 			ClusterCodeVersion: to.Ptr("7.1.168.9494"),
	// 			ClusterID: to.Ptr("92584666-9889-4ae8-8d02-91902923d37f"),
	// 			ClusterState: to.Ptr(armservicefabricmanagedclusters.ClusterStateWaitingForNodes),
	// 			ClusterUpgradeCadence: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeCadenceWave0),
	// 			ClusterUpgradeMode: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeModeAutomatic),
	// 			DNSName: to.Ptr("myCluster"),
	// 			FabricSettings: []*armservicefabricmanagedclusters.SettingsSectionDescription{
	// 				{
	// 					Name: to.Ptr("ManagedIdentityTokenService"),
	// 					Parameters: []*armservicefabricmanagedclusters.SettingsParameterDescription{
	// 						{
	// 							Name: to.Ptr("IsEnabled"),
	// 							Value: to.Ptr("true"),
	// 						},
	// 					},
	// 				},
	// 			},
	// 			Fqdn: to.Ptr("MyCluster.eastus.cloudapp.azure.com"),
	// 			HTTPGatewayConnectionPort: to.Ptr[int32](19080),
	// 			LoadBalancingRules: []*armservicefabricmanagedclusters.LoadBalancingRule{
	// 				{
	// 					BackendPort: to.Ptr[int32](80),
	// 					FrontendPort: to.Ptr[int32](80),
	// 					ProbePort: to.Ptr[int32](80),
	// 					ProbeProtocol: to.Ptr(armservicefabricmanagedclusters.ProbeProtocolHTTP),
	// 					Protocol: to.Ptr(armservicefabricmanagedclusters.Protocol("http")),
	// 				},
	// 				{
	// 					BackendPort: to.Ptr[int32](443),
	// 					FrontendPort: to.Ptr[int32](443),
	// 					ProbePort: to.Ptr[int32](443),
	// 					ProbeProtocol: to.Ptr(armservicefabricmanagedclusters.ProbeProtocolHTTP),
	// 					Protocol: to.Ptr(armservicefabricmanagedclusters.Protocol("http")),
	// 				},
	// 				{
	// 					BackendPort: to.Ptr[int32](10000),
	// 					FrontendPort: to.Ptr[int32](10000),
	// 					ProbePort: to.Ptr[int32](10000),
	// 					ProbeProtocol: to.Ptr(armservicefabricmanagedclusters.ProbeProtocolTCP),
	// 					Protocol: to.Ptr(armservicefabricmanagedclusters.ProtocolTCP),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armservicefabricmanagedclusters.ManagedResourceProvisioningStateSucceeded),
	// 		},
	// 		SKU: &armservicefabricmanagedclusters.SKU{
	// 			Name: to.Ptr(armservicefabricmanagedclusters.SKUNameStandard),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-06-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json
func ExampleManagedClustersClient_GetFaultSimulation() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicefabricmanagedclusters.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewManagedClustersClient().GetFaultSimulation(ctx, "resRg", "myCluster", armservicefabricmanagedclusters.FaultSimulationIDContent{
		SimulationID: to.Ptr("aec13cc2-1d39-4ba6-a1a8-2fc35b00643c"),
	}, 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 = armservicefabricmanagedclusters.ManagedClustersClientGetFaultSimulationResponse{
	// 	FaultSimulation: &armservicefabricmanagedclusters.FaultSimulation{
	// 		EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00"); return t}()),
	// 		SimulationID: to.Ptr("aec13cc2-1d39-4ba6-a1a8-2fc35b00643c"),
	// 		StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-21T18:11:11.3471742Z"); return t}()),
	// 		Status: to.Ptr(armservicefabricmanagedclusters.FaultSimulationStatusActive),
	// 		Details: &armservicefabricmanagedclusters.FaultSimulationDetails{
	// 			OperationID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			ClusterID: to.Ptr("dd65fb6d-753b-4664-8798-4f077d4a2e18"),
	// 			NodeTypeFaultSimulation: []*armservicefabricmanagedclusters.NodeTypeFaultSimulation{
	// 				{
	// 					OperationID: to.Ptr("714f0003-80d8-464a-a019-69e6bf89ed4c"),
	// 					NodeTypeName: to.Ptr("BE"),
	// 					OperationStatus: to.Ptr(armservicefabricmanagedclusters.SfmcOperationStatusSucceeded),
	// 					Status: to.Ptr(armservicefabricmanagedclusters.FaultSimulationStatusActive),
	// 				},
	// 			},
	// 			Parameters: &armservicefabricmanagedclusters.ZoneFaultSimulationContent{
	// 				Constraints: &armservicefabricmanagedclusters.FaultSimulationConstraints{
	// 					ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00"); return t}()),
	// 				},
	// 				FaultKind: to.Ptr(armservicefabricmanagedclusters.FaultKindZone),
	// 				Force: to.Ptr(false),
	// 				Zones: []*string{
	// 					to.Ptr("2"),
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-06-01-preview/ManagedClusterListByResourceGroupOperation_example.json
func ExampleManagedClustersClient_NewListByResourceGroupPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicefabricmanagedclusters.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewManagedClustersClient().NewListByResourceGroupPager("resRg", 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 = armservicefabricmanagedclusters.ManagedClustersClientListByResourceGroupResponse{
		// 	ManagedClusterListResult: armservicefabricmanagedclusters.ManagedClusterListResult{
		// 		NextLink: to.Ptr("http://examplelink.com"),
		// 		Value: []*armservicefabricmanagedclusters.ManagedCluster{
		// 			{
		// 				Name: to.Ptr("myCluster"),
		// 				Type: to.Ptr("Microsoft.ServiceFabric/managedClusters"),
		// 				Etag: to.Ptr("W/\"636462502169240745\""),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster"),
		// 				Location: to.Ptr("eastus"),
		// 				Properties: &armservicefabricmanagedclusters.ManagedClusterProperties{
		// 					AdminUserName: to.Ptr("vmadmin"),
		// 					ClientConnectionPort: to.Ptr[int32](19000),
		// 					ClusterCertificateThumbprints: []*string{
		// 						to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"),
		// 					},
		// 					ClusterCodeVersion: to.Ptr("7.1.168.9494"),
		// 					ClusterID: to.Ptr("92584666-9889-4ae8-8d02-91902923d37f"),
		// 					ClusterState: to.Ptr(armservicefabricmanagedclusters.ClusterStateWaitingForNodes),
		// 					ClusterUpgradeCadence: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeCadenceWave0),
		// 					ClusterUpgradeMode: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeModeAutomatic),
		// 					DNSName: to.Ptr("myCluster"),
		// 					FabricSettings: []*armservicefabricmanagedclusters.SettingsSectionDescription{
		// 						{
		// 							Name: to.Ptr("ManagedIdentityTokenService"),
		// 							Parameters: []*armservicefabricmanagedclusters.SettingsParameterDescription{
		// 								{
		// 									Name: to.Ptr("IsEnabled"),
		// 									Value: to.Ptr("true"),
		// 								},
		// 							},
		// 						},
		// 					},
		// 					Fqdn: to.Ptr("MyCluster.eastus.cloudapp.azure.com"),
		// 					HTTPGatewayConnectionPort: to.Ptr[int32](19080),
		// 					LoadBalancingRules: []*armservicefabricmanagedclusters.LoadBalancingRule{
		// 					},
		// 					ProvisioningState: to.Ptr(armservicefabricmanagedclusters.ManagedResourceProvisioningStateSucceeded),
		// 				},
		// 				SKU: &armservicefabricmanagedclusters.SKU{
		// 					Name: to.Ptr(armservicefabricmanagedclusters.SKUNameStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("myCluster2"),
		// 				Type: to.Ptr("Microsoft.ServiceFabric/managedClusters"),
		// 				Etag: to.Ptr("W/\"636462502164040075\""),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster2"),
		// 				Location: to.Ptr("eastus"),
		// 				Properties: &armservicefabricmanagedclusters.ManagedClusterProperties{
		// 					AdminUserName: to.Ptr("vmadmin"),
		// 					ClientConnectionPort: to.Ptr[int32](19000),
		// 					ClusterCertificateThumbprints: []*string{
		// 						to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"),
		// 					},
		// 					ClusterCodeVersion: to.Ptr("7.1.168.9494"),
		// 					ClusterID: to.Ptr("2747e469-b24e-4039-8a0a-46151419523f"),
		// 					ClusterState: to.Ptr(armservicefabricmanagedclusters.ClusterStateWaitingForNodes),
		// 					ClusterUpgradeCadence: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeCadenceWave0),
		// 					ClusterUpgradeMode: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeModeAutomatic),
		// 					DNSName: to.Ptr("myCluster2"),
		// 					FabricSettings: []*armservicefabricmanagedclusters.SettingsSectionDescription{
		// 						{
		// 							Name: to.Ptr("ManagedIdentityTokenService"),
		// 							Parameters: []*armservicefabricmanagedclusters.SettingsParameterDescription{
		// 								{
		// 									Name: to.Ptr("IsEnabled"),
		// 									Value: to.Ptr("true"),
		// 								},
		// 							},
		// 						},
		// 					},
		// 					Fqdn: to.Ptr("MyCluster.eastus.cloudapp.azure.com"),
		// 					HTTPGatewayConnectionPort: to.Ptr[int32](19080),
		// 					LoadBalancingRules: []*armservicefabricmanagedclusters.LoadBalancingRule{
		// 					},
		// 					ProvisioningState: to.Ptr(armservicefabricmanagedclusters.ManagedResourceProvisioningStateSucceeded),
		// 				},
		// 				SKU: &armservicefabricmanagedclusters.SKU{
		// 					Name: to.Ptr(armservicefabricmanagedclusters.SKUNameStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-06-01-preview/ManagedClusterListBySubscriptionOperation_example.json
func ExampleManagedClustersClient_NewListBySubscriptionPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicefabricmanagedclusters.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewManagedClustersClient().NewListBySubscriptionPager(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 = armservicefabricmanagedclusters.ManagedClustersClientListBySubscriptionResponse{
		// 	ManagedClusterListResult: armservicefabricmanagedclusters.ManagedClusterListResult{
		// 		NextLink: to.Ptr("http://examplelink.com"),
		// 		Value: []*armservicefabricmanagedclusters.ManagedCluster{
		// 			{
		// 				Name: to.Ptr("myCluster"),
		// 				Type: to.Ptr("Microsoft.ServiceFabric/managedClusters"),
		// 				Etag: to.Ptr("W/\"636462502169240745\""),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster"),
		// 				Location: to.Ptr("eastus"),
		// 				Properties: &armservicefabricmanagedclusters.ManagedClusterProperties{
		// 					AdminUserName: to.Ptr("vmadmin"),
		// 					ClientConnectionPort: to.Ptr[int32](19000),
		// 					ClusterCertificateThumbprints: []*string{
		// 						to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"),
		// 					},
		// 					ClusterCodeVersion: to.Ptr("7.1.168.9494"),
		// 					ClusterID: to.Ptr("92584666-9889-4ae8-8d02-91902923d37f"),
		// 					ClusterState: to.Ptr(armservicefabricmanagedclusters.ClusterStateWaitingForNodes),
		// 					ClusterUpgradeCadence: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeCadenceWave0),
		// 					ClusterUpgradeMode: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeModeAutomatic),
		// 					DNSName: to.Ptr("myCluster"),
		// 					FabricSettings: []*armservicefabricmanagedclusters.SettingsSectionDescription{
		// 						{
		// 							Name: to.Ptr("ManagedIdentityTokenService"),
		// 							Parameters: []*armservicefabricmanagedclusters.SettingsParameterDescription{
		// 								{
		// 									Name: to.Ptr("IsEnabled"),
		// 									Value: to.Ptr("true"),
		// 								},
		// 							},
		// 						},
		// 					},
		// 					Fqdn: to.Ptr("MyCluster.eastus.cloudapp.azure.com"),
		// 					HTTPGatewayConnectionPort: to.Ptr[int32](19080),
		// 					LoadBalancingRules: []*armservicefabricmanagedclusters.LoadBalancingRule{
		// 					},
		// 					ProvisioningState: to.Ptr(armservicefabricmanagedclusters.ManagedResourceProvisioningStateSucceeded),
		// 				},
		// 				SKU: &armservicefabricmanagedclusters.SKU{
		// 					Name: to.Ptr(armservicefabricmanagedclusters.SKUNameStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("myCluster2"),
		// 				Type: to.Ptr("Microsoft.ServiceFabric/managedClusters"),
		// 				Etag: to.Ptr("W/\"636462502164040075\""),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster2"),
		// 				Location: to.Ptr("eastus"),
		// 				Properties: &armservicefabricmanagedclusters.ManagedClusterProperties{
		// 					AdminUserName: to.Ptr("vmadmin"),
		// 					ClientConnectionPort: to.Ptr[int32](19000),
		// 					ClusterCertificateThumbprints: []*string{
		// 						to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"),
		// 					},
		// 					ClusterCodeVersion: to.Ptr("7.1.168.9494"),
		// 					ClusterID: to.Ptr("2747e469-b24e-4039-8a0a-46151419523f"),
		// 					ClusterState: to.Ptr(armservicefabricmanagedclusters.ClusterStateWaitingForNodes),
		// 					ClusterUpgradeCadence: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeCadenceWave0),
		// 					ClusterUpgradeMode: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeModeAutomatic),
		// 					DNSName: to.Ptr("myCluster2"),
		// 					FabricSettings: []*armservicefabricmanagedclusters.SettingsSectionDescription{
		// 						{
		// 							Name: to.Ptr("ManagedIdentityTokenService"),
		// 							Parameters: []*armservicefabricmanagedclusters.SettingsParameterDescription{
		// 								{
		// 									Name: to.Ptr("IsEnabled"),
		// 									Value: to.Ptr("true"),
		// 								},
		// 							},
		// 						},
		// 					},
		// 					Fqdn: to.Ptr("MyCluster.eastus.cloudapp.azure.com"),
		// 					HTTPGatewayConnectionPort: to.Ptr[int32](19080),
		// 					LoadBalancingRules: []*armservicefabricmanagedclusters.LoadBalancingRule{
		// 					},
		// 					ProvisioningState: to.Ptr(armservicefabricmanagedclusters.ManagedResourceProvisioningStateSucceeded),
		// 				},
		// 				SKU: &armservicefabricmanagedclusters.SKU{
		// 					Name: to.Ptr(armservicefabricmanagedclusters.SKUNameStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-06-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json
func ExampleManagedClustersClient_NewListFaultSimulationPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicefabricmanagedclusters.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewManagedClustersClient().NewListFaultSimulationPager("resRg", "myCluster", 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 = armservicefabricmanagedclusters.ManagedClustersClientListFaultSimulationResponse{
		// 	FaultSimulationListResult: armservicefabricmanagedclusters.FaultSimulationListResult{
		// 		Value: []*armservicefabricmanagedclusters.FaultSimulation{
		// 			{
		// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00"); return t}()),
		// 				SimulationID: to.Ptr("1bb61ba9-8a41-4d73-b5f0-7fc93b1edfe3"),
		// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-21T21:27:55.4452675Z"); return t}()),
		// 				Status: to.Ptr(armservicefabricmanagedclusters.FaultSimulationStatusActive),
		// 				Details: &armservicefabricmanagedclusters.FaultSimulationDetails{
		// 					OperationID: to.Ptr("b7997d2f-1f07-4245-b197-137b196ecaf3"),
		// 					ClusterID: to.Ptr("dd65fb6d-753b-4664-8798-4f077d4a2e18"),
		// 					NodeTypeFaultSimulation: []*armservicefabricmanagedclusters.NodeTypeFaultSimulation{
		// 						{
		// 							OperationID: to.Ptr("bff10003-af96-465c-b849-99c18e1f4af6"),
		// 							NodeTypeName: to.Ptr("BE"),
		// 							OperationStatus: to.Ptr(armservicefabricmanagedclusters.SfmcOperationStatusSucceeded),
		// 							Status: to.Ptr(armservicefabricmanagedclusters.FaultSimulationStatusActive),
		// 						},
		// 						{
		// 							OperationID: to.Ptr("6021d3c9-6def-4e9e-b133-d58ac1c3a4cc"),
		// 							NodeTypeName: to.Ptr("FE"),
		// 							OperationStatus: to.Ptr(armservicefabricmanagedclusters.SfmcOperationStatusSucceeded),
		// 							Status: to.Ptr(armservicefabricmanagedclusters.FaultSimulationStatusActive),
		// 						},
		// 					},
		// 					Parameters: &armservicefabricmanagedclusters.ZoneFaultSimulationContent{
		// 						Constraints: &armservicefabricmanagedclusters.FaultSimulationConstraints{
		// 							ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00"); return t}()),
		// 						},
		// 						FaultKind: to.Ptr(armservicefabricmanagedclusters.FaultKindZone),
		// 						Force: to.Ptr(false),
		// 						Zones: []*string{
		// 							to.Ptr("3"),
		// 						},
		// 					},
		// 				},
		// 			},
		// 			{
		// 				EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-21T21:24:13.082339Z"); return t}()),
		// 				SimulationID: to.Ptr("aec13cc2-1d39-4ba6-a1a8-2fc35b00643c"),
		// 				StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-11-21T18:11:11.3471742Z"); return t}()),
		// 				Status: to.Ptr(armservicefabricmanagedclusters.FaultSimulationStatusDone),
		// 				Details: &armservicefabricmanagedclusters.FaultSimulationDetails{
		// 					OperationID: to.Ptr("3e22a9a7-13c1-450b-af5e-2c739b963bdf"),
		// 					ClusterID: to.Ptr("dd65fb6d-753b-4664-8798-4f077d4a2e18"),
		// 					NodeTypeFaultSimulation: []*armservicefabricmanagedclusters.NodeTypeFaultSimulation{
		// 						{
		// 							OperationID: to.Ptr("391d0003-0d46-474c-9839-cbc345938704"),
		// 							NodeTypeName: to.Ptr("BE"),
		// 							OperationStatus: to.Ptr(armservicefabricmanagedclusters.SfmcOperationStatusSucceeded),
		// 							Status: to.Ptr(armservicefabricmanagedclusters.FaultSimulationStatusDone),
		// 						},
		// 						{
		// 							OperationID: to.Ptr("cf4ac1d7-e588-491e-9e6f-ce15a17bf389"),
		// 							NodeTypeName: to.Ptr("FE"),
		// 							OperationStatus: to.Ptr(armservicefabricmanagedclusters.SfmcOperationStatusSucceeded),
		// 							Status: to.Ptr(armservicefabricmanagedclusters.FaultSimulationStatusDone),
		// 						},
		// 					},
		// 					Parameters: &armservicefabricmanagedclusters.ZoneFaultSimulationContent{
		// 						Constraints: &armservicefabricmanagedclusters.FaultSimulationConstraints{
		// 							ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T00:00:00"); return t}()),
		// 						},
		// 						FaultKind: to.Ptr(armservicefabricmanagedclusters.FaultKindZone),
		// 						Force: to.Ptr(false),
		// 						Zones: []*string{
		// 							to.Ptr("2"),
		// 						},
		// 					},
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-06-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json
func ExampleManagedClustersClient_BeginStartFaultSimulation() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicefabricmanagedclusters.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewManagedClustersClient().BeginStartFaultSimulation(ctx, "resRg", "myCluster", armservicefabricmanagedclusters.FaultSimulationContentWrapper{
		Parameters: &armservicefabricmanagedclusters.ZoneFaultSimulationContent{
			FaultKind: to.Ptr(armservicefabricmanagedclusters.FaultKindZone),
			Zones: []*string{
				to.Ptr("2"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

// Generated from example definition: 2025-06-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json
func ExampleManagedClustersClient_BeginStopFaultSimulation() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicefabricmanagedclusters.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewManagedClustersClient().BeginStopFaultSimulation(ctx, "resRg", "myCluster", armservicefabricmanagedclusters.FaultSimulationIDContent{
		SimulationID: to.Ptr("1bb61ba9-8a41-4d73-b5f0-7fc93b1edfe3"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

// Generated from example definition: 2025-06-01-preview/ManagedClusterPatchOperation_example.json
func ExampleManagedClustersClient_Update() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicefabricmanagedclusters.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewManagedClustersClient().Update(ctx, "resRg", "myCluster", armservicefabricmanagedclusters.ManagedClusterUpdateParameters{
		Tags: map[string]*string{
			"a": to.Ptr("b"),
		},
	}, 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 = armservicefabricmanagedclusters.ManagedClustersClientUpdateResponse{
	// 	ManagedCluster: &armservicefabricmanagedclusters.ManagedCluster{
	// 		Name: to.Ptr("myCluster"),
	// 		Type: to.Ptr("Microsoft.ServiceFabric/managedClusters"),
	// 		Etag: to.Ptr("W/\"636462502169240745\""),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster"),
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armservicefabricmanagedclusters.ManagedClusterProperties{
	// 			AddonFeatures: []*armservicefabricmanagedclusters.ManagedClusterAddOnFeature{
	// 				to.Ptr(armservicefabricmanagedclusters.ManagedClusterAddOnFeatureDNSService),
	// 				to.Ptr(armservicefabricmanagedclusters.ManagedClusterAddOnFeatureBackupRestoreService),
	// 				to.Ptr(armservicefabricmanagedclusters.ManagedClusterAddOnFeatureResourceMonitorService),
	// 			},
	// 			AdminUserName: to.Ptr("vmadmin"),
	// 			AllowRdpAccess: to.Ptr(true),
	// 			ClientConnectionPort: to.Ptr[int32](19001),
	// 			ClusterCertificateThumbprints: []*string{
	// 				to.Ptr("12599211F8F14C90AFA9532AD79A6F2CA1C00622"),
	// 			},
	// 			ClusterCodeVersion: to.Ptr("7.1.168.9494"),
	// 			ClusterID: to.Ptr("92584666-9889-4ae8-8d02-91902923d37f"),
	// 			ClusterState: to.Ptr(armservicefabricmanagedclusters.ClusterStateWaitingForNodes),
	// 			ClusterUpgradeCadence: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeCadenceWave0),
	// 			ClusterUpgradeMode: to.Ptr(armservicefabricmanagedclusters.ClusterUpgradeModeAutomatic),
	// 			DNSName: to.Ptr("myCluster"),
	// 			EnableAutoOSUpgrade: to.Ptr(true),
	// 			FabricSettings: []*armservicefabricmanagedclusters.SettingsSectionDescription{
	// 				{
	// 					Name: to.Ptr("ManagedIdentityTokenService"),
	// 					Parameters: []*armservicefabricmanagedclusters.SettingsParameterDescription{
	// 						{
	// 							Name: to.Ptr("IsEnabled"),
	// 							Value: to.Ptr("false"),
	// 						},
	// 					},
	// 				},
	// 			},
	// 			Fqdn: to.Ptr("MyCluster.eastus.cloudapp.azure.com"),
	// 			HTTPGatewayConnectionPort: to.Ptr[int32](19081),
	// 			LoadBalancingRules: []*armservicefabricmanagedclusters.LoadBalancingRule{
	// 				{
	// 					BackendPort: to.Ptr[int32](80),
	// 					FrontendPort: to.Ptr[int32](80),
	// 					ProbePort: to.Ptr[int32](80),
	// 					ProbeProtocol: to.Ptr(armservicefabricmanagedclusters.ProbeProtocolHTTP),
	// 					Protocol: to.Ptr(armservicefabricmanagedclusters.Protocol("http")),
	// 				},
	// 				{
	// 					BackendPort: to.Ptr[int32](443),
	// 					FrontendPort: to.Ptr[int32](443),
	// 					ProbePort: to.Ptr[int32](443),
	// 					ProbeProtocol: to.Ptr(armservicefabricmanagedclusters.ProbeProtocolHTTP),
	// 					Protocol: to.Ptr(armservicefabricmanagedclusters.Protocol("http")),
	// 				},
	// 				{
	// 					BackendPort: to.Ptr[int32](10000),
	// 					FrontendPort: to.Ptr[int32](10000),
	// 					ProbePort: to.Ptr[int32](10000),
	// 					ProbeProtocol: to.Ptr(armservicefabricmanagedclusters.ProbeProtocolHTTP),
	// 					Protocol: to.Ptr(armservicefabricmanagedclusters.ProtocolTCP),
	// 				},
	// 			},
	// 			NetworkSecurityRules: []*armservicefabricmanagedclusters.NetworkSecurityRule{
	// 				{
	// 					Name: to.Ptr("TestName"),
	// 					Description: to.Ptr("Test description"),
	// 					Access: to.Ptr(armservicefabricmanagedclusters.AccessAllow),
	// 					DestinationAddressPrefixes: []*string{
	// 						to.Ptr("*"),
	// 					},
	// 					DestinationPortRanges: []*string{
	// 						to.Ptr("*"),
	// 					},
	// 					Direction: to.Ptr(armservicefabricmanagedclusters.DirectionInbound),
	// 					Priority: to.Ptr[int32](1010),
	// 					SourceAddressPrefixes: []*string{
	// 						to.Ptr("*"),
	// 					},
	// 					SourcePortRanges: []*string{
	// 						to.Ptr("*"),
	// 					},
	// 					Protocol: to.Ptr(armservicefabricmanagedclusters.NsgProtocolTCP),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armservicefabricmanagedclusters.ManagedResourceProvisioningStateSucceeded),
	// 		},
	// 		SKU: &armservicefabricmanagedclusters.SKU{
	// 			Name: to.Ptr(armservicefabricmanagedclusters.SKUNameStandard),
	// 		},
	// 		Tags: map[string]*string{
	// 			"a": to.Ptr("b"),
	// 		},
	// 	},
	// }
}
