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

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

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

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

// MockIOBuilder is a mock of IOBuilder interface.
type MockIOBuilder[K1 any, K2 any] struct {
	ctrl     *gomock.Controller
	recorder *MockIOBuilderMockRecorder[K1, K2]
	isgomock struct{}
}

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

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

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

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

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

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

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

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

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

// Set mocks base method.
func (m *MockIOBuilder[K1, K2]) Set(keys []K1, ttl time.Duration, kvs ...redistool.BuilderKV[K2]) {
	m.ctrl.T.Helper()
	varargs := []any{keys, ttl}
	for _, a := range kvs {
		varargs = append(varargs, a)
	}
	m.ctrl.Call(m, "Set", varargs...)
}

// Set indicates an expected call of Set.
func (mr *MockIOBuilderMockRecorder[K1, K2]) Set(keys, ttl any, kvs ...any) *MockIOBuilderSetCall[K1, K2] {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{keys, ttl}, kvs...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockIOBuilder[K1, K2])(nil).Set), varargs...)
	return &MockIOBuilderSetCall[K1, K2]{Call: call}
}

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

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

// Do rewrite *gomock.Call.Do
func (c *MockIOBuilderSetCall[K1, K2]) Do(f func([]K1, time.Duration, ...redistool.BuilderKV[K2])) *MockIOBuilderSetCall[K1, K2] {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockIOBuilderSetCall[K1, K2]) DoAndReturn(f func([]K1, time.Duration, ...redistool.BuilderKV[K2])) *MockIOBuilderSetCall[K1, K2] {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// Unset mocks base method.
func (m *MockIOBuilder[K1, K2]) Unset(keys []K1, hashKeys ...K2) {
	m.ctrl.T.Helper()
	varargs := []any{keys}
	for _, a := range hashKeys {
		varargs = append(varargs, a)
	}
	m.ctrl.Call(m, "Unset", varargs...)
}

// Unset indicates an expected call of Unset.
func (mr *MockIOBuilderMockRecorder[K1, K2]) Unset(keys any, hashKeys ...any) *MockIOBuilderUnsetCall[K1, K2] {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{keys}, hashKeys...)
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unset", reflect.TypeOf((*MockIOBuilder[K1, K2])(nil).Unset), varargs...)
	return &MockIOBuilderUnsetCall[K1, K2]{Call: call}
}

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

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

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

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