// Code generated by MockGen. DO NOT EDIT.
// Source: ../../redistool/expiring_hash.go
//
// Generated by this command:
//
//	mockgen -typed -source ../../redistool/expiring_hash.go -destination expiring_hash.go -package mock_redis
//

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

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

	redistool "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/tool/redistool"
	gomock "go.uber.org/mock/gomock"
)

// MockExpiringHash is a mock of ExpiringHash interface.
type MockExpiringHash[K1 any, K2 any] struct {
	ctrl     *gomock.Controller
	recorder *MockExpiringHashMockRecorder[K1, K2]
	isgomock struct{}
}

// MockExpiringHashMockRecorder is the mock recorder for MockExpiringHash.
type MockExpiringHashMockRecorder[K1 any, K2 any] struct {
	mock *MockExpiringHash[K1, K2]
}

// NewMockExpiringHash creates a new mock instance.
func NewMockExpiringHash[K1 any, K2 any](ctrl *gomock.Controller) *MockExpiringHash[K1, K2] {
	mock := &MockExpiringHash[K1, K2]{ctrl: ctrl}
	mock.recorder = &MockExpiringHashMockRecorder[K1, K2]{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExpiringHash[K1, K2]) EXPECT() *MockExpiringHashMockRecorder[K1, K2] {
	return m.recorder
}

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

// DelEX indicates an expected call of DelEX.
func (mr *MockExpiringHashMockRecorder[K1, K2]) DelEX(ctx, key, hashKey any) *MockExpiringHashDelEXCall[K1, K2] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelEX", reflect.TypeOf((*MockExpiringHash[K1, K2])(nil).DelEX), ctx, key, hashKey)
	return &MockExpiringHashDelEXCall[K1, K2]{Call: call}
}

// MockExpiringHashDelEXCall wrap *gomock.Call
type MockExpiringHashDelEXCall[K1 any, K2 any] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockExpiringHashDelEXCall[K1, K2]) Return(arg0 error) *MockExpiringHashDelEXCall[K1, K2] {
	c.Call = c.Call.Return(arg0)
	return c
}

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

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

// GC mocks base method.
func (m *MockExpiringHash[K1, K2]) GC(arg0 context.Context) (int, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GC", arg0)
	ret0, _ := ret[0].(int)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GC indicates an expected call of GC.
func (mr *MockExpiringHashMockRecorder[K1, K2]) GC(arg0 any) *MockExpiringHashGCCall[K1, K2] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GC", reflect.TypeOf((*MockExpiringHash[K1, K2])(nil).GC), arg0)
	return &MockExpiringHashGCCall[K1, K2]{Call: call}
}

// MockExpiringHashGCCall wrap *gomock.Call
type MockExpiringHashGCCall[K1 any, K2 any] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockExpiringHashGCCall[K1, K2]) Return(arg0 int, arg1 error) *MockExpiringHashGCCall[K1, K2] {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockExpiringHashGCCall[K1, K2]) Do(f func(context.Context) (int, error)) *MockExpiringHashGCCall[K1, K2] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockExpiringHashGCCall[K1, K2]) DoAndReturn(f func(context.Context) (int, error)) *MockExpiringHashGCCall[K1, K2] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// GCFor mocks base method.
func (m *MockExpiringHash[K1, K2]) GCFor(keys []K1) func(context.Context) (int, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GCFor", keys)
	ret0, _ := ret[0].(func(context.Context) (int, error))
	return ret0
}

// GCFor indicates an expected call of GCFor.
func (mr *MockExpiringHashMockRecorder[K1, K2]) GCFor(keys any) *MockExpiringHashGCForCall[K1, K2] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GCFor", reflect.TypeOf((*MockExpiringHash[K1, K2])(nil).GCFor), keys)
	return &MockExpiringHashGCForCall[K1, K2]{Call: call}
}

// MockExpiringHashGCForCall wrap *gomock.Call
type MockExpiringHashGCForCall[K1 any, K2 any] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockExpiringHashGCForCall[K1, K2]) Return(arg0 func(context.Context) (int, error)) *MockExpiringHashGCForCall[K1, K2] {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockExpiringHashGCForCall[K1, K2]) Do(f func([]K1) func(context.Context) (int, error)) *MockExpiringHashGCForCall[K1, K2] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockExpiringHashGCForCall[K1, K2]) DoAndReturn(f func([]K1) func(context.Context) (int, error)) *MockExpiringHashGCForCall[K1, K2] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// GetName mocks base method.
func (m *MockExpiringHash[K1, K2]) GetName() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetName")
	ret0, _ := ret[0].(string)
	return ret0
}

