// 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 armazurestackhcivm_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/azurestackhci/armazurestackhcivm"
	"log"
)

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Gallery_Image.json
func ExampleVirtualMachineInstancesClient_BeginCreateOrUpdate_putVirtualMachineInstanceWithGalleryImage() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", armazurestackhcivm.VirtualMachineInstance{
		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
		},
		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
			},
			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
					{
						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
					},
				},
			},
			OSProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfile{
				AdminPassword: to.Ptr("password"),
				AdminUsername: to.Ptr("localadmin"),
				ComputerName:  to.Ptr("luamaster"),
			},
			SecurityProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfile{
				EnableTPM: to.Ptr(true),
				UefiSettings: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{
					SecureBootEnabled: to.Ptr(true),
				},
			},
			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
				ImageReference: &armazurestackhcivm.ImageArmReference{
					ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"),
				},
				VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
			},
		},
	}, 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 poll 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 = armazurestackhcivm.VirtualMachineInstancesClientCreateOrUpdateResponse{
	// 	VirtualMachineInstance: armazurestackhcivm.VirtualMachineInstance{
	// 		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
	// 			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
	// 			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"),
	// 		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
	// 			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
	// 				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
	// 			},
	// 			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
	// 				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
	// 					},
	// 				},
	// 			},
	// 			OSProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfile{
	// 				AdminUsername: to.Ptr("localadmin"),
	// 				ComputerName: to.Ptr("luamaster"),
	// 			},
	// 			ProvisioningState: to.Ptr(armazurestackhcivm.ProvisioningStateEnumAccepted),
	// 			SecurityProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfile{
	// 				EnableTPM: to.Ptr(true),
	// 				UefiSettings: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{
	// 					SecureBootEnabled: to.Ptr(true),
	// 				},
	// 			},
	// 			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
	// 				ImageReference: &armazurestackhcivm.ImageArmReference{
	// 					ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"),
	// 				},
	// 				VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Gpu.json
func ExampleVirtualMachineInstancesClient_BeginCreateOrUpdate_putVirtualMachineInstanceWithGpu() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", armazurestackhcivm.VirtualMachineInstance{
		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
		},
		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
				VirtualMachineGPUs: []*armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU{
					{
						AssignmentType:  to.Ptr(armazurestackhcivm.GpuAssignmentTypeEnumGpuDDA),
						PartitionSizeMB: to.Ptr[int64](0),
					},
				},
			},
			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
					{
						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
					},
				},
			},
			OSProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfile{
				AdminPassword: to.Ptr("password"),
				AdminUsername: to.Ptr("localadmin"),
				ComputerName:  to.Ptr("luamaster"),
			},
			SecurityProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfile{
				EnableTPM: to.Ptr(true),
				UefiSettings: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{
					SecureBootEnabled: to.Ptr(true),
				},
			},
			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
				ImageReference: &armazurestackhcivm.ImageArmReference{
					ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"),
				},
				VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
			},
		},
	}, 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 poll 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 = armazurestackhcivm.VirtualMachineInstancesClientCreateOrUpdateResponse{
	// 	VirtualMachineInstance: armazurestackhcivm.VirtualMachineInstance{
	// 		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
	// 			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
	// 			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"),
	// 		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
	// 			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
	// 				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
	// 				VirtualMachineGPUs: []*armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfileVirtualMachineGPU{
	// 					{
	// 						AssignmentType: to.Ptr(armazurestackhcivm.GpuAssignmentTypeEnumGpuDDA),
	// 						PartitionSizeMB: to.Ptr[int64](0),
	// 					},
	// 				},
	// 			},
	// 			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
	// 				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
	// 					},
	// 				},
	// 			},
	// 			OSProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfile{
	// 				AdminUsername: to.Ptr("localadmin"),
	// 				ComputerName: to.Ptr("luamaster"),
	// 			},
	// 			ProvisioningState: to.Ptr(armazurestackhcivm.ProvisioningStateEnumAccepted),
	// 			SecurityProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfile{
	// 				EnableTPM: to.Ptr(true),
	// 				UefiSettings: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{
	// 					SecureBootEnabled: to.Ptr(true),
	// 				},
	// 			},
	// 			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
	// 				ImageReference: &armazurestackhcivm.ImageArmReference{
	// 					ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"),
	// 				},
	// 				VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Marketplace_Gallery_Image.json
func ExampleVirtualMachineInstancesClient_BeginCreateOrUpdate_putVirtualMachineInstanceWithMarketplaceGalleryImage() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", armazurestackhcivm.VirtualMachineInstance{
		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
		},
		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
			},
			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
					{
						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
					},
				},
			},
			OSProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfile{
				AdminPassword: to.Ptr("password"),
				AdminUsername: to.Ptr("localadmin"),
				ComputerName:  to.Ptr("luamaster"),
			},
			SecurityProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfile{
				EnableTPM: to.Ptr(true),
				UefiSettings: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{
					SecureBootEnabled: to.Ptr(true),
				},
			},
			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
				ImageReference: &armazurestackhcivm.ImageArmReference{
					ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image"),
				},
				VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
			},
		},
	}, 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 poll 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 = armazurestackhcivm.VirtualMachineInstancesClientCreateOrUpdateResponse{
	// 	VirtualMachineInstance: armazurestackhcivm.VirtualMachineInstance{
	// 		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
	// 			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
	// 			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"),
	// 		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
	// 			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
	// 				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
	// 			},
	// 			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
	// 				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
	// 					},
	// 				},
	// 			},
	// 			OSProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfile{
	// 				AdminUsername: to.Ptr("localadmin"),
	// 				ComputerName: to.Ptr("luamaster"),
	// 			},
	// 			ProvisioningState: to.Ptr(armazurestackhcivm.ProvisioningStateEnumAccepted),
	// 			SecurityProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfile{
	// 				EnableTPM: to.Ptr(true),
	// 				UefiSettings: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{
	// 					SecureBootEnabled: to.Ptr(true),
	// 				},
	// 			},
	// 			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
	// 				ImageReference: &armazurestackhcivm.ImageArmReference{
	// 					ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image"),
	// 				},
	// 				VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Os_Disk.json
func ExampleVirtualMachineInstancesClient_BeginCreateOrUpdate_putVirtualMachineInstanceWithOSDisk() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", armazurestackhcivm.VirtualMachineInstance{
		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
		},
		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
			},
			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
					{
						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
					},
				},
			},
			SecurityProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfile{
				EnableTPM: to.Ptr(true),
				UefiSettings: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{
					SecureBootEnabled: to.Ptr(true),
				},
			},
			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
				OSDisk: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfileOsDisk{
					ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"),
				},
				VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
			},
		},
	}, 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 poll 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 = armazurestackhcivm.VirtualMachineInstancesClientCreateOrUpdateResponse{
	// 	VirtualMachineInstance: armazurestackhcivm.VirtualMachineInstance{
	// 		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
	// 			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
	// 			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"),
	// 		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
	// 			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
	// 				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
	// 			},
	// 			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
	// 				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
	// 					},
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armazurestackhcivm.ProvisioningStateEnumAccepted),
	// 			SecurityProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfile{
	// 				EnableTPM: to.Ptr(true),
	// 				UefiSettings: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{
	// 					SecureBootEnabled: to.Ptr(true),
	// 				},
	// 			},
	// 			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
	// 				OSDisk: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfileOsDisk{
	// 					ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"),
	// 				},
	// 				VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_CreateOrUpdate_Put_Virtual_Machine_Instance_With_Vm_Config_Agent.json
