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

package mocks

import (
	"context"

	"github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
	"github.com/opencloud-eu/libre-graph-api-go"
	"github.com/opencloud-eu/opencloud/services/graph/pkg/service/v0"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type DriveItemPermissionsProvider_Expecter struct {
	mock *mock.Mock
}

func (_m *DriveItemPermissionsProvider) EXPECT() *DriveItemPermissionsProvider_Expecter {
	return &DriveItemPermissionsProvider_Expecter{mock: &_m.Mock}
}

// CreateLink provides a mock function for the type DriveItemPermissionsProvider
func (_mock *DriveItemPermissionsProvider) CreateLink(ctx context.Context, driveItemID *providerv1beta1.ResourceId, createLink libregraph.DriveItemCreateLink) (libregraph.Permission, error) {
	ret := _mock.Called(ctx, driveItemID, createLink)

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

	var r0 libregraph.Permission
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, libregraph.DriveItemCreateLink) (libregraph.Permission, error)); ok {
		return returnFunc(ctx, driveItemID, createLink)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, libregraph.DriveItemCreateLink) libregraph.Permission); ok {
		r0 = returnFunc(ctx, driveItemID, createLink)
	} else {
		r0 = ret.Get(0).(libregraph.Permission)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceId, libregraph.DriveItemCreateLink) error); ok {
		r1 = returnFunc(ctx, driveItemID, createLink)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// CreateLink is a helper method to define mock.On call
//   - ctx context.Context
//   - driveItemID *providerv1beta1.ResourceId
//   - createLink libregraph.DriveItemCreateLink
func (_e *DriveItemPermissionsProvider_Expecter) CreateLink(ctx interface{}, driveItemID interface{}, createLink interface{}) *DriveItemPermissionsProvider_CreateLink_Call {
	return &DriveItemPermissionsProvider_CreateLink_Call{Call: _e.mock.On("CreateLink", ctx, driveItemID, createLink)}
}

func (_c *DriveItemPermissionsProvider_CreateLink_Call) Run(run func(ctx context.Context, driveItemID *providerv1beta1.ResourceId, createLink libregraph.DriveItemCreateLink)) *DriveItemPermissionsProvider_CreateLink_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *providerv1beta1.ResourceId
		if args[1] != nil {
			arg1 = args[1].(*providerv1beta1.ResourceId)
		}
		var arg2 libregraph.DriveItemCreateLink
		if args[2] != nil {
			arg2 = args[2].(libregraph.DriveItemCreateLink)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *DriveItemPermissionsProvider_CreateLink_Call) Return(permission libregraph.Permission, err error) *DriveItemPermissionsProvider_CreateLink_Call {
	_c.Call.Return(permission, err)
	return _c
}

func (_c *DriveItemPermissionsProvider_CreateLink_Call) RunAndReturn(run func(ctx context.Context, driveItemID *providerv1beta1.ResourceId, createLink libregraph.DriveItemCreateLink) (libregraph.Permission, error)) *DriveItemPermissionsProvider_CreateLink_Call {
	_c.Call.Return(run)
	return _c
}

// CreateSpaceRootLink provides a mock function for the type DriveItemPermissionsProvider
func (_mock *DriveItemPermissionsProvider) CreateSpaceRootLink(ctx context.Context, driveID *providerv1beta1.ResourceId, createLink libregraph.DriveItemCreateLink) (libregraph.Permission, error) {
	ret := _mock.Called(ctx, driveID, createLink)

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

	var r0 libregraph.Permission
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, libregraph.DriveItemCreateLink) (libregraph.Permission, error)); ok {
		return returnFunc(ctx, driveID, createLink)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, libregraph.DriveItemCreateLink) libregraph.Permission); ok {
		r0 = returnFunc(ctx, driveID, createLink)
	} else {
		r0 = ret.Get(0).(libregraph.Permission)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceId, libregraph.DriveItemCreateLink) error); ok {
		r1 = returnFunc(ctx, driveID, createLink)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// CreateSpaceRootLink is a helper method to define mock.On call
//   - ctx context.Context
//   - driveID *providerv1beta1.ResourceId
//   - createLink libregraph.DriveItemCreateLink
func (_e *DriveItemPermissionsProvider_Expecter) CreateSpaceRootLink(ctx interface{}, driveID interface{}, createLink interface{}) *DriveItemPermissionsProvider_CreateSpaceRootLink_Call {
	return &DriveItemPermissionsProvider_CreateSpaceRootLink_Call{Call: _e.mock.On("CreateSpaceRootLink", ctx, driveID, createLink)}
}

func (_c *DriveItemPermissionsProvider_CreateSpaceRootLink_Call) Run(run func(ctx context.Context, driveID *providerv1beta1.ResourceId, createLink libregraph.DriveItemCreateLink)) *DriveItemPermissionsProvider_CreateSpaceRootLink_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *providerv1beta1.ResourceId
		if args[1] != nil {
			arg1 = args[1].(*providerv1beta1.ResourceId)
		}
		var arg2 libregraph.DriveItemCreateLink
		if args[2] != nil {
			arg2 = args[2].(libregraph.DriveItemCreateLink)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *DriveItemPermissionsProvider_CreateSpaceRootLink_Call) Return(permission libregraph.Permission, err error) *DriveItemPermissionsProvider_CreateSpaceRootLink_Call {
	_c.Call.Return(permission, err)
	return _c
}

func (_c *DriveItemPermissionsProvider_CreateSpaceRootLink_Call) RunAndReturn(run func(ctx context.Context, driveID *providerv1beta1.ResourceId, createLink libregraph.DriveItemCreateLink) (libregraph.Permission, error)) *DriveItemPermissionsProvider_CreateSpaceRootLink_Call {
	_c.Call.Return(run)
	return _c
}

// DeletePermission provides a mock function for the type DriveItemPermissionsProvider
func (_mock *DriveItemPermissionsProvider) DeletePermission(ctx context.Context, itemID *providerv1beta1.ResourceId, permissionID string) error {
	ret := _mock.Called(ctx, itemID, permissionID)

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

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

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

// DeletePermission is a helper method to define mock.On call
//   - ctx context.Context
//   - itemID *providerv1beta1.ResourceId
//   - permissionID string
func (_e *DriveItemPermissionsProvider_Expecter) DeletePermission(ctx interface{}, itemID interface{}, permissionID interface{}) *DriveItemPermissionsProvider_DeletePermission_Call {
	return &DriveItemPermissionsProvider_DeletePermission_Call{Call: _e.mock.On("DeletePermission", ctx, itemID, permissionID)}
}

func (_c *DriveItemPermissionsProvider_DeletePermission_Call) Run(run func(ctx context.Context, itemID *providerv1beta1.ResourceId, permissionID string)) *DriveItemPermissionsProvider_DeletePermission_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *providerv1beta1.ResourceId
		if args[1] != nil {
			arg1 = args[1].(*providerv1beta1.ResourceId)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *DriveItemPermissionsProvider_DeletePermission_Call) RunAndReturn(run func(ctx context.Context, itemID *providerv1beta1.ResourceId, permissionID string) error) *DriveItemPermissionsProvider_DeletePermission_Call {
	_c.Call.Return(run)
	return _c
}

// DeleteSpaceRootPermission provides a mock function for the type DriveItemPermissionsProvider
func (_mock *DriveItemPermissionsProvider) DeleteSpaceRootPermission(ctx context.Context, driveID *providerv1beta1.ResourceId, permissionID string) error {
	ret := _mock.Called(ctx, driveID, permissionID)

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

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

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

// DeleteSpaceRootPermission is a helper method to define mock.On call
//   - ctx context.Context
//   - driveID *providerv1beta1.ResourceId
//   - permissionID string
func (_e *DriveItemPermissionsProvider_Expecter) DeleteSpaceRootPermission(ctx interface{}, driveID interface{}, permissionID interface{}) *DriveItemPermissionsProvider_DeleteSpaceRootPermission_Call {
	return &DriveItemPermissionsProvider_DeleteSpaceRootPermission_Call{Call: _e.mock.On("DeleteSpaceRootPermission", ctx, driveID, permissionID)}
}

func (_c *DriveItemPermissionsProvider_DeleteSpaceRootPermission_Call) Run(run func(ctx context.Context, driveID *providerv1beta1.ResourceId, permissionID string)) *DriveItemPermissionsProvider_DeleteSpaceRootPermission_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *providerv1beta1.ResourceId
		if args[1] != nil {
			arg1 = args[1].(*providerv1beta1.ResourceId)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *DriveItemPermissionsProvider_DeleteSpaceRootPermission_Call) RunAndReturn(run func(ctx context.Context, driveID *providerv1beta1.ResourceId, permissionID string) error) *DriveItemPermissionsProvider_DeleteSpaceRootPermission_Call {
	_c.Call.Return(run)
	return _c
}

// Invite provides a mock function for the type DriveItemPermissionsProvider
func (_mock *DriveItemPermissionsProvider) Invite(ctx context.Context, resourceId *providerv1beta1.ResourceId, invite libregraph.DriveItemInvite) (libregraph.Permission, error) {
	ret := _mock.Called(ctx, resourceId, invite)

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

	var r0 libregraph.Permission
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, libregraph.DriveItemInvite) (libregraph.Permission, error)); ok {
		return returnFunc(ctx, resourceId, invite)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, libregraph.DriveItemInvite) libregraph.Permission); ok {
		r0 = returnFunc(ctx, resourceId, invite)
	} else {
		r0 = ret.Get(0).(libregraph.Permission)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceId, libregraph.DriveItemInvite) error); ok {
		r1 = returnFunc(ctx, resourceId, invite)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Invite is a helper method to define mock.On call
//   - ctx context.Context
//   - resourceId *providerv1beta1.ResourceId
//   - invite libregraph.DriveItemInvite
func (_e *DriveItemPermissionsProvider_Expecter) Invite(ctx interface{}, resourceId interface{}, invite interface{}) *DriveItemPermissionsProvider_Invite_Call {
	return &DriveItemPermissionsProvider_Invite_Call{Call: _e.mock.On("Invite", ctx, resourceId, invite)}
}

func (_c *DriveItemPermissionsProvider_Invite_Call) Run(run func(ctx context.Context, resourceId *providerv1beta1.ResourceId, invite libregraph.DriveItemInvite)) *DriveItemPermissionsProvider_Invite_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *providerv1beta1.ResourceId
		if args[1] != nil {
			arg1 = args[1].(*providerv1beta1.ResourceId)
		}
		var arg2 libregraph.DriveItemInvite
		if args[2] != nil {
			arg2 = args[2].(libregraph.DriveItemInvite)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *DriveItemPermissionsProvider_Invite_Call) Return(permission libregraph.Permission, err error) *DriveItemPermissionsProvider_Invite_Call {
	_c.Call.Return(permission, err)
	return _c
}

func (_c *DriveItemPermissionsProvider_Invite_Call) RunAndReturn(run func(ctx context.Context, resourceId *providerv1beta1.ResourceId, invite libregraph.DriveItemInvite) (libregraph.Permission, error)) *DriveItemPermissionsProvider_Invite_Call {
	_c.Call.Return(run)
	return _c
}

// ListPermissions provides a mock function for the type DriveItemPermissionsProvider
func (_mock *DriveItemPermissionsProvider) ListPermissions(ctx context.Context, itemID *providerv1beta1.ResourceId, queryOptions svc.ListPermissionsQueryOptions) (libregraph.CollectionOfPermissionsWithAllowedValues, error) {
	ret := _mock.Called(ctx, itemID, queryOptions)

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

	var r0 libregraph.CollectionOfPermissionsWithAllowedValues
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, svc.ListPermissionsQueryOptions) (libregraph.CollectionOfPermissionsWithAllowedValues, error)); ok {
		return returnFunc(ctx, itemID, queryOptions)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, svc.ListPermissionsQueryOptions) libregraph.CollectionOfPermissionsWithAllowedValues); ok {
		r0 = returnFunc(ctx, itemID, queryOptions)
	} else {
		r0 = ret.Get(0).(libregraph.CollectionOfPermissionsWithAllowedValues)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceId, svc.ListPermissionsQueryOptions) error); ok {
		r1 = returnFunc(ctx, itemID, queryOptions)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ListPermissions is a helper method to define mock.On call
//   - ctx context.Context
//   - itemID *providerv1beta1.ResourceId
//   - queryOptions svc.ListPermissionsQueryOptions
func (_e *DriveItemPermissionsProvider_Expecter) ListPermissions(ctx interface{}, itemID interface{}, queryOptions interface{}) *DriveItemPermissionsProvider_ListPermissions_Call {
	return &DriveItemPermissionsProvider_ListPermissions_Call{Call: _e.mock.On("ListPermissions", ctx, itemID, queryOptions)}
}

func (_c *DriveItemPermissionsProvider_ListPermissions_Call) Run(run func(ctx context.Context, itemID *providerv1beta1.ResourceId, queryOptions svc.ListPermissionsQueryOptions)) *DriveItemPermissionsProvider_ListPermissions_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *providerv1beta1.ResourceId
		if args[1] != nil {
			arg1 = args[1].(*providerv1beta1.ResourceId)
		}
		var arg2 svc.ListPermissionsQueryOptions
		if args[2] != nil {
			arg2 = args[2].(svc.ListPermissionsQueryOptions)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *DriveItemPermissionsProvider_ListPermissions_Call) Return(collectionOfPermissionsWithAllowedValues libregraph.CollectionOfPermissionsWithAllowedValues, err error) *DriveItemPermissionsProvider_ListPermissions_Call {
	_c.Call.Return(collectionOfPermissionsWithAllowedValues, err)
	return _c
}

func (_c *DriveItemPermissionsProvider_ListPermissions_Call) RunAndReturn(run func(ctx context.Context, itemID *providerv1beta1.ResourceId, queryOptions svc.ListPermissionsQueryOptions) (libregraph.CollectionOfPermissionsWithAllowedValues, error)) *DriveItemPermissionsProvider_ListPermissions_Call {
	_c.Call.Return(run)
	return _c
}

// ListSpaceRootPermissions provides a mock function for the type DriveItemPermissionsProvider
func (_mock *DriveItemPermissionsProvider) ListSpaceRootPermissions(ctx context.Context, driveID *providerv1beta1.ResourceId, queryOptions svc.ListPermissionsQueryOptions) (libregraph.CollectionOfPermissionsWithAllowedValues, error) {
	ret := _mock.Called(ctx, driveID, queryOptions)

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

	var r0 libregraph.CollectionOfPermissionsWithAllowedValues
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, svc.ListPermissionsQueryOptions) (libregraph.CollectionOfPermissionsWithAllowedValues, error)); ok {
		return returnFunc(ctx, driveID, queryOptions)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, svc.ListPermissionsQueryOptions) libregraph.CollectionOfPermissionsWithAllowedValues); ok {
		r0 = returnFunc(ctx, driveID, queryOptions)
	} else {
		r0 = ret.Get(0).(libregraph.CollectionOfPermissionsWithAllowedValues)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceId, svc.ListPermissionsQueryOptions) error); ok {
		r1 = returnFunc(ctx, driveID, queryOptions)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ListSpaceRootPermissions is a helper method to define mock.On call
//   - ctx context.Context
//   - driveID *providerv1beta1.ResourceId
//   - queryOptions svc.ListPermissionsQueryOptions
func (_e *DriveItemPermissionsProvider_Expecter) ListSpaceRootPermissions(ctx interface{}, driveID interface{}, queryOptions interface{}) *DriveItemPermissionsProvider_ListSpaceRootPermissions_Call {
	return &DriveItemPermissionsProvider_ListSpaceRootPermissions_Call{Call: _e.mock.On("ListSpaceRootPermissions", ctx, driveID, queryOptions)}
}

func (_c *DriveItemPermissionsProvider_ListSpaceRootPermissions_Call) Run(run func(ctx context.Context, driveID *providerv1beta1.ResourceId, queryOptions svc.ListPermissionsQueryOptions)) *DriveItemPermissionsProvider_ListSpaceRootPermissions_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *providerv1beta1.ResourceId
		if args[1] != nil {
			arg1 = args[1].(*providerv1beta1.ResourceId)
		}
		var arg2 svc.ListPermissionsQueryOptions
		if args[2] != nil {
			arg2 = args[2].(svc.ListPermissionsQueryOptions)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *DriveItemPermissionsProvider_ListSpaceRootPermissions_Call) Return(collectionOfPermissionsWithAllowedValues libregraph.CollectionOfPermissionsWithAllowedValues, err error) *DriveItemPermissionsProvider_ListSpaceRootPermissions_Call {
	_c.Call.Return(collectionOfPermissionsWithAllowedValues, err)
	return _c
}

func (_c *DriveItemPermissionsProvider_ListSpaceRootPermissions_Call) RunAndReturn(run func(ctx context.Context, driveID *providerv1beta1.ResourceId, queryOptions svc.ListPermissionsQueryOptions) (libregraph.CollectionOfPermissionsWithAllowedValues, error)) *DriveItemPermissionsProvider_ListSpaceRootPermissions_Call {
	_c.Call.Return(run)
	return _c
}

// SetPublicLinkPassword provides a mock function for the type DriveItemPermissionsProvider
func (_mock *DriveItemPermissionsProvider) SetPublicLinkPassword(ctx context.Context, driveItemID *providerv1beta1.ResourceId, permissionID string, password string) (libregraph.Permission, error) {
	ret := _mock.Called(ctx, driveItemID, permissionID, password)

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

	var r0 libregraph.Permission
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, string, string) (libregraph.Permission, error)); ok {
		return returnFunc(ctx, driveItemID, permissionID, password)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, string, string) libregraph.Permission); ok {
		r0 = returnFunc(ctx, driveItemID, permissionID, password)
	} else {
		r0 = ret.Get(0).(libregraph.Permission)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceId, string, string) error); ok {
		r1 = returnFunc(ctx, driveItemID, permissionID, password)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// SetPublicLinkPassword is a helper method to define mock.On call
//   - ctx context.Context
//   - driveItemID *providerv1beta1.ResourceId
//   - permissionID string
//   - password string
func (_e *DriveItemPermissionsProvider_Expecter) SetPublicLinkPassword(ctx interface{}, driveItemID interface{}, permissionID interface{}, password interface{}) *DriveItemPermissionsProvider_SetPublicLinkPassword_Call {
	return &DriveItemPermissionsProvider_SetPublicLinkPassword_Call{Call: _e.mock.On("SetPublicLinkPassword", ctx, driveItemID, permissionID, password)}
}

func (_c *DriveItemPermissionsProvider_SetPublicLinkPassword_Call) Run(run func(ctx context.Context, driveItemID *providerv1beta1.ResourceId, permissionID string, password string)) *DriveItemPermissionsProvider_SetPublicLinkPassword_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *providerv1beta1.ResourceId
		if args[1] != nil {
			arg1 = args[1].(*providerv1beta1.ResourceId)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *DriveItemPermissionsProvider_SetPublicLinkPassword_Call) Return(permission libregraph.Permission, err error) *DriveItemPermissionsProvider_SetPublicLinkPassword_Call {
	_c.Call.Return(permission, err)
	return _c
}

func (_c *DriveItemPermissionsProvider_SetPublicLinkPassword_Call) RunAndReturn(run func(ctx context.Context, driveItemID *providerv1beta1.ResourceId, permissionID string, password string) (libregraph.Permission, error)) *DriveItemPermissionsProvider_SetPublicLinkPassword_Call {
	_c.Call.Return(run)
	return _c
}

// SetPublicLinkPasswordOnSpaceRoot provides a mock function for the type DriveItemPermissionsProvider
func (_mock *DriveItemPermissionsProvider) SetPublicLinkPasswordOnSpaceRoot(ctx context.Context, driveID *providerv1beta1.ResourceId, permissionID string, password string) (libregraph.Permission, error) {
	ret := _mock.Called(ctx, driveID, permissionID, password)

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

	var r0 libregraph.Permission
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, string, string) (libregraph.Permission, error)); ok {
		return returnFunc(ctx, driveID, permissionID, password)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, string, string) libregraph.Permission); ok {
		r0 = returnFunc(ctx, driveID, permissionID, password)
	} else {
		r0 = ret.Get(0).(libregraph.Permission)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceId, string, string) error); ok {
		r1 = returnFunc(ctx, driveID, permissionID, password)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// SetPublicLinkPasswordOnSpaceRoot is a helper method to define mock.On call
//   - ctx context.Context
//   - driveID *providerv1beta1.ResourceId
//   - permissionID string
//   - password string
func (_e *DriveItemPermissionsProvider_Expecter) SetPublicLinkPasswordOnSpaceRoot(ctx interface{}, driveID interface{}, permissionID interface{}, password interface{}) *DriveItemPermissionsProvider_SetPublicLinkPasswordOnSpaceRoot_Call {
	return &DriveItemPermissionsProvider_SetPublicLinkPasswordOnSpaceRoot_Call{Call: _e.mock.On("SetPublicLinkPasswordOnSpaceRoot", ctx, driveID, permissionID, password)}
}

func (_c *DriveItemPermissionsProvider_SetPublicLinkPasswordOnSpaceRoot_Call) Run(run func(ctx context.Context, driveID *providerv1beta1.ResourceId, permissionID string, password string)) *DriveItemPermissionsProvider_SetPublicLinkPasswordOnSpaceRoot_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *providerv1beta1.ResourceId
		if args[1] != nil {
			arg1 = args[1].(*providerv1beta1.ResourceId)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *DriveItemPermissionsProvider_SetPublicLinkPasswordOnSpaceRoot_Call) Return(permission libregraph.Permission, err error) *DriveItemPermissionsProvider_SetPublicLinkPasswordOnSpaceRoot_Call {
	_c.Call.Return(permission, err)
	return _c
}

func (_c *DriveItemPermissionsProvider_SetPublicLinkPasswordOnSpaceRoot_Call) RunAndReturn(run func(ctx context.Context, driveID *providerv1beta1.ResourceId, permissionID string, password string) (libregraph.Permission, error)) *DriveItemPermissionsProvider_SetPublicLinkPasswordOnSpaceRoot_Call {
	_c.Call.Return(run)
	return _c
}

// SpaceRootInvite provides a mock function for the type DriveItemPermissionsProvider
func (_mock *DriveItemPermissionsProvider) SpaceRootInvite(ctx context.Context, driveID *providerv1beta1.ResourceId, invite libregraph.DriveItemInvite) (libregraph.Permission, error) {
	ret := _mock.Called(ctx, driveID, invite)

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

	var r0 libregraph.Permission
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, libregraph.DriveItemInvite) (libregraph.Permission, error)); ok {
		return returnFunc(ctx, driveID, invite)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, libregraph.DriveItemInvite) libregraph.Permission); ok {
		r0 = returnFunc(ctx, driveID, invite)
	} else {
		r0 = ret.Get(0).(libregraph.Permission)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceId, libregraph.DriveItemInvite) error); ok {
		r1 = returnFunc(ctx, driveID, invite)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// SpaceRootInvite is a helper method to define mock.On call
//   - ctx context.Context
//   - driveID *providerv1beta1.ResourceId
//   - invite libregraph.DriveItemInvite
func (_e *DriveItemPermissionsProvider_Expecter) SpaceRootInvite(ctx interface{}, driveID interface{}, invite interface{}) *DriveItemPermissionsProvider_SpaceRootInvite_Call {
	return &DriveItemPermissionsProvider_SpaceRootInvite_Call{Call: _e.mock.On("SpaceRootInvite", ctx, driveID, invite)}
}

func (_c *DriveItemPermissionsProvider_SpaceRootInvite_Call) Run(run func(ctx context.Context, driveID *providerv1beta1.ResourceId, invite libregraph.DriveItemInvite)) *DriveItemPermissionsProvider_SpaceRootInvite_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *providerv1beta1.ResourceId
		if args[1] != nil {
			arg1 = args[1].(*providerv1beta1.ResourceId)
		}
		var arg2 libregraph.DriveItemInvite
		if args[2] != nil {
			arg2 = args[2].(libregraph.DriveItemInvite)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *DriveItemPermissionsProvider_SpaceRootInvite_Call) Return(permission libregraph.Permission, err error) *DriveItemPermissionsProvider_SpaceRootInvite_Call {
	_c.Call.Return(permission, err)
	return _c
}

func (_c *DriveItemPermissionsProvider_SpaceRootInvite_Call) RunAndReturn(run func(ctx context.Context, driveID *providerv1beta1.ResourceId, invite libregraph.DriveItemInvite) (libregraph.Permission, error)) *DriveItemPermissionsProvider_SpaceRootInvite_Call {
	_c.Call.Return(run)
	return _c
}

// UpdatePermission provides a mock function for the type DriveItemPermissionsProvider
func (_mock *DriveItemPermissionsProvider) UpdatePermission(ctx context.Context, itemID *providerv1beta1.ResourceId, permissionID string, newPermission libregraph.Permission) (libregraph.Permission, error) {
	ret := _mock.Called(ctx, itemID, permissionID, newPermission)

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

	var r0 libregraph.Permission
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, string, libregraph.Permission) (libregraph.Permission, error)); ok {
		return returnFunc(ctx, itemID, permissionID, newPermission)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, string, libregraph.Permission) libregraph.Permission); ok {
		r0 = returnFunc(ctx, itemID, permissionID, newPermission)
	} else {
		r0 = ret.Get(0).(libregraph.Permission)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceId, string, libregraph.Permission) error); ok {
		r1 = returnFunc(ctx, itemID, permissionID, newPermission)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// UpdatePermission is a helper method to define mock.On call
//   - ctx context.Context
//   - itemID *providerv1beta1.ResourceId
//   - permissionID string
//   - newPermission libregraph.Permission
func (_e *DriveItemPermissionsProvider_Expecter) UpdatePermission(ctx interface{}, itemID interface{}, permissionID interface{}, newPermission interface{}) *DriveItemPermissionsProvider_UpdatePermission_Call {
	return &DriveItemPermissionsProvider_UpdatePermission_Call{Call: _e.mock.On("UpdatePermission", ctx, itemID, permissionID, newPermission)}
}

func (_c *DriveItemPermissionsProvider_UpdatePermission_Call) Run(run func(ctx context.Context, itemID *providerv1beta1.ResourceId, permissionID string, newPermission libregraph.Permission)) *DriveItemPermissionsProvider_UpdatePermission_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *providerv1beta1.ResourceId
		if args[1] != nil {
			arg1 = args[1].(*providerv1beta1.ResourceId)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 libregraph.Permission
		if args[3] != nil {
			arg3 = args[3].(libregraph.Permission)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *DriveItemPermissionsProvider_UpdatePermission_Call) Return(permission libregraph.Permission, err error) *DriveItemPermissionsProvider_UpdatePermission_Call {
	_c.Call.Return(permission, err)
	return _c
}

func (_c *DriveItemPermissionsProvider_UpdatePermission_Call) RunAndReturn(run func(ctx context.Context, itemID *providerv1beta1.ResourceId, permissionID string, newPermission libregraph.Permission) (libregraph.Permission, error)) *DriveItemPermissionsProvider_UpdatePermission_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateSpaceRootPermission provides a mock function for the type DriveItemPermissionsProvider
func (_mock *DriveItemPermissionsProvider) UpdateSpaceRootPermission(ctx context.Context, driveID *providerv1beta1.ResourceId, permissionID string, newPermission libregraph.Permission) (libregraph.Permission, error) {
	ret := _mock.Called(ctx, driveID, permissionID, newPermission)

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

	var r0 libregraph.Permission
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, string, libregraph.Permission) (libregraph.Permission, error)); ok {
		return returnFunc(ctx, driveID, permissionID, newPermission)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *providerv1beta1.ResourceId, string, libregraph.Permission) libregraph.Permission); ok {
		r0 = returnFunc(ctx, driveID, permissionID, newPermission)
	} else {
		r0 = ret.Get(0).(libregraph.Permission)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *providerv1beta1.ResourceId, string, libregraph.Permission) error); ok {
		r1 = returnFunc(ctx, driveID, permissionID, newPermission)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// UpdateSpaceRootPermission is a helper method to define mock.On call
//   - ctx context.Context
//   - driveID *providerv1beta1.ResourceId
//   - permissionID string
//   - newPermission libregraph.Permission
func (_e *DriveItemPermissionsProvider_Expecter) UpdateSpaceRootPermission(ctx interface{}, driveID interface{}, permissionID interface{}, newPermission interface{}) *DriveItemPermissionsProvider_UpdateSpaceRootPermission_Call {
	return &DriveItemPermissionsProvider_UpdateSpaceRootPermission_Call{Call: _e.mock.On("UpdateSpaceRootPermission", ctx, driveID, permissionID, newPermission)}
}

func (_c *DriveItemPermissionsProvider_UpdateSpaceRootPermission_Call) Run(run func(ctx context.Context, driveID *providerv1beta1.ResourceId, permissionID string, newPermission libregraph.Permission)) *DriveItemPermissionsProvider_UpdateSpaceRootPermission_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *providerv1beta1.ResourceId
		if args[1] != nil {
			arg1 = args[1].(*providerv1beta1.ResourceId)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 libregraph.Permission
		if args[3] != nil {
			arg3 = args[3].(libregraph.Permission)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *DriveItemPermissionsProvider_UpdateSpaceRootPermission_Call) Return(permission libregraph.Permission, err error) *DriveItemPermissionsProvider_UpdateSpaceRootPermission_Call {
	_c.Call.Return(permission, err)
	return _c
}

func (_c *DriveItemPermissionsProvider_UpdateSpaceRootPermission_Call) RunAndReturn(run func(ctx context.Context, driveID *providerv1beta1.ResourceId, permissionID string, newPermission libregraph.Permission) (libregraph.Permission, error)) *DriveItemPermissionsProvider_UpdateSpaceRootPermission_Call {
	_c.Call.Return(run)
	return _c
}
