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

package mocks

import (
	"context"

	"github.com/agntcy/identity-service/internal/core/device/types"
	"github.com/agntcy/identity-service/internal/pkg/pagination"
	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}
}

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

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

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

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

// AddDevice is a helper method to define mock.On call
//   - ctx context.Context
//   - device *types.Device
func (_e *Repository_Expecter) AddDevice(ctx interface{}, device interface{}) *Repository_AddDevice_Call {
	return &Repository_AddDevice_Call{Call: _e.mock.On("AddDevice", ctx, device)}
}

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

func (_c *Repository_AddDevice_Call) Return(device1 *types.Device, err error) *Repository_AddDevice_Call {
	_c.Call.Return(device1, err)
	return _c
}

func (_c *Repository_AddDevice_Call) RunAndReturn(run func(ctx context.Context, device *types.Device) (*types.Device, error)) *Repository_AddDevice_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

// DeleteDevice is a helper method to define mock.On call
//   - ctx context.Context
//   - device *types.Device
func (_e *Repository_Expecter) DeleteDevice(ctx interface{}, device interface{}) *Repository_DeleteDevice_Call {
	return &Repository_DeleteDevice_Call{Call: _e.mock.On("DeleteDevice", ctx, device)}
}

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

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

func (_c *Repository_DeleteDevice_Call) RunAndReturn(run func(ctx context.Context, device *types.Device) error) *Repository_DeleteDevice_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

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

func (_c *Repository_GetDevice_Call) Run(run func(ctx context.Context, deviceID string)) *Repository_GetDevice_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_GetDevice_Call) Return(device *types.Device, err error) *Repository_GetDevice_Call {
	_c.Call.Return(device, err)
	return _c
}

func (_c *Repository_GetDevice_Call) RunAndReturn(run func(ctx context.Context, deviceID string) (*types.Device, error)) *Repository_GetDevice_Call {
	_c.Call.Return(run)
	return _c
}

// GetDevices provides a mock function for the type Repository
func (_mock *Repository) GetDevices(ctx context.Context, userID *string) ([]*types.Device, error) {
	ret := _mock.Called(ctx, userID)

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

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

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

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

func (_c *Repository_GetDevices_Call) Run(run func(ctx context.Context, userID *string)) *Repository_GetDevices_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_GetDevices_Call) Return(devices []*types.Device, err error) *Repository_GetDevices_Call {
	_c.Call.Return(devices, err)
	return _c
}

func (_c *Repository_GetDevices_Call) RunAndReturn(run func(ctx context.Context, userID *string) ([]*types.Device, error)) *Repository_GetDevices_Call {
	_c.Call.Return(run)
	return _c
}

// ListRegisteredDevices provides a mock function for the type Repository
func (_mock *Repository) ListRegisteredDevices(ctx context.Context, paginationFilter pagination.PaginationFilter, query *string) (*pagination.Pageable[types.Device], error) {
	ret := _mock.Called(ctx, paginationFilter, query)

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

	var r0 *pagination.Pageable[types.Device]
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, pagination.PaginationFilter, *string) (*pagination.Pageable[types.Device], error)); ok {
		return returnFunc(ctx, paginationFilter, query)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, pagination.PaginationFilter, *string) *pagination.Pageable[types.Device]); ok {
		r0 = returnFunc(ctx, paginationFilter, query)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pagination.Pageable[types.Device])
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, pagination.PaginationFilter, *string) error); ok {
		r1 = returnFunc(ctx, paginationFilter, query)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ListRegisteredDevices is a helper method to define mock.On call
//   - ctx context.Context
//   - paginationFilter pagination.PaginationFilter
//   - query *string
func (_e *Repository_Expecter) ListRegisteredDevices(ctx interface{}, paginationFilter interface{}, query interface{}) *Repository_ListRegisteredDevices_Call {
	return &Repository_ListRegisteredDevices_Call{Call: _e.mock.On("ListRegisteredDevices", ctx, paginationFilter, query)}
}

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

func (_c *Repository_ListRegisteredDevices_Call) Return(pageable *pagination.Pageable[types.Device], err error) *Repository_ListRegisteredDevices_Call {
	_c.Call.Return(pageable, err)
	return _c
}

func (_c *Repository_ListRegisteredDevices_Call) RunAndReturn(run func(ctx context.Context, paginationFilter pagination.PaginationFilter, query *string) (*pagination.Pageable[types.Device], error)) *Repository_ListRegisteredDevices_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

// UpdateDevice is a helper method to define mock.On call
//   - ctx context.Context
//   - device *types.Device
func (_e *Repository_Expecter) UpdateDevice(ctx interface{}, device interface{}) *Repository_UpdateDevice_Call {
	return &Repository_UpdateDevice_Call{Call: _e.mock.On("UpdateDevice", ctx, device)}
}

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

func (_c *Repository_UpdateDevice_Call) Return(device1 *types.Device, err error) *Repository_UpdateDevice_Call {
	_c.Call.Return(device1, err)
	return _c
}

func (_c *Repository_UpdateDevice_Call) RunAndReturn(run func(ctx context.Context, device *types.Device) (*types.Device, error)) *Repository_UpdateDevice_Call {
	_c.Call.Return(run)
	return _c
}
