// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package cachemock

import (
	"github.com/asgardeo/thunder/internal/system/cache"
	mock "github.com/stretchr/testify/mock"
)

// NewCacheInterfaceMock creates a new instance of CacheInterfaceMock. 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 NewCacheInterfaceMock[T any](t interface {
	mock.TestingT
	Cleanup(func())
}) *CacheInterfaceMock[T] {
	mock := &CacheInterfaceMock[T]{}
	mock.Mock.Test(t)

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

	return mock
}

// CacheInterfaceMock is an autogenerated mock type for the CacheInterface type
type CacheInterfaceMock[T any] struct {
	mock.Mock
}

type CacheInterfaceMock_Expecter[T any] struct {
	mock *mock.Mock
}

func (_m *CacheInterfaceMock[T]) EXPECT() *CacheInterfaceMock_Expecter[T] {
	return &CacheInterfaceMock_Expecter[T]{mock: &_m.Mock}
}

// CleanupExpired provides a mock function for the type CacheInterfaceMock
func (_mock *CacheInterfaceMock[T]) CleanupExpired() {
	_mock.Called()
	return
}

// CacheInterfaceMock_CleanupExpired_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CleanupExpired'
type CacheInterfaceMock_CleanupExpired_Call[T any] struct {
	*mock.Call
}

// CleanupExpired is a helper method to define mock.On call
func (_e *CacheInterfaceMock_Expecter[T]) CleanupExpired() *CacheInterfaceMock_CleanupExpired_Call[T] {
	return &CacheInterfaceMock_CleanupExpired_Call[T]{Call: _e.mock.On("CleanupExpired")}
}

func (_c *CacheInterfaceMock_CleanupExpired_Call[T]) Run(run func()) *CacheInterfaceMock_CleanupExpired_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *CacheInterfaceMock_CleanupExpired_Call[T]) Return() *CacheInterfaceMock_CleanupExpired_Call[T] {
	_c.Call.Return()
	return _c
}

func (_c *CacheInterfaceMock_CleanupExpired_Call[T]) RunAndReturn(run func()) *CacheInterfaceMock_CleanupExpired_Call[T] {
	_c.Run(run)
	return _c
}

// Clear provides a mock function for the type CacheInterfaceMock
func (_mock *CacheInterfaceMock[T]) Clear() error {
	ret := _mock.Called()

	if len(ret) == 0 {
		panic("no return value specified for Clear")
	}

	var r0 error
	if returnFunc, ok := ret.Get(0).(func() error); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

// CacheInterfaceMock_Clear_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clear'
type CacheInterfaceMock_Clear_Call[T any] struct {
	*mock.Call
}

// Clear is a helper method to define mock.On call
func (_e *CacheInterfaceMock_Expecter[T]) Clear() *CacheInterfaceMock_Clear_Call[T] {
	return &CacheInterfaceMock_Clear_Call[T]{Call: _e.mock.On("Clear")}
}

func (_c *CacheInterfaceMock_Clear_Call[T]) Run(run func()) *CacheInterfaceMock_Clear_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *CacheInterfaceMock_Clear_Call[T]) Return(err error) *CacheInterfaceMock_Clear_Call[T] {
	_c.Call.Return(err)
	return _c
}

func (_c *CacheInterfaceMock_Clear_Call[T]) RunAndReturn(run func() error) *CacheInterfaceMock_Clear_Call[T] {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function for the type CacheInterfaceMock
func (_mock *CacheInterfaceMock[T]) Delete(key cache.CacheKey) error {
	ret := _mock.Called(key)

	if len(ret) == 0 {
		panic("no return value specified for Delete")
	}

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(cache.CacheKey) error); ok {
		r0 = returnFunc(key)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

// CacheInterfaceMock_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
type CacheInterfaceMock_Delete_Call[T any] struct {
	*mock.Call
}

// Delete is a helper method to define mock.On call
//   - key cache.CacheKey
func (_e *CacheInterfaceMock_Expecter[T]) Delete(key interface{}) *CacheInterfaceMock_Delete_Call[T] {
	return &CacheInterfaceMock_Delete_Call[T]{Call: _e.mock.On("Delete", key)}
}

func (_c *CacheInterfaceMock_Delete_Call[T]) Run(run func(key cache.CacheKey)) *CacheInterfaceMock_Delete_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 cache.CacheKey
		if args[0] != nil {
			arg0 = args[0].(cache.CacheKey)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *CacheInterfaceMock_Delete_Call[T]) Return(err error) *CacheInterfaceMock_Delete_Call[T] {
	_c.Call.Return(err)
	return _c
}

func (_c *CacheInterfaceMock_Delete_Call[T]) RunAndReturn(run func(key cache.CacheKey) error) *CacheInterfaceMock_Delete_Call[T] {
	_c.Call.Return(run)
	return _c
}

// Get provides a mock function for the type CacheInterfaceMock
func (_mock *CacheInterfaceMock[T]) Get(key cache.CacheKey) (T, bool) {
	ret := _mock.Called(key)

	if len(ret) == 0 {
		panic("no return value specified for Get")
	}

	var r0 T
	var r1 bool
	if returnFunc, ok := ret.Get(0).(func(cache.CacheKey) (T, bool)); ok {
		return returnFunc(key)
	}
	if returnFunc, ok := ret.Get(0).(func(cache.CacheKey) T); ok {
		r0 = returnFunc(key)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(T)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(cache.CacheKey) bool); ok {
		r1 = returnFunc(key)
	} else {
		r1 = ret.Get(1).(bool)
	}
	return r0, r1
}

// CacheInterfaceMock_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
type CacheInterfaceMock_Get_Call[T any] struct {
	*mock.Call
}

// Get is a helper method to define mock.On call
//   - key cache.CacheKey
func (_e *CacheInterfaceMock_Expecter[T]) Get(key interface{}) *CacheInterfaceMock_Get_Call[T] {
	return &CacheInterfaceMock_Get_Call[T]{Call: _e.mock.On("Get", key)}
}

func (_c *CacheInterfaceMock_Get_Call[T]) Run(run func(key cache.CacheKey)) *CacheInterfaceMock_Get_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 cache.CacheKey
		if args[0] != nil {
			arg0 = args[0].(cache.CacheKey)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *CacheInterfaceMock_Get_Call[T]) Return(v T, b bool) *CacheInterfaceMock_Get_Call[T] {
	_c.Call.Return(v, b)
	return _c
}

func (_c *CacheInterfaceMock_Get_Call[T]) RunAndReturn(run func(key cache.CacheKey) (T, bool)) *CacheInterfaceMock_Get_Call[T] {
	_c.Call.Return(run)
	return _c
}

// GetName provides a mock function for the type CacheInterfaceMock
func (_mock *CacheInterfaceMock[T]) GetName() string {
	ret := _mock.Called()

	if len(ret) == 0 {
		panic("no return value specified for GetName")
	}

	var r0 string
	if returnFunc, ok := ret.Get(0).(func() string); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Get(0).(string)
	}
	return r0
}

// CacheInterfaceMock_GetName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetName'
type CacheInterfaceMock_GetName_Call[T any] struct {
	*mock.Call
}

// GetName is a helper method to define mock.On call
func (_e *CacheInterfaceMock_Expecter[T]) GetName() *CacheInterfaceMock_GetName_Call[T] {
	return &CacheInterfaceMock_GetName_Call[T]{Call: _e.mock.On("GetName")}
}

func (_c *CacheInterfaceMock_GetName_Call[T]) Run(run func()) *CacheInterfaceMock_GetName_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *CacheInterfaceMock_GetName_Call[T]) Return(s string) *CacheInterfaceMock_GetName_Call[T] {
	_c.Call.Return(s)
	return _c
}

