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

package repository

import (
	context "context"

	v0alpha1 "github.com/grafana/grafana/apps/provisioning/pkg/apis/provisioning/v0alpha1"
	mock "github.com/stretchr/testify/mock"
)

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

type MockReaderWriter_Expecter struct {
	mock *mock.Mock
}

func (_m *MockReaderWriter) EXPECT() *MockReaderWriter_Expecter {
	return &MockReaderWriter_Expecter{mock: &_m.Mock}
}

// Config provides a mock function with no fields
func (_m *MockReaderWriter) Config() *v0alpha1.Repository {
	ret := _m.Called()

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

	var r0 *v0alpha1.Repository
	if rf, ok := ret.Get(0).(func() *v0alpha1.Repository); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v0alpha1.Repository)
		}
	}

	return r0
}

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

// Config is a helper method to define mock.On call
func (_e *MockReaderWriter_Expecter) Config() *MockReaderWriter_Config_Call {
	return &MockReaderWriter_Config_Call{Call: _e.mock.On("Config")}
}

func (_c *MockReaderWriter_Config_Call) Run(run func()) *MockReaderWriter_Config_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockReaderWriter_Config_Call) Return(_a0 *v0alpha1.Repository) *MockReaderWriter_Config_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockReaderWriter_Config_Call) RunAndReturn(run func() *v0alpha1.Repository) *MockReaderWriter_Config_Call {
	_c.Call.Return(run)
	return _c
}

// Create provides a mock function with given fields: ctx, path, ref, data, message
func (_m *MockReaderWriter) Create(ctx context.Context, path string, ref string, data []byte, message string) error {
	ret := _m.Called(ctx, path, ref, data, message)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, []byte, string) error); ok {
		r0 = rf(ctx, path, ref, data, message)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Create is a helper method to define mock.On call
//   - ctx context.Context
//   - path string
//   - ref string
//   - data []byte
//   - message string
func (_e *MockReaderWriter_Expecter) Create(ctx interface{}, path interface{}, ref interface{}, data interface{}, message interface{}) *MockReaderWriter_Create_Call {
	return &MockReaderWriter_Create_Call{Call: _e.mock.On("Create", ctx, path, ref, data, message)}
}

func (_c *MockReaderWriter_Create_Call) Run(run func(ctx context.Context, path string, ref string, data []byte, message string)) *MockReaderWriter_Create_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]byte), args[4].(string))
	})
	return _c
}

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

func (_c *MockReaderWriter_Create_Call) RunAndReturn(run func(context.Context, string, string, []byte, string) error) *MockReaderWriter_Create_Call {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function with given fields: ctx, path, ref, message
func (_m *MockReaderWriter) Delete(ctx context.Context, path string, ref string, message string) error {
	ret := _m.Called(ctx, path, ref, message)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
		r0 = rf(ctx, path, ref, message)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Delete is a helper method to define mock.On call
//   - ctx context.Context
//   - path string
//   - ref string
//   - message string
func (_e *MockReaderWriter_Expecter) Delete(ctx interface{}, path interface{}, ref interface{}, message interface{}) *MockReaderWriter_Delete_Call {
	return &MockReaderWriter_Delete_Call{Call: _e.mock.On("Delete", ctx, path, ref, message)}
}

func (_c *MockReaderWriter_Delete_Call) Run(run func(ctx context.Context, path string, ref string, message string)) *MockReaderWriter_Delete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string))
	})
	return _c
}

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

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

// Move provides a mock function with given fields: ctx, oldPath, newPath, ref, message
func (_m *MockReaderWriter) Move(ctx context.Context, oldPath string, newPath string, ref string, message string) error {
	ret := _m.Called(ctx, oldPath, newPath, ref, message)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) error); ok {
		r0 = rf(ctx, oldPath, newPath, ref, message)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Move is a helper method to define mock.On call
//   - ctx context.Context
//   - oldPath string
//   - newPath string
//   - ref string
//   - message string
func (_e *MockReaderWriter_Expecter) Move(ctx interface{}, oldPath interface{}, newPath interface{}, ref interface{}, message interface{}) *MockReaderWriter_Move_Call {
	return &MockReaderWriter_Move_Call{Call: _e.mock.On("Move", ctx, oldPath, newPath, ref, message)}
}

func (_c *MockReaderWriter_Move_Call) Run(run func(ctx context.Context, oldPath string, newPath string, ref string, message string)) *MockReaderWriter_Move_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(string))
	})
	return _c
}

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

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

// Read provides a mock function with given fields: ctx, path, ref
func (_m *MockReaderWriter) Read(ctx context.Context, path string, ref string) (*FileInfo, error) {
	ret := _m.Called(ctx, path, ref)

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

	var r0 *FileInfo
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string) (*FileInfo, error)); ok {
		return rf(ctx, path, ref)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string) *FileInfo); ok {
		r0 = rf(ctx, path, ref)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*FileInfo)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
		r1 = rf(ctx, path, ref)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Read is a helper method to define mock.On call
//   - ctx context.Context
//   - path string
//   - ref string
func (_e *MockReaderWriter_Expecter) Read(ctx interface{}, path interface{}, ref interface{}) *MockReaderWriter_Read_Call {
	return &MockReaderWriter_Read_Call{Call: _e.mock.On("Read", ctx, path, ref)}
}

