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

package mocks

import (
	"context"

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

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

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

	return mock
}

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

type AppService_Expecter struct {
	mock *mock.Mock
}

func (_m *AppService) EXPECT() *AppService_Expecter {
	return &AppService_Expecter{mock: &_m.Mock}
}

// CountAllApps provides a mock function for the type AppService
func (_mock *AppService) CountAllApps(ctx context.Context) (int64, error) {
	ret := _mock.Called(ctx)

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

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

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

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

func (_c *AppService_CountAllApps_Call) Run(run func(ctx context.Context)) *AppService_CountAllApps_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *AppService_CountAllApps_Call) Return(n int64, err error) *AppService_CountAllApps_Call {
	_c.Call.Return(n, err)
	return _c
}

func (_c *AppService_CountAllApps_Call) RunAndReturn(run func(ctx context.Context) (int64, error)) *AppService_CountAllApps_Call {
	_c.Call.Return(run)
	return _c
}

// CreateApp provides a mock function for the type AppService
func (_mock *AppService) CreateApp(ctx context.Context, app *types.App) (*types.App, error) {
	ret := _mock.Called(ctx, app)

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

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

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

// CreateApp is a helper method to define mock.On call
//   - ctx context.Context
//   - app *types.App
func (_e *AppService_Expecter) CreateApp(ctx interface{}, app interface{}) *AppService_CreateApp_Call {
	return &AppService_CreateApp_Call{Call: _e.mock.On("CreateApp", ctx, app)}
}

func (_c *AppService_CreateApp_Call) Run(run func(ctx context.Context, app *types.App)) *AppService_CreateApp_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *types.App
		if args[1] != nil {
			arg1 = args[1].(*types.App)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *AppService_CreateApp_Call) Return(app1 *types.App, err error) *AppService_CreateApp_Call {
	_c.Call.Return(app1, err)
	return _c
}

func (_c *AppService_CreateApp_Call) RunAndReturn(run func(ctx context.Context, app *types.App) (*types.App, error)) *AppService_CreateApp_Call {
	_c.Call.Return(run)
	return _c
}

// CreateAppFromOasfSchema provides a mock function for the type AppService
func (_mock *AppService) CreateAppFromOasfSchema(ctx context.Context, oasfSchemaBase64 string) (*types.App, error) {
	ret := _mock.Called(ctx, oasfSchemaBase64)

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

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

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

// CreateAppFromOasfSchema is a helper method to define mock.On call
//   - ctx context.Context
//   - oasfSchemaBase64 string
func (_e *AppService_Expecter) CreateAppFromOasfSchema(ctx interface{}, oasfSchemaBase64 interface{}) *AppService_CreateAppFromOasfSchema_Call {
	return &AppService_CreateAppFromOasfSchema_Call{Call: _e.mock.On("CreateAppFromOasfSchema", ctx, oasfSchemaBase64)}
}

func (_c *AppService_CreateAppFromOasfSchema_Call) Run(run func(ctx context.Context, oasfSchemaBase64 string)) *AppService_CreateAppFromOasfSchema_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 *AppService_CreateAppFromOasfSchema_Call) Return(app *types.App, err error) *AppService_CreateAppFromOasfSchema_Call {
	_c.Call.Return(app, err)
	return _c
}

func (_c *AppService_CreateAppFromOasfSchema_Call) RunAndReturn(run func(ctx context.Context, oasfSchemaBase64 string) (*types.App, error)) *AppService_CreateAppFromOasfSchema_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	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
}

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

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

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

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

// GetApp provides a mock function for the type AppService
func (_mock *AppService) GetApp(ctx context.Context, id string) (*types.App, error) {
	ret := _mock.Called(ctx, id)

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

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

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

// GetApp is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *AppService_Expecter) GetApp(ctx interface{}, id interface{}) *AppService_GetApp_Call {
	return &AppService_GetApp_Call{Call: _e.mock.On("GetApp", ctx, id)}
}

func (_c *AppService_GetApp_Call) Run(run func(ctx context.Context, id string)) *AppService_GetApp_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 *AppService_GetApp_Call) Return(app *types.App, err error) *AppService_GetApp_Call {
	_c.Call.Return(app, err)
	return _c
}

func (_c *AppService_GetApp_Call) RunAndReturn(run func(ctx context.Context, id string) (*types.App, error)) *AppService_GetApp_Call {
	_c.Call.Return(run)
	return _c
}

// GetTasksPerAppType provides a mock function for the type AppService
func (_mock *AppService) GetTasksPerAppType(ctx context.Context, excludeAppIDs []string) (map[types.AppType][]*types0.Task, error) {
	ret := _mock.Called(ctx, excludeAppIDs)

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

	var r0 map[types.AppType][]*types0.Task
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []string) (map[types.AppType][]*types0.Task, error)); ok {
		return returnFunc(ctx, excludeAppIDs)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, []string) map[types.AppType][]*types0.Task); ok {
		r0 = returnFunc(ctx, excludeAppIDs)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[types.AppType][]*types0.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
}

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

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