func (_c *CacheInterfaceMock_GetName_Call[T]) RunAndReturn(run func() string) *CacheInterfaceMock_GetName_Call[T] {
	_c.Call.Return(run)
	return _c
}

// IsEnabled provides a mock function for the type CacheInterfaceMock
func (_mock *CacheInterfaceMock[T]) IsEnabled() bool {
	ret := _mock.Called()

	if len(ret) == 0 {
		panic("no return value specified for IsEnabled")
	}

	var r0 bool
	if returnFunc, ok := ret.Get(0).(func() bool); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Get(0).(bool)
	}
	return r0
}

// CacheInterfaceMock_IsEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsEnabled'
type CacheInterfaceMock_IsEnabled_Call[T any] struct {
	*mock.Call
}

// IsEnabled is a helper method to define mock.On call
func (_e *CacheInterfaceMock_Expecter[T]) IsEnabled() *CacheInterfaceMock_IsEnabled_Call[T] {
	return &CacheInterfaceMock_IsEnabled_Call[T]{Call: _e.mock.On("IsEnabled")}
}

func (_c *CacheInterfaceMock_IsEnabled_Call[T]) Run(run func()) *CacheInterfaceMock_IsEnabled_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *CacheInterfaceMock_IsEnabled_Call[T]) Return(b bool) *CacheInterfaceMock_IsEnabled_Call[T] {
	_c.Call.Return(b)
	return _c
}

func (_c *CacheInterfaceMock_IsEnabled_Call[T]) RunAndReturn(run func() bool) *CacheInterfaceMock_IsEnabled_Call[T] {
	_c.Call.Return(run)
	return _c
}

// Set provides a mock function for the type CacheInterfaceMock
func (_mock *CacheInterfaceMock[T]) Set(key cache.CacheKey, value T) error {
	ret := _mock.Called(key, value)

	if len(ret) == 0 {
		panic("no return value specified for Set")
	}

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(cache.CacheKey, T) error); ok {
		r0 = returnFunc(key, value)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

// CacheInterfaceMock_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
type CacheInterfaceMock_Set_Call[T any] struct {
	*mock.Call
}

// Set is a helper method to define mock.On call
//   - key cache.CacheKey
//   - value T
func (_e *CacheInterfaceMock_Expecter[T]) Set(key interface{}, value interface{}) *CacheInterfaceMock_Set_Call[T] {
	return &CacheInterfaceMock_Set_Call[T]{Call: _e.mock.On("Set", key, value)}
}

func (_c *CacheInterfaceMock_Set_Call[T]) Run(run func(key cache.CacheKey, value T)) *CacheInterfaceMock_Set_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 cache.CacheKey
		if args[0] != nil {
			arg0 = args[0].(cache.CacheKey)
		}
		var arg1 T
		if args[1] != nil {
			arg1 = args[1].(T)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *CacheInterfaceMock_Set_Call[T]) Return(err error) *CacheInterfaceMock_Set_Call[T] {
	_c.Call.Return(err)
	return _c
}

func (_c *CacheInterfaceMock_Set_Call[T]) RunAndReturn(run func(key cache.CacheKey, value T) error) *CacheInterfaceMock_Set_Call[T] {
	_c.Call.Return(run)
	return _c
}