func (_c *MockReaderWriter_Read_Call) Run(run func(ctx context.Context, path string, ref string)) *MockReaderWriter_Read_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string))
	})
	return _c
}

func (_c *MockReaderWriter_Read_Call) Return(_a0 *FileInfo, _a1 error) *MockReaderWriter_Read_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockReaderWriter_Read_Call) RunAndReturn(run func(context.Context, string, string) (*FileInfo, error)) *MockReaderWriter_Read_Call {
	_c.Call.Return(run)
	return _c
}

// ReadTree provides a mock function with given fields: ctx, ref
func (_m *MockReaderWriter) ReadTree(ctx context.Context, ref string) ([]FileTreeEntry, error) {
	ret := _m.Called(ctx, ref)

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

	var r0 []FileTreeEntry
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string) ([]FileTreeEntry, error)); ok {
		return rf(ctx, ref)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string) []FileTreeEntry); ok {
		r0 = rf(ctx, ref)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]FileTreeEntry)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = rf(ctx, ref)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// ReadTree is a helper method to define mock.On call
//   - ctx context.Context
//   - ref string
func (_e *MockReaderWriter_Expecter) ReadTree(ctx interface{}, ref interface{}) *MockReaderWriter_ReadTree_Call {
	return &MockReaderWriter_ReadTree_Call{Call: _e.mock.On("ReadTree", ctx, ref)}
}

func (_c *MockReaderWriter_ReadTree_Call) Run(run func(ctx context.Context, ref string)) *MockReaderWriter_ReadTree_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockReaderWriter_ReadTree_Call) Return(_a0 []FileTreeEntry, _a1 error) *MockReaderWriter_ReadTree_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockReaderWriter_ReadTree_Call) RunAndReturn(run func(context.Context, string) ([]FileTreeEntry, error)) *MockReaderWriter_ReadTree_Call {
	_c.Call.Return(run)
	return _c
}

// Test provides a mock function with given fields: ctx
func (_m *MockReaderWriter) Test(ctx context.Context) (*v0alpha1.TestResults, error) {
	ret := _m.Called(ctx)

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

	var r0 *v0alpha1.TestResults
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context) (*v0alpha1.TestResults, error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) *v0alpha1.TestResults); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v0alpha1.TestResults)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
		r1 = rf(ctx)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

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

func (_c *MockReaderWriter_Test_Call) Run(run func(ctx context.Context)) *MockReaderWriter_Test_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *MockReaderWriter_Test_Call) Return(_a0 *v0alpha1.TestResults, _a1 error) *MockReaderWriter_Test_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockReaderWriter_Test_Call) RunAndReturn(run func(context.Context) (*v0alpha1.TestResults, error)) *MockReaderWriter_Test_Call {
	_c.Call.Return(run)
	return _c
}

// Update provides a mock function with given fields: ctx, path, ref, data, message
func (_m *MockReaderWriter) Update(ctx context.Context, path string, ref string, data []byte, message string) error {
	ret := _m.Called(ctx, path, ref, data, message)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, []byte, string) error); ok {
		r0 = rf(ctx, path, ref, data, message)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Update is a helper method to define mock.On call
//   - ctx context.Context
//   - path string
//   - ref string
//   - data []byte
//   - message string
func (_e *MockReaderWriter_Expecter) Update(ctx interface{}, path interface{}, ref interface{}, data interface{}, message interface{}) *MockReaderWriter_Update_Call {
	return &MockReaderWriter_Update_Call{Call: _e.mock.On("Update", ctx, path, ref, data, message)}
}

func (_c *MockReaderWriter_Update_Call) Run(run func(ctx context.Context, path string, ref string, data []byte, message string)) *MockReaderWriter_Update_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]byte), args[4].(string))
	})
	return _c
}

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

func (_c *MockReaderWriter_Update_Call) RunAndReturn(run func(context.Context, string, string, []byte, string) error) *MockReaderWriter_Update_Call {
	_c.Call.Return(run)
	return _c
}

// Write provides a mock function with given fields: ctx, path, ref, data, message
func (_m *MockReaderWriter) Write(ctx context.Context, path string, ref string, data []byte, message string) error {
	ret := _m.Called(ctx, path, ref, data, message)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, []byte, string) error); ok {
		r0 = rf(ctx, path, ref, data, message)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Write is a helper method to define mock.On call
//   - ctx context.Context
//   - path string
//   - ref string
//   - data []byte
//   - message string
func (_e *MockReaderWriter_Expecter) Write(ctx interface{}, path interface{}, ref interface{}, data interface{}, message interface{}) *MockReaderWriter_Write_Call {
	return &MockReaderWriter_Write_Call{Call: _e.mock.On("Write", ctx, path, ref, data, message)}
}

func (_c *MockReaderWriter_Write_Call) Run(run func(ctx context.Context, path string, ref string, data []byte, message string)) *MockReaderWriter_Write_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]byte), args[4].(string))
	})
	return _c
}

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

func (_c *MockReaderWriter_Write_Call) RunAndReturn(run func(context.Context, string, string, []byte, string) error) *MockReaderWriter_Write_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