// GetName indicates an expected call of GetName.
func (mr *MockExpiringHashMockRecorder[K1, K2]) GetName() *MockExpiringHashGetNameCall[K1, K2] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetName", reflect.TypeOf((*MockExpiringHash[K1, K2])(nil).GetName))
	return &MockExpiringHashGetNameCall[K1, K2]{Call: call}
}

// MockExpiringHashGetNameCall wrap *gomock.Call
type MockExpiringHashGetNameCall[K1 any, K2 any] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockExpiringHashGetNameCall[K1, K2]) Return(arg0 string) *MockExpiringHashGetNameCall[K1, K2] {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockExpiringHashGetNameCall[K1, K2]) Do(f func() string) *MockExpiringHashGetNameCall[K1, K2] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockExpiringHashGetNameCall[K1, K2]) DoAndReturn(f func() string) *MockExpiringHashGetNameCall[K1, K2] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// Len mocks base method.
func (m *MockExpiringHash[K1, K2]) Len(ctx context.Context, key K1) (int64, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Len", ctx, key)
	ret0, _ := ret[0].(int64)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Len indicates an expected call of Len.
func (mr *MockExpiringHashMockRecorder[K1, K2]) Len(ctx, key any) *MockExpiringHashLenCall[K1, K2] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Len", reflect.TypeOf((*MockExpiringHash[K1, K2])(nil).Len), ctx, key)
	return &MockExpiringHashLenCall[K1, K2]{Call: call}
}

// MockExpiringHashLenCall wrap *gomock.Call
type MockExpiringHashLenCall[K1 any, K2 any] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockExpiringHashLenCall[K1, K2]) Return(arg0 int64, arg1 error) *MockExpiringHashLenCall[K1, K2] {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockExpiringHashLenCall[K1, K2]) Do(f func(context.Context, K1) (int64, error)) *MockExpiringHashLenCall[K1, K2] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockExpiringHashLenCall[K1, K2]) DoAndReturn(f func(context.Context, K1) (int64, error)) *MockExpiringHashLenCall[K1, K2] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// Scan mocks base method.
func (m *MockExpiringHash[K1, K2]) Scan(ctx context.Context, key K1) iter.Seq2[redistool.ScanEntry, error] {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Scan", ctx, key)
	ret0, _ := ret[0].(iter.Seq2[redistool.ScanEntry, error])
	return ret0
}

// Scan indicates an expected call of Scan.
func (mr *MockExpiringHashMockRecorder[K1, K2]) Scan(ctx, key any) *MockExpiringHashScanCall[K1, K2] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Scan", reflect.TypeOf((*MockExpiringHash[K1, K2])(nil).Scan), ctx, key)
	return &MockExpiringHashScanCall[K1, K2]{Call: call}
}

// MockExpiringHashScanCall wrap *gomock.Call
type MockExpiringHashScanCall[K1 any, K2 any] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockExpiringHashScanCall[K1, K2]) Return(arg0 iter.Seq2[redistool.ScanEntry, error]) *MockExpiringHashScanCall[K1, K2] {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockExpiringHashScanCall[K1, K2]) Do(f func(context.Context, K1) iter.Seq2[redistool.ScanEntry, error]) *MockExpiringHashScanCall[K1, K2] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockExpiringHashScanCall[K1, K2]) DoAndReturn(f func(context.Context, K1) iter.Seq2[redistool.ScanEntry, error]) *MockExpiringHashScanCall[K1, K2] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// SetEX mocks base method.
func (m *MockExpiringHash[K1, K2]) SetEX(ctx context.Context, key K1, hashKey K2, value []byte, expiresAt time.Time) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "SetEX", ctx, key, hashKey, value, expiresAt)
	ret0, _ := ret[0].(error)
	return ret0
}

// SetEX indicates an expected call of SetEX.
func (mr *MockExpiringHashMockRecorder[K1, K2]) SetEX(ctx, key, hashKey, value, expiresAt any) *MockExpiringHashSetEXCall[K1, K2] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetEX", reflect.TypeOf((*MockExpiringHash[K1, K2])(nil).SetEX), ctx, key, hashKey, value, expiresAt)
	return &MockExpiringHashSetEXCall[K1, K2]{Call: call}
}

// MockExpiringHashSetEXCall wrap *gomock.Call
type MockExpiringHashSetEXCall[K1 any, K2 any] struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockExpiringHashSetEXCall[K1, K2]) Return(arg0 error) *MockExpiringHashSetEXCall[K1, K2] {
	c.Call = c.Call.Return(arg0)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockExpiringHashSetEXCall[K1, K2]) Do(f func(context.Context, K1, K2, []byte, time.Time) error) *MockExpiringHashSetEXCall[K1, K2] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockExpiringHashSetEXCall[K1, K2]) DoAndReturn(f func(context.Context, K1, K2, []byte, time.Time) error) *MockExpiringHashSetEXCall[K1, K2] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}
