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

package v1

import (
	v1 "github.com/openshift/api/console/v1"
	"k8s.io/apimachinery/pkg/api/errors"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/client-go/tools/cache"
)

// ConsoleQuickStartLister helps list ConsoleQuickStarts.
// All objects returned here must be treated as read-only.
type ConsoleQuickStartLister interface {
	// List lists all ConsoleQuickStarts in the indexer.
	// Objects returned here must be treated as read-only.
	List(selector labels.Selector) (ret []*v1.ConsoleQuickStart, err error)
	// Get retrieves the ConsoleQuickStart from the index for a given name.
	// Objects returned here must be treated as read-only.
	Get(name string) (*v1.ConsoleQuickStart, error)
	ConsoleQuickStartListerExpansion
}

// consoleQuickStartLister implements the ConsoleQuickStartLister interface.
type consoleQuickStartLister struct {
	indexer cache.Indexer
}

// NewConsoleQuickStartLister returns a new ConsoleQuickStartLister.
func NewConsoleQuickStartLister(indexer cache.Indexer) ConsoleQuickStartLister {
	return &consoleQuickStartLister{indexer: indexer}
}

// List lists all ConsoleQuickStarts in the indexer.
func (s *consoleQuickStartLister) List(selector labels.Selector) (ret []*v1.ConsoleQuickStart, err error) {
	err = cache.ListAll(s.indexer, selector, func(m interface{}) {
		ret = append(ret, m.(*v1.ConsoleQuickStart))
	})
	return ret, err
}

// Get retrieves the ConsoleQuickStart from the index for a given name.
func (s *consoleQuickStartLister) Get(name string) (*v1.ConsoleQuickStart, error) {
	obj, exists, err := s.indexer.GetByKey(name)
	if err != nil {
		return nil, err
	}
	if !exists {
		return nil, errors.NewNotFound(v1.Resource("consolequickstart"), name)
	}
	return obj.(*v1.ConsoleQuickStart), nil
}
