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

package gonetworkmanager

import (
	"github.com/Wifx/gonetworkmanager/v2"
	"github.com/godbus/dbus/v5"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type MockConnection_Expecter struct {
	mock *mock.Mock
}

func (_m *MockConnection) EXPECT() *MockConnection_Expecter {
	return &MockConnection_Expecter{mock: &_m.Mock}
}

// ClearSecrets provides a mock function for the type MockConnection
func (_mock *MockConnection) ClearSecrets() error {
	ret := _mock.Called()

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

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

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

// ClearSecrets is a helper method to define mock.On call
func (_e *MockConnection_Expecter) ClearSecrets() *MockConnection_ClearSecrets_Call {
	return &MockConnection_ClearSecrets_Call{Call: _e.mock.On("ClearSecrets")}
}

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

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

func (_c *MockConnection_ClearSecrets_Call) RunAndReturn(run func() error) *MockConnection_ClearSecrets_Call {
	_c.Call.Return(run)
	return _c
}

// Delete provides a mock function for the type MockConnection
func (_mock *MockConnection) Delete() error {
	ret := _mock.Called()

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

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

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

// Delete is a helper method to define mock.On call
func (_e *MockConnection_Expecter) Delete() *MockConnection_Delete_Call {
	return &MockConnection_Delete_Call{Call: _e.mock.On("Delete")}
}

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

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

func (_c *MockConnection_Delete_Call) RunAndReturn(run func() error) *MockConnection_Delete_Call {
	_c.Call.Return(run)
	return _c
}

// GetPath provides a mock function for the type MockConnection
func (_mock *MockConnection) GetPath() dbus.ObjectPath {
	ret := _mock.Called()

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

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

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

// GetPath is a helper method to define mock.On call
func (_e *MockConnection_Expecter) GetPath() *MockConnection_GetPath_Call {
	return &MockConnection_GetPath_Call{Call: _e.mock.On("GetPath")}
}

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

func (_c *MockConnection_GetPath_Call) Return(objectPath dbus.ObjectPath) *MockConnection_GetPath_Call {
	_c.Call.Return(objectPath)
	return _c
}

func (_c *MockConnection_GetPath_Call) RunAndReturn(run func() dbus.ObjectPath) *MockConnection_GetPath_Call {
	_c.Call.Return(run)
	return _c
}

// GetPropertyFilename provides a mock function for the type MockConnection
func (_mock *MockConnection) GetPropertyFilename() (string, error) {
	ret := _mock.Called()

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

	var r0 string
	var r1 error
	if returnFunc, ok := ret.Get(0).(func() (string, error)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() string); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Get(0).(string)
	}
	if returnFunc, ok := ret.Get(1).(func() error); ok {
		r1 = returnFunc()
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetPropertyFilename is a helper method to define mock.On call
func (_e *MockConnection_Expecter) GetPropertyFilename() *MockConnection_GetPropertyFilename_Call {
	return &MockConnection_GetPropertyFilename_Call{Call: _e.mock.On("GetPropertyFilename")}
}

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

func (_c *MockConnection_GetPropertyFilename_Call) Return(s string, err error) *MockConnection_GetPropertyFilename_Call {
	_c.Call.Return(s, err)
	return _c
}

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

// GetPropertyFlags provides a mock function for the type MockConnection
func (_mock *MockConnection) GetPropertyFlags() (uint32, error) {
	ret := _mock.Called()

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

	var r0 uint32
	var r1 error
	if returnFunc, ok := ret.Get(0).(func() (uint32, error)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() uint32); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Get(0).(uint32)
	}
	if returnFunc, ok := ret.Get(1).(func() error); ok {
		r1 = returnFunc()
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetPropertyFlags is a helper method to define mock.On call
func (_e *MockConnection_Expecter) GetPropertyFlags() *MockConnection_GetPropertyFlags_Call {
	return &MockConnection_GetPropertyFlags_Call{Call: _e.mock.On("GetPropertyFlags")}
}

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

func (_c *MockConnection_GetPropertyFlags_Call) Return(v uint32, err error) *MockConnection_GetPropertyFlags_Call {
	_c.Call.Return(v, err)
	return _c
}

func (_c *MockConnection_GetPropertyFlags_Call) RunAndReturn(run func() (uint32, error)) *MockConnection_GetPropertyFlags_Call {
	_c.Call.Return(run)
	return _c
}

// GetPropertyUnsaved provides a mock function for the type MockConnection
func (_mock *MockConnection) GetPropertyUnsaved() (bool, error) {
	ret := _mock.Called()

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

	var r0 bool
	var r1 error
	if returnFunc, ok := ret.Get(0).(func() (bool, error)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() bool); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Get(0).(bool)
	}
	if returnFunc, ok := ret.Get(1).(func() error); ok {
		r1 = returnFunc()
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetPropertyUnsaved is a helper method to define mock.On call
func (_e *MockConnection_Expecter) GetPropertyUnsaved() *MockConnection_GetPropertyUnsaved_Call {
	return &MockConnection_GetPropertyUnsaved_Call{Call: _e.mock.On("GetPropertyUnsaved")}
}

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

func (_c *MockConnection_GetPropertyUnsaved_Call) Return(b bool, err error) *MockConnection_GetPropertyUnsaved_Call {
	_c.Call.Return(b, err)
	return _c
}

func (_c *MockConnection_GetPropertyUnsaved_Call) RunAndReturn(run func() (bool, error)) *MockConnection_GetPropertyUnsaved_Call {
	_c.Call.Return(run)
	return _c
}

// GetSecrets provides a mock function for the type MockConnection
func (_mock *MockConnection) GetSecrets(settingName string) (gonetworkmanager.ConnectionSettings, error) {
	ret := _mock.Called(settingName)

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

	var r0 gonetworkmanager.ConnectionSettings
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(string) (gonetworkmanager.ConnectionSettings, error)); ok {
		return returnFunc(settingName)
	}
	if returnFunc, ok := ret.Get(0).(func(string) gonetworkmanager.ConnectionSettings); ok {
		r0 = returnFunc(settingName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(gonetworkmanager.ConnectionSettings)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
		r1 = returnFunc(settingName)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetSecrets is a helper method to define mock.On call
//   - settingName string
func (_e *MockConnection_Expecter) GetSecrets(settingName any) *MockConnection_GetSecrets_Call {
	return &MockConnection_GetSecrets_Call{Call: _e.mock.On("GetSecrets", settingName)}
}

func (_c *MockConnection_GetSecrets_Call) Run(run func(settingName string)) *MockConnection_GetSecrets_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 *MockConnection_GetSecrets_Call) Return(connectionSettings gonetworkmanager.ConnectionSettings, err error) *MockConnection_GetSecrets_Call {
	_c.Call.Return(connectionSettings, err)
	return _c
}

func (_c *MockConnection_GetSecrets_Call) RunAndReturn(run func(settingName string) (gonetworkmanager.ConnectionSettings, error)) *MockConnection_GetSecrets_Call {
	_c.Call.Return(run)
	return _c
}

// GetSettings provides a mock function for the type MockConnection
func (_mock *MockConnection) GetSettings() (gonetworkmanager.ConnectionSettings, error) {
	ret := _mock.Called()

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

	var r0 gonetworkmanager.ConnectionSettings
	var r1 error
	if returnFunc, ok := ret.Get(0).(func() (gonetworkmanager.ConnectionSettings, error)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() gonetworkmanager.ConnectionSettings); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(gonetworkmanager.ConnectionSettings)
		}
	}
	if returnFunc, ok := ret.Get(1).(func() error); ok {
		r1 = returnFunc()
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetSettings is a helper method to define mock.On call
func (_e *MockConnection_Expecter) GetSettings() *MockConnection_GetSettings_Call {
	return &MockConnection_GetSettings_Call{Call: _e.mock.On("GetSettings")}
}

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

func (_c *MockConnection_GetSettings_Call) Return(connectionSettings gonetworkmanager.ConnectionSettings, err error) *MockConnection_GetSettings_Call {
	_c.Call.Return(connectionSettings, err)
	return _c
}

func (_c *MockConnection_GetSettings_Call) RunAndReturn(run func() (gonetworkmanager.ConnectionSettings, error)) *MockConnection_GetSettings_Call {
	_c.Call.Return(run)
	return _c
}

// MarshalJSON provides a mock function for the type MockConnection
func (_mock *MockConnection) MarshalJSON() ([]byte, error) {
	ret := _mock.Called()

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

	var r0 []byte
	var r1 error
	if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() []byte); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}
	if returnFunc, ok := ret.Get(1).(func() error); ok {
		r1 = returnFunc()
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// MarshalJSON is a helper method to define mock.On call
func (_e *MockConnection_Expecter) MarshalJSON() *MockConnection_MarshalJSON_Call {
	return &MockConnection_MarshalJSON_Call{Call: _e.mock.On("MarshalJSON")}
}

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

func (_c *MockConnection_MarshalJSON_Call) Return(bytes []byte, err error) *MockConnection_MarshalJSON_Call {
	_c.Call.Return(bytes, err)
	return _c
}

func (_c *MockConnection_MarshalJSON_Call) RunAndReturn(run func() ([]byte, error)) *MockConnection_MarshalJSON_Call {
	_c.Call.Return(run)
	return _c
}

// Save provides a mock function for the type MockConnection
func (_mock *MockConnection) Save() error {
	ret := _mock.Called()

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

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

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

// Save is a helper method to define mock.On call
func (_e *MockConnection_Expecter) Save() *MockConnection_Save_Call {
	return &MockConnection_Save_Call{Call: _e.mock.On("Save")}
}

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

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

func (_c *MockConnection_Save_Call) RunAndReturn(run func() error) *MockConnection_Save_Call {
	_c.Call.Return(run)
	return _c
}

// Update provides a mock function for the type MockConnection
func (_mock *MockConnection) Update(settings gonetworkmanager.ConnectionSettings) error {
	ret := _mock.Called(settings)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) error); ok {
		r0 = returnFunc(settings)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Update is a helper method to define mock.On call
//   - settings gonetworkmanager.ConnectionSettings
func (_e *MockConnection_Expecter) Update(settings any) *MockConnection_Update_Call {
	return &MockConnection_Update_Call{Call: _e.mock.On("Update", settings)}
}

func (_c *MockConnection_Update_Call) Run(run func(settings gonetworkmanager.ConnectionSettings)) *MockConnection_Update_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 gonetworkmanager.ConnectionSettings
		if args[0] != nil {
			arg0 = args[0].(gonetworkmanager.ConnectionSettings)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *MockConnection_Update_Call) RunAndReturn(run func(settings gonetworkmanager.ConnectionSettings) error) *MockConnection_Update_Call {
	_c.Call.Return(run)
	return _c
}

// UpdateUnsaved provides a mock function for the type MockConnection
func (_mock *MockConnection) UpdateUnsaved(settings gonetworkmanager.ConnectionSettings) error {
	ret := _mock.Called(settings)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) error); ok {
		r0 = returnFunc(settings)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// UpdateUnsaved is a helper method to define mock.On call
//   - settings gonetworkmanager.ConnectionSettings
func (_e *MockConnection_Expecter) UpdateUnsaved(settings any) *MockConnection_UpdateUnsaved_Call {
	return &MockConnection_UpdateUnsaved_Call{Call: _e.mock.On("UpdateUnsaved", settings)}
}

func (_c *MockConnection_UpdateUnsaved_Call) Run(run func(settings gonetworkmanager.ConnectionSettings)) *MockConnection_UpdateUnsaved_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 gonetworkmanager.ConnectionSettings
		if args[0] != nil {
			arg0 = args[0].(gonetworkmanager.ConnectionSettings)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *MockConnection_UpdateUnsaved_Call) RunAndReturn(run func(settings gonetworkmanager.ConnectionSettings) error) *MockConnection_UpdateUnsaved_Call {
	_c.Call.Return(run)
	return _c
}
