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

package gonetworkmanager

import (
	gonetworkmanager "github.com/Wifx/gonetworkmanager/v2"
	dbus "github.com/godbus/dbus/v5"

	mock "github.com/stretchr/testify/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 with no fields
func (_m *MockConnection) ClearSecrets() error {
	ret := _m.Called()

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

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} 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(_a0 error) *MockConnection_ClearSecrets_Call {
	_c.Call.Return(_a0)
	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 with no fields
func (_m *MockConnection) Delete() error {
	ret := _m.Called()

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

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} 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(_a0 error) *MockConnection_Delete_Call {
	_c.Call.Return(_a0)
	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 with no fields
func (_m *MockConnection) GetPath() dbus.ObjectPath {
	ret := _m.Called()

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

	var r0 dbus.ObjectPath
	if rf, ok := ret.Get(0).(func() dbus.ObjectPath); ok {
		r0 = rf()
	} 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(_a0 dbus.ObjectPath) *MockConnection_GetPath_Call {
	_c.Call.Return(_a0)
	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 with no fields
func (_m *MockConnection) GetPropertyFilename() (string, error) {
	ret := _m.Called()

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

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

	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} 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(_a0 string, _a1 error) *MockConnection_GetPropertyFilename_Call {
	_c.Call.Return(_a0, _a1)
	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 with no fields
func (_m *MockConnection) GetPropertyFlags() (uint32, error) {
	ret := _m.Called()

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

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

	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} 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(_a0 uint32, _a1 error) *MockConnection_GetPropertyFlags_Call {
	_c.Call.Return(_a0, _a1)
	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 with no fields
func (_m *MockConnection) GetPropertyUnsaved() (bool, error) {
	ret := _m.Called()

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

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

	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} 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(_a0 bool, _a1 error) *MockConnection_GetPropertyUnsaved_Call {
	_c.Call.Return(_a0, _a1)
	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 with given fields: settingName
func (_m *MockConnection) GetSecrets(settingName string) (gonetworkmanager.ConnectionSettings, error) {
	ret := _m.Called(settingName)

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

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

	if rf, ok := ret.Get(1).(func(string) error); ok {
		r1 = rf(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 interface{}) *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) {
		run(args[0].(string))
	})
	return _c
}

func (_c *MockConnection_GetSecrets_Call) Return(_a0 gonetworkmanager.ConnectionSettings, _a1 error) *MockConnection_GetSecrets_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

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

// GetSettings provides a mock function with no fields
func (_m *MockConnection) GetSettings() (gonetworkmanager.ConnectionSettings, error) {
	ret := _m.Called()

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

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

	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} 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(_a0 gonetworkmanager.ConnectionSettings, _a1 error) *MockConnection_GetSettings_Call {
	_c.Call.Return(_a0, _a1)
	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 with no fields
func (_m *MockConnection) MarshalJSON() ([]byte, error) {
	ret := _m.Called()

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

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

	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} 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(_a0 []byte, _a1 error) *MockConnection_MarshalJSON_Call {
	_c.Call.Return(_a0, _a1)
	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 with no fields
func (_m *MockConnection) Save() error {
	ret := _m.Called()

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

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} 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(_a0 error) *MockConnection_Save_Call {
	_c.Call.Return(_a0)
	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 with given fields: settings
func (_m *MockConnection) Update(settings gonetworkmanager.ConnectionSettings) error {
	ret := _m.Called(settings)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) error); ok {
		r0 = rf(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 interface{}) *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) {
		run(args[0].(gonetworkmanager.ConnectionSettings))
	})
	return _c
}

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

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

// UpdateUnsaved provides a mock function with given fields: settings
func (_m *MockConnection) UpdateUnsaved(settings gonetworkmanager.ConnectionSettings) error {
	ret := _m.Called(settings)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(gonetworkmanager.ConnectionSettings) error); ok {
		r0 = rf(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 interface{}) *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) {
		run(args[0].(gonetworkmanager.ConnectionSettings))
	})
	return _c
}

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

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

// 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
}
