// Code generated by mockery v2.30.16. DO NOT EDIT.

package mocks

import (
	context "context"

	cache "k8s.io/client-go/tools/cache"

	generic "github.com/rancher/wrangler/v3/pkg/generic"

	management_cattle_iov3 "github.com/rancher/rancher/pkg/apis/management.cattle.io/v3"

	mock "github.com/stretchr/testify/mock"

	rest "k8s.io/client-go/rest"

	schema "k8s.io/apimachinery/pkg/runtime/schema"

	time "time"

	types "k8s.io/apimachinery/pkg/types"

	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"

	watch "k8s.io/apimachinery/pkg/watch"
)

// SettingController is an autogenerated mock type for the SettingController type
type SettingController struct {
	mock.Mock
}

// AddGenericHandler provides a mock function with given fields: ctx, name, handler
func (_m *SettingController) AddGenericHandler(ctx context.Context, name string, handler generic.Handler) {
	_m.Called(ctx, name, handler)
}

// AddGenericRemoveHandler provides a mock function with given fields: ctx, name, handler
func (_m *SettingController) AddGenericRemoveHandler(ctx context.Context, name string, handler generic.Handler) {
	_m.Called(ctx, name, handler)
}

// Cache provides a mock function with given fields:
func (_m *SettingController) Cache() generic.NonNamespacedCacheInterface[*management_cattle_iov3.Setting] {
	ret := _m.Called()

	var r0 generic.NonNamespacedCacheInterface[*management_cattle_iov3.Setting]
	if rf, ok := ret.Get(0).(func() generic.NonNamespacedCacheInterface[*management_cattle_iov3.Setting]); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(generic.NonNamespacedCacheInterface[*management_cattle_iov3.Setting])
		}
	}

	return r0
}

// Create provides a mock function with given fields: _a0
func (_m *SettingController) Create(_a0 *management_cattle_iov3.Setting) (*management_cattle_iov3.Setting, error) {
	ret := _m.Called(_a0)

	var r0 *management_cattle_iov3.Setting
	var r1 error
	if rf, ok := ret.Get(0).(func(*management_cattle_iov3.Setting) (*management_cattle_iov3.Setting, error)); ok {
		return rf(_a0)
	}
	if rf, ok := ret.Get(0).(func(*management_cattle_iov3.Setting) *management_cattle_iov3.Setting); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*management_cattle_iov3.Setting)
		}
	}

	if rf, ok := ret.Get(1).(func(*management_cattle_iov3.Setting) error); ok {
		r1 = rf(_a0)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Delete provides a mock function with given fields: name, options
func (_m *SettingController) Delete(name string, options *v1.DeleteOptions) error {
	ret := _m.Called(name, options)

	var r0 error
	if rf, ok := ret.Get(0).(func(string, *v1.DeleteOptions) error); ok {
		r0 = rf(name, options)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Enqueue provides a mock function with given fields: name
func (_m *SettingController) Enqueue(name string) {
	_m.Called(name)
}

// EnqueueAfter provides a mock function with given fields: name, duration
func (_m *SettingController) EnqueueAfter(name string, duration time.Duration) {
	_m.Called(name, duration)
}

// Get provides a mock function with given fields: name, options
func (_m *SettingController) Get(name string, options v1.GetOptions) (*management_cattle_iov3.Setting, error) {
	ret := _m.Called(name, options)

	var r0 *management_cattle_iov3.Setting
	var r1 error
	if rf, ok := ret.Get(0).(func(string, v1.GetOptions) (*management_cattle_iov3.Setting, error)); ok {
		return rf(name, options)
	}
	if rf, ok := ret.Get(0).(func(string, v1.GetOptions) *management_cattle_iov3.Setting); ok {
		r0 = rf(name, options)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*management_cattle_iov3.Setting)
		}
	}

	if rf, ok := ret.Get(1).(func(string, v1.GetOptions) error); ok {
		r1 = rf(name, options)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GroupVersionKind provides a mock function with given fields:
func (_m *SettingController) GroupVersionKind() schema.GroupVersionKind {
	ret := _m.Called()

	var r0 schema.GroupVersionKind
	if rf, ok := ret.Get(0).(func() schema.GroupVersionKind); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(schema.GroupVersionKind)
	}

	return r0
}

// Informer provides a mock function with given fields:
func (_m *SettingController) Informer() cache.SharedIndexInformer {
	ret := _m.Called()

	var r0 cache.SharedIndexInformer
	if rf, ok := ret.Get(0).(func() cache.SharedIndexInformer); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(cache.SharedIndexInformer)
		}
	}

	return r0
}

