/*
Copyright 2020 The Flux 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 (
	traefikv1alpha1 "github.com/fluxcd/flagger/pkg/apis/traefik/v1alpha1"
	labels "k8s.io/apimachinery/pkg/labels"
	listers "k8s.io/client-go/listers"
	cache "k8s.io/client-go/tools/cache"
)

// TraefikServiceLister helps list TraefikServices.
// All objects returned here must be treated as read-only.
type TraefikServiceLister interface {
	// List lists all TraefikServices in the indexer.
	// Objects returned here must be treated as read-only.
	List(selector labels.Selector) (ret []*traefikv1alpha1.TraefikService, err error)
	// TraefikServices returns an object that can list and get TraefikServices.
	TraefikServices(namespace string) TraefikServiceNamespaceLister
	TraefikServiceListerExpansion
}

// traefikServiceLister implements the TraefikServiceLister interface.
type traefikServiceLister struct {
	listers.ResourceIndexer[*traefikv1alpha1.TraefikService]
}

// NewTraefikServiceLister returns a new TraefikServiceLister.
func NewTraefikServiceLister(indexer cache.Indexer) TraefikServiceLister {
	return &traefikServiceLister{listers.New[*traefikv1alpha1.TraefikService](indexer, traefikv1alpha1.Resource("traefikservice"))}
}

// TraefikServices returns an object that can list and get TraefikServices.
func (s *traefikServiceLister) TraefikServices(namespace string) TraefikServiceNamespaceLister {
	return traefikServiceNamespaceLister{listers.NewNamespaced[*traefikv1alpha1.TraefikService](s.ResourceIndexer, namespace)}
}

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

// traefikServiceNamespaceLister implements the TraefikServiceNamespaceLister
// interface.
type traefikServiceNamespaceLister struct {
	listers.ResourceIndexer[*traefikv1alpha1.TraefikService]
}
