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

package mocks

import (
	"github.com/aerospike/aerospike-client-go/v8"
	mock "github.com/stretchr/testify/mock"
)

// NewMockdbWriter creates a new instance of MockdbWriter. 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 NewMockdbWriter(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockdbWriter {
	mock := &MockdbWriter{}
	mock.Mock.Test(t)

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

	return mock
}

// MockdbWriter is an autogenerated mock type for the dbWriter type
type MockdbWriter struct {
	mock.Mock
}

type MockdbWriter_Expecter struct {
	mock *mock.Mock
}

func (_m *MockdbWriter) EXPECT() *MockdbWriter_Expecter {
	return &MockdbWriter_Expecter{mock: &_m.Mock}
}

// BatchOperate provides a mock function for the type MockdbWriter
func (_mock *MockdbWriter) BatchOperate(policy *aerospike.BatchPolicy, records []aerospike.BatchRecordIfc) aerospike.Error {
	ret := _mock.Called(policy, records)

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

	var r0 aerospike.Error
	if returnFunc, ok := ret.Get(0).(func(*aerospike.BatchPolicy, []aerospike.BatchRecordIfc) aerospike.Error); ok {
		r0 = returnFunc(policy, records)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(aerospike.Error)
		}
	}
	return r0
}

// MockdbWriter_BatchOperate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchOperate'
type MockdbWriter_BatchOperate_Call struct {
	*mock.Call
}

// BatchOperate is a helper method to define mock.On call
//   - policy
//   - records
func (_e *MockdbWriter_Expecter) BatchOperate(policy interface{}, records interface{}) *MockdbWriter_BatchOperate_Call {
	return &MockdbWriter_BatchOperate_Call{Call: _e.mock.On("BatchOperate", policy, records)}
}

func (_c *MockdbWriter_BatchOperate_Call) Run(run func(policy *aerospike.BatchPolicy, records []aerospike.BatchRecordIfc)) *MockdbWriter_BatchOperate_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*aerospike.BatchPolicy), args[1].([]aerospike.BatchRecordIfc))
	})
	return _c
}

func (_c *MockdbWriter_BatchOperate_Call) Return(error aerospike.Error) *MockdbWriter_BatchOperate_Call {
	_c.Call.Return(error)
	return _c
}

func (_c *MockdbWriter_BatchOperate_Call) RunAndReturn(run func(policy *aerospike.BatchPolicy, records []aerospike.BatchRecordIfc) aerospike.Error) *MockdbWriter_BatchOperate_Call {
	_c.Call.Return(run)
	return _c
}

// CreateComplexIndex provides a mock function for the type MockdbWriter
func (_mock *MockdbWriter) CreateComplexIndex(policy *aerospike.WritePolicy, namespace string, set string, indexName string, binName string, indexType aerospike.IndexType, indexCollectionType aerospike.IndexCollectionType, ctx ...*aerospike.CDTContext) (*aerospike.IndexTask, aerospike.Error) {
	var tmpRet mock.Arguments
	if len(ctx) > 0 {
		tmpRet = _mock.Called(policy, namespace, set, indexName, binName, indexType, indexCollectionType, ctx)
	} else {
		tmpRet = _mock.Called(policy, namespace, set, indexName, binName, indexType, indexCollectionType)
	}
	ret := tmpRet

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

	var r0 *aerospike.IndexTask
	var r1 aerospike.Error
	if returnFunc, ok := ret.Get(0).(func(*aerospike.WritePolicy, string, string, string, string, aerospike.IndexType, aerospike.IndexCollectionType, ...*aerospike.CDTContext) (*aerospike.IndexTask, aerospike.Error)); ok {
		return returnFunc(policy, namespace, set, indexName, binName, indexType, indexCollectionType, ctx...)
	}
	if returnFunc, ok := ret.Get(0).(func(*aerospike.WritePolicy, string, string, string, string, aerospike.IndexType, aerospike.IndexCollectionType, ...*aerospike.CDTContext) *aerospike.IndexTask); ok {
		r0 = returnFunc(policy, namespace, set, indexName, binName, indexType, indexCollectionType, ctx...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*aerospike.IndexTask)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*aerospike.WritePolicy, string, string, string, string, aerospike.IndexType, aerospike.IndexCollectionType, ...*aerospike.CDTContext) aerospike.Error); ok {
		r1 = returnFunc(policy, namespace, set, indexName, binName, indexType, indexCollectionType, ctx...)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(aerospike.Error)
		}
	}
	return r0, r1
}

// MockdbWriter_CreateComplexIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateComplexIndex'
type MockdbWriter_CreateComplexIndex_Call struct {
	*mock.Call
}

