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

package mocks

import (
	"context"
	"time"

	"github.com/argoproj/argo-workflows/v3/util/sync/db"
	mock "github.com/stretchr/testify/mock"
	db0 "github.com/upper/db/v4"
)

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

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

	return mock
}

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

type SyncQueries_Expecter struct {
	mock *mock.Mock
}

func (_m *SyncQueries) EXPECT() *SyncQueries_Expecter {
	return &SyncQueries_Expecter{mock: &_m.Mock}
}

// AddToQueue provides a mock function for the type SyncQueries
func (_mock *SyncQueries) AddToQueue(ctx context.Context, record *db.StateRecord) error {
	ret := _mock.Called(ctx, record)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *db.StateRecord) error); ok {
		r0 = returnFunc(ctx, record)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// AddToQueue is a helper method to define mock.On call
//   - ctx context.Context
//   - record *db.StateRecord
func (_e *SyncQueries_Expecter) AddToQueue(ctx interface{}, record interface{}) *SyncQueries_AddToQueue_Call {
	return &SyncQueries_AddToQueue_Call{Call: _e.mock.On("AddToQueue", ctx, record)}
}

func (_c *SyncQueries_AddToQueue_Call) Run(run func(ctx context.Context, record *db.StateRecord)) *SyncQueries_AddToQueue_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *db.StateRecord
		if args[1] != nil {
			arg1 = args[1].(*db.StateRecord)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *SyncQueries_AddToQueue_Call) RunAndReturn(run func(ctx context.Context, record *db.StateRecord) error) *SyncQueries_AddToQueue_Call {
	_c.Call.Return(run)
	return _c
}

// CheckQueueExists provides a mock function for the type SyncQueries
func (_mock *SyncQueries) CheckQueueExists(ctx context.Context, semaphoreName string, holderKey string, controllerName string) ([]db.StateRecord, error) {
	ret := _mock.Called(ctx, semaphoreName, holderKey, controllerName)

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

	var r0 []db.StateRecord
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) ([]db.StateRecord, error)); ok {
		return returnFunc(ctx, semaphoreName, holderKey, controllerName)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) []db.StateRecord); ok {
		r0 = returnFunc(ctx, semaphoreName, holderKey, controllerName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]db.StateRecord)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
		r1 = returnFunc(ctx, semaphoreName, holderKey, controllerName)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// CheckQueueExists is a helper method to define mock.On call
//   - ctx context.Context
//   - semaphoreName string
//   - holderKey string
//   - controllerName string
func (_e *SyncQueries_Expecter) CheckQueueExists(ctx interface{}, semaphoreName interface{}, holderKey interface{}, controllerName interface{}) *SyncQueries_CheckQueueExists_Call {
	return &SyncQueries_CheckQueueExists_Call{Call: _e.mock.On("CheckQueueExists", ctx, semaphoreName, holderKey, controllerName)}
}

func (_c *SyncQueries_CheckQueueExists_Call) Run(run func(ctx context.Context, semaphoreName string, holderKey string, controllerName string)) *SyncQueries_CheckQueueExists_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *SyncQueries_CheckQueueExists_Call) Return(stateRecords []db.StateRecord, err error) *SyncQueries_CheckQueueExists_Call {
	_c.Call.Return(stateRecords, err)
	return _c
}

func (_c *SyncQueries_CheckQueueExists_Call) RunAndReturn(run func(ctx context.Context, semaphoreName string, holderKey string, controllerName string) ([]db.StateRecord, error)) *SyncQueries_CheckQueueExists_Call {
	_c.Call.Return(run)
	return _c
}

