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

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

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

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

// MockExpiringHashAPI is a mock of ExpiringHashAPI interface.
type MockExpiringHashAPI[K1 any, K2 any] struct {
	ctrl     *gomock.Controller
	recorder *MockExpiringHashAPIMockRecorder[K1, K2]
	isgomock struct{}
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// Scan mocks base method.
func (m *MockExpiringHashAPI[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 *MockExpiringHashAPIMockRecorder[K1, K2]) Scan(ctx, key any) *MockExpiringHashAPIScanCall[K1, K2] {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Scan", reflect.TypeOf((*MockExpiringHashAPI[K1, K2])(nil).Scan), ctx, key)
	return &MockExpiringHashAPIScanCall[K1, K2]{Call: call}
}

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

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

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

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