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

package mocks

import (
	"context"

	mock "github.com/stretchr/testify/mock"
	"sigs.k8s.io/controller-runtime/pkg/client"
)

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

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

	return mock
}

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

type MockReader_Expecter struct {
	mock *mock.Mock
}

func (_m *MockReader) EXPECT() *MockReader_Expecter {
	return &MockReader_Expecter{mock: &_m.Mock}
}

// Get provides a mock function for the type MockReader
func (_mock *MockReader) Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error {
	// client.GetOption
	_va := make([]interface{}, len(opts))
	for _i := range opts {
		_va[_i] = opts[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, key, obj)
	_ca = append(_ca, _va...)
	ret := _mock.Called(_ca...)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, client.ObjectKey, client.Object, ...client.GetOption) error); ok {
		r0 = returnFunc(ctx, key, obj, opts...)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Get is a helper method to define mock.On call
//   - ctx context.Context
//   - key client.ObjectKey
//   - obj client.Object
//   - opts ...client.GetOption
func (_e *MockReader_Expecter) Get(ctx interface{}, key interface{}, obj interface{}, opts ...interface{}) *MockReader_Get_Call {
	return &MockReader_Get_Call{Call: _e.mock.On("Get",
		append([]interface{}{ctx, key, obj}, opts...)...)}
}

func (_c *MockReader_Get_Call) Run(run func(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption)) *MockReader_Get_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 client.ObjectKey
		if args[1] != nil {
			arg1 = args[1].(client.ObjectKey)
		}
		var arg2 client.Object
		if args[2] != nil {
			arg2 = args[2].(client.Object)
		}
		var arg3 []client.GetOption
		variadicArgs := make([]client.GetOption, len(args)-3)
		for i, a := range args[3:] {
			if a != nil {
				variadicArgs[i] = a.(client.GetOption)
			}
		}
		arg3 = variadicArgs
		run(
			arg0,
			arg1,
			arg2,
			arg3...,
		)
	})
	return _c
}

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

func (_c *MockReader_Get_Call) RunAndReturn(run func(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error) *MockReader_Get_Call {
	_c.Call.Return(run)
	return _c
}

// List provides a mock function for the type MockReader
func (_mock *MockReader) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error {
	// client.ListOption
	_va := make([]interface{}, len(opts))
	for _i := range opts {
		_va[_i] = opts[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, list)
	_ca = append(_ca, _va...)
	ret := _mock.Called(_ca...)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, client.ObjectList, ...client.ListOption) error); ok {
		r0 = returnFunc(ctx, list, opts...)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// List is a helper method to define mock.On call
//   - ctx context.Context
//   - list client.ObjectList
//   - opts ...client.ListOption
func (_e *MockReader_Expecter) List(ctx interface{}, list interface{}, opts ...interface{}) *MockReader_List_Call {
	return &MockReader_List_Call{Call: _e.mock.On("List",
		append([]interface{}{ctx, list}, opts...)...)}
}

func (_c *MockReader_List_Call) Run(run func(ctx context.Context, list client.ObjectList, opts ...client.ListOption)) *MockReader_List_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 client.ObjectList
		if args[1] != nil {
			arg1 = args[1].(client.ObjectList)
		}
		var arg2 []client.ListOption
		variadicArgs := make([]client.ListOption, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(client.ListOption)
			}
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

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

func (_c *MockReader_List_Call) RunAndReturn(run func(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error) *MockReader_List_Call {
	_c.Call.Return(run)
	return _c
}