// CreateSemaphoreLimit provides a mock function for the type SyncQueries
func (_mock *SyncQueries) CreateSemaphoreLimit(ctx context.Context, name string, sizeLimit int) error {
	ret := _mock.Called(ctx, name, sizeLimit)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) error); ok {
		r0 = returnFunc(ctx, name, sizeLimit)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// CreateSemaphoreLimit is a helper method to define mock.On call
//   - ctx context.Context
//   - name string
//   - sizeLimit int
func (_e *SyncQueries_Expecter) CreateSemaphoreLimit(ctx interface{}, name interface{}, sizeLimit interface{}) *SyncQueries_CreateSemaphoreLimit_Call {
	return &SyncQueries_CreateSemaphoreLimit_Call{Call: _e.mock.On("CreateSemaphoreLimit", ctx, name, sizeLimit)}
}

func (_c *SyncQueries_CreateSemaphoreLimit_Call) Run(run func(ctx context.Context, name string, sizeLimit int)) *SyncQueries_CreateSemaphoreLimit_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 int
		if args[2] != nil {
			arg2 = args[2].(int)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *SyncQueries_CreateSemaphoreLimit_Call) RunAndReturn(run func(ctx context.Context, name string, sizeLimit int) error) *SyncQueries_CreateSemaphoreLimit_Call {
	_c.Call.Return(run)
	return _c
}

// DeleteLock provides a mock function for the type SyncQueries
func (_mock *SyncQueries) DeleteLock(ctx context.Context, lockName string) error {
	ret := _mock.Called(ctx, lockName)

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

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

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

// DeleteLock is a helper method to define mock.On call
//   - ctx context.Context
//   - lockName string
func (_e *SyncQueries_Expecter) DeleteLock(ctx interface{}, lockName interface{}) *SyncQueries_DeleteLock_Call {
	return &SyncQueries_DeleteLock_Call{Call: _e.mock.On("DeleteLock", ctx, lockName)}
}

func (_c *SyncQueries_DeleteLock_Call) Run(run func(ctx context.Context, lockName string)) *SyncQueries_DeleteLock_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *SyncQueries_DeleteLock_Call) RunAndReturn(run func(ctx context.Context, lockName string) error) *SyncQueries_DeleteLock_Call {
	_c.Call.Return(run)
	return _c
}

// DeleteSemaphoreLimit provides a mock function for the type SyncQueries
func (_mock *SyncQueries) DeleteSemaphoreLimit(ctx context.Context, name string) error {
	ret := _mock.Called(ctx, name)

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

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

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

// DeleteSemaphoreLimit is a helper method to define mock.On call
//   - ctx context.Context
//   - name string
func (_e *SyncQueries_Expecter) DeleteSemaphoreLimit(ctx interface{}, name interface{}) *SyncQueries_DeleteSemaphoreLimit_Call {
	return &SyncQueries_DeleteSemaphoreLimit_Call{Call: _e.mock.On("DeleteSemaphoreLimit", ctx, name)}
}

func (_c *SyncQueries_DeleteSemaphoreLimit_Call) Run(run func(ctx context.Context, name string)) *SyncQueries_DeleteSemaphoreLimit_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *SyncQueries_DeleteSemaphoreLimit_Call) RunAndReturn(run func(ctx context.Context, name string) error) *SyncQueries_DeleteSemaphoreLimit_Call {
	_c.Call.Return(run)
	return _c
}

// ExpireInactiveLocks provides a mock function for the type SyncQueries
func (_mock *SyncQueries) ExpireInactiveLocks(ctx context.Context, inactiveTimeout time.Duration) (int64, error) {
	ret := _mock.Called(ctx, inactiveTimeout)

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

	var r0 int64
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, time.Duration) (int64, error)); ok {
		return returnFunc(ctx, inactiveTimeout)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, time.Duration) int64); ok {
		r0 = returnFunc(ctx, inactiveTimeout)
	} else {
		r0 = ret.Get(0).(int64)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, time.Duration) error); ok {
		r1 = returnFunc(ctx, inactiveTimeout)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ExpireInactiveLocks is a helper method to define mock.On call
//   - ctx context.Context
//   - inactiveTimeout time.Duration
func (_e *SyncQueries_Expecter) ExpireInactiveLocks(ctx interface{}, inactiveTimeout interface{}) *SyncQueries_ExpireInactiveLocks_Call {
	return &SyncQueries_ExpireInactiveLocks_Call{Call: _e.mock.On("ExpireInactiveLocks", ctx, inactiveTimeout)}
}

func (_c *SyncQueries_ExpireInactiveLocks_Call) Run(run func(ctx context.Context, inactiveTimeout time.Duration)) *SyncQueries_ExpireInactiveLocks_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 time.Duration
		if args[1] != nil {
			arg1 = args[1].(time.Duration)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *SyncQueries_ExpireInactiveLocks_Call) RunAndReturn(run func(ctx context.Context, inactiveTimeout time.Duration) (int64, error)) *SyncQueries_ExpireInactiveLocks_Call {
	_c.Call.Return(run)
	return _c
}

// GetCurrentHolders provides a mock function for the type SyncQueries
func (_mock *SyncQueries) GetCurrentHolders(ctx context.Context, session db0.Session, semaphoreName string) ([]db.StateRecord, error) {
	ret := _mock.Called(ctx, session, semaphoreName)

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

	var r0 []db.StateRecord
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, string) ([]db.StateRecord, error)); ok {
		return returnFunc(ctx, session, semaphoreName)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, string) []db.StateRecord); ok {
		r0 = returnFunc(ctx, session, semaphoreName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]db.StateRecord)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, db0.Session, string) error); ok {
		r1 = returnFunc(ctx, session, semaphoreName)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetCurrentHolders is a helper method to define mock.On call
//   - ctx context.Context
//   - session db0.Session
//   - semaphoreName string
func (_e *SyncQueries_Expecter) GetCurrentHolders(ctx interface{}, session interface{}, semaphoreName interface{}) *SyncQueries_GetCurrentHolders_Call {
	return &SyncQueries_GetCurrentHolders_Call{Call: _e.mock.On("GetCurrentHolders", ctx, session, semaphoreName)}
}

func (_c *SyncQueries_GetCurrentHolders_Call) Run(run func(ctx context.Context, session db0.Session, semaphoreName string)) *SyncQueries_GetCurrentHolders_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 db0.Session
		if args[1] != nil {
			arg1 = args[1].(db0.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *SyncQueries_GetCurrentHolders_Call) Return(stateRecords []db.StateRecord, err error) *SyncQueries_GetCurrentHolders_Call {
	_c.Call.Return(stateRecords, err)
	return _c
}

func (_c *SyncQueries_GetCurrentHolders_Call) RunAndReturn(run func(ctx context.Context, session db0.Session, semaphoreName string) ([]db.StateRecord, error)) *SyncQueries_GetCurrentHolders_Call {
	_c.Call.Return(run)
	return _c
}

// GetCurrentPending provides a mock function for the type SyncQueries
func (_mock *SyncQueries) GetCurrentPending(ctx context.Context, semaphoreName string) ([]db.StateRecord, error) {
	ret := _mock.Called(ctx, semaphoreName)

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

	var r0 []db.StateRecord
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]db.StateRecord, error)); ok {
		return returnFunc(ctx, semaphoreName)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) []db.StateRecord); ok {
		r0 = returnFunc(ctx, semaphoreName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]db.StateRecord)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, semaphoreName)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetCurrentPending is a helper method to define mock.On call
