// 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"
)

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

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

	return mock
}

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

type DeviceService_Expecter struct {
	mock *mock.Mock
}

func (_m *DeviceService) EXPECT() *DeviceService_Expecter {
	return &DeviceService_Expecter{mock: &_m.Mock}
}

// AddDevice provides a mock function for the type DeviceService
func (_mock *DeviceService) 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
}

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

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

func (_c *DeviceService_AddDevice_Call) Run(run func(ctx context.Context, device *types.Device)) *DeviceService_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 *DeviceService_AddDevice_Call) Return(device1 *types.Device, err error) *DeviceService_AddDevice_Call {
	_c.Call.Return(device1, err)
	return _c
}

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

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

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

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

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

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

func (_c *DeviceService_DeleteDevice_Call) Run(run func(ctx context.Context, deviceID string)) *DeviceService_DeleteDevice_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 *DeviceService_DeleteDevice_Call) Return(err error) *DeviceService_DeleteDevice_Call {
	_c.Call.Return(err)
	return _c
}

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

// ListRegisteredDevices provides a mock function for the type DeviceService
func (_mock *DeviceService) 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
}

// DeviceService_ListRegisteredDevices_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRegisteredDevices'
type DeviceService_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 *DeviceService_Expecter) ListRegisteredDevices(ctx interface{}, paginationFilter interface{}, query interface{}) *DeviceService_ListRegisteredDevices_Call {
	return &DeviceService_ListRegisteredDevices_Call{Call: _e.mock.On("ListRegisteredDevices", ctx, paginationFilter, query)}
}

func (_c *DeviceService_ListRegisteredDevices_Call) Run(run func(ctx context.Context, paginationFilter pagination.PaginationFilter, query *string)) *DeviceService_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 *DeviceService_ListRegisteredDevices_Call) Return(pageable *pagination.Pageable[types.Device], err error) *DeviceService_ListRegisteredDevices_Call {
	_c.Call.Return(pageable, err)
	return _c
}

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

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

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

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

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

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

func (_c *DeviceService_RegisterDevice_Call) Run(run func(ctx context.Context, deviceID string, device *types.Device)) *DeviceService_RegisterDevice_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 *types.Device
		if args[2] != nil {
			arg2 = args[2].(*types.Device)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

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

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

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

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

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

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

func (_c *DeviceService_TestDevice_Call) Run(run func(ctx context.Context, deviceID string)) *DeviceService_TestDevice_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 *DeviceService_TestDevice_Call) Return(err error) *DeviceService_TestDevice_Call {
	_c.Call.Return(err)
	return _c
}

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