func (_c *AppService_GetTasksPerAppType_Call) Run(run func(ctx context.Context, excludeAppIDs []string)) *AppService_GetTasksPerAppType_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 *AppService_GetTasksPerAppType_Call) Return(appTypeToTasks map[types.AppType][]*types0.Task, err error) *AppService_GetTasksPerAppType_Call {
	_c.Call.Return(appTypeToTasks, err)
	return _c
}

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

// ListApps provides a mock function for the type AppService
func (_mock *AppService) ListApps(ctx context.Context, paginationFilter pagination.PaginationFilter, query *string, appTypes []types.AppType, sortBy sorting.Sorting) (*pagination.Pageable[types.App], error) {
	ret := _mock.Called(ctx, paginationFilter, query, appTypes, sortBy)

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

	var r0 *pagination.Pageable[types.App]
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, pagination.PaginationFilter, *string, []types.AppType, sorting.Sorting) (*pagination.Pageable[types.App], error)); ok {
		return returnFunc(ctx, paginationFilter, query, appTypes, sortBy)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, pagination.PaginationFilter, *string, []types.AppType, sorting.Sorting) *pagination.Pageable[types.App]); ok {
		r0 = returnFunc(ctx, paginationFilter, query, appTypes, sortBy)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pagination.Pageable[types.App])
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, pagination.PaginationFilter, *string, []types.AppType, sorting.Sorting) error); ok {
		r1 = returnFunc(ctx, paginationFilter, query, appTypes, sortBy)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ListApps is a helper method to define mock.On call
//   - ctx context.Context
//   - paginationFilter pagination.PaginationFilter
//   - query *string
//   - appTypes []types.AppType
//   - sortBy sorting.Sorting
func (_e *AppService_Expecter) ListApps(ctx interface{}, paginationFilter interface{}, query interface{}, appTypes interface{}, sortBy interface{}) *AppService_ListApps_Call {
	return &AppService_ListApps_Call{Call: _e.mock.On("ListApps", ctx, paginationFilter, query, appTypes, sortBy)}
}

func (_c *AppService_ListApps_Call) Run(run func(ctx context.Context, paginationFilter pagination.PaginationFilter, query *string, appTypes []types.AppType, sortBy sorting.Sorting)) *AppService_ListApps_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 pagination.PaginationFilter
		if args[1] != nil {
			arg1 = args[1].(pagination.PaginationFilter)
		}
		var arg2 *string
		if args[2] != nil {
			arg2 = args[2].(*string)
		}
		var arg3 []types.AppType
		if args[3] != nil {
			arg3 = args[3].([]types.AppType)
		}
		var arg4 sorting.Sorting
		if args[4] != nil {
			arg4 = args[4].(sorting.Sorting)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
			arg4,
		)
	})
	return _c
}

func (_c *AppService_ListApps_Call) Return(pageable *pagination.Pageable[types.App], err error) *AppService_ListApps_Call {
	_c.Call.Return(pageable, err)
	return _c
}

func (_c *AppService_ListApps_Call) RunAndReturn(run func(ctx context.Context, paginationFilter pagination.PaginationFilter, query *string, appTypes []types.AppType, sortBy sorting.Sorting) (*pagination.Pageable[types.App], error)) *AppService_ListApps_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

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

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

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

// UpdateApp provides a mock function for the type AppService
func (_mock *AppService) UpdateApp(ctx context.Context, app *types.App) (*types.App, error) {
	ret := _mock.Called(ctx, app)

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

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

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

// UpdateApp is a helper method to define mock.On call
//   - ctx context.Context
//   - app *types.App
func (_e *AppService_Expecter) UpdateApp(ctx interface{}, app interface{}) *AppService_UpdateApp_Call {
	return &AppService_UpdateApp_Call{Call: _e.mock.On("UpdateApp", ctx, app)}
}

func (_c *AppService_UpdateApp_Call) Run(run func(ctx context.Context, app *types.App)) *AppService_UpdateApp_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *types.App
		if args[1] != nil {
			arg1 = args[1].(*types.App)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *AppService_UpdateApp_Call) Return(app1 *types.App, err error) *AppService_UpdateApp_Call {
	_c.Call.Return(app1, err)
	return _c
}

func (_c *AppService_UpdateApp_Call) RunAndReturn(run func(ctx context.Context, app *types.App) (*types.App, error)) *AppService_UpdateApp_Call {
	_c.Call.Return(run)
	return _c
}