//   - ctx context.Context
//   - semaphoreName string
func (_e *SyncQueries_Expecter) GetCurrentPending(ctx interface{}, semaphoreName interface{}) *SyncQueries_GetCurrentPending_Call {
	return &SyncQueries_GetCurrentPending_Call{Call: _e.mock.On("GetCurrentPending", ctx, semaphoreName)}
}

func (_c *SyncQueries_GetCurrentPending_Call) Run(run func(ctx context.Context, semaphoreName string)) *SyncQueries_GetCurrentPending_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *SyncQueries_GetCurrentPending_Call) Return(stateRecords []db.StateRecord, err error) *SyncQueries_GetCurrentPending_Call {
	_c.Call.Return(stateRecords, err)
	return _c
}

func (_c *SyncQueries_GetCurrentPending_Call) RunAndReturn(run func(ctx context.Context, semaphoreName string) ([]db.StateRecord, error)) *SyncQueries_GetCurrentPending_Call {
	_c.Call.Return(run)
	return _c
}

// GetCurrentState provides a mock function for the type SyncQueries
func (_mock *SyncQueries) GetCurrentState(ctx context.Context, session db0.Session, semaphoreName string, held bool) ([]db.StateRecord, error) {
	ret := _mock.Called(ctx, session, semaphoreName, held)

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

	var r0 []db.StateRecord
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, string, bool) ([]db.StateRecord, error)); ok {
		return returnFunc(ctx, session, semaphoreName, held)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, string, bool) []db.StateRecord); ok {
		r0 = returnFunc(ctx, session, semaphoreName, held)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]db.StateRecord)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, db0.Session, string, bool) error); ok {
		r1 = returnFunc(ctx, session, semaphoreName, held)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetCurrentState is a helper method to define mock.On call
//   - ctx context.Context
//   - session db0.Session
//   - semaphoreName string
//   - held bool
func (_e *SyncQueries_Expecter) GetCurrentState(ctx interface{}, session interface{}, semaphoreName interface{}, held interface{}) *SyncQueries_GetCurrentState_Call {
	return &SyncQueries_GetCurrentState_Call{Call: _e.mock.On("GetCurrentState", ctx, session, semaphoreName, held)}
}

func (_c *SyncQueries_GetCurrentState_Call) Run(run func(ctx context.Context, session db0.Session, semaphoreName string, held bool)) *SyncQueries_GetCurrentState_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 db0.Session
		if args[1] != nil {
			arg1 = args[1].(db0.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 bool
		if args[3] != nil {
			arg3 = args[3].(bool)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *SyncQueries_GetCurrentState_Call) Return(stateRecords []db.StateRecord, err error) *SyncQueries_GetCurrentState_Call {
	_c.Call.Return(stateRecords, err)
	return _c
}

func (_c *SyncQueries_GetCurrentState_Call) RunAndReturn(run func(ctx context.Context, session db0.Session, semaphoreName string, held bool) ([]db.StateRecord, error)) *SyncQueries_GetCurrentState_Call {
	_c.Call.Return(run)
	return _c
}

// GetExistingLocks provides a mock function for the type SyncQueries
func (_mock *SyncQueries) GetExistingLocks(ctx context.Context, lockName string, controllerName string) ([]db.LockRecord, error) {
	ret := _mock.Called(ctx, lockName, controllerName)

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

	var r0 []db.LockRecord
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) ([]db.LockRecord, error)); ok {
		return returnFunc(ctx, lockName, controllerName)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) []db.LockRecord); ok {
		r0 = returnFunc(ctx, lockName, controllerName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]db.LockRecord)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = returnFunc(ctx, lockName, controllerName)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetExistingLocks is a helper method to define mock.On call
//   - ctx context.Context
//   - lockName string
//   - controllerName string
func (_e *SyncQueries_Expecter) GetExistingLocks(ctx interface{}, lockName interface{}, controllerName interface{}) *SyncQueries_GetExistingLocks_Call {
	return &SyncQueries_GetExistingLocks_Call{Call: _e.mock.On("GetExistingLocks", ctx, lockName, controllerName)}
}

func (_c *SyncQueries_GetExistingLocks_Call) Run(run func(ctx context.Context, lockName string, controllerName string)) *SyncQueries_GetExistingLocks_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *SyncQueries_GetExistingLocks_Call) Return(lockRecords []db.LockRecord, err error) *SyncQueries_GetExistingLocks_Call {
	_c.Call.Return(lockRecords, err)
	return _c
}