// CreateComplexIndex is a helper method to define mock.On call
//   - policy
//   - namespace
//   - set
//   - indexName
//   - binName
//   - indexType
//   - indexCollectionType
//   - ctx
func (_e *MockdbWriter_Expecter) CreateComplexIndex(policy interface{}, namespace interface{}, set interface{}, indexName interface{}, binName interface{}, indexType interface{}, indexCollectionType interface{}, ctx ...interface{}) *MockdbWriter_CreateComplexIndex_Call {
	return &MockdbWriter_CreateComplexIndex_Call{Call: _e.mock.On("CreateComplexIndex",
		append([]interface{}{policy, namespace, set, indexName, binName, indexType, indexCollectionType}, ctx...)...)}
}

func (_c *MockdbWriter_CreateComplexIndex_Call) Run(run func(policy *aerospike.WritePolicy, namespace string, set string, indexName string, binName string, indexType aerospike.IndexType, indexCollectionType aerospike.IndexCollectionType, ctx ...*aerospike.CDTContext)) *MockdbWriter_CreateComplexIndex_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := args[7].([]*aerospike.CDTContext)
		run(args[0].(*aerospike.WritePolicy), args[1].(string), args[2].(string), args[3].(string), args[4].(string), args[5].(aerospike.IndexType), args[6].(aerospike.IndexCollectionType), variadicArgs...)
	})
	return _c
}

func (_c *MockdbWriter_CreateComplexIndex_Call) Return(indexTask *aerospike.IndexTask, error aerospike.Error) *MockdbWriter_CreateComplexIndex_Call {
	_c.Call.Return(indexTask, error)
	return _c
}

func (_c *MockdbWriter_CreateComplexIndex_Call) RunAndReturn(run func(policy *aerospike.WritePolicy, namespace string, set string, indexName string, binName string, indexType aerospike.IndexType, indexCollectionType aerospike.IndexCollectionType, ctx ...*aerospike.CDTContext) (*aerospike.IndexTask, aerospike.Error)) *MockdbWriter_CreateComplexIndex_Call {
	_c.Call.Return(run)
	return _c
}

// CreateIndexWithExpression provides a mock function for the type MockdbWriter
func (_mock *MockdbWriter) CreateIndexWithExpression(policy *aerospike.WritePolicy, namespace string, set string, indexName string, indexType aerospike.IndexType, indexCollectionType aerospike.IndexCollectionType, expression *aerospike.Expression) (*aerospike.IndexTask, aerospike.Error) {
	ret := _mock.Called(policy, namespace, set, indexName, indexType, indexCollectionType, expression)

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

	var r0 *aerospike.IndexTask
	var r1 aerospike.Error
	if returnFunc, ok := ret.Get(0).(func(*aerospike.WritePolicy, string, string, string, aerospike.IndexType, aerospike.IndexCollectionType, *aerospike.Expression) (*aerospike.IndexTask, aerospike.Error)); ok {
		return returnFunc(policy, namespace, set, indexName, indexType, indexCollectionType, expression)
	}
	if returnFunc, ok := ret.Get(0).(func(*aerospike.WritePolicy, string, string, string, aerospike.IndexType, aerospike.IndexCollectionType, *aerospike.Expression) *aerospike.IndexTask); ok {
		r0 = returnFunc(policy, namespace, set, indexName, indexType, indexCollectionType, expression)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*aerospike.IndexTask)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*aerospike.WritePolicy, string, string, string, aerospike.IndexType, aerospike.IndexCollectionType, *aerospike.Expression) aerospike.Error); ok {
		r1 = returnFunc(policy, namespace, set, indexName, indexType, indexCollectionType, expression)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(aerospike.Error)
		}
	}
	return r0, r1
}

// MockdbWriter_CreateIndexWithExpression_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateIndexWithExpression'
type MockdbWriter_CreateIndexWithExpression_Call struct {
	*mock.Call
}

// CreateIndexWithExpression is a helper method to define mock.On call
//   - policy
//   - namespace
//   - set
//   - indexName
//   - indexType
//   - indexCollectionType
//   - expression
func (_e *MockdbWriter_Expecter) CreateIndexWithExpression(policy interface{}, namespace interface{}, set interface{}, indexName interface{}, indexType interface{}, indexCollectionType interface{}, expression interface{}) *MockdbWriter_CreateIndexWithExpression_Call {
	return &MockdbWriter_CreateIndexWithExpression_Call{Call: _e.mock.On("CreateIndexWithExpression", policy, namespace, set, indexName, indexType, indexCollectionType, expression)}
}

