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

package v1alpha1

import (
	workflowv1alpha1 "github.com/argoproj/argo-workflows/v4/pkg/apis/workflow/v1alpha1"
	labels "k8s.io/apimachinery/pkg/labels"
	listers "k8s.io/client-go/listers"
	cache "k8s.io/client-go/tools/cache"
)

// WorkflowTemplateLister helps list WorkflowTemplates.
// All objects returned here must be treated as read-only.
type WorkflowTemplateLister interface {
	// List lists all WorkflowTemplates in the indexer.
	// Objects returned here must be treated as read-only.
	List(selector labels.Selector) (ret []*workflowv1alpha1.WorkflowTemplate, err error)
	// WorkflowTemplates returns an object that can list and get WorkflowTemplates.
	WorkflowTemplates(namespace string) WorkflowTemplateNamespaceLister
	WorkflowTemplateListerExpansion
}

// workflowTemplateLister implements the WorkflowTemplateLister interface.
type workflowTemplateLister struct {
	listers.ResourceIndexer[*workflowv1alpha1.WorkflowTemplate]
}

// NewWorkflowTemplateLister returns a new WorkflowTemplateLister.
func NewWorkflowTemplateLister(indexer cache.Indexer) WorkflowTemplateLister {
	return &workflowTemplateLister{listers.New[*workflowv1alpha1.WorkflowTemplate](indexer, workflowv1alpha1.Resource("workflowtemplate"))}
}

// WorkflowTemplates returns an object that can list and get WorkflowTemplates.
func (s *workflowTemplateLister) WorkflowTemplates(namespace string) WorkflowTemplateNamespaceLister {
	return workflowTemplateNamespaceLister{listers.NewNamespaced[*workflowv1alpha1.WorkflowTemplate](s.ResourceIndexer, namespace)}
}

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

// workflowTemplateNamespaceLister implements the WorkflowTemplateNamespaceLister
// interface.
type workflowTemplateNamespaceLister struct {
	listers.ResourceIndexer[*workflowv1alpha1.WorkflowTemplate]
}
