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

package auth

import (
	context "context"

	identity "github.com/grafana/grafana/pkg/apimachinery/identity"
	mock "github.com/stretchr/testify/mock"

	types "github.com/grafana/authlib/types"
)

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

type MockAccessChecker_Expecter struct {
	mock *mock.Mock
}

func (_m *MockAccessChecker) EXPECT() *MockAccessChecker_Expecter {
	return &MockAccessChecker_Expecter{mock: &_m.Mock}
}

// Check provides a mock function with given fields: ctx, req, folder
func (_m *MockAccessChecker) Check(ctx context.Context, req types.CheckRequest, folder string) error {
	ret := _m.Called(ctx, req, folder)

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

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

	return r0
}

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

// Check is a helper method to define mock.On call
//   - ctx context.Context
//   - req types.CheckRequest
//   - folder string
func (_e *MockAccessChecker_Expecter) Check(ctx interface{}, req interface{}, folder interface{}) *MockAccessChecker_Check_Call {
	return &MockAccessChecker_Check_Call{Call: _e.mock.On("Check", ctx, req, folder)}
}

func (_c *MockAccessChecker_Check_Call) Run(run func(ctx context.Context, req types.CheckRequest, folder string)) *MockAccessChecker_Check_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(types.CheckRequest), args[2].(string))
	})
	return _c
}

func (_c *MockAccessChecker_Check_Call) Return(_a0 error) *MockAccessChecker_Check_Call {
	_c.Call.Return(_a0)
	return _c
}

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

// WithFallbackRole provides a mock function with given fields: role
func (_m *MockAccessChecker) WithFallbackRole(role identity.RoleType) AccessChecker {
	ret := _m.Called(role)

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

	var r0 AccessChecker
	if rf, ok := ret.Get(0).(func(identity.RoleType) AccessChecker); ok {
		r0 = rf(role)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(AccessChecker)
		}
	}

	return r0
}

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

// WithFallbackRole is a helper method to define mock.On call
//   - role identity.RoleType
func (_e *MockAccessChecker_Expecter) WithFallbackRole(role interface{}) *MockAccessChecker_WithFallbackRole_Call {
	return &MockAccessChecker_WithFallbackRole_Call{Call: _e.mock.On("WithFallbackRole", role)}
}

func (_c *MockAccessChecker_WithFallbackRole_Call) Run(run func(role identity.RoleType)) *MockAccessChecker_WithFallbackRole_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(identity.RoleType))
	})
	return _c
}

func (_c *MockAccessChecker_WithFallbackRole_Call) Return(_a0 AccessChecker) *MockAccessChecker_WithFallbackRole_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockAccessChecker_WithFallbackRole_Call) RunAndReturn(run func(identity.RoleType) AccessChecker) *MockAccessChecker_WithFallbackRole_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