func (_c *MockdbWriter_CreateIndexWithExpression_Call) Run(run func(policy *aerospike.WritePolicy, namespace string, set string, indexName string, indexType aerospike.IndexType, indexCollectionType aerospike.IndexCollectionType, expression *aerospike.Expression)) *MockdbWriter_CreateIndexWithExpression_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*aerospike.WritePolicy), args[1].(string), args[2].(string), args[3].(string), args[4].(aerospike.IndexType), args[5].(aerospike.IndexCollectionType), args[6].(*aerospike.Expression))
	})
	return _c
}

func (_c *MockdbWriter_CreateIndexWithExpression_Call) Return(indexTask *aerospike.IndexTask, error aerospike.Error) *MockdbWriter_CreateIndexWithExpression_Call {
	_c.Call.Return(indexTask, error)
	return _c
}

func (_c *MockdbWriter_CreateIndexWithExpression_Call) RunAndReturn(run func(policy *aerospike.WritePolicy, namespace string, set string, indexName string, indexType aerospike.IndexType, indexCollectionType aerospike.IndexCollectionType, expression *aerospike.Expression) (*aerospike.IndexTask, aerospike.Error)) *MockdbWriter_CreateIndexWithExpression_Call {
	_c.Call.Return(run)
	return _c
}

// DropIndex provides a mock function for the type MockdbWriter
func (_mock *MockdbWriter) DropIndex(policy *aerospike.WritePolicy, namespace string, set string, indexName string) aerospike.Error {
	ret := _mock.Called(policy, namespace, set, indexName)

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

	var r0 aerospike.Error
	if returnFunc, ok := ret.Get(0).(func(*aerospike.WritePolicy, string, string, string) aerospike.Error); ok {
		r0 = returnFunc(policy, namespace, set, indexName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(aerospike.Error)
		}
	}
	return r0
}

// MockdbWriter_DropIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropIndex'
type MockdbWriter_DropIndex_Call struct {
	*mock.Call
}

// DropIndex is a helper method to define mock.On call
//   - policy
//   - namespace
//   - set
//   - indexName
func (_e *MockdbWriter_Expecter) DropIndex(policy interface{}, namespace interface{}, set interface{}, indexName interface{}) *MockdbWriter_DropIndex_Call {
	return &MockdbWriter_DropIndex_Call{Call: _e.mock.On("DropIndex", policy, namespace, set, indexName)}
}

func (_c *MockdbWriter_DropIndex_Call) Run(run func(policy *aerospike.WritePolicy, namespace string, set string, indexName string)) *MockdbWriter_DropIndex_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*aerospike.WritePolicy), args[1].(string), args[2].(string), args[3].(string))
	})
	return _c
}

func (_c *MockdbWriter_DropIndex_Call) Return(error aerospike.Error) *MockdbWriter_DropIndex_Call {
	_c.Call.Return(error)
	return _c
}

func (_c *MockdbWriter_DropIndex_Call) RunAndReturn(run func(policy *aerospike.WritePolicy, namespace string, set string, indexName string) aerospike.Error) *MockdbWriter_DropIndex_Call {
	_c.Call.Return(run)
	return _c
}

// Put provides a mock function for the type MockdbWriter
func (_mock *MockdbWriter) Put(policy *aerospike.WritePolicy, key *aerospike.Key, bins aerospike.BinMap) aerospike.Error {
	ret := _mock.Called(policy, key, bins)

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

	var r0 aerospike.Error
	if returnFunc, ok := ret.Get(0).(func(*aerospike.WritePolicy, *aerospike.Key, aerospike.BinMap) aerospike.Error); ok {
		r0 = returnFunc(policy, key, bins)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(aerospike.Error)
		}
	}
	return r0
}

// MockdbWriter_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put'
type MockdbWriter_Put_Call struct {
	*mock.Call
}

// Put is a helper method to define mock.On call
//   - policy
//   - key
//   - bins
func (_e *MockdbWriter_Expecter) Put(policy interface{}, key interface{}, bins interface{}) *MockdbWriter_Put_Call {
	return &MockdbWriter_Put_Call{Call: _e.mock.On("Put", policy, key, bins)}
}

func (_c *MockdbWriter_Put_Call) Run(run func(policy *aerospike.WritePolicy, key *aerospike.Key, bins aerospike.BinMap)) *MockdbWriter_Put_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*aerospike.WritePolicy), args[1].(*aerospike.Key), args[2].(aerospike.BinMap))
	})
	return _c
}

func (_c *MockdbWriter_Put_Call) Return(error aerospike.Error) *MockdbWriter_Put_Call {
	_c.Call.Return(error)
	return _c
}

func (_c *MockdbWriter_Put_Call) RunAndReturn(run func(policy *aerospike.WritePolicy, key *aerospike.Key, bins aerospike.BinMap) aerospike.Error) *MockdbWriter_Put_Call {
	_c.Call.Return(run)
	return _c
}

