// Code generated by mockery. DO NOT EDIT.

package mock_identity

import (
	context "context"

	app "github.com/anyproto/any-sync/app"

	crypto "github.com/anyproto/any-sync/util/crypto"

	domain "github.com/anyproto/anytype-heart/core/domain"

	mock "github.com/stretchr/testify/mock"

	model "github.com/anyproto/anytype-heart/pkg/lib/pb/model"
)

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

type MockService_Expecter struct {
	mock *mock.Mock
}

func (_m *MockService) EXPECT() *MockService_Expecter {
	return &MockService_Expecter{mock: &_m.Mock}
}

// Close provides a mock function with given fields: ctx
func (_m *MockService) Close(ctx context.Context) error {
	ret := _m.Called(ctx)

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

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

	return r0
}

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

// Close is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockService_Expecter) Close(ctx interface{}) *MockService_Close_Call {
	return &MockService_Close_Call{Call: _e.mock.On("Close", ctx)}
}

func (_c *MockService_Close_Call) Run(run func(ctx context.Context)) *MockService_Close_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

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

func (_c *MockService_Close_Call) RunAndReturn(run func(context.Context) error) *MockService_Close_Call {
	_c.Call.Return(run)
	return _c
}

// GetMyProfileDetails provides a mock function with given fields: ctx
func (_m *MockService) GetMyProfileDetails(ctx context.Context) (string, crypto.SymKey, *domain.Details) {
	ret := _m.Called(ctx)

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

	var r0 string
	var r1 crypto.SymKey
	var r2 *domain.Details
	if rf, ok := ret.Get(0).(func(context.Context) (string, crypto.SymKey, *domain.Details)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) string); ok {
		r0 = rf(ctx)
	} else {
		r0 = ret.Get(0).(string)
	}

	if rf, ok := ret.Get(1).(func(context.Context) crypto.SymKey); ok {
		r1 = rf(ctx)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(crypto.SymKey)
		}
	}

	if rf, ok := ret.Get(2).(func(context.Context) *domain.Details); ok {
		r2 = rf(ctx)
	} else {
		if ret.Get(2) != nil {
			r2 = ret.Get(2).(*domain.Details)
		}
	}

	return r0, r1, r2
}

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

// GetMyProfileDetails is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockService_Expecter) GetMyProfileDetails(ctx interface{}) *MockService_GetMyProfileDetails_Call {
	return &MockService_GetMyProfileDetails_Call{Call: _e.mock.On("GetMyProfileDetails", ctx)}
}

func (_c *MockService_GetMyProfileDetails_Call) Run(run func(ctx context.Context)) *MockService_GetMyProfileDetails_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *MockService_GetMyProfileDetails_Call) Return(_a0 string, metadataKey crypto.SymKey, details *domain.Details) *MockService_GetMyProfileDetails_Call {
	_c.Call.Return(_a0, metadataKey, details)
	return _c
}

func (_c *MockService_GetMyProfileDetails_Call) RunAndReturn(run func(context.Context) (string, crypto.SymKey, *domain.Details)) *MockService_GetMyProfileDetails_Call {
	_c.Call.Return(run)
	return _c
}

// Init provides a mock function with given fields: a
func (_m *MockService) Init(a *app.App) error {
	ret := _m.Called(a)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(*app.App) error); ok {
		r0 = rf(a)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Init is a helper method to define mock.On call
//   - a *app.App
func (_e *MockService_Expecter) Init(a interface{}) *MockService_Init_Call {
	return &MockService_Init_Call{Call: _e.mock.On("Init", a)}
}

func (_c *MockService_Init_Call) Run(run func(a *app.App)) *MockService_Init_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*app.App))
	})
	return _c
}

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

func (_c *MockService_Init_Call) RunAndReturn(run func(*app.App) error) *MockService_Init_Call {
	_c.Call.Return(run)
	return _c
}

// Name provides a mock function with given fields:
func (_m *MockService) Name() string {
	ret := _m.Called()

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

	var r0 string
	if rf, ok := ret.Get(0).(func() string); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(string)
	}

	return r0
}

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

// Name is a helper method to define mock.On call
func (_e *MockService_Expecter) Name() *MockService_Name_Call {
	return &MockService_Name_Call{Call: _e.mock.On("Name")}
}

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

func (_c *MockService_Name_Call) Return(name string) *MockService_Name_Call {
	_c.Call.Return(name)
	return _c
}

func (_c *MockService_Name_Call) RunAndReturn(run func() string) *MockService_Name_Call {
	_c.Call.Return(run)
	return _c
}

