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

package mocks

import (
	"context"

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

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

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

	return mock
}

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

type TaskService_Expecter struct {
	mock *mock.Mock
}

func (_m *TaskService) EXPECT() *TaskService_Expecter {
	return &TaskService_Expecter{mock: &_m.Mock}
}

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

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

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

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

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

func (_c *TaskService_CreateForMCP_Call) Run(run func(ctx context.Context, appID string, mcpSchema string)) *TaskService_CreateForMCP_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 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *TaskService_CreateForMCP_Call) Return(tasks []*types.Task, err error) *TaskService_CreateForMCP_Call {
	_c.Call.Return(tasks, err)
	return _c
}

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

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

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

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

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

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

func (_c *TaskService_UpdateOrCreateForAgent_Call) Run(run func(ctx context.Context, appID string, name string)) *TaskService_UpdateOrCreateForAgent_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 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *TaskService_UpdateOrCreateForAgent_Call) Return(task *types.Task, err error) *TaskService_UpdateOrCreateForAgent_Call {
	_c.Call.Return(task, err)
	return _c
}

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