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

package mocks

import (
	"github.com/go-logr/logr"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type LogSink_Expecter struct {
	mock *mock.Mock
}

func (_m *LogSink) EXPECT() *LogSink_Expecter {
	return &LogSink_Expecter{mock: &_m.Mock}
}

// Enabled provides a mock function for the type LogSink
func (_mock *LogSink) Enabled(level int) bool {
	ret := _mock.Called(level)

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

	var r0 bool
	if returnFunc, ok := ret.Get(0).(func(int) bool); ok {
		r0 = returnFunc(level)
	} else {
		r0 = ret.Get(0).(bool)
	}
	return r0
}

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

// Enabled is a helper method to define mock.On call
//   - level int
func (_e *LogSink_Expecter) Enabled(level any) *LogSink_Enabled_Call {
	return &LogSink_Enabled_Call{Call: _e.mock.On("Enabled", level)}
}

func (_c *LogSink_Enabled_Call) Run(run func(level int)) *LogSink_Enabled_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int
		if args[0] != nil {
			arg0 = args[0].(int)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *LogSink_Enabled_Call) Return(b bool) *LogSink_Enabled_Call {
	_c.Call.Return(b)
	return _c
}

func (_c *LogSink_Enabled_Call) RunAndReturn(run func(level int) bool) *LogSink_Enabled_Call {
	_c.Call.Return(run)
	return _c
}

// Error provides a mock function for the type LogSink
func (_mock *LogSink) Error(err error, msg string, keysAndValues ...any) {
	var _ca []any
	_ca = append(_ca, err, msg)
	_ca = append(_ca, keysAndValues...)
	_mock.Called(_ca...)
	return
}

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

// Error is a helper method to define mock.On call
//   - err error
//   - msg string
//   - keysAndValues ...any
func (_e *LogSink_Expecter) Error(err any, msg any, keysAndValues ...any) *LogSink_Error_Call {
	return &LogSink_Error_Call{Call: _e.mock.On("Error",
		append([]any{err, msg}, keysAndValues...)...)}
}

func (_c *LogSink_Error_Call) Run(run func(err error, msg string, keysAndValues ...any)) *LogSink_Error_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 error
		if args[0] != nil {
			arg0 = args[0].(error)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []any
		variadicArgs := make([]any, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(any)
			}
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *LogSink_Error_Call) Return() *LogSink_Error_Call {
	_c.Call.Return()
	return _c
}

func (_c *LogSink_Error_Call) RunAndReturn(run func(err error, msg string, keysAndValues ...any)) *LogSink_Error_Call {
	_c.Run(run)
	return _c
}

// Info provides a mock function for the type LogSink
func (_mock *LogSink) Info(level int, msg string, keysAndValues ...any) {
	var _ca []any
	_ca = append(_ca, level, msg)
	_ca = append(_ca, keysAndValues...)
	_mock.Called(_ca...)
	return
}

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

// Info is a helper method to define mock.On call
//   - level int
//   - msg string
//   - keysAndValues ...any
func (_e *LogSink_Expecter) Info(level any, msg any, keysAndValues ...any) *LogSink_Info_Call {
	return &LogSink_Info_Call{Call: _e.mock.On("Info",
		append([]any{level, msg}, keysAndValues...)...)}
}

func (_c *LogSink_Info_Call) Run(run func(level int, msg string, keysAndValues ...any)) *LogSink_Info_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int
		if args[0] != nil {
			arg0 = args[0].(int)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []any
		variadicArgs := make([]any, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(any)
			}
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *LogSink_Info_Call) Return() *LogSink_Info_Call {
	_c.Call.Return()
	return _c
}

func (_c *LogSink_Info_Call) RunAndReturn(run func(level int, msg string, keysAndValues ...any)) *LogSink_Info_Call {
	_c.Run(run)
	return _c
}

// Init provides a mock function for the type LogSink
func (_mock *LogSink) Init(info logr.RuntimeInfo) {
	_mock.Called(info)
	return
}

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

// Init is a helper method to define mock.On call
//   - info logr.RuntimeInfo
func (_e *LogSink_Expecter) Init(info any) *LogSink_Init_Call {
	return &LogSink_Init_Call{Call: _e.mock.On("Init", info)}
}

func (_c *LogSink_Init_Call) Run(run func(info logr.RuntimeInfo)) *LogSink_Init_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 logr.RuntimeInfo
		if args[0] != nil {
			arg0 = args[0].(logr.RuntimeInfo)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *LogSink_Init_Call) Return() *LogSink_Init_Call {
	_c.Call.Return()
	return _c
}

func (_c *LogSink_Init_Call) RunAndReturn(run func(info logr.RuntimeInfo)) *LogSink_Init_Call {
	_c.Run(run)
	return _c
}

// WithName provides a mock function for the type LogSink
func (_mock *LogSink) WithName(name string) logr.LogSink {
	ret := _mock.Called(name)

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

	var r0 logr.LogSink
	if returnFunc, ok := ret.Get(0).(func(string) logr.LogSink); ok {
		r0 = returnFunc(name)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(logr.LogSink)
		}
	}
	return r0
}

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

// WithName is a helper method to define mock.On call
//   - name string
func (_e *LogSink_Expecter) WithName(name any) *LogSink_WithName_Call {
	return &LogSink_WithName_Call{Call: _e.mock.On("WithName", name)}
}

func (_c *LogSink_WithName_Call) Run(run func(name string)) *LogSink_WithName_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *LogSink_WithName_Call) Return(logSink logr.LogSink) *LogSink_WithName_Call {
	_c.Call.Return(logSink)
	return _c
}

func (_c *LogSink_WithName_Call) RunAndReturn(run func(name string) logr.LogSink) *LogSink_WithName_Call {
	_c.Call.Return(run)
	return _c
}

// WithValues provides a mock function for the type LogSink
func (_mock *LogSink) WithValues(keysAndValues ...any) logr.LogSink {
	var _ca []any
	_ca = append(_ca, keysAndValues...)
	ret := _mock.Called(_ca...)

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

	var r0 logr.LogSink
	if returnFunc, ok := ret.Get(0).(func(...any) logr.LogSink); ok {
		r0 = returnFunc(keysAndValues...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(logr.LogSink)
		}
	}
	return r0
}

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

// WithValues is a helper method to define mock.On call
//   - keysAndValues ...any
func (_e *LogSink_Expecter) WithValues(keysAndValues ...any) *LogSink_WithValues_Call {
	return &LogSink_WithValues_Call{Call: _e.mock.On("WithValues",
		append([]any{}, keysAndValues...)...)}
}

func (_c *LogSink_WithValues_Call) Run(run func(keysAndValues ...any)) *LogSink_WithValues_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 []any
		variadicArgs := make([]any, len(args)-0)
		for i, a := range args[0:] {
			if a != nil {
				variadicArgs[i] = a.(any)
			}
		}
		arg0 = variadicArgs
		run(
			arg0...,
		)
	})
	return _c
}

func (_c *LogSink_WithValues_Call) Return(logSink logr.LogSink) *LogSink_WithValues_Call {
	_c.Call.Return(logSink)
	return _c
}

func (_c *LogSink_WithValues_Call) RunAndReturn(run func(keysAndValues ...any) logr.LogSink) *LogSink_WithValues_Call {
	_c.Call.Return(run)
	return _c
}
