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

package connection

import (
	context "context"

	mock "github.com/stretchr/testify/mock"
	field "k8s.io/apimachinery/pkg/util/validation/field"

	runtime "k8s.io/apimachinery/pkg/runtime"

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

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

type MockExtra_Expecter struct {
	mock *mock.Mock
}

func (_m *MockExtra) EXPECT() *MockExtra_Expecter {
	return &MockExtra_Expecter{mock: &_m.Mock}
}

// Build provides a mock function with given fields: ctx, r
func (_m *MockExtra) Build(ctx context.Context, r *v0alpha1.Connection) (Connection, error) {
	ret := _m.Called(ctx, r)

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

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

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

	return r0, r1
}

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

// Build is a helper method to define mock.On call
//   - ctx context.Context
//   - r *v0alpha1.Connection
func (_e *MockExtra_Expecter) Build(ctx interface{}, r interface{}) *MockExtra_Build_Call {
	return &MockExtra_Build_Call{Call: _e.mock.On("Build", ctx, r)}
}

func (_c *MockExtra_Build_Call) Run(run func(ctx context.Context, r *v0alpha1.Connection)) *MockExtra_Build_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*v0alpha1.Connection))
	})
	return _c
}

func (_c *MockExtra_Build_Call) Return(_a0 Connection, _a1 error) *MockExtra_Build_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

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

// Mutate provides a mock function with given fields: ctx, obj
func (_m *MockExtra) Mutate(ctx context.Context, obj runtime.Object) error {
	ret := _m.Called(ctx, obj)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, runtime.Object) error); ok {
		r0 = rf(ctx, obj)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Mutate is a helper method to define mock.On call
//   - ctx context.Context
//   - obj runtime.Object
func (_e *MockExtra_Expecter) Mutate(ctx interface{}, obj interface{}) *MockExtra_Mutate_Call {
	return &MockExtra_Mutate_Call{Call: _e.mock.On("Mutate", ctx, obj)}
}

func (_c *MockExtra_Mutate_Call) Run(run func(ctx context.Context, obj runtime.Object)) *MockExtra_Mutate_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(runtime.Object))
	})
	return _c
}

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

func (_c *MockExtra_Mutate_Call) RunAndReturn(run func(context.Context, runtime.Object) error) *MockExtra_Mutate_Call {
	_c.Call.Return(run)
	return _c
}

// Type provides a mock function with no fields
func (_m *MockExtra) Type() v0alpha1.ConnectionType {
	ret := _m.Called()

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

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

	return r0
}

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

// Type is a helper method to define mock.On call
func (_e *MockExtra_Expecter) Type() *MockExtra_Type_Call {
	return &MockExtra_Type_Call{Call: _e.mock.On("Type")}
}

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

func (_c *MockExtra_Type_Call) Return(_a0 v0alpha1.ConnectionType) *MockExtra_Type_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockExtra_Type_Call) RunAndReturn(run func() v0alpha1.ConnectionType) *MockExtra_Type_Call {
	_c.Call.Return(run)
	return _c
}

// Validate provides a mock function with given fields: ctx, obj
func (_m *MockExtra) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
	ret := _m.Called(ctx, obj)

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

	var r0 field.ErrorList
	if rf, ok := ret.Get(0).(func(context.Context, runtime.Object) field.ErrorList); ok {
		r0 = rf(ctx, obj)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(field.ErrorList)
		}
	}

	return r0
}

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

// Validate is a helper method to define mock.On call
//   - ctx context.Context
//   - obj runtime.Object
func (_e *MockExtra_Expecter) Validate(ctx interface{}, obj interface{}) *MockExtra_Validate_Call {
	return &MockExtra_Validate_Call{Call: _e.mock.On("Validate", ctx, obj)}
}

func (_c *MockExtra_Validate_Call) Run(run func(ctx context.Context, obj runtime.Object)) *MockExtra_Validate_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(runtime.Object))
	})
	return _c
}

func (_c *MockExtra_Validate_Call) Return(_a0 field.ErrorList) *MockExtra_Validate_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockExtra_Validate_Call) RunAndReturn(run func(context.Context, runtime.Object) field.ErrorList) *MockExtra_Validate_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
