/*
Copyright The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

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

package v1alpha1

import (
	policyv1alpha1 "github.com/linkerd/linkerd2/controller/gen/apis/policy/v1alpha1"
	labels "k8s.io/apimachinery/pkg/labels"
	listers "k8s.io/client-go/listers"
	cache "k8s.io/client-go/tools/cache"
)

// NetworkAuthenticationLister helps list NetworkAuthentications.
// All objects returned here must be treated as read-only.
type NetworkAuthenticationLister interface {
	// List lists all NetworkAuthentications in the indexer.
	// Objects returned here must be treated as read-only.
	List(selector labels.Selector) (ret []*policyv1alpha1.NetworkAuthentication, err error)
	// NetworkAuthentications returns an object that can list and get NetworkAuthentications.
	NetworkAuthentications(namespace string) NetworkAuthenticationNamespaceLister
	NetworkAuthenticationListerExpansion
}

// networkAuthenticationLister implements the NetworkAuthenticationLister interface.
type networkAuthenticationLister struct {
	listers.ResourceIndexer[*policyv1alpha1.NetworkAuthentication]
}

// NewNetworkAuthenticationLister returns a new NetworkAuthenticationLister.
func NewNetworkAuthenticationLister(indexer cache.Indexer) NetworkAuthenticationLister {
	return &networkAuthenticationLister{listers.New[*policyv1alpha1.NetworkAuthentication](indexer, policyv1alpha1.Resource("networkauthentication"))}
}

// NetworkAuthentications returns an object that can list and get NetworkAuthentications.
func (s *networkAuthenticationLister) NetworkAuthentications(namespace string) NetworkAuthenticationNamespaceLister {
	return networkAuthenticationNamespaceLister{listers.NewNamespaced[*policyv1alpha1.NetworkAuthentication](s.ResourceIndexer, namespace)}
}

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

// networkAuthenticationNamespaceLister implements the NetworkAuthenticationNamespaceLister
// interface.
type networkAuthenticationNamespaceLister struct {
	listers.ResourceIndexer[*policyv1alpha1.NetworkAuthentication]
}
