// 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 armmonitorworkspaces_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/monitor/armmonitorworkspaces"
	"log"
	"time"
)

// Generated from example definition: 2025-10-03/Issue_AddInvestigationResult_MaximumSet_Gen.json
func ExampleIssueClient_AddInvestigationResult() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIssueClient().AddInvestigationResult(ctx, "rg1", "myWorkspace", "3f29e1b2b05f8371595dc761fed8e8b3", armmonitorworkspaces.InvestigationResult{
		ID:     to.Ptr("76399e8c-f7b2-421e-a97b-40182cfa2743"),
		Result: to.Ptr(""),
	}, 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 = armmonitorworkspaces.IssueClientAddInvestigationResultResponse{
	// 	InvestigationResult: armmonitorworkspaces.InvestigationResult{
	// 		ID: to.Ptr("76399e8c-f7b2-421e-a97b-40182cfa2743"),
	// 		Origin: &armmonitorworkspaces.Origin{
	// 			AddedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 			AddedByType: to.Ptr(armmonitorworkspaces.AddedByTypeManual),
	// 		},
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:11:07"); return t}()),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:51:45"); return t}()),
	// 		Result: to.Ptr(""),
	// 	},
	// }
}

// Generated from example definition: 2025-10-03/Issue_AddOrUpdateAlerts_MaximumSet_Gen.json
func ExampleIssueClient_AddOrUpdateAlerts() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIssueClient().AddOrUpdateAlerts(ctx, "rg1", "myWorkspace", "3f29e1b2b05f8371595dc761fed8e8b3", armmonitorworkspaces.RelatedAlerts{
		Value: []*armmonitorworkspaces.RelatedAlert{
			{
				ID:        to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/Microsoft.AlertsManagement/2ca4a194-dd28-4d38-92ca-df48f6a3efc3"),
				Relevance: to.Ptr(armmonitorworkspaces.RelevanceRelevant),
				Origin: &armmonitorworkspaces.Origin{
					AddedBy:     to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
					AddedByType: to.Ptr(armmonitorworkspaces.AddedByTypeManual),
				},
			},
		},
	}, 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 = armmonitorworkspaces.IssueClientAddOrUpdateAlertsResponse{
	// 	RelatedAlerts: armmonitorworkspaces.RelatedAlerts{
	// 		Value: []*armmonitorworkspaces.RelatedAlert{
	// 			{
	// 				ID: to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/Microsoft.AlertsManagement/2ca4a194-dd28-4d38-92ca-df48f6a3efc3"),
	// 				Relevance: to.Ptr(armmonitorworkspaces.RelevanceRelevant),
	// 				Origin: &armmonitorworkspaces.Origin{
	// 					AddedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 					AddedByType: to.Ptr(armmonitorworkspaces.AddedByTypeManual),
	// 				},
	// 				AddedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:11:07"); return t}()),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:51:45"); return t}()),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-10-03/Issue_AddOrUpdateResources_MaximumSet_Gen.json
func ExampleIssueClient_AddOrUpdateResources() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIssueClient().AddOrUpdateResources(ctx, "rg1", "myWorkspace", "3f29e1b2b05f8371595dc761fed8e8b3", armmonitorworkspaces.RelatedResources{
		Value: []*armmonitorworkspaces.RelatedResource{
			{
				ID:        to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1"),
				Relevance: to.Ptr(armmonitorworkspaces.RelevanceRelevant),
				Origin: &armmonitorworkspaces.Origin{
					AddedBy:     to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
					AddedByType: to.Ptr(armmonitorworkspaces.AddedByTypeManual),
				},
			},
		},
	}, 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 = armmonitorworkspaces.IssueClientAddOrUpdateResourcesResponse{
	// 	RelatedResources: armmonitorworkspaces.RelatedResources{
	// 		Value: []*armmonitorworkspaces.RelatedResource{
	// 			{
	// 				ID: to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1"),
	// 				Relevance: to.Ptr(armmonitorworkspaces.RelevanceRelevant),
	// 				Origin: &armmonitorworkspaces.Origin{
	// 					AddedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 					AddedByType: to.Ptr(armmonitorworkspaces.AddedByTypeManual),
	// 				},
	// 				AddedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:11:07"); return t}()),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:51:45"); return t}()),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-10-03/Issue_Create_MaximumSet_Gen.json
func ExampleIssueClient_Create() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIssueClient().Create(ctx, "rg1", "myWorkspace", "3f29e1b2b05f8371595dc761fed8e8b3", armmonitorworkspaces.IssueResource{
		Properties: &armmonitorworkspaces.IssueProperties{
			Title:      to.Ptr("Alert fired on VM CPU"),
			Status:     to.Ptr(armmonitorworkspaces.StatusNew),
			Severity:   to.Ptr("Sev2"),
			ImpactTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T02:45:33"); return t }()),
			Notifications: &armmonitorworkspaces.Notifications{
				UpdateTypes: []armmonitorworkspaces.IssueNotificationTypeClassification{
					&armmonitorworkspaces.IssueCreationNotificationType{
						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeIssueCreation),
					},
					&armmonitorworkspaces.OnChangeNotificationType{
						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeOnChange),
					},
					&armmonitorworkspaces.TimeBasedUpdatesNotificationType{
						UpdateType:     to.Ptr(armmonitorworkspaces.UpdateTypeTimeBased),
						UpdateInterval: to.Ptr("PT1H"),
					},
				},
				ActionGroupIDs: []*string{
					to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Insights/actionGroups/myActionGroup"),
				},
				ExcludeDefaultActionGroups: to.Ptr(false),
			},
		},
	}, 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 = armmonitorworkspaces.IssueClientCreateResponse{
	// 	IssueResource: armmonitorworkspaces.IssueResource{
	// 		Properties: &armmonitorworkspaces.IssueProperties{
	// 			Title: to.Ptr("Alert fired on VM CPU"),
	// 			Status: to.Ptr(armmonitorworkspaces.StatusNew),
	// 			Severity: to.Ptr("Sev2"),
	// 			Investigations: []*armmonitorworkspaces.InvestigationMetadata{
	// 			},
	// 			ImpactTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T02:45:33"); return t}()),
	// 			InvestigationsCount: to.Ptr[int32](0),
	// 			Notifications: &armmonitorworkspaces.Notifications{
	// 				UpdateTypes: []armmonitorworkspaces.IssueNotificationTypeClassification{
	// 					&armmonitorworkspaces.IssueCreationNotificationType{
	// 						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeIssueCreation),
	// 					},
	// 					&armmonitorworkspaces.OnChangeNotificationType{
	// 						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeOnChange),
	// 					},
	// 					&armmonitorworkspaces.TimeBasedUpdatesNotificationType{
	// 						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeTimeBased),
	// 						UpdateInterval: to.Ptr("PT1H"),
	// 					},
	// 				},
	// 				ActionGroupIDs: []*string{
	// 					to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Insights/actionGroups/myActionGroup"),
	// 				},
	// 				ExcludeDefaultActionGroups: to.Ptr(false),
	// 			},
	// 			ProvisioningState: to.Ptr(armmonitorworkspaces.ResourceProvisioningStateSucceeded),
	// 		},
	// 		ID: to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.AlertsManagement/issues/3f29e1b2b05f8371595dc761fed8e8b3"),
	// 		Name: to.Ptr("3f29e1b2b05f8371595dc761fed8e8b3"),
	// 		SystemData: &armmonitorworkspaces.SystemData{
	// 			CreatedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 			CreatedByType: to.Ptr(armmonitorworkspaces.CreatedByType("Manual")),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:11:07"); return t}()),
	// 			LastModifiedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 			LastModifiedByType: to.Ptr(armmonitorworkspaces.CreatedByType("Manual")),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:51:45"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-10-03/Issue_Delete_MaximumSet_Gen.json
func ExampleIssueClient_Delete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIssueClient().Delete(ctx, "rg1", "myWorkspace", "3f29e1b2b05f8371595dc761fed8e8b3", 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 = armmonitorworkspaces.IssueClientDeleteResponse{
	// }
}

// Generated from example definition: 2025-10-03/Issue_FetchBackgroundVisualization_MaximumSet_Gen.json
func ExampleIssueClient_FetchBackgroundVisualization() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIssueClient().FetchBackgroundVisualization(ctx, "rg1", "myWorkspace", "3f29e1b2b05f8371595dc761fed8e8b3", 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 = armmonitorworkspaces.IssueClientFetchBackgroundVisualizationResponse{
	// 	BackgroundVisualization: armmonitorworkspaces.BackgroundVisualization{
	// 		Visualization: to.Ptr("{\"type\":\"AdaptiveCard\",\"version\":\"1.3\",\"body\":[{\"type\":\"TextBlock\",\"text\":\"Issue Background Visualization\",\"size\":\"Large\",\"weight\":\"Bolder\"},{\"type\":\"TextBlock\",\"text\":\"This adaptive card provides background context for the issue including related metrics, logs, and diagnostic information.\",\"wrap\":true},{\"type\":\"FactSet\",\"facts\":[{\"title\":\"Affected Resources\",\"value\":\"5 virtual machines\"},{\"title\":\"Impact Duration\",\"value\":\"2 hours 15 minutes\"},{\"title\":\"Severity Level\",\"value\":\"High\"}]},{\"type\":\"Container\",\"items\":[{\"type\":\"TextBlock\",\"text\":\"Key Metrics\",\"weight\":\"Bolder\"},{\"type\":\"TextBlock\",\"text\":\"CPU Utilization: 95%\\nMemory Usage: 87%\\nDisk I/O: High\",\"wrap\":true}]}]}"),
	// 		Origin: &armmonitorworkspaces.Origin{
	// 			AddedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 			AddedByType: to.Ptr(armmonitorworkspaces.AddedByTypeManual),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-10-03/Issue_FetchInvestigationResult_MaximumSet_Gen.json
func ExampleIssueClient_FetchInvestigationResult() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIssueClient().FetchInvestigationResult(ctx, "rg1", "myWorkspace", "3f29e1b2b05f8371595dc761fed8e8b3", armmonitorworkspaces.FetchInvestigationResultParameters{
		InvestigationID: to.Ptr("b7341c85-b2c7-46ea-9a7f-784823b71fbc"),
	}, 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 = armmonitorworkspaces.IssueClientFetchInvestigationResultResponse{
	// 	InvestigationResult: armmonitorworkspaces.InvestigationResult{
	// 		ID: to.Ptr("76399e8c-f7b2-421e-a97b-40182cfa2743"),
	// 		Origin: &armmonitorworkspaces.Origin{
	// 			AddedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 			AddedByType: to.Ptr(armmonitorworkspaces.AddedByTypeManual),
	// 		},
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:11:07"); return t}()),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:51:45"); return t}()),
	// 		Result: to.Ptr(""),
	// 	},
	// }
}

// Generated from example definition: 2025-10-03/Issue_Get_MaximumSet_Gen.json
func ExampleIssueClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIssueClient().Get(ctx, "rg1", "myWorkspace", "3f29e1b2b05f8371595dc761fed8e8b3", 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 = armmonitorworkspaces.IssueClientGetResponse{
	// 	IssueResource: armmonitorworkspaces.IssueResource{
	// 		Properties: &armmonitorworkspaces.IssueProperties{
	// 			Title: to.Ptr("Alert fired on VM CPU"),
	// 			Status: to.Ptr(armmonitorworkspaces.StatusNew),
	// 			Severity: to.Ptr("Sev2"),
	// 			Investigations: []*armmonitorworkspaces.InvestigationMetadata{
	// 			},
	// 			ImpactTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T02:45:33"); return t}()),
	// 			InvestigationsCount: to.Ptr[int32](0),
	// 			Notifications: &armmonitorworkspaces.Notifications{
	// 				UpdateTypes: []armmonitorworkspaces.IssueNotificationTypeClassification{
	// 					&armmonitorworkspaces.IssueCreationNotificationType{
	// 						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeIssueCreation),
	// 					},
	// 					&armmonitorworkspaces.OnChangeNotificationType{
	// 						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeOnChange),
	// 					},
	// 					&armmonitorworkspaces.TimeBasedUpdatesNotificationType{
	// 						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeTimeBased),
	// 						UpdateInterval: to.Ptr("PT1H"),
	// 					},
	// 				},
	// 				ActionGroupIDs: []*string{
	// 					to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Insights/actionGroups/myActionGroup"),
	// 				},
	// 				ExcludeDefaultActionGroups: to.Ptr(false),
	// 			},
	// 			ProvisioningState: to.Ptr(armmonitorworkspaces.ResourceProvisioningStateSucceeded),
	// 		},
	// 		ID: to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.AlertsManagement/issues/3f29e1b2b05f8371595dc761fed8e8b3"),
	// 		Name: to.Ptr("3f29e1b2b05f8371595dc761fed8e8b3"),
	// 		SystemData: &armmonitorworkspaces.SystemData{
	// 			CreatedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 			CreatedByType: to.Ptr(armmonitorworkspaces.CreatedByType("Manual")),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:11:07"); return t}()),
	// 			LastModifiedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 			LastModifiedByType: to.Ptr(armmonitorworkspaces.CreatedByType("Manual")),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:51:45"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-10-03/Issue_List_MaximumSet_Gen.json
func ExampleIssueClient_NewListPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewIssueClient().NewListPager("rg1", "myWorkspace", 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 = armmonitorworkspaces.IssueClientListResponse{
		// 	IssueResourceListResult: armmonitorworkspaces.IssueResourceListResult{
		// 		Value: []*armmonitorworkspaces.IssueResource{
		// 			{
		// 				Properties: &armmonitorworkspaces.IssueProperties{
		// 					Title: to.Ptr("Alert fired on VM CPU"),
		// 					Status: to.Ptr(armmonitorworkspaces.StatusNew),
		// 					Severity: to.Ptr("Sev2"),
		// 					Investigations: []*armmonitorworkspaces.InvestigationMetadata{
		// 					},
		// 					ImpactTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T02:45:33"); return t}()),
		// 					InvestigationsCount: to.Ptr[int32](0),
		// 					Notifications: &armmonitorworkspaces.Notifications{
		// 						UpdateTypes: []armmonitorworkspaces.IssueNotificationTypeClassification{
		// 							&armmonitorworkspaces.IssueCreationNotificationType{
		// 								UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeIssueCreation),
		// 							},
		// 							&armmonitorworkspaces.OnChangeNotificationType{
		// 								UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeOnChange),
		// 							},
		// 							&armmonitorworkspaces.TimeBasedUpdatesNotificationType{
		// 								UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeTimeBased),
		// 								UpdateInterval: to.Ptr("PT1H"),
		// 							},
		// 						},
		// 						ActionGroupIDs: []*string{
		// 							to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Insights/actionGroups/myActionGroup"),
		// 						},
		// 						ExcludeDefaultActionGroups: to.Ptr(false),
		// 					},
		// 					ProvisioningState: to.Ptr(armmonitorworkspaces.ResourceProvisioningStateSucceeded),
		// 				},
		// 				ID: to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.AlertsManagement/issues/3f29e1b2b05f8371595dc761fed8e8b3"),
		// 				Name: to.Ptr("3f29e1b2b05f8371595dc761fed8e8b3"),
		// 				SystemData: &armmonitorworkspaces.SystemData{
		// 					CreatedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
		// 					CreatedByType: to.Ptr(armmonitorworkspaces.CreatedByType("Manual")),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:11:07"); return t}()),
		// 					LastModifiedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
		// 					LastModifiedByType: to.Ptr(armmonitorworkspaces.CreatedByType("Manual")),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:51:45"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}

// Generated from example definition: 2025-10-03/Issue_ListAlerts_MaximumSet_Gen.json
func ExampleIssueClient_ListAlerts() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIssueClient().ListAlerts(ctx, "rg1", "myWorkspace", "3f29e1b2b05f8371595dc761fed8e8b3", armmonitorworkspaces.ListParameter{
		Filter: to.Ptr(""),
	}, 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 = armmonitorworkspaces.IssueClientListAlertsResponse{
	// 	PagedRelatedAlert: armmonitorworkspaces.PagedRelatedAlert{
	// 		Value: []*armmonitorworkspaces.RelatedAlert{
	// 			{
	// 				ID: to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/Microsoft.AlertsManagement/2ca4a194-dd28-4d38-92ca-df48f6a3efc3"),
	// 				Relevance: to.Ptr(armmonitorworkspaces.RelevanceRelevant),
	// 				Origin: &armmonitorworkspaces.Origin{
	// 					AddedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 					AddedByType: to.Ptr(armmonitorworkspaces.AddedByTypeManual),
	// 				},
	// 				AddedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:11:07"); return t}()),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:51:45"); return t}()),
	// 			},
	// 		},
	// 		NextLink: to.Ptr("https://microsoft.com/a"),
	// 	},
	// }
}

// Generated from example definition: 2025-10-03/Issue_ListResources_MaximumSet_Gen.json
func ExampleIssueClient_ListResources() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIssueClient().ListResources(ctx, "rg1", "myWorkspace", "3f29e1b2b05f8371595dc761fed8e8b3", armmonitorworkspaces.ListParameter{
		Filter: to.Ptr(""),
	}, 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 = armmonitorworkspaces.IssueClientListResourcesResponse{
	// 	PagedRelatedResource: armmonitorworkspaces.PagedRelatedResource{
	// 		Value: []*armmonitorworkspaces.RelatedResource{
	// 			{
	// 				ID: to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1"),
	// 				Relevance: to.Ptr(armmonitorworkspaces.RelevanceRelevant),
	// 				Origin: &armmonitorworkspaces.Origin{
	// 					AddedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 					AddedByType: to.Ptr(armmonitorworkspaces.AddedByTypeManual),
	// 				},
	// 				AddedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:11:07"); return t}()),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:51:45"); return t}()),
	// 			},
	// 		},
	// 		NextLink: to.Ptr("https://microsoft.com/a"),
	// 	},
	// }
}

// Generated from example definition: 2025-10-03/Issue_SetBackgroundVisualization_MaximumSet_Gen.json
func ExampleIssueClient_SetBackgroundVisualization() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewIssueClient().SetBackgroundVisualization(ctx, "rg1", "myWorkspace", "3f29e1b2b05f8371595dc761fed8e8b3", armmonitorworkspaces.BackgroundVisualization{
		Visualization: to.Ptr("{\"type\":\"AdaptiveCard\",\"version\":\"1.3\",\"body\":[{\"type\":\"TextBlock\",\"text\":\"Issue Background Visualization\",\"size\":\"Large\",\"weight\":\"Bolder\"},{\"type\":\"TextBlock\",\"text\":\"This adaptive card provides background context for the issue including related metrics, logs, and diagnostic information.\",\"wrap\":true},{\"type\":\"FactSet\",\"facts\":[{\"title\":\"Affected Resources\",\"value\":\"5 virtual machines\"},{\"title\":\"Impact Duration\",\"value\":\"2 hours 15 minutes\"},{\"title\":\"Severity Level\",\"value\":\"High\"}]},{\"type\":\"Container\",\"items\":[{\"type\":\"TextBlock\",\"text\":\"Key Metrics\",\"weight\":\"Bolder\"},{\"type\":\"TextBlock\",\"text\":\"CPU Utilization: 95%\\nMemory Usage: 87%\\nDisk I/O: High\",\"wrap\":true}]}]}"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}

// Generated from example definition: 2025-10-03/Issue_Update_MaximumSet_Gen.json
func ExampleIssueClient_Update() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armmonitorworkspaces.NewClientFactory("aceaa046-91f0-492a-96dc-45e10a9183dc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewIssueClient().Update(ctx, "rg1", "myWorkspace", "3f29e1b2b05f8371595dc761fed8e8b3", armmonitorworkspaces.IssueResourceUpdate{
		Properties: &armmonitorworkspaces.IssuePropertiesUpdate{
			Title:      to.Ptr("Alert fired on VM CPU"),
			Status:     to.Ptr(armmonitorworkspaces.StatusNew),
			Severity:   to.Ptr("Sev2"),
			ImpactTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T02:45:33"); return t }()),
			Notifications: &armmonitorworkspaces.Notifications{
				UpdateTypes: []armmonitorworkspaces.IssueNotificationTypeClassification{
					&armmonitorworkspaces.IssueCreationNotificationType{
						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeIssueCreation),
					},
					&armmonitorworkspaces.OnChangeNotificationType{
						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeOnChange),
					},
					&armmonitorworkspaces.TimeBasedUpdatesNotificationType{
						UpdateType:     to.Ptr(armmonitorworkspaces.UpdateTypeTimeBased),
						UpdateInterval: to.Ptr("PT1H"),
					},
				},
				ActionGroupIDs: []*string{
					to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Insights/actionGroups/myActionGroup"),
				},
				ExcludeDefaultActionGroups: to.Ptr(false),
			},
		},
	}, 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 = armmonitorworkspaces.IssueClientUpdateResponse{
	// 	IssueResource: armmonitorworkspaces.IssueResource{
	// 		Properties: &armmonitorworkspaces.IssueProperties{
	// 			Title: to.Ptr("Alert fired on VM CPU"),
	// 			Status: to.Ptr(armmonitorworkspaces.StatusNew),
	// 			Severity: to.Ptr("Sev2"),
	// 			Investigations: []*armmonitorworkspaces.InvestigationMetadata{
	// 			},
	// 			ImpactTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T02:45:33"); return t}()),
	// 			InvestigationsCount: to.Ptr[int32](0),
	// 			Notifications: &armmonitorworkspaces.Notifications{
	// 				UpdateTypes: []armmonitorworkspaces.IssueNotificationTypeClassification{
	// 					&armmonitorworkspaces.IssueCreationNotificationType{
	// 						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeIssueCreation),
	// 					},
	// 					&armmonitorworkspaces.OnChangeNotificationType{
	// 						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeOnChange),
	// 					},
	// 					&armmonitorworkspaces.TimeBasedUpdatesNotificationType{
	// 						UpdateType: to.Ptr(armmonitorworkspaces.UpdateTypeTimeBased),
	// 						UpdateInterval: to.Ptr("PT1H"),
	// 					},
	// 				},
	// 				ActionGroupIDs: []*string{
	// 					to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Insights/actionGroups/myActionGroup"),
	// 				},
	// 				ExcludeDefaultActionGroups: to.Ptr(false),
	// 			},
	// 			ProvisioningState: to.Ptr(armmonitorworkspaces.ResourceProvisioningStateSucceeded),
	// 		},
	// 		ID: to.Ptr("/subscriptions/aceaa046-91f0-492a-96dc-45e10a9183dc/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.AlertsManagement/issues/3f29e1b2b05f8371595dc761fed8e8b3"),
	// 		Name: to.Ptr("3f29e1b2b05f8371595dc761fed8e8b3"),
	// 		SystemData: &armmonitorworkspaces.SystemData{
	// 			CreatedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 			CreatedByType: to.Ptr(armmonitorworkspaces.CreatedByType("Manual")),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:11:07"); return t}()),
	// 			LastModifiedBy: to.Ptr("171a811c-2a3a-4e6c-b742-f78f5f6ca51c"),
	// 			LastModifiedByType: to.Ptr(armmonitorworkspaces.CreatedByType("Manual")),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-12-13T03:51:45"); return t}()),
	// 		},
	// 	},
	// }
}
