// Code generated by mockery v2.48.0. DO NOT EDIT.

package membership

import (
	context "context"

	mock "github.com/stretchr/testify/mock"
	membership "opencsg.com/csghub-server/builder/git/membership"
)

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

type MockGitMemerShip_Expecter struct {
	mock *mock.Mock
}

func (_m *MockGitMemerShip) EXPECT() *MockGitMemerShip_Expecter {
	return &MockGitMemerShip_Expecter{mock: &_m.Mock}
}

// AddMember provides a mock function with given fields: ctx, org, user, role
func (_m *MockGitMemerShip) AddMember(ctx context.Context, org string, user string, role membership.Role) error {
	ret := _m.Called(ctx, org, user, role)

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

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

	return r0
}

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

// AddMember is a helper method to define mock.On call
//   - ctx context.Context
//   - org string
//   - user string
//   - role membership.Role
func (_e *MockGitMemerShip_Expecter) AddMember(ctx interface{}, org interface{}, user interface{}, role interface{}) *MockGitMemerShip_AddMember_Call {
	return &MockGitMemerShip_AddMember_Call{Call: _e.mock.On("AddMember", ctx, org, user, role)}
}

func (_c *MockGitMemerShip_AddMember_Call) Run(run func(ctx context.Context, org string, user string, role membership.Role)) *MockGitMemerShip_AddMember_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(membership.Role))
	})
	return _c
}

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

func (_c *MockGitMemerShip_AddMember_Call) RunAndReturn(run func(context.Context, string, string, membership.Role) error) *MockGitMemerShip_AddMember_Call {
	_c.Call.Return(run)
	return _c
}

// AddRoles provides a mock function with given fields: ctx, org, roles
func (_m *MockGitMemerShip) AddRoles(ctx context.Context, org string, roles []membership.Role) error {
	ret := _m.Called(ctx, org, roles)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, []membership.Role) error); ok {
		r0 = rf(ctx, org, roles)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// AddRoles is a helper method to define mock.On call
//   - ctx context.Context
//   - org string
//   - roles []membership.Role
func (_e *MockGitMemerShip_Expecter) AddRoles(ctx interface{}, org interface{}, roles interface{}) *MockGitMemerShip_AddRoles_Call {
	return &MockGitMemerShip_AddRoles_Call{Call: _e.mock.On("AddRoles", ctx, org, roles)}
}

func (_c *MockGitMemerShip_AddRoles_Call) Run(run func(ctx context.Context, org string, roles []membership.Role)) *MockGitMemerShip_AddRoles_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].([]membership.Role))
	})
	return _c
}

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

func (_c *MockGitMemerShip_AddRoles_Call) RunAndReturn(run func(context.Context, string, []membership.Role) error) *MockGitMemerShip_AddRoles_Call {
	_c.Call.Return(run)
	return _c
}

// IsRole provides a mock function with given fields: ctx, org, user, role
func (_m *MockGitMemerShip) IsRole(ctx context.Context, org string, user string, role membership.Role) (bool, error) {
	ret := _m.Called(ctx, org, user, role)

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

	var r0 bool
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, membership.Role) (bool, error)); ok {
		return rf(ctx, org, user, role)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string, membership.Role) bool); ok {
		r0 = rf(ctx, org, user, role)
	} else {
		r0 = ret.Get(0).(bool)
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string, membership.Role) error); ok {
		r1 = rf(ctx, org, user, role)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// IsRole is a helper method to define mock.On call
//   - ctx context.Context
//   - org string
//   - user string
//   - role membership.Role
func (_e *MockGitMemerShip_Expecter) IsRole(ctx interface{}, org interface{}, user interface{}, role interface{}) *MockGitMemerShip_IsRole_Call {
	return &MockGitMemerShip_IsRole_Call{Call: _e.mock.On("IsRole", ctx, org, user, role)}
}

func (_c *MockGitMemerShip_IsRole_Call) Run(run func(ctx context.Context, org string, user string, role membership.Role)) *MockGitMemerShip_IsRole_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(membership.Role))
	})
	return _c
}

func (_c *MockGitMemerShip_IsRole_Call) Return(_a0 bool, _a1 error) *MockGitMemerShip_IsRole_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockGitMemerShip_IsRole_Call) RunAndReturn(run func(context.Context, string, string, membership.Role) (bool, error)) *MockGitMemerShip_IsRole_Call {
	_c.Call.Return(run)
	return _c
}

// RemoveMember provides a mock function with given fields: ctx, org, user, role
func (_m *MockGitMemerShip) RemoveMember(ctx context.Context, org string, user string, role membership.Role) error {
	ret := _m.Called(ctx, org, user, role)

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

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

	return r0
}

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

// RemoveMember is a helper method to define mock.On call
//   - ctx context.Context
//   - org string
//   - user string
//   - role membership.Role
func (_e *MockGitMemerShip_Expecter) RemoveMember(ctx interface{}, org interface{}, user interface{}, role interface{}) *MockGitMemerShip_RemoveMember_Call {
	return &MockGitMemerShip_RemoveMember_Call{Call: _e.mock.On("RemoveMember", ctx, org, user, role)}
}

func (_c *MockGitMemerShip_RemoveMember_Call) Run(run func(ctx context.Context, org string, user string, role membership.Role)) *MockGitMemerShip_RemoveMember_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(membership.Role))
	})
	return _c
}

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

func (_c *MockGitMemerShip_RemoveMember_Call) RunAndReturn(run func(context.Context, string, string, membership.Role) error) *MockGitMemerShip_RemoveMember_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
