// Code generated by "./generator ./session/org.desktopspec.applicationmanager1"; DO NOT EDIT.

// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
package applicationmanager1

import (
	"fmt"

	"github.com/godbus/dbus/v5"
	"github.com/LingmoOS/golang-github-lingmo-go-lib/dbusutil/proxy"
	"github.com/stretchr/testify/mock"
)

type MockApplication struct {
	MockInterfaceApplication // interface org.desktopspec.ApplicationManager1.Application
	proxy.MockObject
}

type MockInterfaceApplication struct {
	mock.Mock
}

// method Launch

func (v *MockInterfaceApplication) GoLaunch(flags dbus.Flags, ch chan *dbus.Call, action string, fields []string, options map[string]dbus.Variant) *dbus.Call {
	mockArgs := v.Called(flags, ch, action, fields, options)

	ret, ok := mockArgs.Get(0).(*dbus.Call)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: 0 failed because object wasn't correct type: %v", mockArgs.Get(0)))
	}

	return ret
}

func (v *MockInterfaceApplication) Launch(flags dbus.Flags, action string, fields []string, options map[string]dbus.Variant) (dbus.ObjectPath, error) {
	mockArgs := v.Called(flags, action, fields, options)

	ret0, ok := mockArgs.Get(0).(dbus.ObjectPath)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0, mockArgs.Error(1)
}

// method SendToDesktop

func (v *MockInterfaceApplication) GoSendToDesktop(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
	mockArgs := v.Called(flags, ch)

	ret, ok := mockArgs.Get(0).(*dbus.Call)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: 0 failed because object wasn't correct type: %v", mockArgs.Get(0)))
	}

	return ret
}

func (v *MockInterfaceApplication) SendToDesktop(flags dbus.Flags) (bool, error) {
	mockArgs := v.Called(flags)

	return mockArgs.Bool(0), mockArgs.Error(1)
}

// method RemoveFromDesktop

func (v *MockInterfaceApplication) GoRemoveFromDesktop(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
	mockArgs := v.Called(flags, ch)

	ret, ok := mockArgs.Get(0).(*dbus.Call)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: 0 failed because object wasn't correct type: %v", mockArgs.Get(0)))
	}

	return ret
}

func (v *MockInterfaceApplication) RemoveFromDesktop(flags dbus.Flags) (bool, error) {
	mockArgs := v.Called(flags)

	return mockArgs.Bool(0), mockArgs.Error(1)
}

// property Categories as

func (v *MockInterfaceApplication) Categories() proxy.PropStringArray {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropStringArray)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property X_linglong b

func (v *MockInterfaceApplication) X_linglong() proxy.PropBool {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropBool)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property X_Flatpak b

func (v *MockInterfaceApplication) X_Flatpak() proxy.PropBool {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropBool)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property installedTime t

func (v *MockInterfaceApplication) InstalledTime() proxy.PropUint64 {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropUint64)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property NoDisplay b

func (v *MockInterfaceApplication) NoDisplay() proxy.PropBool {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropBool)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property MimeTypes as

func (v *MockInterfaceApplication) MimeTypes() proxy.PropStringArray {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropStringArray)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property Actions as

func (v *MockInterfaceApplication) Actions() proxy.PropStringArray {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropStringArray)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property AutoStart b

func (v *MockInterfaceApplication) AutoStart() proxy.PropBool {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropBool)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property LastLaunchedTime t

func (v *MockInterfaceApplication) LastLaunchedTime() proxy.PropUint64 {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropUint64)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property Instances ao

func (v *MockInterfaceApplication) Instances() proxy.PropObjectPathArray {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropObjectPathArray)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property ID s

func (v *MockInterfaceApplication) ID() proxy.PropString {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropString)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property Terminal b

func (v *MockInterfaceApplication) Terminal() proxy.PropBool {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropBool)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property ScaleFactor d

func (v *MockInterfaceApplication) ScaleFactor() proxy.PropDouble {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropDouble)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

// property isOnDesktop b

func (v *MockInterfaceApplication) IsOnDesktop() proxy.PropBool {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropBool)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

type MockManager struct {
	MockInterfaceManager // interface org.desktopspec.ApplicationManager1
	proxy.MockObject
}

type MockInterfaceManager struct {
	mock.Mock
}

// method ReloadApplications

func (v *MockInterfaceManager) GoReloadApplications(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
	mockArgs := v.Called(flags, ch)

	ret, ok := mockArgs.Get(0).(*dbus.Call)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: 0 failed because object wasn't correct type: %v", mockArgs.Get(0)))
	}

	return ret
}

func (v *MockInterfaceManager) ReloadApplications(flags dbus.Flags) error {
	mockArgs := v.Called(flags)

	return mockArgs.Error(0)
}

// method Identify

func (v *MockInterfaceManager) GoIdentify(flags dbus.Flags, ch chan *dbus.Call, pidfd dbus.UnixFD) *dbus.Call {
	mockArgs := v.Called(flags, ch, pidfd)

	ret, ok := mockArgs.Get(0).(*dbus.Call)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: 0 failed because object wasn't correct type: %v", mockArgs.Get(0)))
	}

	return ret
}

