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

package controller

import (
	context "context"

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

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

type MockConnectionStatusPatcher_Expecter struct {
	mock *mock.Mock
}

func (_m *MockConnectionStatusPatcher) EXPECT() *MockConnectionStatusPatcher_Expecter {
	return &MockConnectionStatusPatcher_Expecter{mock: &_m.Mock}
}

// Patch provides a mock function with given fields: ctx, conn, patchOperations
func (_m *MockConnectionStatusPatcher) Patch(ctx context.Context, conn *v0alpha1.Connection, patchOperations ...map[string]interface{}) error {
	_va := make([]interface{}, len(patchOperations))
	for _i := range patchOperations {
		_va[_i] = patchOperations[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, conn)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *v0alpha1.Connection, ...map[string]interface{}) error); ok {
		r0 = rf(ctx, conn, patchOperations...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Patch is a helper method to define mock.On call
//   - ctx context.Context
//   - conn *v0alpha1.Connection
//   - patchOperations ...map[string]interface{}
func (_e *MockConnectionStatusPatcher_Expecter) Patch(ctx interface{}, conn interface{}, patchOperations ...interface{}) *MockConnectionStatusPatcher_Patch_Call {
	return &MockConnectionStatusPatcher_Patch_Call{Call: _e.mock.On("Patch",
		append([]interface{}{ctx, conn}, patchOperations...)...)}
}

func (_c *MockConnectionStatusPatcher_Patch_Call) Run(run func(ctx context.Context, conn *v0alpha1.Connection, patchOperations ...map[string]interface{})) *MockConnectionStatusPatcher_Patch_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]map[string]interface{}, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(map[string]interface{})
			}
		}
		run(args[0].(context.Context), args[1].(*v0alpha1.Connection), variadicArgs...)
	})
	return _c
}

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

func (_c *MockConnectionStatusPatcher_Patch_Call) RunAndReturn(run func(context.Context, *v0alpha1.Connection, ...map[string]interface{}) error) *MockConnectionStatusPatcher_Patch_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
