// 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 armhardwaresecuritymodules_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/hardwaresecuritymodules/armhardwaresecuritymodules/v2"
	"log"
)

// Generated from example definition: 2025-03-31/DedicatedHsm_CreateOrUpdate.json
func ExampleDedicatedHsmClient_BeginCreateOrUpdate_createANewOrUpdateAnExistingDedicatedHsm() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDedicatedHsmClient().BeginCreateOrUpdate(ctx, "hsm-group", "hsm1", armhardwaresecuritymodules.DedicatedHsm{
		Location: to.Ptr("westus"),
		Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
			NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
					{
						PrivateIPAddress: to.Ptr("1.0.0.1"),
					},
				},
				Subnet: &armhardwaresecuritymodules.APIEntityReference{
					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
				},
			},
			StampID: to.Ptr("stamp01"),
		},
		SKU: &armhardwaresecuritymodules.SKU{
			Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
		},
		Tags: map[string]*string{
			"Dept":        to.Ptr("hsm"),
			"Environment": to.Ptr("dogfood"),
		},
	}, 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 = armhardwaresecuritymodules.DedicatedHsmClientCreateOrUpdateResponse{
	// 	DedicatedHsm: &armhardwaresecuritymodules.DedicatedHsm{
	// 		Name: to.Ptr("hsm1"),
	// 		Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 			NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 					{
	// 						PrivateIPAddress: to.Ptr("1.0.0.1"),
	// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
	// 					},
	// 				},
	// 				Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 			StampID: to.Ptr("stamp01"),
	// 			StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 		},
	// 		SKU: &armhardwaresecuritymodules.SKU{
	// 			Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
	// 		},
	// 		Tags: map[string]*string{
	// 			"Dept": to.Ptr("hsm"),
	// 			"Environment": to.Ptr("dogfood"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-03-31/PaymentHsm_CreateOrUpdate.json
func ExampleDedicatedHsmClient_BeginCreateOrUpdate_createANewOrUpdateAnExistingPaymentHsm() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDedicatedHsmClient().BeginCreateOrUpdate(ctx, "hsm-group", "hsm1", armhardwaresecuritymodules.DedicatedHsm{
		Location: to.Ptr("westus"),
		Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
			NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
					{
						PrivateIPAddress: to.Ptr("1.0.0.1"),
					},
				},
				Subnet: &armhardwaresecuritymodules.APIEntityReference{
					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
				},
			},
			StampID: to.Ptr("stamp01"),
		},
		SKU: &armhardwaresecuritymodules.SKU{
			Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
		},
		Tags: map[string]*string{
			"Dept":        to.Ptr("hsm"),
			"Environment": to.Ptr("dogfood"),
		},
	}, 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 = armhardwaresecuritymodules.DedicatedHsmClientCreateOrUpdateResponse{
	// 	DedicatedHsm: &armhardwaresecuritymodules.DedicatedHsm{
	// 		Name: to.Ptr("hsm1"),
	// 		Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 			ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 					{
	// 						PrivateIPAddress: to.Ptr("1.0.0.2"),
	// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMMgmtNic"),
	// 					},
	// 				},
	// 				Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 				},
	// 			},
	// 			NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 					{
	// 						PrivateIPAddress: to.Ptr("1.0.0.1"),
	// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
	// 					},
	// 				},
	// 				Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 			StampID: to.Ptr("stamp01"),
	// 			StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 		},
	// 		SKU: &armhardwaresecuritymodules.SKU{
	// 			Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
	// 		},
	// 		SystemData: &armhardwaresecuritymodules.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
	// 			CreatedBy: to.Ptr("user1"),
	// 			CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("user2"),
	// 			LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 		},
	// 		Tags: map[string]*string{
	// 			"Dept": to.Ptr("hsm"),
	// 			"Environment": to.Ptr("dogfood"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-03-31/PaymentHsm_CreateOrUpdate_WithManagementProfile.json
func ExampleDedicatedHsmClient_BeginCreateOrUpdate_createANewOrUpdateAnExistingPaymentHsmWithManagementProfile() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDedicatedHsmClient().BeginCreateOrUpdate(ctx, "hsm-group", "hsm1", armhardwaresecuritymodules.DedicatedHsm{
		Location: to.Ptr("westus"),
		Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
			ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
					{
						PrivateIPAddress: to.Ptr("1.0.0.2"),
					},
				},
				Subnet: &armhardwaresecuritymodules.APIEntityReference{
					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
				},
			},
			NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
					{
						PrivateIPAddress: to.Ptr("1.0.0.1"),
					},
				},
				Subnet: &armhardwaresecuritymodules.APIEntityReference{
					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
				},
			},
			StampID: to.Ptr("stamp01"),
		},
		SKU: &armhardwaresecuritymodules.SKU{
			Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
		},
		Tags: map[string]*string{
			"Dept":        to.Ptr("hsm"),
			"Environment": to.Ptr("dogfood"),
		},
	}, 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 = armhardwaresecuritymodules.DedicatedHsmClientCreateOrUpdateResponse{
	// 	DedicatedHsm: &armhardwaresecuritymodules.DedicatedHsm{
	// 		Name: to.Ptr("hsm1"),
	// 		Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 			ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 					{
	// 						PrivateIPAddress: to.Ptr("1.0.0.2"),
	// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMMgmtNic"),
	// 					},
	// 				},
	// 				Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 				},
	// 			},
	// 			NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 					{
	// 						PrivateIPAddress: to.Ptr("1.0.0.1"),
	// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
	// 					},
	// 				},
	// 				Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 			StampID: to.Ptr("stamp01"),
	// 			StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 		},
	// 		SKU: &armhardwaresecuritymodules.SKU{
	// 			Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
	// 		},
	// 		SystemData: &armhardwaresecuritymodules.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
	// 			CreatedBy: to.Ptr("user1"),
	// 			CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("user2"),
	// 			LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 		},
	// 		Tags: map[string]*string{
	// 			"Dept": to.Ptr("hsm"),
	// 			"Environment": to.Ptr("dogfood"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-03-31/DedicatedHsm_Delete.json
func ExampleDedicatedHsmClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDedicatedHsmClient().BeginDelete(ctx, "hsm-group", "hsm1", 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-03-31/DedicatedHsm_Get.json
func ExampleDedicatedHsmClient_Get_getADedicatedHsm() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDedicatedHsmClient().Get(ctx, "hsm-group", "hsm1", 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 = armhardwaresecuritymodules.DedicatedHsmClientGetResponse{
	// 	DedicatedHsm: &armhardwaresecuritymodules.DedicatedHsm{
	// 		Name: to.Ptr("hsm1"),
	// 		Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 			NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 					{
	// 						PrivateIPAddress: to.Ptr("1.0.0.1"),
	// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
	// 					},
	// 				},
	// 				Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 			StampID: to.Ptr("stamp01"),
	// 			StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 		},
	// 		SKU: &armhardwaresecuritymodules.SKU{
	// 			Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
	// 		},
	// 		Tags: map[string]*string{
	// 			"Dept": to.Ptr("hsm"),
	// 			"Environment": to.Ptr("dogfood"),
	// 			"Slice": to.Ptr("A"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-03-31/PaymentHsm_Get.json
func ExampleDedicatedHsmClient_Get_getAPaymentHsm() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDedicatedHsmClient().Get(ctx, "hsm-group", "hsm1", 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 = armhardwaresecuritymodules.DedicatedHsmClientGetResponse{
	// 	DedicatedHsm: &armhardwaresecuritymodules.DedicatedHsm{
	// 		Name: to.Ptr("hsm1"),
	// 		Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 			ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 					{
	// 						PrivateIPAddress: to.Ptr("1.0.0.2"),
	// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMMgmtNic"),
	// 					},
	// 				},
	// 				Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 				},
	// 			},
	// 			NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 					{
	// 						PrivateIPAddress: to.Ptr("1.0.0.1"),
	// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
	// 					},
	// 				},
	// 				Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 			StampID: to.Ptr("stamp01"),
	// 			StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 		},
	// 		SKU: &armhardwaresecuritymodules.SKU{
	// 			Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
	// 		},
	// 		SystemData: &armhardwaresecuritymodules.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
	// 			CreatedBy: to.Ptr("user1"),
	// 			CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("user2"),
	// 			LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 		},
	// 		Tags: map[string]*string{
	// 			"Dept": to.Ptr("hsm"),
	// 			"Environment": to.Ptr("dogfood"),
	// 			"Slice": to.Ptr("A"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-03-31/PaymentHsm_Get_With_2018-10-31Preview_Version.json
func ExampleDedicatedHsmClient_Get_getAPaymentHsmWith20181031PreviewApiVersion() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDedicatedHsmClient().Get(ctx, "hsm-group", "hsm1", 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 = armhardwaresecuritymodules.DedicatedHsmClientGetResponse{
	// 	DedicatedHsm: &armhardwaresecuritymodules.DedicatedHsm{
	// 		Name: to.Ptr("hsm1"),
	// 		Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 			NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 					{
	// 						PrivateIPAddress: to.Ptr("1.0.0.1"),
	// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
	// 					},
	// 				},
	// 				Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 			StampID: to.Ptr("stamp01"),
	// 			StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 		},
	// 		SKU: &armhardwaresecuritymodules.SKU{
	// 			Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
	// 		},
	// 		Tags: map[string]*string{
	// 			"Dept": to.Ptr("hsm"),
	// 			"Environment": to.Ptr("dogfood"),
	// 			"Slice": to.Ptr("A"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-03-31/DedicatedHsm_ListByResourceGroup.json
func ExampleDedicatedHsmClient_NewListByResourceGroupPager_listDedicatedHsmDevicesInAResourceGroup() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDedicatedHsmClient().NewListByResourceGroupPager("hsm-group", 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 = armhardwaresecuritymodules.DedicatedHsmClientListByResourceGroupResponse{
		// 	DedicatedHsmListResult: armhardwaresecuritymodules.DedicatedHsmListResult{
		// 		NextLink: to.Ptr("https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs?api-version=2018-10-31-preview&$skiptoken=dmF1bHQtcGVza3ktanVyeS03MzA3Ng=="),
		// 		Value: []*armhardwaresecuritymodules.DedicatedHsm{
		// 			{
		// 				Name: to.Ptr("hsm1"),
		// 				Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
		// 					NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
		// 						NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
		// 							{
		// 								PrivateIPAddress: to.Ptr("1.0.0.1"),
		// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
		// 							},
		// 						},
		// 						Subnet: &armhardwaresecuritymodules.APIEntityReference{
		// 							ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
		// 					StampID: to.Ptr("stamp01"),
		// 					StatusMessage: to.Ptr("DedicatedHsm device is functional."),
		// 				},
		// 				SKU: &armhardwaresecuritymodules.SKU{
		// 					Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
		// 				},
		// 				Tags: map[string]*string{
		// 					"Dept": to.Ptr("hsm"),
		// 					"Environment": to.Ptr("dogfood"),
		// 					"Slice": to.Ptr("A"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("hsm1"),
		// 				Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm2"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
		// 					NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
		// 						NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
		// 							{
		// 								PrivateIPAddress: to.Ptr("1.0.0.2"),
		// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
		// 							},
		// 						},
		// 						Subnet: &armhardwaresecuritymodules.APIEntityReference{
		// 							ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
		// 					StampID: to.Ptr("stamp01"),
		// 					StatusMessage: to.Ptr("DedicatedHsm device is functional."),
		// 				},
		// 				SKU: &armhardwaresecuritymodules.SKU{
		// 					Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
		// 				},
		// 				Tags: map[string]*string{
		// 					"Dept": to.Ptr("hsm"),
		// 					"Environment": to.Ptr("dogfood"),
		// 					"Slice": to.Ptr("B"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-03-31/PaymentHsm_ListByResourceGroup.json
func ExampleDedicatedHsmClient_NewListByResourceGroupPager_listDedicatedHsmDevicesInAResourceGroupIncludingPaymentHsm() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDedicatedHsmClient().NewListByResourceGroupPager("hsm-group", 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 = armhardwaresecuritymodules.DedicatedHsmClientListByResourceGroupResponse{
		// 	DedicatedHsmListResult: armhardwaresecuritymodules.DedicatedHsmListResult{
		// 		NextLink: to.Ptr("https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs?api-version=2021-11-30&$skiptoken=dmF1bHQtcGVza3ktanVyeS03MzA3Ng=="),
		// 		Value: []*armhardwaresecuritymodules.DedicatedHsm{
		// 			{
		// 				Name: to.Ptr("hsm1"),
		// 				Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
		// 					ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
		// 						NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
		// 							{
		// 								PrivateIPAddress: to.Ptr("1.0.0.2"),
		// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMMgmtNic"),
		// 							},
		// 						},
		// 						Subnet: &armhardwaresecuritymodules.APIEntityReference{
		// 							ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
		// 						},
		// 					},
		// 					NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
		// 						NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
		// 							{
		// 								PrivateIPAddress: to.Ptr("1.0.0.1"),
		// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
		// 							},
		// 						},
		// 						Subnet: &armhardwaresecuritymodules.APIEntityReference{
		// 							ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
		// 					StampID: to.Ptr("stamp01"),
		// 					StatusMessage: to.Ptr("DedicatedHsm device is functional."),
		// 				},
		// 				SKU: &armhardwaresecuritymodules.SKU{
		// 					Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
		// 				},
		// 				SystemData: &armhardwaresecuritymodules.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
		// 					CreatedBy: to.Ptr("user1"),
		// 					CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("user2"),
		// 					LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
		// 				},
		// 				Tags: map[string]*string{
		// 					"Dept": to.Ptr("hsm"),
		// 					"Environment": to.Ptr("dogfood"),
		// 					"Slice": to.Ptr("A"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("hsm2"),
		// 				Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm2"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
		// 					ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
		// 						NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
		// 							{
		// 								PrivateIPAddress: to.Ptr("1.0.0.4"),
		// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm2_HSMMgmtNic"),
		// 							},
		// 						},
		// 						Subnet: &armhardwaresecuritymodules.APIEntityReference{
		// 							ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
		// 						},
		// 					},
		// 					NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
		// 						NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
		// 							{
		// 								PrivateIPAddress: to.Ptr("1.0.0.3"),
		// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm2_HSMHost1Nic"),
		// 							},
		// 						},
		// 						Subnet: &armhardwaresecuritymodules.APIEntityReference{
		// 							ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
		// 					StampID: to.Ptr("stamp01"),
		// 					StatusMessage: to.Ptr("DedicatedHsm device is functional."),
		// 				},
		// 				SKU: &armhardwaresecuritymodules.SKU{
		// 					Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
		// 				},
		// 				SystemData: &armhardwaresecuritymodules.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
		// 					CreatedBy: to.Ptr("user1"),
		// 					CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("user2"),
		// 					LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
		// 				},
		// 				Tags: map[string]*string{
		// 					"Dept": to.Ptr("hsm"),
		// 					"Environment": to.Ptr("dogfood"),
		// 					"Slice": to.Ptr("B"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-03-31/DedicatedHsm_ListBySubscription.json
func ExampleDedicatedHsmClient_NewListBySubscriptionPager_listDedicatedHsmDevicesInASubscription() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDedicatedHsmClient().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 = armhardwaresecuritymodules.DedicatedHsmClientListBySubscriptionResponse{
		// 	DedicatedHsmListResult: armhardwaresecuritymodules.DedicatedHsmListResult{
		// 		NextLink: to.Ptr("https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs?api-version=2018-10-31-preview&$skiptoken=dmF1bHQtcGVza3ktanVyeS03MzA3Ng=="),
		// 		Value: []*armhardwaresecuritymodules.DedicatedHsm{
		// 			{
		// 				Name: to.Ptr("hsm1"),
		// 				Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
		// 					NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
		// 						NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
		// 							{
		// 								PrivateIPAddress: to.Ptr("1.0.0.1"),
		// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
		// 							},
		// 						},
		// 						Subnet: &armhardwaresecuritymodules.APIEntityReference{
		// 							ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
		// 					StampID: to.Ptr("stamp01"),
		// 					StatusMessage: to.Ptr("DedicatedHsm device is functional."),
		// 				},
		// 				SKU: &armhardwaresecuritymodules.SKU{
		// 					Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
		// 				},
		// 				Tags: map[string]*string{
		// 					"Dept": to.Ptr("hsm"),
		// 					"Environment": to.Ptr("dogfood"),
		// 					"Slice": to.Ptr("A"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("hsm1"),
		// 				Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm2"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
		// 					NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
		// 						NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
		// 							{
		// 								PrivateIPAddress: to.Ptr("1.0.0.2"),
		// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
		// 							},
		// 						},
		// 						Subnet: &armhardwaresecuritymodules.APIEntityReference{
		// 							ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
		// 					StampID: to.Ptr("stamp01"),
		// 					StatusMessage: to.Ptr("DedicatedHsm device is functional."),
		// 				},
		// 				SKU: &armhardwaresecuritymodules.SKU{
		// 					Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
		// 				},
		// 				Tags: map[string]*string{
		// 					"Dept": to.Ptr("hsm"),
		// 					"Environment": to.Ptr("dogfood"),
		// 					"Slice": to.Ptr("B"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-03-31/PaymentHsm_ListBySubscription.json
func ExampleDedicatedHsmClient_NewListBySubscriptionPager_listDedicatedHsmDevicesInASubscriptionIncludingPaymentHsm() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDedicatedHsmClient().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 = armhardwaresecuritymodules.DedicatedHsmClientListBySubscriptionResponse{
		// 	DedicatedHsmListResult: armhardwaresecuritymodules.DedicatedHsmListResult{
		// 		NextLink: to.Ptr("https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs?api-version=2021-11-30&$skiptoken=dmF1bHQtcGVza3ktanVyeS03MzA3Ng=="),
		// 		Value: []*armhardwaresecuritymodules.DedicatedHsm{
		// 			{
		// 				Name: to.Ptr("hsm1"),
		// 				Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
		// 					ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
		// 						NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
		// 							{
		// 								PrivateIPAddress: to.Ptr("1.0.0.2"),
		// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMMgmtNic"),
		// 							},
		// 						},
		// 						Subnet: &armhardwaresecuritymodules.APIEntityReference{
		// 							ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
		// 						},
		// 					},
		// 					NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
		// 						NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
		// 							{
		// 								PrivateIPAddress: to.Ptr("1.0.0.1"),
		// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
		// 							},
		// 						},
		// 						Subnet: &armhardwaresecuritymodules.APIEntityReference{
		// 							ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
		// 					StampID: to.Ptr("stamp01"),
		// 					StatusMessage: to.Ptr("DedicatedHsm device is functional."),
		// 				},
		// 				SKU: &armhardwaresecuritymodules.SKU{
		// 					Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
		// 				},
		// 				SystemData: &armhardwaresecuritymodules.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
		// 					CreatedBy: to.Ptr("user1"),
		// 					CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("user2"),
		// 					LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
		// 				},
		// 				Tags: map[string]*string{
		// 					"Dept": to.Ptr("hsm1"),
		// 					"Environment": to.Ptr("dogfood"),
		// 					"Slice": to.Ptr("A"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("hsm2"),
		// 				Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm2"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
		// 					ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
		// 						NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
		// 							{
		// 								PrivateIPAddress: to.Ptr("1.0.0.4"),
		// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm2_HSMMgmtNic"),
		// 							},
		// 						},
		// 						Subnet: &armhardwaresecuritymodules.APIEntityReference{
		// 							ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
		// 						},
		// 					},
		// 					NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
		// 						NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
		// 							{
		// 								PrivateIPAddress: to.Ptr("1.0.0.3"),
		// 								ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm2_HSMHost1Nic"),
		// 							},
		// 						},
		// 						Subnet: &armhardwaresecuritymodules.APIEntityReference{
		// 							ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
		// 					StampID: to.Ptr("stamp01"),
		// 					StatusMessage: to.Ptr("DedicatedHsm device is functional."),
		// 				},
		// 				SKU: &armhardwaresecuritymodules.SKU{
		// 					Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
		// 				},
		// 				SystemData: &armhardwaresecuritymodules.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
		// 					CreatedBy: to.Ptr("user1"),
		// 					CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("user2"),
		// 					LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
		// 				},
		// 				Tags: map[string]*string{
		// 					"Dept": to.Ptr("hsm"),
		// 					"Environment": to.Ptr("dogfood"),
		// 					"Slice": to.Ptr("B"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-03-31/GetOutboundNetworkDependenciesEndpointsList.json
func ExampleDedicatedHsmClient_NewListOutboundNetworkDependenciesEndpointsPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDedicatedHsmClient().NewListOutboundNetworkDependenciesEndpointsPager("hsm-group", "hsm1", 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 = armhardwaresecuritymodules.DedicatedHsmClientListOutboundNetworkDependenciesEndpointsResponse{
		// 	OutboundEnvironmentEndpointCollection: armhardwaresecuritymodules.OutboundEnvironmentEndpointCollection{
		// 		Value: []*armhardwaresecuritymodules.OutboundEnvironmentEndpoint{
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-03-31/DedicatedHsm_Update.json
func ExampleDedicatedHsmClient_BeginUpdate_updateAnExistingDedicatedHsm() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDedicatedHsmClient().BeginUpdate(ctx, "hsm-group", "hsm1", armhardwaresecuritymodules.DedicatedHsmPatchParameters{
		Tags: map[string]*string{
			"Dept":        to.Ptr("hsm"),
			"Environment": to.Ptr("dogfood"),
			"Slice":       to.Ptr("A"),
		},
	}, 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 = armhardwaresecuritymodules.DedicatedHsmClientUpdateResponse{
	// 	DedicatedHsm: &armhardwaresecuritymodules.DedicatedHsm{
	// 		Name: to.Ptr("hsm1"),
	// 		Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 			NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 					{
	// 						PrivateIPAddress: to.Ptr("1.0.0.1"),
	// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
	// 					},
	// 				},
	// 				Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 			StampID: to.Ptr("stamp01"),
	// 			StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 		},
	// 		SKU: &armhardwaresecuritymodules.SKU{
	// 			Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
	// 		},
	// 		Tags: map[string]*string{
	// 			"Dept": to.Ptr("hsm"),
	// 			"Environment": to.Ptr("dogfood"),
	// 			"Slice": to.Ptr("A"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-03-31/PaymentHsm_Update.json
func ExampleDedicatedHsmClient_BeginUpdate_updateAnExistingPaymentHsm() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhardwaresecuritymodules.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDedicatedHsmClient().BeginUpdate(ctx, "hsm-group", "hsm1", armhardwaresecuritymodules.DedicatedHsmPatchParameters{
		Tags: map[string]*string{
			"Dept":        to.Ptr("hsm"),
			"Environment": to.Ptr("dogfood"),
			"Slice":       to.Ptr("A"),
		},
	}, 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 = armhardwaresecuritymodules.DedicatedHsmClientUpdateResponse{
	// 	DedicatedHsm: &armhardwaresecuritymodules.DedicatedHsm{
	// 		Name: to.Ptr("hsm1"),
	// 		Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 			ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 					{
	// 						PrivateIPAddress: to.Ptr("1.0.0.2"),
	// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMMgmtNic"),
	// 					},
	// 				},
	// 				Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 				},
	// 			},
	// 			NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 				NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 					{
	// 						PrivateIPAddress: to.Ptr("1.0.0.1"),
	// 						ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
	// 					},
	// 				},
	// 				Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 					ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 			StampID: to.Ptr("stamp01"),
	// 			StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 		},
	// 		SKU: &armhardwaresecuritymodules.SKU{
	// 			Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
	// 		},
	// 		SystemData: &armhardwaresecuritymodules.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
	// 			CreatedBy: to.Ptr("user1"),
	// 			CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.0000000Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("user2"),
	// 			LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 		},
	// 		Tags: map[string]*string{
	// 			"Dept": to.Ptr("hsm"),
	// 			"Environment": to.Ptr("dogfood"),
	// 			"Slice": to.Ptr("A"),
	// 		},
	// 	},
	// }
}