func (v *MockInterfaceManager) Identify(flags dbus.Flags, pidfd dbus.UnixFD) (string, dbus.ObjectPath, map[string]map[string]dbus.Variant, error) {
	mockArgs := v.Called(flags, pidfd)

	ret1, ok := mockArgs.Get(1).(dbus.ObjectPath)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 1, mockArgs.Get(1)))
	}

	ret2, ok := mockArgs.Get(2).(map[string]map[string]dbus.Variant)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 2, mockArgs.Get(2)))
	}

	return mockArgs.String(0), ret1, ret2, mockArgs.Error(3)
}

// method addUserApplication

func (v *MockInterfaceManager) GoAddUserApplication(flags dbus.Flags, ch chan *dbus.Call, desktop_file map[string]dbus.Variant, name string) *dbus.Call {
	mockArgs := v.Called(flags, ch, desktop_file, name)

	ret, ok := mockArgs.Get(0).(*dbus.Call)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: 0 failed because object wasn't correct type: %v", mockArgs.Get(0)))
	}

	return ret
}

func (v *MockInterfaceManager) AddUserApplication(flags dbus.Flags, desktop_file map[string]dbus.Variant, name string) (string, error) {
	mockArgs := v.Called(flags, desktop_file, name)

	return mockArgs.String(0), mockArgs.Error(1)
}

// property List ao

func (v *MockInterfaceManager) List() proxy.PropObjectPathArray {
	mockArgs := v.Called()

	ret0, ok := mockArgs.Get(0).(*proxy.MockPropObjectPathArray)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0
}

type MockMimeManager struct {
	MockInterfaceMimeManager // interface org.desktopspec.MimeManager1
	proxy.MockObject
}

type MockInterfaceMimeManager struct {
	mock.Mock
}

// method queryDefaultApplication

func (v *MockInterfaceMimeManager) GoQueryDefaultApplication(flags dbus.Flags, ch chan *dbus.Call, content string) *dbus.Call {
	mockArgs := v.Called(flags, ch, content)

	ret, ok := mockArgs.Get(0).(*dbus.Call)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: 0 failed because object wasn't correct type: %v", mockArgs.Get(0)))
	}

	return ret
}

func (v *MockInterfaceMimeManager) QueryDefaultApplication(flags dbus.Flags, content string) (string, dbus.ObjectPath, error) {
	mockArgs := v.Called(flags, content)

	ret1, ok := mockArgs.Get(1).(dbus.ObjectPath)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 1, mockArgs.Get(1)))
	}

	return mockArgs.String(0), ret1, mockArgs.Error(2)
}

// method setDefaultApplication

func (v *MockInterfaceMimeManager) GoSetDefaultApplication(flags dbus.Flags, ch chan *dbus.Call, defaultApps map[string]string) *dbus.Call {
	mockArgs := v.Called(flags, ch, defaultApps)

	ret, ok := mockArgs.Get(0).(*dbus.Call)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: 0 failed because object wasn't correct type: %v", mockArgs.Get(0)))
	}

	return ret
}

func (v *MockInterfaceMimeManager) SetDefaultApplication(flags dbus.Flags, defaultApps map[string]string) error {
	mockArgs := v.Called(flags, defaultApps)

	return mockArgs.Error(0)
}

// method unsetDefaultApplication

func (v *MockInterfaceMimeManager) GoUnsetDefaultApplication(flags dbus.Flags, ch chan *dbus.Call, mimeTypes []string) *dbus.Call {
	mockArgs := v.Called(flags, ch, mimeTypes)

	ret, ok := mockArgs.Get(0).(*dbus.Call)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: 0 failed because object wasn't correct type: %v", mockArgs.Get(0)))
	}

	return ret
}

func (v *MockInterfaceMimeManager) UnsetDefaultApplication(flags dbus.Flags, mimeTypes []string) error {
	mockArgs := v.Called(flags, mimeTypes)

	return mockArgs.Error(0)
}

// method listApplications

func (v *MockInterfaceMimeManager) GoListApplications(flags dbus.Flags, ch chan *dbus.Call, mimeType string) *dbus.Call {
	mockArgs := v.Called(flags, ch, mimeType)

	ret, ok := mockArgs.Get(0).(*dbus.Call)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: 0 failed because object wasn't correct type: %v", mockArgs.Get(0)))
	}

	return ret
}

func (v *MockInterfaceMimeManager) ListApplications(flags dbus.Flags, mimeType string) (map[dbus.ObjectPath]map[string]map[string]dbus.Variant, error) {
	mockArgs := v.Called(flags, mimeType)

	ret0, ok := mockArgs.Get(0).(map[dbus.ObjectPath]map[string]map[string]dbus.Variant)
	if !ok {
		panic(fmt.Sprintf("assert: arguments: %d failed because object wasn't correct type: %v", 0, mockArgs.Get(0)))
	}

	return ret0, mockArgs.Error(1)
}
