// 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 armcompute_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/compute/armcompute/v8"
	"log"
)

// Generated from example definition: 2026-03-01/capacityReservationExamples/BlockCapacityReservationGroup_CreateOrUpdate.json
func ExampleCapacityReservationGroupsClient_CreateOrUpdate_createOrUpdateABlockCapacityReservationGroup() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacityReservationGroupsClient().CreateOrUpdate(ctx, "myResourceGroup", "blockCapacityReservationGroup", armcompute.CapacityReservationGroup{
		Location: to.Ptr("westus"),
		Tags: map[string]*string{
			"department": to.Ptr("finance"),
		},
		Zones: []*string{
			to.Ptr("1"),
			to.Ptr("2"),
		},
		Properties: &armcompute.CapacityReservationGroupProperties{
			ReservationType: to.Ptr(armcompute.ReservationTypeBlock),
		},
	}, 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 = armcompute.CapacityReservationGroupsClientCreateOrUpdateResponse{
	// 	CapacityReservationGroup: armcompute.CapacityReservationGroup{
	// 		Location: to.Ptr("westus"),
	// 		Tags: map[string]*string{
	// 			"department": to.Ptr("finance"),
	// 			"owner": to.Ptr("myCompany"),
	// 		},
	// 		Name: to.Ptr("blockCapacityReservationGroup"),
	// 		ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/blockCapacityReservationGroup"),
	// 		Zones: []*string{
	// 			to.Ptr("1"),
	// 			to.Ptr("2"),
	// 		},
	// 		Properties: &armcompute.CapacityReservationGroupProperties{
	// 			ReservationType: to.Ptr(armcompute.ReservationTypeBlock),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-03-01/capacityReservationExamples/CapacityReservationGroup_CreateOrUpdate.json
func ExampleCapacityReservationGroupsClient_CreateOrUpdate_createOrUpdateACapacityReservationGroup() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacityReservationGroupsClient().CreateOrUpdate(ctx, "myResourceGroup", "myCapacityReservationGroup", armcompute.CapacityReservationGroup{
		Location: to.Ptr("westus"),
		Tags: map[string]*string{
			"department": to.Ptr("finance"),
		},
		Zones: []*string{
			to.Ptr("1"),
			to.Ptr("2"),
		},
		Properties: &armcompute.CapacityReservationGroupProperties{
			SharingProfile: &armcompute.ResourceSharingProfile{
				SubscriptionIDs: []*armcompute.SubResource{
					{
						ID: to.Ptr("/subscriptions/{subscription-id1}"),
					},
					{
						ID: to.Ptr("/subscriptions/{subscription-id2}"),
					},
				},
			},
		},
	}, 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 = armcompute.CapacityReservationGroupsClientCreateOrUpdateResponse{
	// 	CapacityReservationGroup: armcompute.CapacityReservationGroup{
	// 		Location: to.Ptr("westus"),
	// 		Tags: map[string]*string{
	// 			"department": to.Ptr("finance"),
	// 			"owner": to.Ptr("myCompany"),
	// 		},
	// 		Name: to.Ptr("myCapacityReservationGroup"),
	// 		ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup"),
	// 		Zones: []*string{
	// 			to.Ptr("1"),
	// 			to.Ptr("2"),
	// 		},
	// 		Properties: &armcompute.CapacityReservationGroupProperties{
	// 			SharingProfile: &armcompute.ResourceSharingProfile{
	// 				SubscriptionIDs: []*armcompute.SubResource{
	// 					{
	// 						ID: to.Ptr("/subscriptions/{subscription-id1}"),
	// 					},
	// 					{
	// 						ID: to.Ptr("/subscriptions/{subscription-id2}"),
	// 					},
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-03-01/capacityReservationExamples/TargetedCapacityReservationGroup_CreateOrUpdate.json
func ExampleCapacityReservationGroupsClient_CreateOrUpdate_createOrUpdateATargetedCapacityReservationGroup() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacityReservationGroupsClient().CreateOrUpdate(ctx, "myResourceGroup", "targetedCapacityReservationGroup", armcompute.CapacityReservationGroup{
		Location: to.Ptr("westus"),
		Tags: map[string]*string{
			"department": to.Ptr("finance"),
		},
		Zones: []*string{
			to.Ptr("1"),
			to.Ptr("2"),
		},
		Properties: &armcompute.CapacityReservationGroupProperties{
			SharingProfile: &armcompute.ResourceSharingProfile{
				SubscriptionIDs: []*armcompute.SubResource{
					{
						ID: to.Ptr("/subscriptions/{subscription-id1}"),
					},
					{
						ID: to.Ptr("/subscriptions/{subscription-id2}"),
					},
				},
			},
			ReservationType: to.Ptr(armcompute.ReservationTypeTargeted),
		},
	}, 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 = armcompute.CapacityReservationGroupsClientCreateOrUpdateResponse{
	// 	CapacityReservationGroup: armcompute.CapacityReservationGroup{
	// 		Location: to.Ptr("westus"),
	// 		Tags: map[string]*string{
	// 			"department": to.Ptr("finance"),
	// 			"owner": to.Ptr("myCompany"),
	// 		},
	// 		Name: to.Ptr("targetedCapacityReservationGroup"),
	// 		ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/targetedCapacityReservationGroup"),
	// 		Zones: []*string{
	// 			to.Ptr("1"),
	// 			to.Ptr("2"),
	// 		},
	// 		Properties: &armcompute.CapacityReservationGroupProperties{
	// 			SharingProfile: &armcompute.ResourceSharingProfile{
	// 				SubscriptionIDs: []*armcompute.SubResource{
	// 					{
	// 						ID: to.Ptr("/subscriptions/{subscription-id1}"),
	// 					},
	// 					{
	// 						ID: to.Ptr("/subscriptions/{subscription-id2}"),
	// 					},
	// 				},
	// 			},
	// 			ReservationType: to.Ptr(armcompute.ReservationTypeTargeted),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-03-01/capacityReservationExamples/CapacityReservationGroup_Delete_MaximumSet_Gen.json
func ExampleCapacityReservationGroupsClient_Delete_capacityReservationGroupDeleteMaximumSetGen() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacityReservationGroupsClient().Delete(ctx, "rgcompute", "a", 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 = armcompute.CapacityReservationGroupsClientDeleteResponse{
	// }
}

// Generated from example definition: 2026-03-01/capacityReservationExamples/CapacityReservationGroup_Delete_MinimumSet_Gen.json
func ExampleCapacityReservationGroupsClient_Delete_capacityReservationGroupDeleteMinimumSetGen() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacityReservationGroupsClient().Delete(ctx, "rgcompute", "aaaaaaaaaaaaaaaaaaaaaaaaaa", 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 = armcompute.CapacityReservationGroupsClientDeleteResponse{
	// }
}

// Generated from example definition: 2026-03-01/capacityReservationExamples/BlockCapacityReservationGroup_Get.json
func ExampleCapacityReservationGroupsClient_Get_getABlockCapacityReservationGroup() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscriptionId}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacityReservationGroupsClient().Get(ctx, "myResourceGroup", "blockCapacityReservationGroup", &armcompute.CapacityReservationGroupsClientGetOptions{
		Expand: to.Ptr(armcompute.CapacityReservationGroupInstanceViewTypesInstanceView)})
	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 = armcompute.CapacityReservationGroupsClientGetResponse{
	// 	CapacityReservationGroup: armcompute.CapacityReservationGroup{
	// 		ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/blockCapacityReservationGroup"),
	// 		Properties: &armcompute.CapacityReservationGroupProperties{
	// 			CapacityReservations: []*armcompute.SubResourceReadOnly{
	// 				{
	// 					ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup/capacityReservations/blockCapacityReservation1"),
	// 				},
	// 				{
	// 					ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup/capacityReservations/blockCapacityReservation2"),
	// 				},
	// 			},
	// 			InstanceView: &armcompute.CapacityReservationGroupInstanceView{
	// 				CapacityReservations: []*armcompute.CapacityReservationInstanceViewWithName{
	// 					{
	// 						Name: to.Ptr("blockCapacityReservation1"),
	// 						UtilizationInfo: &armcompute.CapacityReservationUtilization{
	// 							CurrentCapacity: to.Ptr[int32](5),
	// 							VirtualMachinesAllocated: []*armcompute.SubResourceReadOnly{
	// 								{
	// 									ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"),
	// 								},
	// 								{
	// 									ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"),
	// 								},
	// 							},
	// 						},
	// 						Statuses: []*armcompute.InstanceViewStatus{
	// 							{
	// 								Code: to.Ptr("ProvisioningState/succeeded"),
	// 								Level: to.Ptr(armcompute.StatusLevelTypesInfo),
	// 								DisplayStatus: to.Ptr("Provisioning succeeded"),
	// 							},
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("blockCapacityReservation2"),
	// 						UtilizationInfo: &armcompute.CapacityReservationUtilization{
	// 							CurrentCapacity: to.Ptr[int32](5),
	// 							VirtualMachinesAllocated: []*armcompute.SubResourceReadOnly{
	// 								{
	// 									ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"),
	// 								},
	// 								{
	// 									ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM4"),
	// 								},
	// 							},
	// 						},
	// 						Statuses: []*armcompute.InstanceViewStatus{
	// 							{
	// 								Code: to.Ptr("ProvisioningState/succeeded"),
	// 								Level: to.Ptr(armcompute.StatusLevelTypesInfo),
	// 								DisplayStatus: to.Ptr("Provisioning succeeded"),
	// 							},
	// 						},
	// 					},
	// 				},
	// 			},
	// 			ReservationType: to.Ptr(armcompute.ReservationTypeBlock),
	// 		},
	// 		Location: to.Ptr("westus"),
	// 		Tags: map[string]*string{
	// 			"{tagName}": to.Ptr("{tagValue}"),
	// 		},
	// 		Name: to.Ptr("blockCapacityReservationGroup"),
	// 		Zones: []*string{
	// 			to.Ptr("3"),
	// 			to.Ptr("1"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-03-01/capacityReservationExamples/CapacityReservationGroup_Get.json
func ExampleCapacityReservationGroupsClient_Get_getACapacityReservationGroup() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscriptionId}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacityReservationGroupsClient().Get(ctx, "myResourceGroup", "myCapacityReservationGroup", &armcompute.CapacityReservationGroupsClientGetOptions{
		Expand: to.Ptr(armcompute.CapacityReservationGroupInstanceViewTypesInstanceView)})
	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 = armcompute.CapacityReservationGroupsClientGetResponse{
	// 	CapacityReservationGroup: armcompute.CapacityReservationGroup{
	// 		ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup"),
	// 		Properties: &armcompute.CapacityReservationGroupProperties{
	// 			CapacityReservations: []*armcompute.SubResourceReadOnly{
	// 				{
	// 					ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation1"),
	// 				},
	// 				{
	// 					ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation2"),
	// 				},
	// 			},
	// 			SharingProfile: &armcompute.ResourceSharingProfile{
	// 				SubscriptionIDs: []*armcompute.SubResource{
	// 					{
	// 						ID: to.Ptr("/subscriptions/{subscription-id1}"),
	// 					},
	// 					{
	// 						ID: to.Ptr("/subscriptions/{subscription-id2}"),
	// 					},
	// 				},
	// 			},
	// 			InstanceView: &armcompute.CapacityReservationGroupInstanceView{
	// 				CapacityReservations: []*armcompute.CapacityReservationInstanceViewWithName{
	// 					{
	// 						Name: to.Ptr("myCapacityReservation1"),
	// 						UtilizationInfo: &armcompute.CapacityReservationUtilization{
	// 							CurrentCapacity: to.Ptr[int32](5),
	// 							VirtualMachinesAllocated: []*armcompute.SubResourceReadOnly{
	// 								{
	// 									ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"),
	// 								},
	// 								{
	// 									ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"),
	// 								},
	// 							},
	// 						},
	// 						Statuses: []*armcompute.InstanceViewStatus{
	// 							{
	// 								Code: to.Ptr("ProvisioningState/succeeded"),
	// 								Level: to.Ptr(armcompute.StatusLevelTypesInfo),
	// 								DisplayStatus: to.Ptr("Provisioning succeeded"),
	// 							},
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("myCapacityReservation2"),
	// 						UtilizationInfo: &armcompute.CapacityReservationUtilization{
	// 							CurrentCapacity: to.Ptr[int32](5),
	// 							VirtualMachinesAllocated: []*armcompute.SubResourceReadOnly{
	// 								{
	// 									ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"),
	// 								},
	// 								{
	// 									ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM4"),
	// 								},
	// 							},
	// 						},
	// 						Statuses: []*armcompute.InstanceViewStatus{
	// 							{
	// 								Code: to.Ptr("ProvisioningState/succeeded"),
	// 								Level: to.Ptr(armcompute.StatusLevelTypesInfo),
	// 								DisplayStatus: to.Ptr("Provisioning succeeded"),
	// 							},
	// 						},
	// 					},
	// 				},
	// 				SharedSubscriptionIDs: []*armcompute.SubResourceReadOnly{
	// 					{
	// 						ID: to.Ptr("/subscriptions/{subscription-id1}"),
	// 					},
	// 					{
	// 						ID: to.Ptr("/subscriptions/{subscription-id2}"),
	// 					},
	// 				},
	// 			},
	// 		},
	// 		Location: to.Ptr("westus"),
	// 		Tags: map[string]*string{
	// 			"{tagName}": to.Ptr("{tagValue}"),
	// 		},
	// 		Name: to.Ptr("myCapacityReservationGroup"),
	// 		Zones: []*string{
	// 			to.Ptr("3"),
	// 			to.Ptr("1"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-03-01/capacityReservationExamples/TargetedCapacityReservationGroup_Get.json
func ExampleCapacityReservationGroupsClient_Get_getATargetedCapacityReservationGroup() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscriptionId}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacityReservationGroupsClient().Get(ctx, "myResourceGroup", "targetedCapacityReservationGroup", &armcompute.CapacityReservationGroupsClientGetOptions{
		Expand: to.Ptr(armcompute.CapacityReservationGroupInstanceViewTypesInstanceView)})
	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 = armcompute.CapacityReservationGroupsClientGetResponse{
	// 	CapacityReservationGroup: armcompute.CapacityReservationGroup{
	// 		ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/targetedCapacityReservationGroup"),
	// 		Properties: &armcompute.CapacityReservationGroupProperties{
	// 			CapacityReservations: []*armcompute.SubResourceReadOnly{
	// 				{
	// 					ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup/capacityReservations/targetedCapacityReservation1"),
	// 				},
	// 				{
	// 					ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup/capacityReservations/targetedCapacityReservation2"),
	// 				},
	// 			},
	// 			SharingProfile: &armcompute.ResourceSharingProfile{
	// 				SubscriptionIDs: []*armcompute.SubResource{
	// 					{
	// 						ID: to.Ptr("/subscriptions/{subscription-id1}"),
	// 					},
	// 					{
	// 						ID: to.Ptr("/subscriptions/{subscription-id2}"),
	// 					},
	// 				},
	// 			},
	// 			InstanceView: &armcompute.CapacityReservationGroupInstanceView{
	// 				CapacityReservations: []*armcompute.CapacityReservationInstanceViewWithName{
	// 					{
	// 						Name: to.Ptr("targetedCapacityReservation1"),
	// 						UtilizationInfo: &armcompute.CapacityReservationUtilization{
	// 							CurrentCapacity: to.Ptr[int32](5),
	// 							VirtualMachinesAllocated: []*armcompute.SubResourceReadOnly{
	// 								{
	// 									ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"),
	// 								},
	// 								{
	// 									ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"),
	// 								},
	// 							},
	// 						},
	// 						Statuses: []*armcompute.InstanceViewStatus{
	// 							{
	// 								Code: to.Ptr("ProvisioningState/succeeded"),
	// 								Level: to.Ptr(armcompute.StatusLevelTypesInfo),
	// 								DisplayStatus: to.Ptr("Provisioning succeeded"),
	// 							},
	// 						},
	// 					},
	// 					{
	// 						Name: to.Ptr("targetedCapacityReservation2"),
	// 						UtilizationInfo: &armcompute.CapacityReservationUtilization{
	// 							CurrentCapacity: to.Ptr[int32](5),
	// 							VirtualMachinesAllocated: []*armcompute.SubResourceReadOnly{
	// 								{
	// 									ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"),
	// 								},
	// 								{
	// 									ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM4"),
	// 								},
	// 							},
	// 						},
	// 						Statuses: []*armcompute.InstanceViewStatus{
	// 							{
	// 								Code: to.Ptr("ProvisioningState/succeeded"),
	// 								Level: to.Ptr(armcompute.StatusLevelTypesInfo),
	// 								DisplayStatus: to.Ptr("Provisioning succeeded"),
	// 							},
	// 						},
	// 					},
	// 				},
	// 				SharedSubscriptionIDs: []*armcompute.SubResourceReadOnly{
	// 					{
	// 						ID: to.Ptr("/subscriptions/{subscription-id1}"),
	// 					},
	// 					{
	// 						ID: to.Ptr("/subscriptions/{subscription-id2}"),
	// 					},
	// 				},
	// 			},
	// 			ReservationType: to.Ptr(armcompute.ReservationTypeTargeted),
	// 		},
	// 		Location: to.Ptr("westus"),
	// 		Tags: map[string]*string{
	// 			"{tagName}": to.Ptr("{tagValue}"),
	// 		},
	// 		Name: to.Ptr("targetedCapacityReservationGroup"),
	// 		Zones: []*string{
	// 			to.Ptr("3"),
	// 			to.Ptr("1"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-03-01/capacityReservationExamples/CapacityReservationGroup_ListByResourceGroup.json
func ExampleCapacityReservationGroupsClient_NewListByResourceGroupPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCapacityReservationGroupsClient().NewListByResourceGroupPager("myResourceGroup", &armcompute.CapacityReservationGroupsClientListByResourceGroupOptions{
		Expand: to.Ptr(armcompute.ExpandTypesForGetCapacityReservationGroupsVirtualMachinesRef)})
	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 = armcompute.CapacityReservationGroupsClientListByResourceGroupResponse{
		// 	CapacityReservationGroupListResult: armcompute.CapacityReservationGroupListResult{
		// 		Value: []*armcompute.CapacityReservationGroup{
		// 			{
		// 				Name: to.Ptr("{capacityReservationGroupName}"),
		// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"),
		// 				Type: to.Ptr("Microsoft.Compute/CapacityReservationGroups"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armcompute.CapacityReservationGroupProperties{
		// 					CapacityReservations: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation1"),
		// 						},
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation2"),
		// 						},
		// 					},
		// 					VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"),
		// 						},
		// 						{
		// 							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"),
		// 						},
		// 					},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("{capacityReservationGroupName}"),
		// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"),
		// 				Type: to.Ptr("Microsoft.Compute/CapacityReservationGroups"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armcompute.CapacityReservationGroupProperties{
		// 					CapacityReservations: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation3"),
		// 						},
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation4"),
		// 						},
		// 					},
		// 					VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"),
		// 						},
		// 					},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("{capacityReservationGroupName}"),
		// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"),
		// 				Type: to.Ptr("Microsoft.Compute/CapacityReservationGroups"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armcompute.CapacityReservationGroupProperties{
		// 					CapacityReservations: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup/capacityReservations/blockCapacityReservation1"),
		// 						},
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup/capacityReservations/blockCapacityReservation2"),
		// 						},
		// 					},
		// 					VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"),
		// 						},
		// 					},
		// 					ReservationType: to.Ptr(armcompute.ReservationTypeBlock),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("{capacityReservationGroupName}"),
		// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"),
		// 				Type: to.Ptr("Microsoft.Compute/CapacityReservationGroups"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armcompute.CapacityReservationGroupProperties{
		// 					CapacityReservations: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup/capacityReservations/targetedCapacityReservation1"),
		// 						},
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup/capacityReservations/targetedCapacityReservation2"),
		// 						},
		// 					},
		// 					VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"),
		// 						},
		// 					},
		// 					ReservationType: to.Ptr(armcompute.ReservationTypeTargeted),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2026-03-01/capacityReservationExamples/CapacityReservationGroup_ListBySubscription.json
func ExampleCapacityReservationGroupsClient_NewListBySubscriptionPager_listCapacityReservationGroupsInSubscription() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCapacityReservationGroupsClient().NewListBySubscriptionPager(&armcompute.CapacityReservationGroupsClientListBySubscriptionOptions{
		Expand: to.Ptr(armcompute.ExpandTypesForGetCapacityReservationGroupsVirtualMachinesRef)})
	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 = armcompute.CapacityReservationGroupsClientListBySubscriptionResponse{
		// 	CapacityReservationGroupListResult: armcompute.CapacityReservationGroupListResult{
		// 		Value: []*armcompute.CapacityReservationGroup{
		// 			{
		// 				Name: to.Ptr("{capacityReservationGroupName}"),
		// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"),
		// 				Type: to.Ptr("Microsoft.Compute/CapacityReservationGroups"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armcompute.CapacityReservationGroupProperties{
		// 					CapacityReservations: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation1"),
		// 						},
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation2"),
		// 						},
		// 					},
		// 					VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/virtualMachines/myVM1"),
		// 						},
		// 						{
		// 							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/virtualMachines/myVM2"),
		// 						},
		// 					},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("{capacityReservationGroupName}"),
		// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"),
		// 				Type: to.Ptr("Microsoft.Compute/CapacityReservationGroups"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armcompute.CapacityReservationGroupProperties{
		// 					CapacityReservations: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation3"),
		// 						},
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation4"),
		// 						},
		// 					},
		// 					VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/virtualMachines/myVM3"),
		// 						},
		// 					},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("{capacityReservationGroupName}"),
		// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"),
		// 				Type: to.Ptr("Microsoft.Compute/CapacityReservationGroups"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armcompute.CapacityReservationGroupProperties{
		// 					CapacityReservations: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup/capacityReservations/blockCapacityReservation1"),
		// 						},
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup/capacityReservations/blockCapacityReservation2"),
		// 						},
		// 					},
		// 					VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"),
		// 						},
		// 					},
		// 					ReservationType: to.Ptr(armcompute.ReservationTypeBlock),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("{capacityReservationGroupName}"),
		// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"),
		// 				Type: to.Ptr("Microsoft.Compute/CapacityReservationGroups"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armcompute.CapacityReservationGroupProperties{
		// 					CapacityReservations: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup/capacityReservations/targetedCapacityReservation1"),
		// 						},
		// 						{
		// 							ID: to.Ptr("subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup/capacityReservations/targetedCapacityReservation2"),
		// 						},
		// 					},
		// 					VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
		// 						{
		// 							ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"),
		// 						},
		// 					},
		// 					ReservationType: to.Ptr(armcompute.ReservationTypeTargeted),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2026-03-01/capacityReservationExamples/CapacityReservationGroup_ListBySubscriptionWithResourceIdsQuery.json
func ExampleCapacityReservationGroupsClient_NewListBySubscriptionPager_listCapacityReservationGroupsWithResourceIdsOnlyInSubscription() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewCapacityReservationGroupsClient().NewListBySubscriptionPager(&armcompute.CapacityReservationGroupsClientListBySubscriptionOptions{
		ResourceIDsOnly: to.Ptr(armcompute.ResourceIDOptionsForGetCapacityReservationGroupsAll)})
	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 = armcompute.CapacityReservationGroupsClientListBySubscriptionResponse{
		// 	CapacityReservationGroupListResult: armcompute.CapacityReservationGroupListResult{
		// 		Value: []*armcompute.CapacityReservationGroup{
		// 			{
		// 				ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName1}"),
		// 				Type: to.Ptr("Microsoft.Compute/capacityReservationGroups"),
		// 				Location: to.Ptr("SouthCentralUSSTG"),
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/{subscriptionId2}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName2}"),
		// 				Type: to.Ptr("Microsoft.Compute/capacityReservationGroups"),
		// 				Location: to.Ptr("SouthCentralUSSTG"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2026-03-01/capacityReservationExamples/CapacityReservationGroup_Update_MaximumSet_Gen.json
func ExampleCapacityReservationGroupsClient_Update_capacityReservationGroupUpdateMaximumSetGen() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacityReservationGroupsClient().Update(ctx, "rgcompute", "aaaaaaaaaaaaaaaaaaaaaa", armcompute.CapacityReservationGroupUpdate{
		Properties: &armcompute.CapacityReservationGroupProperties{
			InstanceView: &armcompute.CapacityReservationGroupInstanceView{},
		},
		Tags: map[string]*string{
			"key5355": to.Ptr("aaa"),
		},
	}, 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 = armcompute.CapacityReservationGroupsClientUpdateResponse{
	// 	CapacityReservationGroup: armcompute.CapacityReservationGroup{
	// 		Location: to.Ptr("westus"),
	// 		Tags: map[string]*string{
	// 		},
	// 		Zones: []*string{
	// 			to.Ptr("1"),
	// 			to.Ptr("2"),
	// 		},
	// 		Properties: &armcompute.CapacityReservationGroupProperties{
	// 			CapacityReservations: []*armcompute.SubResourceReadOnly{
	// 				{
	// 					ID: to.Ptr("aaaa"),
	// 				},
	// 			},
	// 			VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
	// 				{
	// 					ID: to.Ptr("aaaa"),
	// 				},
	// 			},
	// 			InstanceView: &armcompute.CapacityReservationGroupInstanceView{
	// 				CapacityReservations: []*armcompute.CapacityReservationInstanceViewWithName{
	// 					{
	// 						Name: to.Ptr("aaaaaaaaaaaaaaaa"),
	// 						UtilizationInfo: &armcompute.CapacityReservationUtilization{
	// 							VirtualMachinesAllocated: []*armcompute.SubResourceReadOnly{
	// 								{
	// 									ID: to.Ptr("aaaa"),
	// 								},
	// 							},
	// 						},
	// 						Statuses: []*armcompute.InstanceViewStatus{
	// 							{
	// 								Code: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaa"),
	// 								Level: to.Ptr(armcompute.StatusLevelTypesInfo),
	// 								DisplayStatus: to.Ptr("aaaaaa"),
	// 								Message: to.Ptr("a"),
	// 								Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-30T12:58:26.522Z"); return t}()),
	// 							},
	// 						},
	// 					},
	// 				},
	// 			},
	// 		},
	// 		ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup"),
	// 		Name: to.Ptr("myCapacityReservationGroup"),
	// 		Type: to.Ptr("aaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
	// 	},
	// }
}

// Generated from example definition: 2026-03-01/capacityReservationExamples/CapacityReservationGroup_Update_MinimumSet_Gen.json
func ExampleCapacityReservationGroupsClient_Update_capacityReservationGroupUpdateMinimumSetGen() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcompute.NewClientFactory("{subscription-id}", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewCapacityReservationGroupsClient().Update(ctx, "rgcompute", "aaaaaaaaaaaaaaaaaaaaaa", armcompute.CapacityReservationGroupUpdate{}, 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 = armcompute.CapacityReservationGroupsClientUpdateResponse{
	// 	CapacityReservationGroup: armcompute.CapacityReservationGroup{
	// 		Location: to.Ptr("westus"),
	// 	},
	// }
}
