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

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v10"
	"log"
)

// Generated from example definition: 2025-07-01/ServiceTagsList.json
func ExampleServiceTagsClient_List() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewServiceTagsClient().List(ctx, "westcentralus", 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 = armnetwork.ServiceTagsClientListResponse{
	// 	ServiceTagsListResult: armnetwork.ServiceTagsListResult{
	// 		Name: to.Ptr("public"),
	// 		Type: to.Ptr("Microsoft.Network/serviceTags"),
	// 		ChangeNumber: to.Ptr("63"),
	// 		Cloud: to.Ptr("Public"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/serviceTags/public"),
	// 		NextLink: to.Ptr("https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/centraluseuap/serviceTags?api-version=2020-06-01&changenumber=changenumber&$skipToken={skipToken}"),
	// 		Values: []*armnetwork.ServiceTagInformation{
	// 			{
	// 				Name: to.Ptr("ApiManagement"),
	// 				ID: to.Ptr("ApiManagement"),
	// 				Properties: &armnetwork.ServiceTagInformationPropertiesFormat{
	// 					AddressPrefixes: []*string{
	// 						to.Ptr("13.64.39.16/32"),
	// 						to.Ptr("40.74.146.80/31"),
	// 						to.Ptr("40.74.147.32/28"),
	// 					},
	// 					ChangeNumber: to.Ptr("7"),
	// 					Region: to.Ptr(""),
	// 					SystemService: to.Ptr("AzureApiManagement"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("ApiManagement.AustraliaCentral"),
	// 				ID: to.Ptr("ApiManagement.AustraliaCentral"),
	// 				Properties: &armnetwork.ServiceTagInformationPropertiesFormat{
	// 					AddressPrefixes: []*string{
	// 						to.Ptr("20.36.106.68/31"),
	// 						to.Ptr("20.36.107.176/28"),
	// 					},
	// 					ChangeNumber: to.Ptr("2"),
	// 					Region: to.Ptr("australiacentral"),
	// 					SystemService: to.Ptr("AzureApiManagement"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("AppService"),
	// 				ID: to.Ptr("AppService"),
	// 				Properties: &armnetwork.ServiceTagInformationPropertiesFormat{
	// 					AddressPrefixes: []*string{
	// 						to.Ptr("13.64.73.110/32"),
	// 						to.Ptr("191.235.208.12/32"),
	// 						to.Ptr("191.235.215.184/32"),
	// 					},
	// 					ChangeNumber: to.Ptr("13"),
	// 					Region: to.Ptr(""),
	// 					SystemService: to.Ptr("AzureAppService"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("ServiceBus"),
	// 				ID: to.Ptr("ServiceBus"),
	// 				Properties: &armnetwork.ServiceTagInformationPropertiesFormat{
	// 					AddressPrefixes: []*string{
	// 						to.Ptr("23.98.82.96/29"),
	// 						to.Ptr("40.68.127.68/32"),
	// 						to.Ptr("40.70.146.64/29"),
	// 					},
	// 					ChangeNumber: to.Ptr("10"),
	// 					Region: to.Ptr(""),
	// 					SystemService: to.Ptr("AzureServiceBus"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("ServiceBus.EastUS2"),
	// 				ID: to.Ptr("ServiceBus.EastUS2"),
	// 				Properties: &armnetwork.ServiceTagInformationPropertiesFormat{
	// 					AddressPrefixes: []*string{
	// 						to.Ptr("13.68.110.36/32"),
	// 						to.Ptr("40.70.146.64/29"),
	// 					},
	// 					ChangeNumber: to.Ptr("1"),
	// 					Region: to.Ptr("eastus2"),
	// 					SystemService: to.Ptr("AzureServiceBus"),
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}
