// SPDX-License-Identifier: AGPL-3.0-only

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

package v0alpha1

import (
	provisioningv0alpha1 "github.com/grafana/grafana/apps/provisioning/pkg/apis/provisioning/v0alpha1"
	labels "k8s.io/apimachinery/pkg/labels"
	listers "k8s.io/client-go/listers"
	cache "k8s.io/client-go/tools/cache"
)

// HistoricJobLister helps list HistoricJobs.
// All objects returned here must be treated as read-only.
type HistoricJobLister interface {
	// List lists all HistoricJobs in the indexer.
	// Objects returned here must be treated as read-only.
	List(selector labels.Selector) (ret []*provisioningv0alpha1.HistoricJob, err error)
	// HistoricJobs returns an object that can list and get HistoricJobs.
	HistoricJobs(namespace string) HistoricJobNamespaceLister
	HistoricJobListerExpansion
}

// historicJobLister implements the HistoricJobLister interface.
type historicJobLister struct {
	listers.ResourceIndexer[*provisioningv0alpha1.HistoricJob]
}

// NewHistoricJobLister returns a new HistoricJobLister.
func NewHistoricJobLister(indexer cache.Indexer) HistoricJobLister {
	return &historicJobLister{listers.New[*provisioningv0alpha1.HistoricJob](indexer, provisioningv0alpha1.Resource("historicjob"))}
}

// HistoricJobs returns an object that can list and get HistoricJobs.
func (s *historicJobLister) HistoricJobs(namespace string) HistoricJobNamespaceLister {
	return historicJobNamespaceLister{listers.NewNamespaced[*provisioningv0alpha1.HistoricJob](s.ResourceIndexer, namespace)}
}

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

// historicJobNamespaceLister implements the HistoricJobNamespaceLister
// interface.
type historicJobNamespaceLister struct {
	listers.ResourceIndexer[*provisioningv0alpha1.HistoricJob]
}