func (_c *SyncQueries_GetExistingLocks_Call) RunAndReturn(run func(ctx context.Context, lockName string, controllerName string) ([]db.LockRecord, error)) *SyncQueries_GetExistingLocks_Call {
	_c.Call.Return(run)
	return _c
}

// GetOrderedQueue provides a mock function for the type SyncQueries
func (_mock *SyncQueries) GetOrderedQueue(ctx context.Context, session db0.Session, semaphoreName string, inactiveTimeout time.Duration) ([]db.StateRecord, error) {
	ret := _mock.Called(ctx, session, semaphoreName, inactiveTimeout)

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

	var r0 []db.StateRecord
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, string, time.Duration) ([]db.StateRecord, error)); ok {
		return returnFunc(ctx, session, semaphoreName, inactiveTimeout)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, string, time.Duration) []db.StateRecord); ok {
		r0 = returnFunc(ctx, session, semaphoreName, inactiveTimeout)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]db.StateRecord)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, db0.Session, string, time.Duration) error); ok {
		r1 = returnFunc(ctx, session, semaphoreName, inactiveTimeout)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetOrderedQueue is a helper method to define mock.On call
//   - ctx context.Context
//   - session db0.Session
//   - semaphoreName string
//   - inactiveTimeout time.Duration
func (_e *SyncQueries_Expecter) GetOrderedQueue(ctx interface{}, session interface{}, semaphoreName interface{}, inactiveTimeout interface{}) *SyncQueries_GetOrderedQueue_Call {
	return &SyncQueries_GetOrderedQueue_Call{Call: _e.mock.On("GetOrderedQueue", ctx, session, semaphoreName, inactiveTimeout)}
}

func (_c *SyncQueries_GetOrderedQueue_Call) Run(run func(ctx context.Context, session db0.Session, semaphoreName string, inactiveTimeout time.Duration)) *SyncQueries_GetOrderedQueue_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 db0.Session
		if args[1] != nil {
			arg1 = args[1].(db0.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 time.Duration
		if args[3] != nil {
			arg3 = args[3].(time.Duration)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *SyncQueries_GetOrderedQueue_Call) Return(stateRecords []db.StateRecord, err error) *SyncQueries_GetOrderedQueue_Call {
	_c.Call.Return(stateRecords, err)
	return _c
}

func (_c *SyncQueries_GetOrderedQueue_Call) RunAndReturn(run func(ctx context.Context, session db0.Session, semaphoreName string, inactiveTimeout time.Duration) ([]db.StateRecord, error)) *SyncQueries_GetOrderedQueue_Call {
	_c.Call.Return(run)
	return _c
}

// GetPendingInQueue provides a mock function for the type SyncQueries
func (_mock *SyncQueries) GetPendingInQueue(ctx context.Context, session db0.Session, semaphoreName string, holderKey string, controllerName string) ([]db.StateRecord, error) {
	ret := _mock.Called(ctx, session, semaphoreName, holderKey, controllerName)

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

	var r0 []db.StateRecord
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, string, string, string) ([]db.StateRecord, error)); ok {
		return returnFunc(ctx, session, semaphoreName, holderKey, controllerName)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, string, string, string) []db.StateRecord); ok {
		r0 = returnFunc(ctx, session, semaphoreName, holderKey, controllerName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]db.StateRecord)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, db0.Session, string, string, string) error); ok {
		r1 = returnFunc(ctx, session, semaphoreName, holderKey, controllerName)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetPendingInQueue is a helper method to define mock.On call
//   - ctx context.Context
//   - session db0.Session
//   - semaphoreName string
//   - holderKey string
//   - controllerName string
func (_e *SyncQueries_Expecter) GetPendingInQueue(ctx interface{}, session interface{}, semaphoreName interface{}, holderKey interface{}, controllerName interface{}) *SyncQueries_GetPendingInQueue_Call {
	return &SyncQueries_GetPendingInQueue_Call{Call: _e.mock.On("GetPendingInQueue", ctx, session, semaphoreName, holderKey, controllerName)}
}

func (_c *SyncQueries_GetPendingInQueue_Call) Run(run func(ctx context.Context, session db0.Session, semaphoreName string, holderKey string, controllerName string)) *SyncQueries_GetPendingInQueue_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 db0.Session
		if args[1] != nil {
			arg1 = args[1].(db0.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		var arg4 string
		if args[4] != nil {
			arg4 = args[4].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
		)
	})
	return _c
}