func ExampleVirtualMachineInstancesClient_BeginCreateOrUpdate_putVirtualMachineInstanceWithVMConfigAgent() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", armazurestackhcivm.VirtualMachineInstance{
		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
		},
		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
			},
			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
					{
						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
					},
				},
			},
			OSProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfile{
				AdminPassword: to.Ptr("password"),
				AdminUsername: to.Ptr("localadmin"),
				ComputerName:  to.Ptr("luamaster"),
				WindowsConfiguration: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfileWindowsConfiguration{
					ProvisionVMConfigAgent: to.Ptr(true),
				},
			},
			SecurityProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfile{
				EnableTPM: to.Ptr(true),
				UefiSettings: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{
					SecureBootEnabled: to.Ptr(true),
				},
			},
			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
				ImageReference: &armazurestackhcivm.ImageArmReference{
					ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"),
				},
				VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
			},
		},
	}, 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 poll 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 = armazurestackhcivm.VirtualMachineInstancesClientCreateOrUpdateResponse{
	// 	VirtualMachineInstance: armazurestackhcivm.VirtualMachineInstance{
	// 		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
	// 			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
	// 			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"),
	// 		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
	// 			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
	// 				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
	// 			},
	// 			InstanceView: &armazurestackhcivm.VirtualMachineInstanceView{
	// 				VMAgent: &armazurestackhcivm.VirtualMachineConfigAgentInstanceView{
	// 					Statuses: []*armazurestackhcivm.InstanceViewStatus{
	// 						{
	// 							Code: to.Ptr("Ok"),
	// 							DisplayStatus: to.Ptr("Ok"),
	// 							Level: to.Ptr(armazurestackhcivm.StatusLevelTypesInfo),
	// 							Message: to.Ptr("The agent is healthy"),
	// 							Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2009-06-15T13:45:30"); return t}()),
	// 						},
	// 					},
	// 					VMConfigAgentVersion: to.Ptr("1.0.0"),
	// 				},
	// 			},
	// 			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
	// 				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
	// 					},
	// 				},
	// 			},
	// 			OSProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfile{
	// 				AdminUsername: to.Ptr("localadmin"),
	// 				ComputerName: to.Ptr("luamaster"),
	// 			},
	// 			ProvisioningState: to.Ptr(armazurestackhcivm.ProvisioningStateEnumAccepted),
	// 			SecurityProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfile{
	// 				EnableTPM: to.Ptr(true),
	// 				UefiSettings: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{
	// 					SecureBootEnabled: to.Ptr(true),
	// 				},
	// 			},
	// 			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
	// 				ImageReference: &armazurestackhcivm.ImageArmReference{
	// 					ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"),
	// 				},
	// 				VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances__CreateOrUpdate_CreateFromLocal.json
func ExampleVirtualMachineInstancesClient_BeginCreateOrUpdate_createVirtualMachineInstanceFromLocal() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", armazurestackhcivm.VirtualMachineInstance{
		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
		},
		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
					{
						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
					},
				},
			},
			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
				DataDisks: []*armazurestackhcivm.VirtualHardDiskArmReference{
					{
						ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"),
					},
				},
			},
			CreateFromLocal: to.Ptr(true),
		},
	}, 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 poll 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 = armazurestackhcivm.VirtualMachineInstancesClientCreateOrUpdateResponse{
	// 	VirtualMachineInstance: armazurestackhcivm.VirtualMachineInstance{
	// 		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
	// 			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
	// 			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"),
	// 		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
	// 			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
	// 				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
	// 			},
	// 			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
	// 				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
	// 					},
	// 				},
	// 			},
	// 			OSProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfile{
	// 				AdminUsername: to.Ptr("localadmin"),
	// 				ComputerName: to.Ptr("luamaster"),
	// 			},
	// 			ProvisioningState: to.Ptr(armazurestackhcivm.ProvisioningStateEnumAccepted),
	// 			SecurityProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfile{
	// 				EnableTPM: to.Ptr(true),
	// 				UefiSettings: &armazurestackhcivm.VirtualMachineInstancePropertiesSecurityProfileUefiSettings{
	// 					SecureBootEnabled: to.Ptr(true),
	// 				},
	// 			},
	// 			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
	// 				ImageReference: &armazurestackhcivm.ImageArmReference{
	// 					ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"),
	// 				},
	// 				VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
	// 			},
	// 			CreateFromLocal: to.Ptr(true),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_Delete.json
func ExampleVirtualMachineInstancesClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginDelete(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", 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 poll the result: %v", err)
	}
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_Get.json
func ExampleVirtualMachineInstancesClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVirtualMachineInstancesClient().Get(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", 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 = armazurestackhcivm.VirtualMachineInstancesClientGetResponse{
	// 	VirtualMachineInstance: armazurestackhcivm.VirtualMachineInstance{
	// 		Name: to.Ptr("default"),
	// 		Type: to.Ptr("Microsoft.AzureStackHCI/virtualMachineInstances"),
	// 		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
	// 			Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
	// 			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"),
	// 		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
	// 			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
	// 				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
	// 			},
	// 			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
	// 				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
	// 					},
	// 				},
	// 			},
	// 			OSProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfile{
	// 				AdminUsername: to.Ptr("localadmin"),
	// 				ComputerName: to.Ptr("luamaster"),
	// 			},
	// 			ProvisioningState: to.Ptr(armazurestackhcivm.ProvisioningStateEnumAccepted),
	// 			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
	// 				ImageReference: &armazurestackhcivm.ImageArmReference{
	// 					ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"),
	// 				},
	// 				VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_List.json
func ExampleVirtualMachineInstancesClient_NewListPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVirtualMachineInstancesClient().NewListPager("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", 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 = armazurestackhcivm.VirtualMachineInstancesClientListResponse{
		// 	VirtualMachineInstanceListResult: armazurestackhcivm.VirtualMachineInstanceListResult{
		// 		Value: []*armazurestackhcivm.VirtualMachineInstance{
		// 			{
		// 				Name: to.Ptr("default"),
		// 				Type: to.Ptr("Microsoft.AzureStackHCI/virtualMachineInstances"),
		// 				ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
		// 					Name: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
		// 					Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
		// 				},
		// 				ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"),
		// 				Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
		// 					HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
		// 						VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
		// 					},
		// 					NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
		// 						NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
		// 							{
		// 								ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
		// 							},
		// 						},
		// 					},
		// 					OSProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfile{
		// 						AdminUsername: to.Ptr("localadmin"),
		// 						ComputerName: to.Ptr("luamaster"),
		// 					},
		// 					ProvisioningState: to.Ptr(armazurestackhcivm.ProvisioningStateEnumAccepted),
		// 					StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
		// 						ImageReference: &armazurestackhcivm.ImageArmReference{
		// 							ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"),
		// 						},
		// 						VMConfigStoragePathID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
		// 					},
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_Pause.json
func ExampleVirtualMachineInstancesClient_BeginPause() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginPause(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", 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 poll the result: %v", err)
	}
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_Restart.json
func ExampleVirtualMachineInstancesClient_BeginRestart() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginRestart(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", 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 poll the result: %v", err)
	}
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_Save.json
func ExampleVirtualMachineInstancesClient_BeginSave() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginSave(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", 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 poll the result: %v", err)
	}
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_Start.json
func ExampleVirtualMachineInstancesClient_BeginStart() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginStart(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", 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 poll the result: %v", err)
	}
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_Stop.json
func ExampleVirtualMachineInstancesClient_BeginStop() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginStop(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default", 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 poll the result: %v", err)
	}
}

