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

package database

import (
	context "context"

	mock "github.com/stretchr/testify/mock"
	database "opencsg.com/csghub-server/builder/store/database"
)

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

type MockOrgStore_Expecter struct {
	mock *mock.Mock
}

func (_m *MockOrgStore) EXPECT() *MockOrgStore_Expecter {
	return &MockOrgStore_Expecter{mock: &_m.Mock}
}

// Create provides a mock function with given fields: ctx, org, namepace
func (_m *MockOrgStore) Create(ctx context.Context, org *database.Organization, namepace *database.Namespace) error {
	ret := _m.Called(ctx, org, namepace)

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

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

	return r0
}

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

// Create is a helper method to define mock.On call
//   - ctx context.Context
//   - org *database.Organization
//   - namepace *database.Namespace
func (_e *MockOrgStore_Expecter) Create(ctx interface{}, org interface{}, namepace interface{}) *MockOrgStore_Create_Call {
	return &MockOrgStore_Create_Call{Call: _e.mock.On("Create", ctx, org, namepace)}
}

func (_c *MockOrgStore_Create_Call) Run(run func(ctx context.Context, org *database.Organization, namepace *database.Namespace)) *MockOrgStore_Create_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*database.Organization), args[2].(*database.Namespace))
	})
	return _c
}

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

func (_c *MockOrgStore_Create_Call) RunAndReturn(run func(context.Context, *database.Organization, *database.Namespace) error) *MockOrgStore_Create_Call {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function with given fields: ctx, path
func (_m *MockOrgStore) Delete(ctx context.Context, path string) error {
	ret := _m.Called(ctx, path)

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

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

	return r0
}

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

// Delete is a helper method to define mock.On call
//   - ctx context.Context
//   - path string
func (_e *MockOrgStore_Expecter) Delete(ctx interface{}, path interface{}) *MockOrgStore_Delete_Call {
	return &MockOrgStore_Delete_Call{Call: _e.mock.On("Delete", ctx, path)}
}

func (_c *MockOrgStore_Delete_Call) Run(run func(ctx context.Context, path string)) *MockOrgStore_Delete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

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

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

// Exists provides a mock function with given fields: ctx, path
func (_m *MockOrgStore) Exists(ctx context.Context, path string) (bool, error) {
	ret := _m.Called(ctx, path)

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

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

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

	return r0, r1
}

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

// Exists is a helper method to define mock.On call
//   - ctx context.Context
//   - path string
func (_e *MockOrgStore_Expecter) Exists(ctx interface{}, path interface{}) *MockOrgStore_Exists_Call {
	return &MockOrgStore_Exists_Call{Call: _e.mock.On("Exists", ctx, path)}
}

func (_c *MockOrgStore_Exists_Call) Run(run func(ctx context.Context, path string)) *MockOrgStore_Exists_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockOrgStore_Exists_Call) Return(exists bool, err error) *MockOrgStore_Exists_Call {
	_c.Call.Return(exists, err)
	return _c
}

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

// FindByPath provides a mock function with given fields: ctx, path
func (_m *MockOrgStore) FindByPath(ctx context.Context, path string) (database.Organization, error) {
	ret := _m.Called(ctx, path)

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

	var r0 database.Organization
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string) (database.Organization, error)); ok {
		return rf(ctx, path)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string) database.Organization); ok {
		r0 = rf(ctx, path)
	} else {
		r0 = ret.Get(0).(database.Organization)
	}

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

	return r0, r1
}

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

// FindByPath is a helper method to define mock.On call
//   - ctx context.Context
//   - path string
func (_e *MockOrgStore_Expecter) FindByPath(ctx interface{}, path interface{}) *MockOrgStore_FindByPath_Call {
	return &MockOrgStore_FindByPath_Call{Call: _e.mock.On("FindByPath", ctx, path)}
}

func (_c *MockOrgStore_FindByPath_Call) Run(run func(ctx context.Context, path string)) *MockOrgStore_FindByPath_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockOrgStore_FindByPath_Call) Return(org database.Organization, err error) *MockOrgStore_FindByPath_Call {
	_c.Call.Return(org, err)
	return _c
}

func (_c *MockOrgStore_FindByPath_Call) RunAndReturn(run func(context.Context, string) (database.Organization, error)) *MockOrgStore_FindByPath_Call {
	_c.Call.Return(run)
	return _c
}

