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

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

// Generated from example definition: 2025-06-01/AssociatedFiltersForDeployment_list.json
func ExampleListAssociatedTrafficFiltersClient_List() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armelastic.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewListAssociatedTrafficFiltersClient().List(ctx, "myResourceGroup", "myMonitor", 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 = armelastic.ListAssociatedTrafficFiltersClientListResponse{
	// 	TrafficFilterResponse: armelastic.TrafficFilterResponse{
	// 		Rulesets: []*armelastic.TrafficFilter{
	// 			{
	// 				Name: to.Ptr("IPFromApi"),
	// 				Type: to.Ptr(armelastic.TypeIP),
	// 				Description: to.Ptr("created from azure"),
	// 				ID: to.Ptr("31d91b5afb6f4c2eaaf104c97b1991dd"),
	// 				IncludeByDefault: to.Ptr(false),
	// 				Region: to.Ptr("azure-eastus"),
	// 				Rules: []*armelastic.TrafficFilterRule{
	// 					{
	// 						Description: to.Ptr("Allow inbound traffic from IP address 192.168.131.0"),
	// 						ID: to.Ptr("f0297dad72af4a5e964cddf817f35e65"),
	// 						Source: to.Ptr("192.168.131.0"),
	// 					},
	// 					{
	// 						Description: to.Ptr("Allow inbound traffic from IP address block 192.168.132.6/22"),
	// 						ID: to.Ptr("f9c00169f0e54931ae72aabde326b589"),
	// 						Source: to.Ptr("192.168.132.6/22"),
	// 					},
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}
