// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium

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

package v2

import (
	ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2"
	labels "k8s.io/apimachinery/pkg/labels"
	listers "k8s.io/client-go/listers"
	cache "k8s.io/client-go/tools/cache"
)

// CiliumLocalRedirectPolicyLister helps list CiliumLocalRedirectPolicies.
// All objects returned here must be treated as read-only.
type CiliumLocalRedirectPolicyLister interface {
	// List lists all CiliumLocalRedirectPolicies in the indexer.
	// Objects returned here must be treated as read-only.
	List(selector labels.Selector) (ret []*ciliumiov2.CiliumLocalRedirectPolicy, err error)
	// CiliumLocalRedirectPolicies returns an object that can list and get CiliumLocalRedirectPolicies.
	CiliumLocalRedirectPolicies(namespace string) CiliumLocalRedirectPolicyNamespaceLister
	CiliumLocalRedirectPolicyListerExpansion
}

// ciliumLocalRedirectPolicyLister implements the CiliumLocalRedirectPolicyLister interface.
type ciliumLocalRedirectPolicyLister struct {
	listers.ResourceIndexer[*ciliumiov2.CiliumLocalRedirectPolicy]
}

// NewCiliumLocalRedirectPolicyLister returns a new CiliumLocalRedirectPolicyLister.
func NewCiliumLocalRedirectPolicyLister(indexer cache.Indexer) CiliumLocalRedirectPolicyLister {
	return &ciliumLocalRedirectPolicyLister{listers.New[*ciliumiov2.CiliumLocalRedirectPolicy](indexer, ciliumiov2.Resource("ciliumlocalredirectpolicy"))}
}

// CiliumLocalRedirectPolicies returns an object that can list and get CiliumLocalRedirectPolicies.
func (s *ciliumLocalRedirectPolicyLister) CiliumLocalRedirectPolicies(namespace string) CiliumLocalRedirectPolicyNamespaceLister {
	return ciliumLocalRedirectPolicyNamespaceLister{listers.NewNamespaced[*ciliumiov2.CiliumLocalRedirectPolicy](s.ResourceIndexer, namespace)}
}

// CiliumLocalRedirectPolicyNamespaceLister helps list and get CiliumLocalRedirectPolicies.
// All objects returned here must be treated as read-only.
type CiliumLocalRedirectPolicyNamespaceLister interface {
	// List lists all CiliumLocalRedirectPolicies in the indexer for a given namespace.
	// Objects returned here must be treated as read-only.
	List(selector labels.Selector) (ret []*ciliumiov2.CiliumLocalRedirectPolicy, err error)
	// Get retrieves the CiliumLocalRedirectPolicy from the indexer for a given namespace and name.
	// Objects returned here must be treated as read-only.
	Get(name string) (*ciliumiov2.CiliumLocalRedirectPolicy, error)
	CiliumLocalRedirectPolicyNamespaceListerExpansion
}

// ciliumLocalRedirectPolicyNamespaceLister implements the CiliumLocalRedirectPolicyNamespaceLister
// interface.
type ciliumLocalRedirectPolicyNamespaceLister struct {
	listers.ResourceIndexer[*ciliumiov2.CiliumLocalRedirectPolicy]
}