// Generated from example definition: 2025-06-01-preview/VirtualMachineInstances_Update.json
func ExampleVirtualMachineInstancesClient_BeginUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armazurestackhcivm.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualMachineInstancesClient().BeginUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", armazurestackhcivm.VirtualMachineInstanceUpdateRequest{
		Properties: &armazurestackhcivm.VirtualMachineInstanceUpdateProperties{
			StorageProfile: &armazurestackhcivm.StorageProfileUpdate{
				DataDisks: []*armazurestackhcivm.VirtualHardDiskArmReference{
					{
						ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"),
					},
				},
			},
		},
	}, 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 poll 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 = armazurestackhcivm.VirtualMachineInstancesClientUpdateResponse{
	// 	VirtualMachineInstance: armazurestackhcivm.VirtualMachineInstance{
	// 		Name: to.Ptr("default"),
	// 		Type: to.Ptr("Microsoft.AzureStackHCI/virtualMachineInstances"),
	// 		ExtendedLocation: &armazurestackhcivm.ExtendedLocation{
	// 			Name: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
	// 			Type: to.Ptr(armazurestackhcivm.ExtendedLocationTypesCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default"),
	// 		Properties: &armazurestackhcivm.VirtualMachineInstanceProperties{
	// 			HardwareProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesHardwareProfile{
	// 				VMSize: to.Ptr(armazurestackhcivm.VMSizeEnumDefault),
	// 			},
	// 			NetworkProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesNetworkProfile{
	// 				NetworkInterfaces: []*armazurestackhcivm.NetworkInterfaceArmReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/networkInterfaces/test-nic"),
	// 					},
	// 				},
	// 			},
	// 			OSProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesOsProfile{
	// 				AdminUsername: to.Ptr("localadmin"),
	// 				ComputerName: to.Ptr("luamaster"),
	// 			},
	// 			ProvisioningState: to.Ptr(armazurestackhcivm.ProvisioningStateEnumAccepted),
	// 			StorageProfile: &armazurestackhcivm.VirtualMachineInstancePropertiesStorageProfile{
	// 				DataDisks: []*armazurestackhcivm.VirtualHardDiskArmReference{
	// 					{
	// 						ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"),
	// 					},
	// 				},
	// 				ImageReference: &armazurestackhcivm.ImageArmReference{
	// 					ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"),
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}
