// 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 armresiliencemanagement_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/resiliencemanagement/armresiliencemanagement"
	"log"
)

// Generated from example definition: 2026-04-01-preview/DrillResources_Get_MaximumSet_Gen.json
func ExampleDrillResourcesClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armresiliencemanagement.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDrillResourcesClient().Get(ctx, "sampleServiceGroupName", "drill1", "b6378181-9dc0-4a43-8e09-97a8b08aabaa", 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 = armresiliencemanagement.DrillResourcesClientGetResponse{
	// 	DrillResource: armresiliencemanagement.DrillResource{
	// 		Properties: &armresiliencemanagement.DrillResourceProperties{
	// 			ResourceID: to.Ptr("/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/vm1"),
	// 			ResourceType: to.Ptr("Microsoft.Compute/virtualMachines"),
	// 			InclusionState: to.Ptr(armresiliencemanagement.DrillResourceInclusionStateExcluded),
	// 			ReadinessState: to.Ptr(armresiliencemanagement.DrillResourceReadinessStateReady),
	// 			FaultState: to.Ptr(armresiliencemanagement.DrillResourceFaultStateSystemNative),
	// 			FaultProperties: &armresiliencemanagement.FaultProperties{
	// 				AvailableFaults: []*armresiliencemanagement.FaultDetails{
	// 					{
	// 						FaultUrn: to.Ptr("urn:csci:microsoft:virtualMachine:shutdown/1.0"),
	// 						FaultName: to.Ptr("shutdown"),
	// 						TargetResourceID: to.Ptr("/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/vm1"),
	// 					},
	// 				},
	// 				DefaultFault: &armresiliencemanagement.FaultDetails{
	// 					FaultUrn: to.Ptr("urn:csci:microsoft:virtualMachine:shutdown/1.0"),
	// 					FaultName: to.Ptr("shutdown"),
	// 					TargetResourceID: to.Ptr("/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/vm1"),
	// 				},
	// 				OverriddenDefaultFault: &armresiliencemanagement.FaultDetails{
	// 					FaultUrn: to.Ptr("iqxyrb"),
	// 					FaultName: to.Ptr("miodmhraajzmmashiknlbkgdtxabzxexunwypvexaulzhsspjgflsawwdkqrdodpdteihxuckdyiv"),
	// 					TargetResourceID: to.Ptr("/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/viveksi/providers/Microsoft.Network/networkSecurityGroups/viveksinensg"),
	// 				},
	// 				CustomFault: &armresiliencemanagement.CustomFaultDetails{
	// 					FaultName: to.Ptr("customScriptFault"),
	// 					ScriptResourceID: to.Ptr("/subscriptions/191973cd-9c54-41e0-ac19-25dd9a92d5a8/resourceGroups/abhinkRG/providers/Microsoft.Automation/automationAccounts/abhinkAcc/runbooks/viveksi"),
	// 				},
	// 			},
	// 			HaStatus: to.Ptr(armresiliencemanagement.HAStatusEnabled),
	// 			AttentionReason: &armresiliencemanagement.DrillResourceAttentionReason{
	// 				ResourceState: []*armresiliencemanagement.DrillResourceState{
	// 					to.Ptr(armresiliencemanagement.DrillResourceState("InSGNotInDrill")),
	// 				},
	// 				RunbookFaultRbacOnTargets: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 				MonitoringRbacOnTargets: to.Ptr(armresiliencemanagement.RBACStateNotSet),
	// 				FaultRbacOnTargetResource: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 			},
	// 			AdvisorHaRecommendationID: to.Ptr("/subscriptions/56207a5d-4746-4a2d-9f7f-c5ac77a5ddfd/providers/Microsoft.Advisor/recommendations/adf5287d-27e0-9954-1cc1-f51dc78c8adc"),
	// 			RbacAssignmentError: &armresiliencemanagement.ErrorDetails{
	// 				Code: to.Ptr("Success"),
	// 				Message: to.Ptr("vftwvnutpraic"),
	// 			},
	// 			ProvisioningState: to.Ptr(armresiliencemanagement.ProvisioningStateSucceeded),
	// 			ResourceProtectionSolutionType: to.Ptr(armresiliencemanagement.ResourceProtectionSolutionTypeNone),
	// 			RecoveryPlanInclusionState: to.Ptr(armresiliencemanagement.ResourceInclusionStateIncluded),
	// 			RecoveryPlanExclusionReason: to.Ptr(armresiliencemanagement.RecoveryPlanExclusionReasonExcludedFromRecoveryPlan),
	// 			ForceInclusionState: to.Ptr(armresiliencemanagement.ForceInclusionAndUpdateEnable),
	// 			AdvisorRecommendationTypeID: to.Ptr("azogxpwhcogwwjchwoypqvjaaejbh"),
	// 			MonitoringRbacAssignmentError: &armresiliencemanagement.ErrorDetails{
	// 				Code: to.Ptr("14123903"),
	// 				Message: to.Ptr("Unable to assign Monitoring RBAC on target resource."),
	// 			},
	// 			ActiveLocations: []*string{
	// 				to.Ptr("eastus-zone2"),
	// 			},
	// 			RecoveryLocations: []*string{
	// 				to.Ptr("eastus-zone3"),
	// 			},
	// 			ActivePhysicalZones: []*string{
	// 				to.Ptr("eastus-az3"),
	// 			},
	// 			RecoveryPhysicalZones: []*string{
	// 				to.Ptr("eastus-az2"),
	// 			},
	// 		},
	// 		ID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName/providers/Microsoft.AzureResilienceManagement/drills/drill1/drillResources/2c9b3a1f-f96e-42c2-98fe-15005da8a133"),
	// 		Name: to.Ptr("2c9b3a1f-f96e-42c2-98fe-15005da8a133"),
	// 		Type: to.Ptr("Microsoft.AzureResilienceManagement/drillResources"),
	// 		SystemData: &armresiliencemanagement.SystemData{
	// 			CreatedBy: to.Ptr("dvnfxbuyqhvivfjddjccdtlwajfht"),
	// 			CreatedByType: to.Ptr(armresiliencemanagement.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-06T15:03:42.796Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("lndhhaimomorael"),
	// 			LastModifiedByType: to.Ptr(armresiliencemanagement.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-06T15:03:42.797Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-04-01-preview/DrillResources_List_MaximumSet_Gen.json
func ExampleDrillResourcesClient_NewListPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armresiliencemanagement.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDrillResourcesClient().NewListPager("sampleServiceGroupName", "drill1", &armresiliencemanagement.DrillResourcesClientListOptions{
		SkipToken: to.Ptr("xntbyoswztnmvitj"),
		Top:       to.Ptr[int32](69)})
	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 = armresiliencemanagement.DrillResourcesClientListResponse{
		// 	DrillResourceListResult: armresiliencemanagement.DrillResourceListResult{
		// 		Value: []*armresiliencemanagement.DrillResource{
		// 			{
		// 				Properties: &armresiliencemanagement.DrillResourceProperties{
		// 					ResourceID: to.Ptr("/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/vm1"),
		// 					ResourceType: to.Ptr("Microsoft.Compute/virtualMachines"),
		// 					InclusionState: to.Ptr(armresiliencemanagement.DrillResourceInclusionStateExcluded),
		// 					ReadinessState: to.Ptr(armresiliencemanagement.DrillResourceReadinessStateReady),
		// 					FaultState: to.Ptr(armresiliencemanagement.DrillResourceFaultStateSystemNative),
		// 					FaultProperties: &armresiliencemanagement.FaultProperties{
		// 						AvailableFaults: []*armresiliencemanagement.FaultDetails{
		// 							{
		// 								FaultUrn: to.Ptr("urn:csci:microsoft:virtualMachine:shutdown/1.0"),
		// 								FaultName: to.Ptr("shutdown"),
		// 								TargetResourceID: to.Ptr("/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/vm1"),
		// 							},
		// 						},
		// 						DefaultFault: &armresiliencemanagement.FaultDetails{
		// 							FaultUrn: to.Ptr("urn:csci:microsoft:virtualMachine:shutdown/1.0"),
		// 							FaultName: to.Ptr("shutdown"),
		// 							TargetResourceID: to.Ptr("/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/vm1"),
		// 						},
		// 						OverriddenDefaultFault: &armresiliencemanagement.FaultDetails{
		// 							FaultUrn: to.Ptr("iqxyrb"),
		// 							FaultName: to.Ptr("miodmhraajzmmashiknlbkgdtxabzxexunwypvexaulzhsspjgflsawwdkqrdodpdteihxuckdyiv"),
		// 							TargetResourceID: to.Ptr("/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/viveksi/providers/Microsoft.Network/networkSecurityGroups/viveksinensg"),
		// 						},
		// 						CustomFault: &armresiliencemanagement.CustomFaultDetails{
		// 							FaultName: to.Ptr("customScriptFault"),
		// 							ScriptResourceID: to.Ptr("/subscriptions/191973cd-9c54-41e0-ac19-25dd9a92d5a8/resourceGroups/abhinkRG/providers/Microsoft.Automation/automationAccounts/abhinkAcc/runbooks/viveksi"),
		// 						},
		// 					},
		// 					HaStatus: to.Ptr(armresiliencemanagement.HAStatusEnabled),
		// 					AttentionReason: &armresiliencemanagement.DrillResourceAttentionReason{
		// 						ResourceState: []*armresiliencemanagement.DrillResourceState{
		// 							to.Ptr(armresiliencemanagement.DrillResourceState("InSGNotInDrill")),
		// 						},
		// 						RunbookFaultRbacOnTargets: to.Ptr(armresiliencemanagement.RBACStateSet),
		// 						MonitoringRbacOnTargets: to.Ptr(armresiliencemanagement.RBACStateNotSet),
		// 						FaultRbacOnTargetResource: to.Ptr(armresiliencemanagement.RBACStateSet),
		// 					},
		// 					AdvisorHaRecommendationID: to.Ptr("/subscriptions/56207a5d-4746-4a2d-9f7f-c5ac77a5ddfd/providers/Microsoft.Advisor/recommendations/adf5287d-27e0-9954-1cc1-f51dc78c8adc"),
		// 					RbacAssignmentError: &armresiliencemanagement.ErrorDetails{
		// 						Code: to.Ptr("Success"),
		// 						Message: to.Ptr("vftwvnutpraic"),
		// 					},
		// 					ProvisioningState: to.Ptr(armresiliencemanagement.ProvisioningStateSucceeded),
		// 					ResourceProtectionSolutionType: to.Ptr(armresiliencemanagement.ResourceProtectionSolutionTypeNone),
		// 					RecoveryPlanInclusionState: to.Ptr(armresiliencemanagement.ResourceInclusionStateIncluded),
		// 					RecoveryPlanExclusionReason: to.Ptr(armresiliencemanagement.RecoveryPlanExclusionReasonExcludedFromRecoveryPlan),
		// 					ForceInclusionState: to.Ptr(armresiliencemanagement.ForceInclusionAndUpdateEnable),
		// 					AdvisorRecommendationTypeID: to.Ptr("azogxpwhcogwwjchwoypqvjaaejbh"),
		// 					MonitoringRbacAssignmentError: &armresiliencemanagement.ErrorDetails{
		// 						Code: to.Ptr("14123903"),
		// 						Message: to.Ptr("Unable to assign Monitoring RBAC on target resource."),
		// 					},
		// 					ActiveLocations: []*string{
		// 						to.Ptr("eastus-az2"),
		// 					},
		// 					RecoveryLocations: []*string{
		// 						to.Ptr("eastus-az3"),
		// 					},
		// 					ActivePhysicalZones: []*string{
		// 						to.Ptr("eastus-az3"),
		// 					},
		// 					RecoveryPhysicalZones: []*string{
		// 						to.Ptr("eastus-az2"),
		// 					},
		// 				},
		// 				ID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName/providers/Microsoft.AzureResilienceManagement/drills/drill1/drillResources/2c9b3a1f-f96e-42c2-98fe-15005da8a133"),
		// 				Name: to.Ptr("drillResource1"),
		// 				Type: to.Ptr("Microsoft.AzureResilienceManagement/drillResources"),
		// 				SystemData: &armresiliencemanagement.SystemData{
		// 					CreatedBy: to.Ptr("dvnfxbuyqhvivfjddjccdtlwajfht"),
		// 					CreatedByType: to.Ptr(armresiliencemanagement.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-06T15:03:42.796Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("lndhhaimomorael"),
		// 					LastModifiedByType: to.Ptr(armresiliencemanagement.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-06T15:03:42.797Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				Properties: &armresiliencemanagement.DrillResourceProperties{
		// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroups1/providers/Microsoft.Sql/managedInstances/managedInstances1"),
		// 					ResourceType: to.Ptr("Microsoft.Sql/managedInstances"),
		// 					InclusionState: to.Ptr(armresiliencemanagement.DrillResourceInclusionStateExcluded),
		// 					ReadinessState: to.Ptr(armresiliencemanagement.DrillResourceReadinessStateReady),
		// 					FaultState: to.Ptr(armresiliencemanagement.DrillResourceFaultStateSystemNative),
		// 					FaultProperties: &armresiliencemanagement.FaultProperties{
		// 						AvailableFaults: []*armresiliencemanagement.FaultDetails{
		// 							{
		// 								FaultUrn: to.Ptr("urn:csci:microsoft:networkSecurityGroup:securityRule/1.0"),
		// 								FaultName: to.Ptr("nsg"),
		// 								TargetResourceID: to.Ptr("/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/viveksi/providers/Microsoft.Network/networkSecurityGroups/viveksinensg"),
		// 							},
		// 						},
		// 						DefaultFault: &armresiliencemanagement.FaultDetails{
		// 							FaultUrn: to.Ptr("urn:csci:microsoft:networkSecurityGroup:securityRule/1.0"),
		// 							FaultName: to.Ptr("nsg"),
		// 							TargetResourceID: to.Ptr("/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/viveksi/providers/Microsoft.Network/networkSecurityGroups/viveksinensg"),
		// 						},
		// 						OverriddenDefaultFault: &armresiliencemanagement.FaultDetails{
		// 							FaultUrn: to.Ptr("iqxyrb"),
		// 							FaultName: to.Ptr("miodmhraajzmmashiknlbkgdtxabzxexunwypvexaulzhsspjgflsawwdkqrdodpdteihxuckdyiv"),
		// 							TargetResourceID: to.Ptr("/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/viveksi/providers/Microsoft.Network/networkSecurityGroups/viveksinensg"),
		// 						},
		// 						CustomFault: &armresiliencemanagement.CustomFaultDetails{
		// 							FaultName: to.Ptr("customScriptFault"),
		// 							ScriptResourceID: to.Ptr("/subscriptions/191973cd-9c54-41e0-ac19-25dd9a92d5a8/resourceGroups/abhinkRG/providers/Microsoft.Automation/automationAccounts/abhinkAcc/runbooks/viveksi"),
		// 						},
		// 					},
		// 					HaStatus: to.Ptr(armresiliencemanagement.HAStatusEnabled),
		// 					AttentionReason: &armresiliencemanagement.DrillResourceAttentionReason{
		// 						ResourceState: []*armresiliencemanagement.DrillResourceState{
		// 							to.Ptr(armresiliencemanagement.DrillResourceState("InSGNotInDrill")),
		// 						},
		// 						RunbookFaultRbacOnTargets: to.Ptr(armresiliencemanagement.RBACStateSet),
		// 						MonitoringRbacOnTargets: to.Ptr(armresiliencemanagement.RBACStateSet),
		// 						FaultRbacOnTargetResource: to.Ptr(armresiliencemanagement.RBACStateSet),
		// 					},
		// 					AdvisorHaRecommendationID: to.Ptr("/subscriptions/56207a5d-4746-4a2d-9f7f-c5ac77a5ddfd/providers/Microsoft.Advisor/recommendations/adf5287d-27e0-9954-1cc1-f51dc78c8adc"),
		// 					RbacAssignmentError: &armresiliencemanagement.ErrorDetails{
		// 						Code: to.Ptr("Success"),
		// 						Message: to.Ptr("vftwvnutpraic"),
		// 					},
		// 					ProvisioningState: to.Ptr(armresiliencemanagement.ProvisioningStateSucceeded),
		// 					ResourceProtectionSolutionType: to.Ptr(armresiliencemanagement.ResourceProtectionSolutionTypeNone),
		// 					RecoveryPlanInclusionState: to.Ptr(armresiliencemanagement.ResourceInclusionStateIncluded),
		// 					RecoveryPlanExclusionReason: to.Ptr(armresiliencemanagement.RecoveryPlanExclusionReasonExcludedFromRecoveryPlan),
		// 					ForceInclusionState: to.Ptr(armresiliencemanagement.ForceInclusionAndUpdateEnable),
		// 					AdvisorRecommendationTypeID: to.Ptr("iydcsfy"),
		// 					ActiveLocations: []*string{
		// 						to.Ptr("eastus-zone2"),
		// 					},
		// 					RecoveryLocations: []*string{
		// 						to.Ptr("eastus-zone3"),
		// 					},
		// 					ActivePhysicalZones: []*string{
		// 						to.Ptr("eastus-az3"),
		// 					},
		// 					RecoveryPhysicalZones: []*string{
		// 						to.Ptr("eastus-az2"),
		// 					},
		// 					MonitoringRbacAssignmentError: &armresiliencemanagement.ErrorDetails{
		// 						Code: to.Ptr("14123903"),
		// 						Message: to.Ptr("Unable to assign Monitoring RBAC on target resource."),
		// 					},
		// 				},
		// 				ID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName/providers/Microsoft.AzureResilienceManagement/drills/drill1/drillResources/a3d5571f-7b5a-4de4-a0fd-77bd06601af5"),
		// 				Name: to.Ptr("a3d5571f-7b5a-4de4-a0fd-77bd06601af5"),
		// 				Type: to.Ptr("Microsoft.AzureResilienceManagement/drillResources"),
		// 				SystemData: &armresiliencemanagement.SystemData{
		// 					CreatedBy: to.Ptr("dvnfxbuyqhvivfjddjccdtlwajfht"),
		// 					CreatedByType: to.Ptr(armresiliencemanagement.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-06T15:03:42.796Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("lndhhaimomorael"),
		// 					LastModifiedByType: to.Ptr(armresiliencemanagement.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-06T15:03:42.797Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
