/*
Copyright The Volcano 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 (
	labels "k8s.io/apimachinery/pkg/labels"
	listers "k8s.io/client-go/listers"
	cache "k8s.io/client-go/tools/cache"
	trainingv1alpha1 "volcano.sh/apis/pkg/apis/training/v1alpha1"
)

// HyperJobLister helps list HyperJobs.
// All objects returned here must be treated as read-only.
type HyperJobLister interface {
	// List lists all HyperJobs in the indexer.
	// Objects returned here must be treated as read-only.
	List(selector labels.Selector) (ret []*trainingv1alpha1.HyperJob, err error)
	// HyperJobs returns an object that can list and get HyperJobs.
	HyperJobs(namespace string) HyperJobNamespaceLister
	HyperJobListerExpansion
}

// hyperJobLister implements the HyperJobLister interface.
type hyperJobLister struct {
	listers.ResourceIndexer[*trainingv1alpha1.HyperJob]
}

// NewHyperJobLister returns a new HyperJobLister.
func NewHyperJobLister(indexer cache.Indexer) HyperJobLister {
	return &hyperJobLister{listers.New[*trainingv1alpha1.HyperJob](indexer, trainingv1alpha1.Resource("hyperjob"))}
}

// HyperJobs returns an object that can list and get HyperJobs.
func (s *hyperJobLister) HyperJobs(namespace string) HyperJobNamespaceLister {
	return hyperJobNamespaceLister{listers.NewNamespaced[*trainingv1alpha1.HyperJob](s.ResourceIndexer, namespace)}
}

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

// hyperJobNamespaceLister implements the HyperJobNamespaceLister
// interface.
type hyperJobNamespaceLister struct {
	listers.ResourceIndexer[*trainingv1alpha1.HyperJob]
}
