// 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 armhybridcompute_test

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute/v3"
	"log"
)

// Generated from example definition: 2026-06-16-preview/extension/ExtensionMetadataV2_Get.json
func ExampleExtensionMetadataV2Client_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcompute.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewExtensionMetadataV2Client().Get(ctx, "EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", "1.33.0", 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 = armhybridcompute.ExtensionMetadataV2ClientGetResponse{
	// 	ExtensionValueV2: armhybridcompute.ExtensionValueV2{
	// 		ID: to.Ptr("/providers/Microsoft.HybridCompute/locations/eastus/publishers/microsoft.azure.monitor/extensionTypes/azuremonitorlinuxagent/versions/1.33.0"),
	// 		Properties: &armhybridcompute.ExtensionValueV2Properties{
	// 			Architecture: []*string{
	// 				to.Ptr("x64"),
	// 			},
	// 			ExtensionSignatureURI: to.Ptr("https://eastus.his.arc.azure.com/extensions/extensionsignatures/azuremonitorlinuxagent__1.33.0.zip"),
	// 			ExtensionType: to.Ptr("azuremonitorlinuxagent"),
	// 			ExtensionUris: []*string{
	// 				to.Ptr("https://aaaaaaaaaaaaaaaaaaaa.blob.core.windows.net/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_1.33.0.zip"),
	// 				to.Ptr("https://bbbbbbbbbbbbbbbbbbbb.blob.core.windows.net/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb_1.33.0.zip"),
	// 				to.Ptr("https://cccccccccccccccccccc.blob.core.windows.net/cccccccccccccccccccccccccccccccccccc/cccccccccccccccccccccccccccccccccccc_1.33.0.zip"),
	// 			},
	// 			OperatingSystem: to.Ptr("Linux"),
	// 			Publisher: to.Ptr("microsoft.azure.monitor"),
	// 			Version: to.Ptr("1.33.0"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-06-16-preview/extension/ExtensionMetadataV2_List.json
func ExampleExtensionMetadataV2Client_NewListPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armhybridcompute.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewExtensionMetadataV2Client().NewListPager("EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", 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 = armhybridcompute.ExtensionMetadataV2ClientListResponse{
		// 	ExtensionValueListResultV2: armhybridcompute.ExtensionValueListResultV2{
		// 		Value: []*armhybridcompute.ExtensionValueV2{
		// 			{
		// 				ID: to.Ptr("/providers/Microsoft.HybridCompute/locations/eastus/publishers/microsoft.azure.monitor/extensionTypes/azuremonitorlinuxagent/versions/1.33.0"),
		// 				Properties: &armhybridcompute.ExtensionValueV2Properties{
		// 					Architecture: []*string{
		// 						to.Ptr("x64"),
		// 					},
		// 					ExtensionSignatureURI: to.Ptr("https://eastus.his.arc.azure.com/extensions/extensionsignatures/azuremonitorlinuxagent__1.33.0.zip"),
		// 					ExtensionType: to.Ptr("azuremonitorlinuxagent"),
		// 					ExtensionUris: []*string{
		// 						to.Ptr("https://aaaaaaaaaaaaaaaaaaaa.blob.core.windows.net/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_1.33.0.zip"),
		// 						to.Ptr("https://bbbbbbbbbbbbbbbbbbbb.blob.core.windows.net/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb_1.33.0.zip"),
		// 						to.Ptr("https://cccccccccccccccccccc.blob.core.windows.net/cccccccccccccccccccccccccccccccccccc/cccccccccccccccccccccccccccccccccccc_1.33.0.zip"),
		// 					},
		// 					OperatingSystem: to.Ptr("Linux"),
		// 					Publisher: to.Ptr("microsoft.azure.monitor"),
		// 					Version: to.Ptr("1.33.0"),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/providers/Microsoft.HybridCompute/locations/eastus/publishers/microsoft.azure.monitor/extensionTypes/azuremonitorlinuxagent/versions/1.32.6"),
		// 				Properties: &armhybridcompute.ExtensionValueV2Properties{
		// 					Architecture: []*string{
		// 						to.Ptr("x64"),
		// 					},
		// 					ExtensionSignatureURI: to.Ptr("https://eastus.his.arc.azure.com/extensions/extensionsignatures/azuremonitorlinuxagent__1.32.6.zip"),
		// 					ExtensionType: to.Ptr("azuremonitorlinuxagent"),
		// 					ExtensionUris: []*string{
		// 						to.Ptr("https://aaaaaaaaaaaaaaaaaaaa.blob.core.windows.net/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_1.32.6.zip"),
		// 						to.Ptr("https://bbbbbbbbbbbbbbbbbbbb.blob.core.windows.net/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb_1.32.6.zip"),
		// 						to.Ptr("https://cccccccccccccccccccc.blob.core.windows.net/cccccccccccccccccccccccccccccccccccc/cccccccccccccccccccccccccccccccccccc_1.32.6.zip"),
		// 					},
		// 					OperatingSystem: to.Ptr("Linux"),
		// 					Publisher: to.Ptr("microsoft.azure.monitor"),
		// 					Version: to.Ptr("1.32.6"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}
