// Code generated by MockGen. DO NOT EDIT.
// Source: ../../cache/cache_with_err.go
//
// Generated by this command:
//
//	mockgen -typed -source ../../cache/cache_with_err.go -destination cache.go -package mock_cache
//

// Package mock_cache is a generated GoMock package.
package mock_cache

import (
	context "context"
	reflect "reflect"
	time "time"

	gomock "go.uber.org/mock/gomock"
)

// MockErrCacher is a mock of ErrCacher interface.
type MockErrCacher[K any] struct {
	ctrl     *gomock.Controller
	recorder *MockErrCacherMockRecorder[K]
	isgomock struct{}
}

// MockErrCacherMockRecorder is the mock recorder for MockErrCacher.
type MockErrCacherMockRecorder[K any] struct {
	mock *MockErrCacher[K]
}

// NewMockErrCacher creates a new mock instance.
func NewMockErrCacher[K any](ctrl *gomock.Controller) *MockErrCacher[K] {
	mock := &MockErrCacher[K]{ctrl: ctrl}
	mock.recorder = &MockErrCacherMockRecorder[K]{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockErrCacher[K]) EXPECT() *MockErrCacherMockRecorder[K] {
	return m.recorder
}

// CacheError mocks base method.
func (m *MockErrCacher[K]) CacheError(ctx context.Context, key K, err error, errTTL time.Duration) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "CacheError", ctx, key, err, errTTL)
}

// CacheError indicates an expected call of CacheError.
func (mr *MockErrCacherMockRecorder[K]) CacheError(ctx, key, err, errTTL any) *MockErrCacherCacheErrorCall[K] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CacheError", reflect.TypeOf((*MockErrCacher[K])(nil).CacheError), ctx, key, err, errTTL)
	return &MockErrCacherCacheErrorCall[K]{Call: call}
}

// MockErrCacherCacheErrorCall wrap *gomock.Call
type MockErrCacherCacheErrorCall[K any] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockErrCacherCacheErrorCall[K]) Return() *MockErrCacherCacheErrorCall[K] {
	c.Call = c.Call.Return()
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockErrCacherCacheErrorCall[K]) Do(f func(context.Context, K, error, time.Duration)) *MockErrCacherCacheErrorCall[K] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockErrCacherCacheErrorCall[K]) DoAndReturn(f func(context.Context, K, error, time.Duration)) *MockErrCacherCacheErrorCall[K] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// GetError mocks base method.
func (m *MockErrCacher[K]) GetError(ctx context.Context, key K) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetError", ctx, key)
	ret0, _ := ret[0].(error)
	return ret0
}

// GetError indicates an expected call of GetError.
func (mr *MockErrCacherMockRecorder[K]) GetError(ctx, key any) *MockErrCacherGetErrorCall[K] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetError", reflect.TypeOf((*MockErrCacher[K])(nil).GetError), ctx, key)
	return &MockErrCacherGetErrorCall[K]{Call: call}
}

// MockErrCacherGetErrorCall wrap *gomock.Call
type MockErrCacherGetErrorCall[K any] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockErrCacherGetErrorCall[K]) Return(arg0 error) *MockErrCacherGetErrorCall[K] {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockErrCacherGetErrorCall[K]) Do(f func(context.Context, K) error) *MockErrCacherGetErrorCall[K] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockErrCacherGetErrorCall[K]) DoAndReturn(f func(context.Context, K) error) *MockErrCacherGetErrorCall[K] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}