// PutPayload provides a mock function for the type MockdbWriter
func (_mock *MockdbWriter) PutPayload(policy *aerospike.WritePolicy, key *aerospike.Key, payload []byte) aerospike.Error {
	ret := _mock.Called(policy, key, payload)

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

	var r0 aerospike.Error
	if returnFunc, ok := ret.Get(0).(func(*aerospike.WritePolicy, *aerospike.Key, []byte) aerospike.Error); ok {
		r0 = returnFunc(policy, key, payload)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(aerospike.Error)
		}
	}
	return r0
}

// MockdbWriter_PutPayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutPayload'
type MockdbWriter_PutPayload_Call struct {
	*mock.Call
}

// PutPayload is a helper method to define mock.On call
//   - policy
//   - key
//   - payload
func (_e *MockdbWriter_Expecter) PutPayload(policy interface{}, key interface{}, payload interface{}) *MockdbWriter_PutPayload_Call {
	return &MockdbWriter_PutPayload_Call{Call: _e.mock.On("PutPayload", policy, key, payload)}
}

func (_c *MockdbWriter_PutPayload_Call) Run(run func(policy *aerospike.WritePolicy, key *aerospike.Key, payload []byte)) *MockdbWriter_PutPayload_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*aerospike.WritePolicy), args[1].(*aerospike.Key), args[2].([]byte))
	})
	return _c
}

func (_c *MockdbWriter_PutPayload_Call) Return(error aerospike.Error) *MockdbWriter_PutPayload_Call {
	_c.Call.Return(error)
	return _c
}

func (_c *MockdbWriter_PutPayload_Call) RunAndReturn(run func(policy *aerospike.WritePolicy, key *aerospike.Key, payload []byte) aerospike.Error) *MockdbWriter_PutPayload_Call {
	_c.Call.Return(run)
	return _c
}

// RegisterUDF provides a mock function for the type MockdbWriter
func (_mock *MockdbWriter) RegisterUDF(policy *aerospike.WritePolicy, udfBody []byte, serverPath string, language aerospike.Language) (*aerospike.RegisterTask, aerospike.Error) {
	ret := _mock.Called(policy, udfBody, serverPath, language)

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

	var r0 *aerospike.RegisterTask
	var r1 aerospike.Error
	if returnFunc, ok := ret.Get(0).(func(*aerospike.WritePolicy, []byte, string, aerospike.Language) (*aerospike.RegisterTask, aerospike.Error)); ok {
		return returnFunc(policy, udfBody, serverPath, language)
	}
	if returnFunc, ok := ret.Get(0).(func(*aerospike.WritePolicy, []byte, string, aerospike.Language) *aerospike.RegisterTask); ok {
		r0 = returnFunc(policy, udfBody, serverPath, language)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*aerospike.RegisterTask)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*aerospike.WritePolicy, []byte, string, aerospike.Language) aerospike.Error); ok {
		r1 = returnFunc(policy, udfBody, serverPath, language)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(aerospike.Error)
		}
	}
	return r0, r1
}

// MockdbWriter_RegisterUDF_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterUDF'
type MockdbWriter_RegisterUDF_Call struct {
	*mock.Call
}

// RegisterUDF is a helper method to define mock.On call
//   - policy
//   - udfBody
//   - serverPath
//   - language
func (_e *MockdbWriter_Expecter) RegisterUDF(policy interface{}, udfBody interface{}, serverPath interface{}, language interface{}) *MockdbWriter_RegisterUDF_Call {
	return &MockdbWriter_RegisterUDF_Call{Call: _e.mock.On("RegisterUDF", policy, udfBody, serverPath, language)}
}

func (_c *MockdbWriter_RegisterUDF_Call) Run(run func(policy *aerospike.WritePolicy, udfBody []byte, serverPath string, language aerospike.Language)) *MockdbWriter_RegisterUDF_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*aerospike.WritePolicy), args[1].([]byte), args[2].(string), args[3].(aerospike.Language))
	})
	return _c
}

func (_c *MockdbWriter_RegisterUDF_Call) Return(registerTask *aerospike.RegisterTask, error aerospike.Error) *MockdbWriter_RegisterUDF_Call {
	_c.Call.Return(registerTask, error)
	return _c
}

func (_c *MockdbWriter_RegisterUDF_Call) RunAndReturn(run func(policy *aerospike.WritePolicy, udfBody []byte, serverPath string, language aerospike.Language) (*aerospike.RegisterTask, aerospike.Error)) *MockdbWriter_RegisterUDF_Call {
	_c.Call.Return(run)
	return _c
}
