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

package mocks

import (
	"context"

	types0 "github.com/agntcy/identity-service/internal/core/app/types"
	"github.com/agntcy/identity-service/internal/core/policy/types"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type TaskRepository_Expecter struct {
	mock *mock.Mock
}

func (_m *TaskRepository) EXPECT() *TaskRepository_Expecter {
	return &TaskRepository_Expecter{mock: &_m.Mock}
}

// Create provides a mock function for the type TaskRepository
func (_mock *TaskRepository) Create(ctx context.Context, tasks ...*types.Task) error {
	// *types.Task
	_va := make([]interface{}, len(tasks))
	for _i := range tasks {
		_va[_i] = tasks[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx)
	_ca = append(_ca, _va...)
	ret := _mock.Called(_ca...)

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

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

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

// Create is a helper method to define mock.On call
//   - ctx context.Context
//   - tasks ...*types.Task
func (_e *TaskRepository_Expecter) Create(ctx interface{}, tasks ...interface{}) *TaskRepository_Create_Call {
	return &TaskRepository_Create_Call{Call: _e.mock.On("Create",
		append([]interface{}{ctx}, tasks...)...)}
}

func (_c *TaskRepository_Create_Call) Run(run func(ctx context.Context, tasks ...*types.Task)) *TaskRepository_Create_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []*types.Task
		variadicArgs := make([]*types.Task, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(*types.Task)
			}
		}
		arg1 = variadicArgs
		run(
			arg0,
			arg1...,
		)
	})
	return _c
}

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

func (_c *TaskRepository_Create_Call) RunAndReturn(run func(ctx context.Context, tasks ...*types.Task) error) *TaskRepository_Create_Call {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function for the type TaskRepository
func (_mock *TaskRepository) Delete(ctx context.Context, tasks ...*types.Task) error {
	// *types.Task
	_va := make([]interface{}, len(tasks))
	for _i := range tasks {
		_va[_i] = tasks[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx)
	_ca = append(_ca, _va...)
	ret := _mock.Called(_ca...)

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

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

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

// Delete is a helper method to define mock.On call
//   - ctx context.Context
//   - tasks ...*types.Task
func (_e *TaskRepository_Expecter) Delete(ctx interface{}, tasks ...interface{}) *TaskRepository_Delete_Call {
	return &TaskRepository_Delete_Call{Call: _e.mock.On("Delete",
		append([]interface{}{ctx}, tasks...)...)}
}

func (_c *TaskRepository_Delete_Call) Run(run func(ctx context.Context, tasks ...*types.Task)) *TaskRepository_Delete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []*types.Task
		variadicArgs := make([]*types.Task, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(*types.Task)
			}
		}
		arg1 = variadicArgs
		run(
			arg0,
			arg1...,
		)
	})
	return _c
}

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

func (_c *TaskRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, tasks ...*types.Task) error) *TaskRepository_Delete_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

// DeleteByAppID is a helper method to define mock.On call
//   - ctx context.Context
//   - appID string
func (_e *TaskRepository_Expecter) DeleteByAppID(ctx interface{}, appID interface{}) *TaskRepository_DeleteByAppID_Call {
	return &TaskRepository_DeleteByAppID_Call{Call: _e.mock.On("DeleteByAppID", ctx, appID)}
}

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

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

// GetByAppID provides a mock function for the type TaskRepository
func (_mock *TaskRepository) GetByAppID(ctx context.Context, appID string) ([]*types.Task, error) {
	ret := _mock.Called(ctx, appID)

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

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

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

// GetByAppID is a helper method to define mock.On call
//   - ctx context.Context
//   - appID string
func (_e *TaskRepository_Expecter) GetByAppID(ctx interface{}, appID interface{}) *TaskRepository_GetByAppID_Call {
	return &TaskRepository_GetByAppID_Call{Call: _e.mock.On("GetByAppID", ctx, appID)}
}

func (_c *TaskRepository_GetByAppID_Call) Run(run func(ctx context.Context, appID string)) *TaskRepository_GetByAppID_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 *TaskRepository_GetByAppID_Call) Return(tasks []*types.Task, err error) *TaskRepository_GetByAppID_Call {
	_c.Call.Return(tasks, err)
	return _c
}

func (_c *TaskRepository_GetByAppID_Call) RunAndReturn(run func(ctx context.Context, appID string) ([]*types.Task, error)) *TaskRepository_GetByAppID_Call {
	_c.Call.Return(run)
	return _c
}

