// 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 armcloudhealth_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/cloudhealth/armcloudhealth"
	"log"
)

// Generated from example definition: 2025-05-01-preview/Entities_CreateOrUpdate.json
func ExampleEntitiesClient_CreateOrUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcloudhealth.NewClientFactory("4980D7D5-4E07-47AD-AD34-E76C6BC9F061", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEntitiesClient().CreateOrUpdate(ctx, "rgopenapi", "myHealthModel", "uszrxbdkxesdrxhmagmzywebgbjj", armcloudhealth.Entity{
		Properties: &armcloudhealth.EntityProperties{
			DisplayName: to.Ptr("My entity"),
			CanvasPosition: &armcloudhealth.EntityCoordinates{
				X: to.Ptr[float32](14),
				Y: to.Ptr[float32](13),
			},
			Icon: &armcloudhealth.IconDefinition{
				IconName:   to.Ptr("Custom"),
				CustomData: to.Ptr("rcitntvapruccrhtxmkqjphbxunkz"),
			},
			HealthObjective: to.Ptr[float32](62),
			Impact:          to.Ptr(armcloudhealth.EntityImpactStandard),
			Labels: map[string]*string{
				"key1376": to.Ptr("ixfvzsfnpvkkbrce"),
			},
			Signals: &armcloudhealth.SignalGroup{
				AzureResource: &armcloudhealth.AzureResourceSignalGroup{
					SignalAssignments: []*armcloudhealth.SignalAssignment{
						{
							SignalDefinitions: []*string{
								to.Ptr("sigdef1"),
							},
						},
					},
					AuthenticationSetting: to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
					AzureResourceID:       to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1"),
				},
				AzureLogAnalytics: &armcloudhealth.LogAnalyticsSignalGroup{
					SignalAssignments: []*armcloudhealth.SignalAssignment{
						{
							SignalDefinitions: []*string{
								to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
							},
						},
					},
					AuthenticationSetting:           to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
					LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.OperationalInsights/workspaces/myworkspace"),
				},
				AzureMonitorWorkspace: &armcloudhealth.AzureMonitorWorkspaceSignalGroup{
					SignalAssignments: []*armcloudhealth.SignalAssignment{
						{
							SignalDefinitions: []*string{
								to.Ptr("sigdef2"),
							},
						},
						{
							SignalDefinitions: []*string{
								to.Ptr("sigdef3"),
							},
						},
					},
					AuthenticationSetting:           to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
					AzureMonitorWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.OperationalInsights/workspaces/myworkspace"),
				},
				Dependencies: &armcloudhealth.DependenciesSignalGroup{
					AggregationType: to.Ptr(armcloudhealth.DependenciesAggregationTypeWorstOf),
				},
			},
			Alerts: &armcloudhealth.EntityAlerts{
				Unhealthy: &armcloudhealth.AlertConfiguration{
					Severity:    to.Ptr(armcloudhealth.AlertSeveritySev1),
					Description: to.Ptr("Alert description"),
					ActionGroupIDs: []*string{
						to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Insights/actionGroups/myactiongroup"),
					},
				},
				Degraded: &armcloudhealth.AlertConfiguration{
					Severity:    to.Ptr(armcloudhealth.AlertSeveritySev4),
					Description: to.Ptr("Alert description"),
					ActionGroupIDs: []*string{
						to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Insights/actionGroups/myactiongroup"),
					},
				},
			},
		},
	}, 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 = armcloudhealth.EntitiesClientCreateOrUpdateResponse{
	// 	Entity: &armcloudhealth.Entity{
	// 		Properties: &armcloudhealth.EntityProperties{
	// 			ProvisioningState: to.Ptr(armcloudhealth.HealthModelProvisioningStateSucceeded),
	// 			DisplayName: to.Ptr("My entity"),
	// 			CanvasPosition: &armcloudhealth.EntityCoordinates{
	// 				X: to.Ptr[float32](14),
	// 				Y: to.Ptr[float32](13),
	// 			},
	// 			Icon: &armcloudhealth.IconDefinition{
	// 				IconName: to.Ptr("Custom"),
	// 				CustomData: to.Ptr("rcitntvapruccrhtxmkqjphbxunkz"),
	// 			},
	// 			HealthObjective: to.Ptr[float32](62),
	// 			Impact: to.Ptr(armcloudhealth.EntityImpactStandard),
	// 			Labels: map[string]*string{
	// 				"key1376": to.Ptr("ixfvzsfnpvkkbrce"),
	// 			},
	// 			Signals: &armcloudhealth.SignalGroup{
	// 				AzureResource: &armcloudhealth.AzureResourceSignalGroup{
	// 					SignalAssignments: []*armcloudhealth.SignalAssignment{
	// 						{
	// 							SignalDefinitions: []*string{
	// 								to.Ptr("sigdef1"),
	// 							},
	// 						},
	// 					},
	// 					AuthenticationSetting: to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
	// 					AzureResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.OperationalInsights/workspaces/myworkspace"),
	// 				},
	// 				AzureMonitorWorkspace: &armcloudhealth.AzureMonitorWorkspaceSignalGroup{
	// 					SignalAssignments: []*armcloudhealth.SignalAssignment{
	// 						{
	// 							SignalDefinitions: []*string{
	// 								to.Ptr("sigdef2"),
	// 							},
	// 						},
	// 						{
	// 							SignalDefinitions: []*string{
	// 								to.Ptr("sigdef3"),
	// 							},
	// 						},
	// 					},
	// 					AuthenticationSetting: to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
	// 					AzureMonitorWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.OperationalInsights/workspaces/myworkspace"),
	// 				},
	// 				Dependencies: &armcloudhealth.DependenciesSignalGroup{
	// 					AggregationType: to.Ptr(armcloudhealth.DependenciesAggregationTypeWorstOf),
	// 				},
	// 			},
	// 			DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-18T14:04:14.531Z"); return t}()),
	// 			Alerts: &armcloudhealth.EntityAlerts{
	// 				Unhealthy: &armcloudhealth.AlertConfiguration{
	// 					Severity: to.Ptr(armcloudhealth.AlertSeveritySev1),
	// 					Description: to.Ptr("Alert description"),
	// 					ActionGroupIDs: []*string{
	// 						to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Insights/actionGroups/myactiongroup"),
	// 					},
	// 				},
	// 				Degraded: &armcloudhealth.AlertConfiguration{
	// 					Severity: to.Ptr(armcloudhealth.AlertSeveritySev4),
	// 					Description: to.Ptr("Alert description"),
	// 					ActionGroupIDs: []*string{
	// 						to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Insights/actionGroups/myactiongroup"),
	// 					},
	// 				},
	// 			},
	// 		},
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.CloudHealth/healthmodels/myHealthModel/entities/uszrxbdkxesdrxhmagmzywebgbjj"),
	// 		Name: to.Ptr("uszrxbdkxesdrxhmagmzywebgbjj"),
	// 		Type: to.Ptr("Microsoft.CloudHealth/healthmodels/entities"),
	// 		SystemData: &armcloudhealth.SystemData{
	// 			CreatedBy: to.Ptr("cbhzxxlvkmufetjjjwtk"),
	// 			CreatedByType: to.Ptr(armcloudhealth.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-18T14:04:09.327Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("arz"),
	// 			LastModifiedByType: to.Ptr(armcloudhealth.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-18T14:04:09.328Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-05-01-preview/Entities_Delete.json
func ExampleEntitiesClient_Delete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcloudhealth.NewClientFactory("4980D7D5-4E07-47AD-AD34-E76C6BC9F061", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEntitiesClient().Delete(ctx, "rgopenapi", "model1", "U4VTRFlUkm9kR6H23-c-6U-XHq7n", 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 = armcloudhealth.EntitiesClientDeleteResponse{
	// }
}

// Generated from example definition: 2025-05-01-preview/Entities_Get.json
func ExampleEntitiesClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcloudhealth.NewClientFactory("4980D7D5-4E07-47AD-AD34-E76C6BC9F061", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewEntitiesClient().Get(ctx, "rgopenapi", "myHealthModel", "entity1", 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 = armcloudhealth.EntitiesClientGetResponse{
	// 	Entity: &armcloudhealth.Entity{
	// 		Properties: &armcloudhealth.EntityProperties{
	// 			ProvisioningState: to.Ptr(armcloudhealth.HealthModelProvisioningStateSucceeded),
	// 			DisplayName: to.Ptr("olsaxmichzpzqzpdworuxbvucaazeoxvnaujlvbpjijarbnfdmskksgdtyfdlfuftoecrgmmenvvgfkzlfcogkyhk"),
	// 			CanvasPosition: &armcloudhealth.EntityCoordinates{
	// 				X: to.Ptr[float32](14),
	// 				Y: to.Ptr[float32](13),
	// 			},
	// 			Icon: &armcloudhealth.IconDefinition{
	// 				IconName: to.Ptr("UserFlow"),
	// 			},
	// 			HealthObjective: to.Ptr[float32](62),
	// 			Impact: to.Ptr(armcloudhealth.EntityImpactStandard),
	// 			Labels: map[string]*string{
	// 				"key1376": to.Ptr("ixfvzsfnpvkkbrcedaligqtopbadmojqgnzglztqytwickyeurumvqdqetmmikaqwuodokzjagoddnlolnputcdpyguuagucpbafkdpekxlxlmlrknzzjjxmbkysveyfmhzkgxverwcwdaolfqranhuearqchyxrtdlzabumuajmuxysgpaqwmwlrmqegyowtcnighwuudbgkzgzqfptsvdlvzgmnvnraufeocfkevwngzulwzjazttrwqcaakwwcehrdyhseimrwoqdkdxtcjadqcdrtdwwnieddexogctivtosotbddmjnjtexxrhngtnombrlqtasnncqmmmtnivnlkejghrvbfmullwnpjfhpejlzhcytgrrrybydizeefuxtuvjhlksxzyouukfhpsfpoqgcqoohvbqdvotzubjvqptqtapcahdhwhkxnyenlpsiepigjwukxwvpdgturhosxlfgidortepltfkkukrkuuaafhdjjwiozztomxjlluegvxrfsjiktoakpsjpqrxfsiajmzgexrfkergxbyoahyqhenydbvbtyqjwquruumwammhatjegpuokgwlildvghtlnpbsafhqqfltgxqxxusuybxamqqbhljfoaiaxkeqqsthzjdzisirutglrksotlabiitdzjudxtbbtetjxwizrvvzfcwuxiisalsbtvrpsfolasbegwivrkrjldijywozlldwxhedsnvvfecjuajhnbqmatkvsbuatpwdjfuhzdykrjprpvakktnwehehgbiewdxyxfyrruwjkndywcwwkyeupwjxceaqousxtufkhyqjnuluqkxxqupafnyrmhaxtnqzbpiavuwjagkdpqehfutmnjhmdruoatlvhkvvzaylaytvwuiirfurxeyegmiultvffswlzzhmicvxjozvngnyerepqskhjpaaicvwmlqhgbddjnudpppkeuuydjzzxhoxyefeszxpiwuexvyatxutnavzrmjmbnmalskaxnnrkcukdnkndoijtbirepqlcrmwygambodzwcppjpzerwyowpumxkypyrjzunzhutwjqpdbpwanunjnnnxmyqmlwzcmpvievaefcebzkooipxomlpviertmwoeekznzacypgptjuoegmikqwpnjlhwoqcgbggxtbneavfuixusnwdjdzxbbanoymoqnbldycwlzkeffsdbqxurzehzkmlowtoyqegkacazobopayenowenkpmyydloxnzkgjpvsirrklujljafltsvayxdvnfasmywffeifmrbqghaoprihgikeuuxyzoddhuqzsrladhpfexafdkdorlkfaukpailrlpyncyovlgdueygtzlsuykbuhbbcdfkotzqcelkrlxwuswzittcantblfpeikpwnppmnfzvsgarmqfpwmpqpfcicfnkxhepddwpqnvfqhedkecrpsutpfikwlmicfjcffommczdqvizrlofzqibjutnfczjecgfsyhhmylvdfhnsrovfivhgdmbbzwdqscjhvamvnpneryiafcykojgzvcmptphjbwsakbsmdrgvscrduqqgdztswobpctbnhdtjbrldpefdmdtemihpfbxllcsrydxbfwwolekwwxbyxexdlsepdzjpaxwpmqlsbrmyanzazdffepfwnltmopdqifsonrqcbkjphiydjhmcqfnkdbsrmvgknrvjywpmaehfshklwlmqajhkjlysxhqqeogtrbeqmopbfeqgrdwoihoebidkkurwygxhbhyivbubdtexrixwyqrsxwqjkdjmfdvxxdsfrnlumgwsywfzcnakabctdmcvqtyiijfwtvlkrmcvuncwcesmwvipmxoxeqaelzfgwznowvnwarfffevwdgmjvdkmkcrmtoxkboczjchbqnrdrodbetttulazfxwqxtrfcgjiusoubmqklesrqydiumytmqaqknvtxsvutmtxmbpccferzekdqzeqirnnavzmktdewfwihxwluqgtkynnqanexybirsssrfsjpzoseujluxtobzwuwqbllertseuwtifdihejvvtopoopdlogqvokhinvmryxlgjjcrtbgynxoztxpsyjgqxlgsvrvidpobbohjeniozridnjxbqewtgpjtkhdnqlceovpuxsrjcackwgtsllqazbxnhowajrtynuvldfcnedngnrwiwbjfogfzwlqkhbzklvziysuiyqbezkqpoanudvtabhlpgxljwailxvjarcumvxuwzxfevllhhvjyxqweesdgworgnneveovfgprphymmgjjoxjndsefmzrglkyootgjyarycquagpfkhiifqdmrwvwfyhtxtzhziefmysgdupawzaohqoecrebadanvnacsoeszhggciahbmpbsmbpjfzcmqcoquatvooeifsvdmfobivkzgvgbnadusjqcgvhqcxwrprtpulluwzutqivwhzncrpflgfikjiwubkndelhiprzzwrqunqwmpkrbhrcwutrwpeybrcplgqzxpohnasthxsdhjhxfqzntsiderxmcirhaoagswhtnjvjhtfbvujrxihbnqubzogedbhmnlmuylleruqpcpwhaevtkxuimmdvmqjhvdpkxkpsrwxbjfvoerlizufmcsjybvisohwhftdtslijozojfvrxswbxtxmksagrfupnrzuvepklqeoqtbksyhvavqrfmfioogifjlaacqnfmsjrnmhssaxnulrqaefikbkhsnfaelmiabbdhpsauikymiaynbxywybqgzhegxhrelpadodltzwgfirqertmoauuglcrpjxlznalzlqdisvtphfqefmgegxotsetvylexpbjlyxcznssqdbkshwocmq"),
	// 			},
	// 			HealthState: to.Ptr(armcloudhealth.HealthStateHealthy),
	// 			Signals: &armcloudhealth.SignalGroup{
	// 				AzureResource: &armcloudhealth.AzureResourceSignalGroup{
	// 					SignalAssignments: []*armcloudhealth.SignalAssignment{
	// 						{
	// 							SignalDefinitions: []*string{
	// 								to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
	// 							},
	// 						},
	// 						{
	// 							SignalDefinitions: []*string{
	// 								to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
	// 							},
	// 						},
	// 					},
	// 					AuthenticationSetting: to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
	// 					AzureResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1"),
	// 				},
	// 				AzureLogAnalytics: &armcloudhealth.LogAnalyticsSignalGroup{
	// 					SignalAssignments: []*armcloudhealth.SignalAssignment{
	// 						{
	// 							SignalDefinitions: []*string{
	// 								to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
	// 							},
	// 						},
	// 					},
	// 					AuthenticationSetting: to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
	// 					LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.OperationalInsights/workspaces/myworkspace"),
	// 				},
	// 				AzureMonitorWorkspace: &armcloudhealth.AzureMonitorWorkspaceSignalGroup{
	// 					SignalAssignments: []*armcloudhealth.SignalAssignment{
	// 						{
	// 							SignalDefinitions: []*string{
	// 								to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
	// 							},
	// 						},
	// 						{
	// 							SignalDefinitions: []*string{
	// 								to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
	// 							},
	// 						},
	// 					},
	// 					AuthenticationSetting: to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
	// 					AzureMonitorWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.OperationalInsights/workspaces/myworkspace"),
	// 				},
	// 				Dependencies: &armcloudhealth.DependenciesSignalGroup{
	// 					AggregationType: to.Ptr(armcloudhealth.DependenciesAggregationTypeThresholds),
	// 					DegradedThreshold: to.Ptr("3"),
	// 					UnhealthyThreshold: to.Ptr("50%"),
	// 				},
	// 			},
	// 			DiscoveredBy: to.Ptr("discoveryRule1"),
	// 			DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-18T14:04:14.531Z"); return t}()),
	// 			Alerts: &armcloudhealth.EntityAlerts{
	// 				Unhealthy: &armcloudhealth.AlertConfiguration{
	// 					Severity: to.Ptr(armcloudhealth.AlertSeveritySev1),
	// 					Description: to.Ptr("Alert description"),
	// 					ActionGroupIDs: []*string{
	// 						to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Insights/actionGroups/myactiongroup"),
	// 					},
	// 				},
	// 				Degraded: &armcloudhealth.AlertConfiguration{
	// 					Severity: to.Ptr(armcloudhealth.AlertSeveritySev4),
	// 					Description: to.Ptr("Alert description"),
	// 					ActionGroupIDs: []*string{
	// 						to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Insights/actionGroups/myactiongroup"),
	// 					},
	// 				},
	// 			},
	// 		},
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.CloudHealth/healthmodels/myHealthModel/entities/entity1"),
	// 		Name: to.Ptr("entity1"),
	// 		Type: to.Ptr("Microsoft.CloudHealth/healthmodels/entities"),
	// 		SystemData: &armcloudhealth.SystemData{
	// 			CreatedBy: to.Ptr("cbhzxxlvkmufetjjjwtk"),
	// 			CreatedByType: to.Ptr(armcloudhealth.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-18T14:04:09.327Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("arz"),
	// 			LastModifiedByType: to.Ptr(armcloudhealth.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-18T14:04:09.328Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-05-01-preview/Entities_ListByHealthModel.json
func ExampleEntitiesClient_NewListByHealthModelPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcloudhealth.NewClientFactory("4980D7D5-4E07-47AD-AD34-E76C6BC9F061", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewEntitiesClient().NewListByHealthModelPager("rgopenapi", "gPWT6GP85xRV248L7LhNRTD--2Yc73wu-5Qk-0tS", 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 = armcloudhealth.EntitiesClientListByHealthModelResponse{
		// 	EntityListResult: armcloudhealth.EntityListResult{
		// 		Value: []*armcloudhealth.Entity{
		// 			{
		// 				Properties: &armcloudhealth.EntityProperties{
		// 					ProvisioningState: to.Ptr(armcloudhealth.HealthModelProvisioningStateSucceeded),
		// 					DisplayName: to.Ptr("olsaxmichzpzqzpdworuxbvucaazeoxvnaujlvbpjijarbnfdmskksgdtyfdlfuftoecrgmmenvvgfkzlfcogkyhk"),
		// 					CanvasPosition: &armcloudhealth.EntityCoordinates{
		// 						X: to.Ptr[float32](14),
		// 						Y: to.Ptr[float32](13),
		// 					},
		// 					Icon: &armcloudhealth.IconDefinition{
		// 						IconName: to.Ptr("SystemComponent"),
		// 					},
		// 					HealthObjective: to.Ptr[float32](62),
		// 					Impact: to.Ptr(armcloudhealth.EntityImpactStandard),
		// 					Labels: map[string]*string{
		// 						"key1376": to.Ptr("ixfvzsfnpvkkbrcedaligqtopbadmojqgnzglztqytwickyeurumvqdqetmmikaqwuodokzjagoddnlolnputcdpyguuagucpbafkdpekxlxlmlrknzzjjxmbkysveyfmhzkgxverwcwdaolfqranhuearqchyxrtdlzabumuajmuxysgpaqwmwlrmqegyowtcnighwuudbgkzgzqfptsvdlvzgmnvnraufeocfkevwngzulwzjazttrwqcaakwwcehrdyhseimrwoqdkdxtcjadqcdrtdwwnieddexogctivtosotbddmjnjtexxrhngtnombrlqtasnncqmmmtnivnlkejghrvbfmullwnpjfhpejlzhcytgrrrybydizeefuxtuvjhlksxzyouukfhpsfpoqgcqoohvbqdvotzubjvqptqtapcahdhwhkxnyenlpsiepigjwukxwvpdgturhosxlfgidortepltfkkukrkuuaafhdjjwiozztomxjlluegvxrfsjiktoakpsjpqrxfsiajmzgexrfkergxbyoahyqhenydbvbtyqjwquruumwammhatjegpuokgwlildvghtlnpbsafhqqfltgxqxxusuybxamqqbhljfoaiaxkeqqsthzjdzisirutglrksotlabiitdzjudxtbbtetjxwizrvvzfcwuxiisalsbtvrpsfolasbegwivrkrjldijywozlldwxhedsnvvfecjuajhnbqmatkvsbuatpwdjfuhzdykrjprpvakktnwehehgbiewdxyxfyrruwjkndywcwwkyeupwjxceaqousxtufkhyqjnuluqkxxqupafnyrmhaxtnqzbpiavuwjagkdpqehfutmnjhmdruoatlvhkvvzaylaytvwuiirfurxeyegmiultvffswlzzhmicvxjozvngnyerepqskhjpaaicvwmlqhgbddjnudpppkeuuydjzzxhoxyefeszxpiwuexvyatxutnavzrmjmbnmalskaxnnrkcukdnkndoijtbirepqlcrmwygambodzwcppjpzerwyowpumxkypyrjzunzhutwjqpdbpwanunjnnnxmyqmlwzcmpvievaefcebzkooipxomlpviertmwoeekznzacypgptjuoegmikqwpnjlhwoqcgbggxtbneavfuixusnwdjdzxbbanoymoqnbldycwlzkeffsdbqxurzehzkmlowtoyqegkacazobopayenowenkpmyydloxnzkgjpvsirrklujljafltsvayxdvnfasmywffeifmrbqghaoprihgikeuuxyzoddhuqzsrladhpfexafdkdorlkfaukpailrlpyncyovlgdueygtzlsuykbuhbbcdfkotzqcelkrlxwuswzittcantblfpeikpwnppmnfzvsgarmqfpwmpqpfcicfnkxhepddwpqnvfqhedkecrpsutpfikwlmicfjcffommczdqvizrlofzqibjutnfczjecgfsyhhmylvdfhnsrovfivhgdmbbzwdqscjhvamvnpneryiafcykojgzvcmptphjbwsakbsmdrgvscrduqqgdztswobpctbnhdtjbrldpefdmdtemihpfbxllcsrydxbfwwolekwwxbyxexdlsepdzjpaxwpmqlsbrmyanzazdffepfwnltmopdqifsonrqcbkjphiydjhmcqfnkdbsrmvgknrvjywpmaehfshklwlmqajhkjlysxhqqeogtrbeqmopbfeqgrdwoihoebidkkurwygxhbhyivbubdtexrixwyqrsxwqjkdjmfdvxxdsfrnlumgwsywfzcnakabctdmcvqtyiijfwtvlkrmcvuncwcesmwvipmxoxeqaelzfgwznowvnwarfffevwdgmjvdkmkcrmtoxkboczjchbqnrdrodbetttulazfxwqxtrfcgjiusoubmqklesrqydiumytmqaqknvtxsvutmtxmbpccferzekdqzeqirnnavzmktdewfwihxwluqgtkynnqanexybirsssrfsjpzoseujluxtobzwuwqbllertseuwtifdihejvvtopoopdlogqvokhinvmryxlgjjcrtbgynxoztxpsyjgqxlgsvrvidpobbohjeniozridnjxbqewtgpjtkhdnqlceovpuxsrjcackwgtsllqazbxnhowajrtynuvldfcnedngnrwiwbjfogfzwlqkhbzklvziysuiyqbezkqpoanudvtabhlpgxljwailxvjarcumvxuwzxfevllhhvjyxqweesdgworgnneveovfgprphymmgjjoxjndsefmzrglkyootgjyarycquagpfkhiifqdmrwvwfyhtxtzhziefmysgdupawzaohqoecrebadanvnacsoeszhggciahbmpbsmbpjfzcmqcoquatvooeifsvdmfobivkzgvgbnadusjqcgvhqcxwrprtpulluwzutqivwhzncrpflgfikjiwubkndelhiprzzwrqunqwmpkrbhrcwutrwpeybrcplgqzxpohnasthxsdhjhxfqzntsiderxmcirhaoagswhtnjvjhtfbvujrxihbnqubzogedbhmnlmuylleruqpcpwhaevtkxuimmdvmqjhvdpkxkpsrwxbjfvoerlizufmcsjybvisohwhftdtslijozojfvrxswbxtxmksagrfupnrzuvepklqeoqtbksyhvavqrfmfioogifjlaacqnfmsjrnmhssaxnulrqaefikbkhsnfaelmiabbdhpsauikymiaynbxywybqgzhegxhrelpadodltzwgfirqertmoauuglcrpjxlznalzlqdisvtphfqefmgegxotsetvylexpbjlyxcznssqdbkshwocmq"),
		// 					},
		// 					HealthState: to.Ptr(armcloudhealth.HealthStateDegraded),
		// 					Signals: &armcloudhealth.SignalGroup{
		// 						AzureResource: &armcloudhealth.AzureResourceSignalGroup{
		// 							SignalAssignments: []*armcloudhealth.SignalAssignment{
		// 								{
		// 									SignalDefinitions: []*string{
		// 										to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
		// 									},
		// 								},
		// 								{
		// 									SignalDefinitions: []*string{
		// 										to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
		// 									},
		// 								},
		// 							},
		// 							AuthenticationSetting: to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
		// 							AzureResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/myvm"),
		// 						},
		// 						AzureLogAnalytics: &armcloudhealth.LogAnalyticsSignalGroup{
		// 							SignalAssignments: []*armcloudhealth.SignalAssignment{
		// 								{
		// 									SignalDefinitions: []*string{
		// 										to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
		// 									},
		// 								},
		// 								{
		// 									SignalDefinitions: []*string{
		// 										to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
		// 									},
		// 								},
		// 							},
		// 							AuthenticationSetting: to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
		// 							LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.OperationalInsights/workspaces/myworkspace"),
		// 						},
		// 						AzureMonitorWorkspace: &armcloudhealth.AzureMonitorWorkspaceSignalGroup{
		// 							SignalAssignments: []*armcloudhealth.SignalAssignment{
		// 								{
		// 									SignalDefinitions: []*string{
		// 										to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
		// 									},
		// 								},
		// 								{
		// 									SignalDefinitions: []*string{
		// 										to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
		// 									},
		// 								},
		// 							},
		// 							AuthenticationSetting: to.Ptr("B3P1X3e-FZtZ-4Ak-2VLHGQ-4m4-05DE-XNW5zW3P-46XY-DC3SSX"),
		// 							AzureMonitorWorkspaceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.OperationalInsights/workspaces/myworkspace"),
		// 						},
		// 						Dependencies: &armcloudhealth.DependenciesSignalGroup{
		// 							AggregationType: to.Ptr(armcloudhealth.DependenciesAggregationTypeThresholds),
		// 							DegradedThreshold: to.Ptr("3"),
		// 							UnhealthyThreshold: to.Ptr("50%"),
		// 						},
		// 					},
		// 					DiscoveredBy: to.Ptr("discoveryRule1"),
		// 					DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-18T14:04:14.531Z"); return t}()),
		// 					Alerts: &armcloudhealth.EntityAlerts{
		// 						Unhealthy: &armcloudhealth.AlertConfiguration{
		// 							Severity: to.Ptr(armcloudhealth.AlertSeveritySev1),
		// 							Description: to.Ptr("Alert description"),
		// 							ActionGroupIDs: []*string{
		// 								to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Insights/actionGroups/myactiongroup"),
		// 							},
		// 						},
		// 						Degraded: &armcloudhealth.AlertConfiguration{
		// 							Severity: to.Ptr(armcloudhealth.AlertSeveritySev4),
		// 							Description: to.Ptr("Alert description"),
		// 							ActionGroupIDs: []*string{
		// 								to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Insights/actionGroups/myactiongroup"),
		// 							},
		// 						},
		// 					},
		// 				},
		// 				ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.CloudHealth/healthmodels/5D334Xv2hy4-Kj48w7b3JO0--51G625B6-m/entities/entity1"),
		// 				Name: to.Ptr("entity1"),
		// 				Type: to.Ptr("Microsoft.CloudHealth/healthmodels/entities"),
		// 				SystemData: &armcloudhealth.SystemData{
		// 					CreatedBy: to.Ptr("cbhzxxlvkmufetjjjwtk"),
		// 					CreatedByType: to.Ptr(armcloudhealth.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-18T14:04:09.327Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("arz"),
		// 					LastModifiedByType: to.Ptr(armcloudhealth.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-18T14:04:09.328Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/ai"),
		// 	},
		// }
	}
}
