// 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 armrecommender_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/armrecommender"
	"log"
)

// Generated from example definition: 2026-05-05-preview/GetSkuMixPlacementScores.json
func ExampleSKUMixPlacementScoresClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecommender.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSKUMixPlacementScoresClient().Get(ctx, "eastus", 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 = armrecommender.SKUMixPlacementScoresClientGetResponse{
	// 	SKUMixPlacementBase: armrecommender.SKUMixPlacementBase{
	// 		Name: to.Ptr("recommendations"),
	// 		Type: to.Ptr("Microsoft.Compute/skuMixPlacementScores"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/skuMixPlacementScores/recommendations"),
	// 		Properties: &armrecommender.SKUMixPlacementProperties{
	// 			SupportedResourceTypes: []*string{
	// 				to.Ptr("Microsoft.Compute/virtualMachines"),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-05-05-preview/GenerateSkuMixPlacementScores.json
func ExampleSKUMixPlacementScoresClient_Post() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecommender.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewSKUMixPlacementScoresClient().Post(ctx, "eastus", armrecommender.SKUMixPlacementRequest{
		Zones: []*string{
			to.Ptr("1"),
			to.Ptr("2"),
			to.Ptr("3"),
		},
		CapacityProfile: &armrecommender.SKUMixPlacementCapacityProfile{
			Capacity:           to.Ptr[int32](10),
			CapacityType:       to.Ptr(armrecommender.SKUMixPlacementCapacityTypeVM),
			Priority:           to.Ptr(armrecommender.SKUMixPlacementPriorityRegular),
			AllocationStrategy: to.Ptr(armrecommender.SKUMixPlacementAllocationStrategyLowestPrice),
			OSType:             to.Ptr(armrecommender.SKUMixPlacementOSTypeLinux),
			ZoneAllocationPolicy: &armrecommender.SKUMixPlacementZoneAllocationPolicy{
				DistributionStrategy: to.Ptr(armrecommender.SKUMixPlacementZonalDistributionStrategyBestEffortBalanced),
			},
		},
		InstanceDescription: &armrecommender.SKUMixPlacementInstanceDescription{
			VMSizes: []*armrecommender.SKUMixPlacementVMSize{
				{
					Name: to.Ptr("Standard_D2s_v3"),
				},
				{
					Name: to.Ptr("Standard_D4s_v3"),
				},
				{
					Name: to.Ptr("Standard_D8s_v3"),
				},
			},
		},
	}, 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 = armrecommender.SKUMixPlacementScoresClientPostResponse{
	// 	SKUMixPlacementResponse: armrecommender.SKUMixPlacementResponse{
	// 		PlacementChoices: []*armrecommender.SKUMixPlacementDeploymentChoice{
	// 			{
	// 				ID: to.Ptr("3fc69ef8-209e-4ecb-9cc4-392354af9201"),
	// 				Score: to.Ptr[int32](8),
	// 				SKUSplit: []*armrecommender.SKUMixPlacementItem{
	// 					{
	// 						Name: to.Ptr("Standard_D2s_v3"),
	// 						Priority: to.Ptr(armrecommender.SKUMixPlacementPriorityRegular),
	// 						Capacity: to.Ptr[int32](4),
	// 						CapacityMax: to.Ptr[int32](6),
	// 						Zone: to.Ptr("1"),
	// 					},
	// 					{
	// 						Name: to.Ptr("Standard_D4s_v3"),
	// 						Priority: to.Ptr(armrecommender.SKUMixPlacementPriorityRegular),
	// 						Capacity: to.Ptr[int32](3),
	// 						CapacityMax: to.Ptr[int32](5),
	// 						Zone: to.Ptr("2"),
	// 					},
	// 					{
	// 						Name: to.Ptr("Standard_D2s_v3"),
	// 						Priority: to.Ptr(armrecommender.SKUMixPlacementPriorityRegular),
	// 						Capacity: to.Ptr[int32](3),
	// 						CapacityMax: to.Ptr[int32](5),
	// 						Zone: to.Ptr("3"),
	// 					},
	// 				},
	// 			},
	// 			{
	// 				ID: to.Ptr("a7c12b3d-4e5f-6789-abcd-ef0123456789"),
	// 				Score: to.Ptr[int32](4),
	// 				SKUSplit: []*armrecommender.SKUMixPlacementItem{
	// 					{
	// 						Name: to.Ptr("Standard_D8s_v3"),
	// 						Priority: to.Ptr(armrecommender.SKUMixPlacementPriorityRegular),
	// 						Capacity: to.Ptr[int32](5),
	// 						Zone: to.Ptr("1"),
	// 					},
	// 					{
	// 						Name: to.Ptr("Standard_D8s_v3"),
	// 						Priority: to.Ptr(armrecommender.SKUMixPlacementPriorityRegular),
	// 						Capacity: to.Ptr[int32](5),
	// 						Zone: to.Ptr("2"),
	// 					},
	// 				},
	// 			},
	// 		},
	// 		PartialFulfillmentReason: to.Ptr(armrecommender.SKUMixPlacementPartialFulfillmentReasonNone),
	// 		ValidUntil: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-05T18:00:00Z"); return t}()),
	// 	},
	// }
}