// GetByID provides a mock function for the type TaskRepository
func (_mock *TaskRepository) GetByID(ctx context.Context, ids []string) ([]*types.Task, error) {
	ret := _mock.Called(ctx, ids)

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

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

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

// GetByID is a helper method to define mock.On call
//   - ctx context.Context
//   - ids []string
func (_e *TaskRepository_Expecter) GetByID(ctx interface{}, ids interface{}) *TaskRepository_GetByID_Call {
	return &TaskRepository_GetByID_Call{Call: _e.mock.On("GetByID", ctx, ids)}
}

func (_c *TaskRepository_GetByID_Call) Run(run func(ctx context.Context, ids []string)) *TaskRepository_GetByID_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 *TaskRepository_GetByID_Call) Return(tasks []*types.Task, err error) *TaskRepository_GetByID_Call {
	_c.Call.Return(tasks, err)
	return _c
}

func (_c *TaskRepository_GetByID_Call) RunAndReturn(run func(ctx context.Context, ids []string) ([]*types.Task, error)) *TaskRepository_GetByID_Call {
	_c.Call.Return(run)
	return _c
}

// GetPerAppType provides a mock function for the type TaskRepository
func (_mock *TaskRepository) GetPerAppType(ctx context.Context, excludeAppIDs ...string) (map[types0.AppType][]*types.Task, error) {
	// string
	_va := make([]interface{}, len(excludeAppIDs))
	for _i := range excludeAppIDs {
		_va[_i] = excludeAppIDs[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx)
	_ca = append(_ca, _va...)
	ret := _mock.Called(_ca...)

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

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

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

// GetPerAppType is a helper method to define mock.On call
//   - ctx context.Context
//   - excludeAppIDs ...string
func (_e *TaskRepository_Expecter) GetPerAppType(ctx interface{}, excludeAppIDs ...interface{}) *TaskRepository_GetPerAppType_Call {
	return &TaskRepository_GetPerAppType_Call{Call: _e.mock.On("GetPerAppType",
		append([]interface{}{ctx}, excludeAppIDs...)...)}
}

func (_c *TaskRepository_GetPerAppType_Call) Run(run func(ctx context.Context, excludeAppIDs ...string)) *TaskRepository_GetPerAppType_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []string
		variadicArgs := make([]string, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(string)
			}
		}
		arg1 = variadicArgs
		run(
			arg0,
			arg1...,
		)
	})
	return _c
}

func (_c *TaskRepository_GetPerAppType_Call) Return(appTypeToTasks map[types0.AppType][]*types.Task, err error) *TaskRepository_GetPerAppType_Call {
	_c.Call.Return(appTypeToTasks, err)
	return _c
}

func (_c *TaskRepository_GetPerAppType_Call) RunAndReturn(run func(ctx context.Context, excludeAppIDs ...string) (map[types0.AppType][]*types.Task, error)) *TaskRepository_GetPerAppType_Call {
	_c.Call.Return(run)
	return _c
}

// Update provides a mock function for the type TaskRepository
func (_mock *TaskRepository) Update(ctx context.Context, tasks ...*types.Task) error {
	// *types.Task
	_va := make([]interface{}, len(tasks))
	for _i := range tasks {
		_va[_i] = tasks[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx)
	_ca = append(_ca, _va...)
	ret := _mock.Called(_ca...)

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

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

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

// Update is a helper method to define mock.On call
//   - ctx context.Context
//   - tasks ...*types.Task
func (_e *TaskRepository_Expecter) Update(ctx interface{}, tasks ...interface{}) *TaskRepository_Update_Call {
	return &TaskRepository_Update_Call{Call: _e.mock.On("Update",
		append([]interface{}{ctx}, tasks...)...)}
}

func (_c *TaskRepository_Update_Call) Run(run func(ctx context.Context, tasks ...*types.Task)) *TaskRepository_Update_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []*types.Task
		variadicArgs := make([]*types.Task, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(*types.Task)
			}
		}
		arg1 = variadicArgs
		run(
			arg0,
			arg1...,
		)
	})
	return _c
}

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

func (_c *TaskRepository_Update_Call) RunAndReturn(run func(ctx context.Context, tasks ...*types.Task) error) *TaskRepository_Update_Call {
	_c.Call.Return(run)
	return _c
}