func (_c *SyncQueries_GetPendingInQueue_Call) Return(stateRecords []db.StateRecord, err error) *SyncQueries_GetPendingInQueue_Call {
	_c.Call.Return(stateRecords, err)
	return _c
}

func (_c *SyncQueries_GetPendingInQueue_Call) RunAndReturn(run func(ctx context.Context, session db0.Session, semaphoreName string, holderKey string, controllerName string) ([]db.StateRecord, error)) *SyncQueries_GetPendingInQueue_Call {
	_c.Call.Return(run)
	return _c
}

// GetPendingInQueueWithSession provides a mock function for the type SyncQueries
func (_mock *SyncQueries) GetPendingInQueueWithSession(ctx context.Context, session db0.Session, semaphoreName string, holderKey string, controllerName string) ([]db.StateRecord, error) {
	ret := _mock.Called(ctx, session, semaphoreName, holderKey, controllerName)

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

	var r0 []db.StateRecord
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, string, string, string) ([]db.StateRecord, error)); ok {
		return returnFunc(ctx, session, semaphoreName, holderKey, controllerName)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, string, string, string) []db.StateRecord); ok {
		r0 = returnFunc(ctx, session, semaphoreName, holderKey, controllerName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]db.StateRecord)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, db0.Session, string, string, string) error); ok {
		r1 = returnFunc(ctx, session, semaphoreName, holderKey, controllerName)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetPendingInQueueWithSession is a helper method to define mock.On call
//   - ctx context.Context
//   - session db0.Session
//   - semaphoreName string
//   - holderKey string
//   - controllerName string
func (_e *SyncQueries_Expecter) GetPendingInQueueWithSession(ctx interface{}, session interface{}, semaphoreName interface{}, holderKey interface{}, controllerName interface{}) *SyncQueries_GetPendingInQueueWithSession_Call {
	return &SyncQueries_GetPendingInQueueWithSession_Call{Call: _e.mock.On("GetPendingInQueueWithSession", ctx, session, semaphoreName, holderKey, controllerName)}
}

func (_c *SyncQueries_GetPendingInQueueWithSession_Call) Run(run func(ctx context.Context, session db0.Session, semaphoreName string, holderKey string, controllerName string)) *SyncQueries_GetPendingInQueueWithSession_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 db0.Session
		if args[1] != nil {
			arg1 = args[1].(db0.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		var arg4 string
		if args[4] != nil {
			arg4 = args[4].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
		)
	})
	return _c
}

func (_c *SyncQueries_GetPendingInQueueWithSession_Call) Return(stateRecords []db.StateRecord, err error) *SyncQueries_GetPendingInQueueWithSession_Call {
	_c.Call.Return(stateRecords, err)
	return _c
}

func (_c *SyncQueries_GetPendingInQueueWithSession_Call) RunAndReturn(run func(ctx context.Context, session db0.Session, semaphoreName string, holderKey string, controllerName string) ([]db.StateRecord, error)) *SyncQueries_GetPendingInQueueWithSession_Call {
	_c.Call.Return(run)
	return _c
}

// GetSemaphoreLimit provides a mock function for the type SyncQueries
func (_mock *SyncQueries) GetSemaphoreLimit(ctx context.Context, dbKey string) (*db.LimitRecord, error) {
	ret := _mock.Called(ctx, dbKey)

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

	var r0 *db.LimitRecord
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*db.LimitRecord, error)); ok {
		return returnFunc(ctx, dbKey)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) *db.LimitRecord); ok {
		r0 = returnFunc(ctx, dbKey)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*db.LimitRecord)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, dbKey)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetSemaphoreLimit is a helper method to define mock.On call
//   - ctx context.Context
//   - dbKey string
func (_e *SyncQueries_Expecter) GetSemaphoreLimit(ctx interface{}, dbKey interface{}) *SyncQueries_GetSemaphoreLimit_Call {
	return &SyncQueries_GetSemaphoreLimit_Call{Call: _e.mock.On("GetSemaphoreLimit", ctx, dbKey)}
}

func (_c *SyncQueries_GetSemaphoreLimit_Call) Run(run func(ctx context.Context, dbKey string)) *SyncQueries_GetSemaphoreLimit_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *SyncQueries_GetSemaphoreLimit_Call) Return(limitRecord *db.LimitRecord, err error) *SyncQueries_GetSemaphoreLimit_Call {
	_c.Call.Return(limitRecord, err)
	return _c
}

