// Copyright (c) 2026 Tigera, Inc. All rights reserved.

// Code generated by lister-gen. DO NOT EDIT.

package v3

import (
	projectcalicov3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
	labels "k8s.io/apimachinery/pkg/labels"
	listers "k8s.io/client-go/listers"
	cache "k8s.io/client-go/tools/cache"
)

// GlobalNetworkPolicyLister helps list GlobalNetworkPolicies.
// All objects returned here must be treated as read-only.
type GlobalNetworkPolicyLister interface {
	// List lists all GlobalNetworkPolicies in the indexer.
	// Objects returned here must be treated as read-only.
	List(selector labels.Selector) (ret []*projectcalicov3.GlobalNetworkPolicy, err error)
	// Get retrieves the GlobalNetworkPolicy from the index for a given name.
	// Objects returned here must be treated as read-only.
	Get(name string) (*projectcalicov3.GlobalNetworkPolicy, error)
	GlobalNetworkPolicyListerExpansion
}

// globalNetworkPolicyLister implements the GlobalNetworkPolicyLister interface.
type globalNetworkPolicyLister struct {
	listers.ResourceIndexer[*projectcalicov3.GlobalNetworkPolicy]
}

// NewGlobalNetworkPolicyLister returns a new GlobalNetworkPolicyLister.
func NewGlobalNetworkPolicyLister(indexer cache.Indexer) GlobalNetworkPolicyLister {
	return &globalNetworkPolicyLister{listers.New[*projectcalicov3.GlobalNetworkPolicy](indexer, projectcalicov3.Resource("globalnetworkpolicy"))}
}