// GetUserBelongOrgs provides a mock function with given fields: ctx, userID
func (_m *MockOrgStore) GetUserBelongOrgs(ctx context.Context, userID int64) ([]database.Organization, error) {
	ret := _m.Called(ctx, userID)

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

	var r0 []database.Organization
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, int64) ([]database.Organization, error)); ok {
		return rf(ctx, userID)
	}
	if rf, ok := ret.Get(0).(func(context.Context, int64) []database.Organization); ok {
		r0 = rf(ctx, userID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]database.Organization)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
		r1 = rf(ctx, userID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// GetUserBelongOrgs is a helper method to define mock.On call
//   - ctx context.Context
//   - userID int64
func (_e *MockOrgStore_Expecter) GetUserBelongOrgs(ctx interface{}, userID interface{}) *MockOrgStore_GetUserBelongOrgs_Call {
	return &MockOrgStore_GetUserBelongOrgs_Call{Call: _e.mock.On("GetUserBelongOrgs", ctx, userID)}
}

func (_c *MockOrgStore_GetUserBelongOrgs_Call) Run(run func(ctx context.Context, userID int64)) *MockOrgStore_GetUserBelongOrgs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(int64))
	})
	return _c
}

func (_c *MockOrgStore_GetUserBelongOrgs_Call) Return(orgs []database.Organization, err error) *MockOrgStore_GetUserBelongOrgs_Call {
	_c.Call.Return(orgs, err)
	return _c
}

func (_c *MockOrgStore_GetUserBelongOrgs_Call) RunAndReturn(run func(context.Context, int64) ([]database.Organization, error)) *MockOrgStore_GetUserBelongOrgs_Call {
	_c.Call.Return(run)
	return _c
}

// GetUserOwnOrgs provides a mock function with given fields: ctx, username
func (_m *MockOrgStore) GetUserOwnOrgs(ctx context.Context, username string) ([]database.Organization, error) {
	ret := _m.Called(ctx, username)

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

	var r0 []database.Organization
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string) ([]database.Organization, error)); ok {
		return rf(ctx, username)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string) []database.Organization); ok {
		r0 = rf(ctx, username)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]database.Organization)
		}
	}

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

	return r0, r1
}

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

// GetUserOwnOrgs is a helper method to define mock.On call
//   - ctx context.Context
//   - username string
func (_e *MockOrgStore_Expecter) GetUserOwnOrgs(ctx interface{}, username interface{}) *MockOrgStore_GetUserOwnOrgs_Call {
	return &MockOrgStore_GetUserOwnOrgs_Call{Call: _e.mock.On("GetUserOwnOrgs", ctx, username)}
}

func (_c *MockOrgStore_GetUserOwnOrgs_Call) Run(run func(ctx context.Context, username string)) *MockOrgStore_GetUserOwnOrgs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockOrgStore_GetUserOwnOrgs_Call) Return(orgs []database.Organization, err error) *MockOrgStore_GetUserOwnOrgs_Call {
	_c.Call.Return(orgs, err)
	return _c
}

func (_c *MockOrgStore_GetUserOwnOrgs_Call) RunAndReturn(run func(context.Context, string) ([]database.Organization, error)) *MockOrgStore_GetUserOwnOrgs_Call {
	_c.Call.Return(run)
	return _c
}

// Update provides a mock function with given fields: ctx, org
func (_m *MockOrgStore) Update(ctx context.Context, org *database.Organization) error {
	ret := _m.Called(ctx, org)

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

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

	return r0
}

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

// Update is a helper method to define mock.On call
//   - ctx context.Context
//   - org *database.Organization
func (_e *MockOrgStore_Expecter) Update(ctx interface{}, org interface{}) *MockOrgStore_Update_Call {
	return &MockOrgStore_Update_Call{Call: _e.mock.On("Update", ctx, org)}
}

func (_c *MockOrgStore_Update_Call) Run(run func(ctx context.Context, org *database.Organization)) *MockOrgStore_Update_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*database.Organization))
	})
	return _c
}

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

func (_c *MockOrgStore_Update_Call) RunAndReturn(run func(context.Context, *database.Organization) error) *MockOrgStore_Update_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