func (_c *SyncQueries_GetSemaphoreLimit_Call) RunAndReturn(run func(ctx context.Context, dbKey string) (*db.LimitRecord, error)) *SyncQueries_GetSemaphoreLimit_Call {
	_c.Call.Return(run)
	return _c
}

// InsertControllerHealth provides a mock function for the type SyncQueries
func (_mock *SyncQueries) InsertControllerHealth(ctx context.Context, record *db.ControllerHealthRecord) error {
	ret := _mock.Called(ctx, record)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *db.ControllerHealthRecord) error); ok {
		r0 = returnFunc(ctx, record)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// InsertControllerHealth is a helper method to define mock.On call
//   - ctx context.Context
//   - record *db.ControllerHealthRecord
func (_e *SyncQueries_Expecter) InsertControllerHealth(ctx interface{}, record interface{}) *SyncQueries_InsertControllerHealth_Call {
	return &SyncQueries_InsertControllerHealth_Call{Call: _e.mock.On("InsertControllerHealth", ctx, record)}
}

func (_c *SyncQueries_InsertControllerHealth_Call) Run(run func(ctx context.Context, record *db.ControllerHealthRecord)) *SyncQueries_InsertControllerHealth_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *db.ControllerHealthRecord
		if args[1] != nil {
			arg1 = args[1].(*db.ControllerHealthRecord)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *SyncQueries_InsertControllerHealth_Call) RunAndReturn(run func(ctx context.Context, record *db.ControllerHealthRecord) error) *SyncQueries_InsertControllerHealth_Call {
	_c.Call.Return(run)
	return _c
}

// InsertHeldState provides a mock function for the type SyncQueries
func (_mock *SyncQueries) InsertHeldState(ctx context.Context, session db0.Session, record *db.StateRecord) error {
	ret := _mock.Called(ctx, session, record)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, *db.StateRecord) error); ok {
		r0 = returnFunc(ctx, session, record)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// InsertHeldState is a helper method to define mock.On call
//   - ctx context.Context
//   - session db0.Session
//   - record *db.StateRecord
func (_e *SyncQueries_Expecter) InsertHeldState(ctx interface{}, session interface{}, record interface{}) *SyncQueries_InsertHeldState_Call {
	return &SyncQueries_InsertHeldState_Call{Call: _e.mock.On("InsertHeldState", ctx, session, record)}
}

func (_c *SyncQueries_InsertHeldState_Call) Run(run func(ctx context.Context, session db0.Session, record *db.StateRecord)) *SyncQueries_InsertHeldState_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 db0.Session
		if args[1] != nil {
			arg1 = args[1].(db0.Session)
		}
		var arg2 *db.StateRecord
		if args[2] != nil {
			arg2 = args[2].(*db.StateRecord)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *SyncQueries_InsertHeldState_Call) RunAndReturn(run func(ctx context.Context, session db0.Session, record *db.StateRecord) error) *SyncQueries_InsertHeldState_Call {
	_c.Call.Return(run)
	return _c
}

// InsertHeldStateWithSession provides a mock function for the type SyncQueries
func (_mock *SyncQueries) InsertHeldStateWithSession(ctx context.Context, session db0.Session, record *db.StateRecord) error {
	ret := _mock.Called(ctx, session, record)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, *db.StateRecord) error); ok {
		r0 = returnFunc(ctx, session, record)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// InsertHeldStateWithSession is a helper method to define mock.On call
//   - ctx context.Context
//   - session db0.Session
//   - record *db.StateRecord
func (_e *SyncQueries_Expecter) InsertHeldStateWithSession(ctx interface{}, session interface{}, record interface{}) *SyncQueries_InsertHeldStateWithSession_Call {
	return &SyncQueries_InsertHeldStateWithSession_Call{Call: _e.mock.On("InsertHeldStateWithSession", ctx, session, record)}
}

func (_c *SyncQueries_InsertHeldStateWithSession_Call) Run(run func(ctx context.Context, session db0.Session, record *db.StateRecord)) *SyncQueries_InsertHeldStateWithSession_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 db0.Session
		if args[1] != nil {
			arg1 = args[1].(db0.Session)
		}
		var arg2 *db.StateRecord
		if args[2] != nil {
			arg2 = args[2].(*db.StateRecord)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *SyncQueries_InsertHeldStateWithSession_Call) RunAndReturn(run func(ctx context.Context, session db0.Session, record *db.StateRecord) error) *SyncQueries_InsertHeldStateWithSession_Call {
	_c.Call.Return(run)
	return _c
}

// InsertLock provides a mock function for the type SyncQueries
func (_mock *SyncQueries) InsertLock(ctx context.Context, record *db.LockRecord) error {
	ret := _mock.Called(ctx, record)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *db.LockRecord) error); ok {
		r0 = returnFunc(ctx, record)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// InsertLock is a helper method to define mock.On call
//   - ctx context.Context
//   - record *db.LockRecord
func (_e *SyncQueries_Expecter) InsertLock(ctx interface{}, record interface{}) *SyncQueries_InsertLock_Call {
	return &SyncQueries_InsertLock_Call{Call: _e.mock.On("InsertLock", ctx, record)}
}

func (_c *SyncQueries_InsertLock_Call) Run(run func(ctx context.Context, record *db.LockRecord)) *SyncQueries_InsertLock_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *db.LockRecord
		if args[1] != nil {
			arg1 = args[1].(*db.LockRecord)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *SyncQueries_InsertLock_Call) RunAndReturn(run func(ctx context.Context, record *db.LockRecord) error) *SyncQueries_InsertLock_Call {
	_c.Call.Return(run)
	return _c
}

// ReleaseHeld provides a mock function for the type SyncQueries
func (_mock *SyncQueries) ReleaseHeld(ctx context.Context, semaphoreName string, key string, controllerName string) error {
	ret := _mock.Called(ctx, semaphoreName, key, controllerName)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
		r0 = returnFunc(ctx, semaphoreName, key, controllerName)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// ReleaseHeld is a helper method to define mock.On call
//   - ctx context.Context
//   - semaphoreName string
//   - key string
//   - controllerName string
func (_e *SyncQueries_Expecter) ReleaseHeld(ctx interface{}, semaphoreName interface{}, key interface{}, controllerName interface{}) *SyncQueries_ReleaseHeld_Call {
	return &SyncQueries_ReleaseHeld_Call{Call: _e.mock.On("ReleaseHeld", ctx, semaphoreName, key, controllerName)}
}

func (_c *SyncQueries_ReleaseHeld_Call) Run(run func(ctx context.Context, semaphoreName string, key string, controllerName string)) *SyncQueries_ReleaseHeld_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

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

func (_c *SyncQueries_ReleaseHeld_Call) RunAndReturn(run func(ctx context.Context, semaphoreName string, key string, controllerName string) error) *SyncQueries_ReleaseHeld_Call {
	_c.Call.Return(run)
	return _c
}

// RemoveFromQueue provides a mock function for the type SyncQueries
func (_mock *SyncQueries) RemoveFromQueue(ctx context.Context, semaphoreName string, holderKey string) error {
	ret := _mock.Called(ctx, semaphoreName, holderKey)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
		r0 = returnFunc(ctx, semaphoreName, holderKey)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// RemoveFromQueue is a helper method to define mock.On call
//   - ctx context.Context
//   - semaphoreName string
//   - holderKey string
func (_e *SyncQueries_Expecter) RemoveFromQueue(ctx interface{}, semaphoreName interface{}, holderKey interface{}) *SyncQueries_RemoveFromQueue_Call {
	return &SyncQueries_RemoveFromQueue_Call{Call: _e.mock.On("RemoveFromQueue", ctx, semaphoreName, holderKey)}
}

func (_c *SyncQueries_RemoveFromQueue_Call) Run(run func(ctx context.Context, semaphoreName string, holderKey string)) *SyncQueries_RemoveFromQueue_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *SyncQueries_RemoveFromQueue_Call) RunAndReturn(run func(ctx context.Context, semaphoreName string, holderKey string) error) *SyncQueries_RemoveFromQueue_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateControllerTimestamp provides a mock function for the type SyncQueries
func (_mock *SyncQueries) UpdateControllerTimestamp(ctx context.Context, controllerName string, timestamp time.Time) error {
	ret := _mock.Called(ctx, controllerName, timestamp)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, time.Time) error); ok {
		r0 = returnFunc(ctx, controllerName, timestamp)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// UpdateControllerTimestamp is a helper method to define mock.On call
//   - ctx context.Context
//   - controllerName string
//   - timestamp time.Time
func (_e *SyncQueries_Expecter) UpdateControllerTimestamp(ctx interface{}, controllerName interface{}, timestamp interface{}) *SyncQueries_UpdateControllerTimestamp_Call {
	return &SyncQueries_UpdateControllerTimestamp_Call{Call: _e.mock.On("UpdateControllerTimestamp", ctx, controllerName, timestamp)}
}

func (_c *SyncQueries_UpdateControllerTimestamp_Call) Run(run func(ctx context.Context, controllerName string, timestamp time.Time)) *SyncQueries_UpdateControllerTimestamp_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 time.Time
		if args[2] != nil {
			arg2 = args[2].(time.Time)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *SyncQueries_UpdateControllerTimestamp_Call) RunAndReturn(run func(ctx context.Context, controllerName string, timestamp time.Time) error) *SyncQueries_UpdateControllerTimestamp_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateSemaphoreLimit provides a mock function for the type SyncQueries
func (_mock *SyncQueries) UpdateSemaphoreLimit(ctx context.Context, name string, sizeLimit int) error {
	ret := _mock.Called(ctx, name, sizeLimit)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, int) error); ok {
		r0 = returnFunc(ctx, name, sizeLimit)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// UpdateSemaphoreLimit is a helper method to define mock.On call
//   - ctx context.Context
//   - name string
//   - sizeLimit int
func (_e *SyncQueries_Expecter) UpdateSemaphoreLimit(ctx interface{}, name interface{}, sizeLimit interface{}) *SyncQueries_UpdateSemaphoreLimit_Call {
	return &SyncQueries_UpdateSemaphoreLimit_Call{Call: _e.mock.On("UpdateSemaphoreLimit", ctx, name, sizeLimit)}
}

func (_c *SyncQueries_UpdateSemaphoreLimit_Call) Run(run func(ctx context.Context, name string, sizeLimit int)) *SyncQueries_UpdateSemaphoreLimit_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 int
		if args[2] != nil {
			arg2 = args[2].(int)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *SyncQueries_UpdateSemaphoreLimit_Call) RunAndReturn(run func(ctx context.Context, name string, sizeLimit int) error) *SyncQueries_UpdateSemaphoreLimit_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateStateToHeld provides a mock function for the type SyncQueries
func (_mock *SyncQueries) UpdateStateToHeld(ctx context.Context, session db0.Session, semaphoreName string, holderKey string, controllerName string) error {
	ret := _mock.Called(ctx, session, semaphoreName, holderKey, controllerName)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, string, string, string) error); ok {
		r0 = returnFunc(ctx, session, semaphoreName, holderKey, controllerName)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// UpdateStateToHeld is a helper method to define mock.On call
//   - ctx context.Context
//   - session db0.Session
//   - semaphoreName string
//   - holderKey string
//   - controllerName string
func (_e *SyncQueries_Expecter) UpdateStateToHeld(ctx interface{}, session interface{}, semaphoreName interface{}, holderKey interface{}, controllerName interface{}) *SyncQueries_UpdateStateToHeld_Call {
	return &SyncQueries_UpdateStateToHeld_Call{Call: _e.mock.On("UpdateStateToHeld", ctx, session, semaphoreName, holderKey, controllerName)}
}

func (_c *SyncQueries_UpdateStateToHeld_Call) Run(run func(ctx context.Context, session db0.Session, semaphoreName string, holderKey string, controllerName string)) *SyncQueries_UpdateStateToHeld_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 db0.Session
		if args[1] != nil {
			arg1 = args[1].(db0.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		var arg4 string
		if args[4] != nil {
			arg4 = args[4].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
		)
	})
	return _c
}

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

func (_c *SyncQueries_UpdateStateToHeld_Call) RunAndReturn(run func(ctx context.Context, session db0.Session, semaphoreName string, holderKey string, controllerName string) error) *SyncQueries_UpdateStateToHeld_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateStateToHeldWithSession provides a mock function for the type SyncQueries
func (_mock *SyncQueries) UpdateStateToHeldWithSession(ctx context.Context, session db0.Session, semaphoreName string, holderKey string, controllerName string) error {
	ret := _mock.Called(ctx, session, semaphoreName, holderKey, controllerName)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, db0.Session, string, string, string) error); ok {
		r0 = returnFunc(ctx, session, semaphoreName, holderKey, controllerName)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// UpdateStateToHeldWithSession is a helper method to define mock.On call
//   - ctx context.Context
//   - session db0.Session
//   - semaphoreName string
//   - holderKey string
//   - controllerName string
func (_e *SyncQueries_Expecter) UpdateStateToHeldWithSession(ctx interface{}, session interface{}, semaphoreName interface{}, holderKey interface{}, controllerName interface{}) *SyncQueries_UpdateStateToHeldWithSession_Call {
	return &SyncQueries_UpdateStateToHeldWithSession_Call{Call: _e.mock.On("UpdateStateToHeldWithSession", ctx, session, semaphoreName, holderKey, controllerName)}
}

func (_c *SyncQueries_UpdateStateToHeldWithSession_Call) Run(run func(ctx context.Context, session db0.Session, semaphoreName string, holderKey string, controllerName string)) *SyncQueries_UpdateStateToHeldWithSession_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 db0.Session
		if args[1] != nil {
			arg1 = args[1].(db0.Session)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		var arg4 string
		if args[4] != nil {
			arg4 = args[4].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
		)
	})
	return _c
}

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

func (_c *SyncQueries_UpdateStateToHeldWithSession_Call) RunAndReturn(run func(ctx context.Context, session db0.Session, semaphoreName string, holderKey string, controllerName string) error) *SyncQueries_UpdateStateToHeldWithSession_Call {
	_c.Call.Return(run)
	return _c
}
