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

package mocks

import (
	"context"

	"github.com/agntcy/identity-service/internal/core/auth/types/int"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Repository_Expecter struct {
	mock *mock.Mock
}

func (_m *Repository) EXPECT() *Repository_Expecter {
	return &Repository_Expecter{mock: &_m.Mock}
}

// CreateDeviceOTP provides a mock function for the type Repository
func (_mock *Repository) CreateDeviceOTP(ctx context.Context, otp *types.SessionDeviceOTP) error {
	ret := _mock.Called(ctx, otp)

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

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

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

// CreateDeviceOTP is a helper method to define mock.On call
//   - ctx context.Context
//   - otp *types.SessionDeviceOTP
func (_e *Repository_Expecter) CreateDeviceOTP(ctx interface{}, otp interface{}) *Repository_CreateDeviceOTP_Call {
	return &Repository_CreateDeviceOTP_Call{Call: _e.mock.On("CreateDeviceOTP", ctx, otp)}
}

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

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

func (_c *Repository_CreateDeviceOTP_Call) RunAndReturn(run func(ctx context.Context, otp *types.SessionDeviceOTP) error) *Repository_CreateDeviceOTP_Call {
	_c.Call.Return(run)
	return _c
}

// CreateSession provides a mock function for the type Repository
func (_mock *Repository) CreateSession(ctx context.Context, session *types.Session) (*types.Session, error) {
	ret := _mock.Called(ctx, session)

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

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

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

// CreateSession is a helper method to define mock.On call
//   - ctx context.Context
//   - session *types.Session
func (_e *Repository_Expecter) CreateSession(ctx interface{}, session interface{}) *Repository_CreateSession_Call {
	return &Repository_CreateSession_Call{Call: _e.mock.On("CreateSession", ctx, session)}
}

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

func (_c *Repository_CreateSession_Call) Return(session1 *types.Session, err error) *Repository_CreateSession_Call {
	_c.Call.Return(session1, err)
	return _c
}

func (_c *Repository_CreateSession_Call) RunAndReturn(run func(ctx context.Context, session *types.Session) (*types.Session, error)) *Repository_CreateSession_Call {
	_c.Call.Return(run)
	return _c
}

// GetDeviceOTP provides a mock function for the type Repository
func (_mock *Repository) GetDeviceOTP(ctx context.Context, id string) (*types.SessionDeviceOTP, error) {
	ret := _mock.Called(ctx, id)

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

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

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

// GetDeviceOTP is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *Repository_Expecter) GetDeviceOTP(ctx interface{}, id interface{}) *Repository_GetDeviceOTP_Call {
	return &Repository_GetDeviceOTP_Call{Call: _e.mock.On("GetDeviceOTP", ctx, id)}
}

func (_c *Repository_GetDeviceOTP_Call) Run(run func(ctx context.Context, id string)) *Repository_GetDeviceOTP_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 *Repository_GetDeviceOTP_Call) Return(sessionDeviceOTP *types.SessionDeviceOTP, err error) *Repository_GetDeviceOTP_Call {
	_c.Call.Return(sessionDeviceOTP, err)
	return _c
}

func (_c *Repository_GetDeviceOTP_Call) RunAndReturn(run func(ctx context.Context, id string) (*types.SessionDeviceOTP, error)) *Repository_GetDeviceOTP_Call {
	_c.Call.Return(run)
	return _c
}

// GetDeviceOTPByValue provides a mock function for the type Repository
func (_mock *Repository) GetDeviceOTPByValue(ctx context.Context, deviceID string, sessionID string, value string) (*types.SessionDeviceOTP, error) {
	ret := _mock.Called(ctx, deviceID, sessionID, value)

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

	var r0 *types.SessionDeviceOTP
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) (*types.SessionDeviceOTP, error)); ok {
		return returnFunc(ctx, deviceID, sessionID, value)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) *types.SessionDeviceOTP); ok {
		r0 = returnFunc(ctx, deviceID, sessionID, value)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*types.SessionDeviceOTP)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
		r1 = returnFunc(ctx, deviceID, sessionID, value)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetDeviceOTPByValue is a helper method to define mock.On call
//   - ctx context.Context
//   - deviceID string
//   - sessionID string
//   - value string
func (_e *Repository_Expecter) GetDeviceOTPByValue(ctx interface{}, deviceID interface{}, sessionID interface{}, value interface{}) *Repository_GetDeviceOTPByValue_Call {
	return &Repository_GetDeviceOTPByValue_Call{Call: _e.mock.On("GetDeviceOTPByValue", ctx, deviceID, sessionID, value)}
}

