/*
Copyright The Akash Network 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 v2beta2

import (
	akashnetworkv2beta2 "github.com/akash-network/provider/pkg/apis/akash.network/v2beta2"
	labels "k8s.io/apimachinery/pkg/labels"
	listers "k8s.io/client-go/listers"
	cache "k8s.io/client-go/tools/cache"
)

// ProviderHostLister helps list ProviderHosts.
// All objects returned here must be treated as read-only.
type ProviderHostLister interface {
	// List lists all ProviderHosts in the indexer.
	// Objects returned here must be treated as read-only.
	List(selector labels.Selector) (ret []*akashnetworkv2beta2.ProviderHost, err error)
	// ProviderHosts returns an object that can list and get ProviderHosts.
	ProviderHosts(namespace string) ProviderHostNamespaceLister
	ProviderHostListerExpansion
}

// providerHostLister implements the ProviderHostLister interface.
type providerHostLister struct {
	listers.ResourceIndexer[*akashnetworkv2beta2.ProviderHost]
}

// NewProviderHostLister returns a new ProviderHostLister.
func NewProviderHostLister(indexer cache.Indexer) ProviderHostLister {
	return &providerHostLister{listers.New[*akashnetworkv2beta2.ProviderHost](indexer, akashnetworkv2beta2.Resource("providerhost"))}
}

// ProviderHosts returns an object that can list and get ProviderHosts.
func (s *providerHostLister) ProviderHosts(namespace string) ProviderHostNamespaceLister {
	return providerHostNamespaceLister{listers.NewNamespaced[*akashnetworkv2beta2.ProviderHost](s.ResourceIndexer, namespace)}
}

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

// providerHostNamespaceLister implements the ProviderHostNamespaceLister
// interface.
type providerHostNamespaceLister struct {
	listers.ResourceIndexer[*akashnetworkv2beta2.ProviderHost]
}