// List provides a mock function with given fields: opts
func (_m *SettingController) List(opts v1.ListOptions) (*management_cattle_iov3.SettingList, error) {
	ret := _m.Called(opts)

	var r0 *management_cattle_iov3.SettingList
	var r1 error
	if rf, ok := ret.Get(0).(func(v1.ListOptions) (*management_cattle_iov3.SettingList, error)); ok {
		return rf(opts)
	}
	if rf, ok := ret.Get(0).(func(v1.ListOptions) *management_cattle_iov3.SettingList); ok {
		r0 = rf(opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*management_cattle_iov3.SettingList)
		}
	}

	if rf, ok := ret.Get(1).(func(v1.ListOptions) error); ok {
		r1 = rf(opts)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// OnChange provides a mock function with given fields: ctx, name, sync
func (_m *SettingController) OnChange(ctx context.Context, name string, sync generic.ObjectHandler[*management_cattle_iov3.Setting]) {
	_m.Called(ctx, name, sync)
}

// OnRemove provides a mock function with given fields: ctx, name, sync
func (_m *SettingController) OnRemove(ctx context.Context, name string, sync generic.ObjectHandler[*management_cattle_iov3.Setting]) {
	_m.Called(ctx, name, sync)
}

// Patch provides a mock function with given fields: name, pt, data, subresources
func (_m *SettingController) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*management_cattle_iov3.Setting, error) {
	_va := make([]interface{}, len(subresources))
	for _i := range subresources {
		_va[_i] = subresources[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, name, pt, data)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

	var r0 *management_cattle_iov3.Setting
	var r1 error
	if rf, ok := ret.Get(0).(func(string, types.PatchType, []byte, ...string) (*management_cattle_iov3.Setting, error)); ok {
		return rf(name, pt, data, subresources...)
	}
	if rf, ok := ret.Get(0).(func(string, types.PatchType, []byte, ...string) *management_cattle_iov3.Setting); ok {
		r0 = rf(name, pt, data, subresources...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*management_cattle_iov3.Setting)
		}
	}

	if rf, ok := ret.Get(1).(func(string, types.PatchType, []byte, ...string) error); ok {
		r1 = rf(name, pt, data, subresources...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Update provides a mock function with given fields: _a0
func (_m *SettingController) Update(_a0 *management_cattle_iov3.Setting) (*management_cattle_iov3.Setting, error) {
	ret := _m.Called(_a0)

	var r0 *management_cattle_iov3.Setting
	var r1 error
	if rf, ok := ret.Get(0).(func(*management_cattle_iov3.Setting) (*management_cattle_iov3.Setting, error)); ok {
		return rf(_a0)
	}
	if rf, ok := ret.Get(0).(func(*management_cattle_iov3.Setting) *management_cattle_iov3.Setting); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*management_cattle_iov3.Setting)
		}
	}

	if rf, ok := ret.Get(1).(func(*management_cattle_iov3.Setting) error); ok {
		r1 = rf(_a0)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// UpdateStatus provides a mock function with given fields: _a0
func (_m *SettingController) UpdateStatus(_a0 *management_cattle_iov3.Setting) (*management_cattle_iov3.Setting, error) {
	ret := _m.Called(_a0)

	var r0 *management_cattle_iov3.Setting
	var r1 error
	if rf, ok := ret.Get(0).(func(*management_cattle_iov3.Setting) (*management_cattle_iov3.Setting, error)); ok {
		return rf(_a0)
	}
	if rf, ok := ret.Get(0).(func(*management_cattle_iov3.Setting) *management_cattle_iov3.Setting); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*management_cattle_iov3.Setting)
		}
	}

	if rf, ok := ret.Get(1).(func(*management_cattle_iov3.Setting) error); ok {
		r1 = rf(_a0)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Updater provides a mock function with given fields:
func (_m *SettingController) Updater() generic.Updater {
	ret := _m.Called()

	var r0 generic.Updater
	if rf, ok := ret.Get(0).(func() generic.Updater); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(generic.Updater)
		}
	}

	return r0
}

// Watch provides a mock function with given fields: opts
func (_m *SettingController) Watch(opts v1.ListOptions) (watch.Interface, error) {
	ret := _m.Called(opts)

	var r0 watch.Interface
	var r1 error
	if rf, ok := ret.Get(0).(func(v1.ListOptions) (watch.Interface, error)); ok {
		return rf(opts)
	}
	if rf, ok := ret.Get(0).(func(v1.ListOptions) watch.Interface); ok {
		r0 = rf(opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(watch.Interface)
		}
	}

	if rf, ok := ret.Get(1).(func(v1.ListOptions) error); ok {
		r1 = rf(opts)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// WithImpersonation provides a mock function with given fields: impersonate
func (_m *SettingController) WithImpersonation(impersonate rest.ImpersonationConfig) (generic.NonNamespacedClientInterface[*management_cattle_iov3.Setting, *management_cattle_iov3.SettingList], error) {
	ret := _m.Called(impersonate)

	var r0 generic.NonNamespacedClientInterface[*management_cattle_iov3.Setting, *management_cattle_iov3.SettingList]
	var r1 error
	if rf, ok := ret.Get(0).(func(rest.ImpersonationConfig) (generic.NonNamespacedClientInterface[*management_cattle_iov3.Setting, *management_cattle_iov3.SettingList], error)); ok {
		return rf(impersonate)
	}
	if rf, ok := ret.Get(0).(func(rest.ImpersonationConfig) generic.NonNamespacedClientInterface[*management_cattle_iov3.Setting, *management_cattle_iov3.SettingList]); ok {
		r0 = rf(impersonate)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(generic.NonNamespacedClientInterface[*management_cattle_iov3.Setting, *management_cattle_iov3.SettingList])
		}
	}

	if rf, ok := ret.Get(1).(func(rest.ImpersonationConfig) error); ok {
		r1 = rf(impersonate)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// NewSettingController creates a new instance of SettingController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewSettingController(t interface {
	mock.TestingT
	Cleanup(func())
}) *SettingController {
	mock := &SettingController{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