// RegisterIdentity provides a mock function with given fields: spaceId, _a1, encryptionKey, observer
func (_m *MockService) RegisterIdentity(spaceId string, _a1 string, encryptionKey crypto.SymKey, observer func(string, *model.IdentityProfile)) error {
	ret := _m.Called(spaceId, _a1, encryptionKey, observer)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(string, string, crypto.SymKey, func(string, *model.IdentityProfile)) error); ok {
		r0 = rf(spaceId, _a1, encryptionKey, observer)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// RegisterIdentity is a helper method to define mock.On call
//   - spaceId string
//   - _a1 string
//   - encryptionKey crypto.SymKey
//   - observer func(string , *model.IdentityProfile)
func (_e *MockService_Expecter) RegisterIdentity(spaceId interface{}, _a1 interface{}, encryptionKey interface{}, observer interface{}) *MockService_RegisterIdentity_Call {
	return &MockService_RegisterIdentity_Call{Call: _e.mock.On("RegisterIdentity", spaceId, _a1, encryptionKey, observer)}
}

func (_c *MockService_RegisterIdentity_Call) Run(run func(spaceId string, _a1 string, encryptionKey crypto.SymKey, observer func(string, *model.IdentityProfile))) *MockService_RegisterIdentity_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(string), args[2].(crypto.SymKey), args[3].(func(string, *model.IdentityProfile)))
	})
	return _c
}

func (_c *MockService_RegisterIdentity_Call) Return(_a0 error) *MockService_RegisterIdentity_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockService_RegisterIdentity_Call) RunAndReturn(run func(string, string, crypto.SymKey, func(string, *model.IdentityProfile)) error) *MockService_RegisterIdentity_Call {
	_c.Call.Return(run)
	return _c
}

// Run provides a mock function with given fields: ctx
func (_m *MockService) Run(ctx context.Context) error {
	ret := _m.Called(ctx)

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

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

	return r0
}

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

// Run is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockService_Expecter) Run(ctx interface{}) *MockService_Run_Call {
	return &MockService_Run_Call{Call: _e.mock.On("Run", ctx)}
}

func (_c *MockService_Run_Call) Run(run func(ctx context.Context)) *MockService_Run_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

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

func (_c *MockService_Run_Call) RunAndReturn(run func(context.Context) error) *MockService_Run_Call {
	_c.Call.Return(run)
	return _c
}

// UnregisterIdentitiesInSpace provides a mock function with given fields: spaceId
func (_m *MockService) UnregisterIdentitiesInSpace(spaceId string) {
	_m.Called(spaceId)
}

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

// UnregisterIdentitiesInSpace is a helper method to define mock.On call
//   - spaceId string
func (_e *MockService_Expecter) UnregisterIdentitiesInSpace(spaceId interface{}) *MockService_UnregisterIdentitiesInSpace_Call {
	return &MockService_UnregisterIdentitiesInSpace_Call{Call: _e.mock.On("UnregisterIdentitiesInSpace", spaceId)}
}

func (_c *MockService_UnregisterIdentitiesInSpace_Call) Run(run func(spaceId string)) *MockService_UnregisterIdentitiesInSpace_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string))
	})
	return _c
}

func (_c *MockService_UnregisterIdentitiesInSpace_Call) Return() *MockService_UnregisterIdentitiesInSpace_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockService_UnregisterIdentitiesInSpace_Call) RunAndReturn(run func(string)) *MockService_UnregisterIdentitiesInSpace_Call {
	_c.Call.Return(run)
	return _c
}

// UnregisterIdentity provides a mock function with given fields: spaceId, _a1
func (_m *MockService) UnregisterIdentity(spaceId string, _a1 string) {
	_m.Called(spaceId, _a1)
}

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

// UnregisterIdentity is a helper method to define mock.On call
//   - spaceId string
//   - _a1 string
func (_e *MockService_Expecter) UnregisterIdentity(spaceId interface{}, _a1 interface{}) *MockService_UnregisterIdentity_Call {
	return &MockService_UnregisterIdentity_Call{Call: _e.mock.On("UnregisterIdentity", spaceId, _a1)}
}

func (_c *MockService_UnregisterIdentity_Call) Run(run func(spaceId string, _a1 string)) *MockService_UnregisterIdentity_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(string))
	})
	return _c
}

func (_c *MockService_UnregisterIdentity_Call) Return() *MockService_UnregisterIdentity_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockService_UnregisterIdentity_Call) RunAndReturn(run func(string, string)) *MockService_UnregisterIdentity_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateOwnGlobalName provides a mock function with given fields: myIdentityGlobalName
func (_m *MockService) UpdateOwnGlobalName(myIdentityGlobalName string) {
	_m.Called(myIdentityGlobalName)
}

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

// UpdateOwnGlobalName is a helper method to define mock.On call
//   - myIdentityGlobalName string
func (_e *MockService_Expecter) UpdateOwnGlobalName(myIdentityGlobalName interface{}) *MockService_UpdateOwnGlobalName_Call {
	return &MockService_UpdateOwnGlobalName_Call{Call: _e.mock.On("UpdateOwnGlobalName", myIdentityGlobalName)}
}

func (_c *MockService_UpdateOwnGlobalName_Call) Run(run func(myIdentityGlobalName string)) *MockService_UpdateOwnGlobalName_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string))
	})
	return _c
}

func (_c *MockService_UpdateOwnGlobalName_Call) Return() *MockService_UpdateOwnGlobalName_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockService_UpdateOwnGlobalName_Call) RunAndReturn(run func(string)) *MockService_UpdateOwnGlobalName_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
