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

package clientmock

import (
	"github.com/asgardeo/thunder/internal/system/database/model"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

// DBClientInterfaceMock is an autogenerated mock type for the DBClientInterface type
type DBClientInterfaceMock struct {
	mock.Mock
}

type DBClientInterfaceMock_Expecter struct {
	mock *mock.Mock
}

func (_m *DBClientInterfaceMock) EXPECT() *DBClientInterfaceMock_Expecter {
	return &DBClientInterfaceMock_Expecter{mock: &_m.Mock}
}

// BeginTx provides a mock function for the type DBClientInterfaceMock
func (_mock *DBClientInterfaceMock) BeginTx() (model.TxInterface, error) {
	ret := _mock.Called()

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

	var r0 model.TxInterface
	var r1 error
	if returnFunc, ok := ret.Get(0).(func() (model.TxInterface, error)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() model.TxInterface); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(model.TxInterface)
		}
	}
	if returnFunc, ok := ret.Get(1).(func() error); ok {
		r1 = returnFunc()
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// BeginTx is a helper method to define mock.On call
func (_e *DBClientInterfaceMock_Expecter) BeginTx() *DBClientInterfaceMock_BeginTx_Call {
	return &DBClientInterfaceMock_BeginTx_Call{Call: _e.mock.On("BeginTx")}
}

func (_c *DBClientInterfaceMock_BeginTx_Call) Run(run func()) *DBClientInterfaceMock_BeginTx_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *DBClientInterfaceMock_BeginTx_Call) Return(txInterface model.TxInterface, err error) *DBClientInterfaceMock_BeginTx_Call {
	_c.Call.Return(txInterface, err)
	return _c
}

func (_c *DBClientInterfaceMock_BeginTx_Call) RunAndReturn(run func() (model.TxInterface, error)) *DBClientInterfaceMock_BeginTx_Call {
	_c.Call.Return(run)
	return _c
}

// Close provides a mock function for the type DBClientInterfaceMock
func (_mock *DBClientInterfaceMock) Close() error {
	ret := _mock.Called()

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func() error); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Close is a helper method to define mock.On call
func (_e *DBClientInterfaceMock_Expecter) Close() *DBClientInterfaceMock_Close_Call {
	return &DBClientInterfaceMock_Close_Call{Call: _e.mock.On("Close")}
}

func (_c *DBClientInterfaceMock_Close_Call) Run(run func()) *DBClientInterfaceMock_Close_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *DBClientInterfaceMock_Close_Call) Return(err error) *DBClientInterfaceMock_Close_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *DBClientInterfaceMock_Close_Call) RunAndReturn(run func() error) *DBClientInterfaceMock_Close_Call {
	_c.Call.Return(run)
	return _c
}

// Execute provides a mock function for the type DBClientInterfaceMock
func (_mock *DBClientInterfaceMock) Execute(query model.DBQuery, args ...interface{}) (int64, error) {
	var _ca []interface{}
	_ca = append(_ca, query)
	_ca = append(_ca, args...)
	ret := _mock.Called(_ca...)

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

	var r0 int64
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(model.DBQuery, ...interface{}) (int64, error)); ok {
		return returnFunc(query, args...)
	}
	if returnFunc, ok := ret.Get(0).(func(model.DBQuery, ...interface{}) int64); ok {
		r0 = returnFunc(query, args...)
	} else {
		r0 = ret.Get(0).(int64)
	}
	if returnFunc, ok := ret.Get(1).(func(model.DBQuery, ...interface{}) error); ok {
		r1 = returnFunc(query, args...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Execute is a helper method to define mock.On call
//   - query model.DBQuery
//   - args ...interface{}
func (_e *DBClientInterfaceMock_Expecter) Execute(query interface{}, args ...interface{}) *DBClientInterfaceMock_Execute_Call {
	return &DBClientInterfaceMock_Execute_Call{Call: _e.mock.On("Execute",
		append([]interface{}{query}, args...)...)}
}

func (_c *DBClientInterfaceMock_Execute_Call) Run(run func(query model.DBQuery, args ...interface{})) *DBClientInterfaceMock_Execute_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 model.DBQuery
		if args[0] != nil {
			arg0 = args[0].(model.DBQuery)
		}
		var arg1 []interface{}
		variadicArgs := make([]interface{}, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(interface{})
			}
		}
		arg1 = variadicArgs
		run(
			arg0,
			arg1...,
		)
	})
	return _c
}

func (_c *DBClientInterfaceMock_Execute_Call) Return(n int64, err error) *DBClientInterfaceMock_Execute_Call {
	_c.Call.Return(n, err)
	return _c
}

func (_c *DBClientInterfaceMock_Execute_Call) RunAndReturn(run func(query model.DBQuery, args ...interface{}) (int64, error)) *DBClientInterfaceMock_Execute_Call {
	_c.Call.Return(run)
	return _c
}

// Query provides a mock function for the type DBClientInterfaceMock
func (_mock *DBClientInterfaceMock) Query(query model.DBQuery, args ...interface{}) ([]map[string]interface{}, error) {
	var _ca []interface{}
	_ca = append(_ca, query)
	_ca = append(_ca, args...)
	ret := _mock.Called(_ca...)

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

	var r0 []map[string]interface{}
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(model.DBQuery, ...interface{}) ([]map[string]interface{}, error)); ok {
		return returnFunc(query, args...)
	}
	if returnFunc, ok := ret.Get(0).(func(model.DBQuery, ...interface{}) []map[string]interface{}); ok {
		r0 = returnFunc(query, args...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]map[string]interface{})
		}
	}
	if returnFunc, ok := ret.Get(1).(func(model.DBQuery, ...interface{}) error); ok {
		r1 = returnFunc(query, args...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Query is a helper method to define mock.On call
//   - query model.DBQuery
//   - args ...interface{}
func (_e *DBClientInterfaceMock_Expecter) Query(query interface{}, args ...interface{}) *DBClientInterfaceMock_Query_Call {
	return &DBClientInterfaceMock_Query_Call{Call: _e.mock.On("Query",
		append([]interface{}{query}, args...)...)}
}

func (_c *DBClientInterfaceMock_Query_Call) Run(run func(query model.DBQuery, args ...interface{})) *DBClientInterfaceMock_Query_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 model.DBQuery
		if args[0] != nil {
			arg0 = args[0].(model.DBQuery)
		}
		var arg1 []interface{}
		variadicArgs := make([]interface{}, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(interface{})
			}
		}
		arg1 = variadicArgs
		run(
			arg0,
			arg1...,
		)
	})
	return _c
}

func (_c *DBClientInterfaceMock_Query_Call) Return(stringToIfaceVals []map[string]interface{}, err error) *DBClientInterfaceMock_Query_Call {
	_c.Call.Return(stringToIfaceVals, err)
	return _c
}

func (_c *DBClientInterfaceMock_Query_Call) RunAndReturn(run func(query model.DBQuery, args ...interface{}) ([]map[string]interface{}, error)) *DBClientInterfaceMock_Query_Call {
	_c.Call.Return(run)
	return _c
}