func (_c *Repository_GetDeviceOTPByValue_Call) Run(run func(ctx context.Context, deviceID string, sessionID string, value string)) *Repository_GetDeviceOTPByValue_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 *Repository_GetDeviceOTPByValue_Call) Return(sessionDeviceOTP *types.SessionDeviceOTP, err error) *Repository_GetDeviceOTPByValue_Call {
	_c.Call.Return(sessionDeviceOTP, err)
	return _c
}

func (_c *Repository_GetDeviceOTPByValue_Call) RunAndReturn(run func(ctx context.Context, deviceID string, sessionID string, value string) (*types.SessionDeviceOTP, error)) *Repository_GetDeviceOTPByValue_Call {
	_c.Call.Return(run)
	return _c
}

// GetSessionByAccessToken provides a mock function for the type Repository
func (_mock *Repository) GetSessionByAccessToken(ctx context.Context, accessToken string) (*types.Session, error) {
	ret := _mock.Called(ctx, accessToken)

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

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

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

// GetSessionByAccessToken is a helper method to define mock.On call
//   - ctx context.Context
//   - accessToken string
func (_e *Repository_Expecter) GetSessionByAccessToken(ctx interface{}, accessToken interface{}) *Repository_GetSessionByAccessToken_Call {
	return &Repository_GetSessionByAccessToken_Call{Call: _e.mock.On("GetSessionByAccessToken", ctx, accessToken)}
}

func (_c *Repository_GetSessionByAccessToken_Call) Run(run func(ctx context.Context, accessToken string)) *Repository_GetSessionByAccessToken_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 *Repository_GetSessionByAccessToken_Call) Return(session *types.Session, err error) *Repository_GetSessionByAccessToken_Call {
	_c.Call.Return(session, err)
	return _c
}

func (_c *Repository_GetSessionByAccessToken_Call) RunAndReturn(run func(ctx context.Context, accessToken string) (*types.Session, error)) *Repository_GetSessionByAccessToken_Call {
	_c.Call.Return(run)
	return _c
}

// GetSessionByAuthCode provides a mock function for the type Repository
func (_mock *Repository) GetSessionByAuthCode(ctx context.Context, code string) (*types.Session, error) {
	ret := _mock.Called(ctx, code)

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

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

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

// GetSessionByAuthCode is a helper method to define mock.On call
//   - ctx context.Context
//   - code string
func (_e *Repository_Expecter) GetSessionByAuthCode(ctx interface{}, code interface{}) *Repository_GetSessionByAuthCode_Call {
	return &Repository_GetSessionByAuthCode_Call{Call: _e.mock.On("GetSessionByAuthCode", ctx, code)}
}

func (_c *Repository_GetSessionByAuthCode_Call) Run(run func(ctx context.Context, code string)) *Repository_GetSessionByAuthCode_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 *Repository_GetSessionByAuthCode_Call) Return(session *types.Session, err error) *Repository_GetSessionByAuthCode_Call {
	_c.Call.Return(session, err)
	return _c
}

func (_c *Repository_GetSessionByAuthCode_Call) RunAndReturn(run func(ctx context.Context, code string) (*types.Session, error)) *Repository_GetSessionByAuthCode_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateDeviceOTP provides a mock function for the type Repository
func (_mock *Repository) UpdateDeviceOTP(ctx context.Context, otp *types.SessionDeviceOTP) error {
	ret := _mock.Called(ctx, otp)

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

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

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

// UpdateDeviceOTP is a helper method to define mock.On call
//   - ctx context.Context
//   - otp *types.SessionDeviceOTP
func (_e *Repository_Expecter) UpdateDeviceOTP(ctx interface{}, otp interface{}) *Repository_UpdateDeviceOTP_Call {
	return &Repository_UpdateDeviceOTP_Call{Call: _e.mock.On("UpdateDeviceOTP", ctx, otp)}
}

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

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

func (_c *Repository_UpdateDeviceOTP_Call) RunAndReturn(run func(ctx context.Context, otp *types.SessionDeviceOTP) error) *Repository_UpdateDeviceOTP_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateSession provides a mock function for the type Repository
func (_mock *Repository) UpdateSession(ctx context.Context, session *types.Session) error {
	ret := _mock.Called(ctx, session)

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

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

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

// UpdateSession is a helper method to define mock.On call
//   - ctx context.Context
//   - session *types.Session
func (_e *Repository_Expecter) UpdateSession(ctx interface{}, session interface{}) *Repository_UpdateSession_Call {
	return &Repository_UpdateSession_Call{Call: _e.mock.On("UpdateSession", ctx, session)}
}

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

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

func (_c *Repository_UpdateSession_Call) RunAndReturn(run func(ctx context.Context, session *types.Session) error) *Repository_UpdateSession_Call {
	_c.Call.Return(run)
	return _c
}
