// 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"
)

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

// ciliumNodeConfigLister implements the CiliumNodeConfigLister interface.
type ciliumNodeConfigLister struct {
	listers.ResourceIndexer[*ciliumiov2.CiliumNodeConfig]
}

// NewCiliumNodeConfigLister returns a new CiliumNodeConfigLister.
func NewCiliumNodeConfigLister(indexer cache.Indexer) CiliumNodeConfigLister {
	return &ciliumNodeConfigLister{listers.New[*ciliumiov2.CiliumNodeConfig](indexer, ciliumiov2.Resource("ciliumnodeconfig"))}
}

// CiliumNodeConfigs returns an object that can list and get CiliumNodeConfigs.
func (s *ciliumNodeConfigLister) CiliumNodeConfigs(namespace string) CiliumNodeConfigNamespaceLister {
	return ciliumNodeConfigNamespaceLister{listers.NewNamespaced[*ciliumiov2.CiliumNodeConfig](s.ResourceIndexer, namespace)}
}

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

// ciliumNodeConfigNamespaceLister implements the CiliumNodeConfigNamespaceLister
// interface.
type ciliumNodeConfigNamespaceLister struct {
	listers.ResourceIndexer[*ciliumiov2.CiliumNodeConfig]
}
