// Code generated by "./generator ./system/org.freedesktop.policykit1"; DO NOT EDIT.

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

import (
	"fmt"

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

type MockAuthority struct {
	MockInterfaceAuthority // interface org.freedesktop.PolicyKit1.Authority
	proxy.MockObject
}

type MockInterfaceAuthority struct {
	mock.Mock
}

// method EnumerateActions

func (v *MockInterfaceAuthority) GoEnumerateActions(flags dbus.Flags, ch chan *dbus.Call, locale string) *dbus.Call {
	mockArgs := v.Called(flags, ch, locale)

	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 *MockInterfaceAuthority) EnumerateActions(flags dbus.Flags, locale string) ([]ActionDescription, error) {
	mockArgs := v.Called(flags, locale)

	ret0, ok := mockArgs.Get(0).([]ActionDescription)
	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 CheckAuthorization

func (v *MockInterfaceAuthority) GoCheckAuthorization(flags dbus.Flags, ch chan *dbus.Call, subject Subject, action_id string, details map[string]string, flags0 uint32, cancellation_id string) *dbus.Call {
	mockArgs := v.Called(flags, ch, subject, action_id, details, flags0, cancellation_id)

	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 *MockInterfaceAuthority) CheckAuthorization(flags dbus.Flags, subject Subject, action_id string, details map[string]string, flags0 uint32, cancellation_id string) (AuthorizationResult, error) {
	mockArgs := v.Called(flags, subject, action_id, details, flags0, cancellation_id)

	ret0, ok := mockArgs.Get(0).(AuthorizationResult)
	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 CancelCheckAuthorization

func (v *MockInterfaceAuthority) GoCancelCheckAuthorization(flags dbus.Flags, ch chan *dbus.Call, cancellation_id string) *dbus.Call {
	mockArgs := v.Called(flags, ch, cancellation_id)

	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 *MockInterfaceAuthority) CancelCheckAuthorization(flags dbus.Flags, cancellation_id string) error {
	mockArgs := v.Called(flags, cancellation_id)

	return mockArgs.Error(0)
}

// method RegisterAuthenticationAgent

func (v *MockInterfaceAuthority) GoRegisterAuthenticationAgent(flags dbus.Flags, ch chan *dbus.Call, subject Subject, locale string, object_path string) *dbus.Call {
	mockArgs := v.Called(flags, ch, subject, locale, object_path)

	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 *MockInterfaceAuthority) RegisterAuthenticationAgent(flags dbus.Flags, subject Subject, locale string, object_path string) error {
	mockArgs := v.Called(flags, subject, locale, object_path)

	return mockArgs.Error(0)
}

// method RegisterAuthenticationAgentWithOptions

func (v *MockInterfaceAuthority) GoRegisterAuthenticationAgentWithOptions(flags dbus.Flags, ch chan *dbus.Call, subject Subject, locale string, object_path string, options map[string]dbus.Variant) *dbus.Call {
	mockArgs := v.Called(flags, ch, subject, locale, object_path, 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 *MockInterfaceAuthority) RegisterAuthenticationAgentWithOptions(flags dbus.Flags, subject Subject, locale string, object_path string, options map[string]dbus.Variant) error {
	mockArgs := v.Called(flags, subject, locale, object_path, options)

	return mockArgs.Error(0)
}

// method UnregisterAuthenticationAgent

func (v *MockInterfaceAuthority) GoUnregisterAuthenticationAgent(flags dbus.Flags, ch chan *dbus.Call, subject Subject, object_path string) *dbus.Call {
	mockArgs := v.Called(flags, ch, subject, object_path)

	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 *MockInterfaceAuthority) UnregisterAuthenticationAgent(flags dbus.Flags, subject Subject, object_path string) error {
	mockArgs := v.Called(flags, subject, object_path)

	return mockArgs.Error(0)
}

// method AuthenticationAgentResponse

func (v *MockInterfaceAuthority) GoAuthenticationAgentResponse(flags dbus.Flags, ch chan *dbus.Call, cookie string, identity Identity) *dbus.Call {
	mockArgs := v.Called(flags, ch, cookie, identity)

	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 *MockInterfaceAuthority) AuthenticationAgentResponse(flags dbus.Flags, cookie string, identity Identity) error {
	mockArgs := v.Called(flags, cookie, identity)

	return mockArgs.Error(0)
}

// method AuthenticationAgentResponse2

func (v *MockInterfaceAuthority) GoAuthenticationAgentResponse2(flags dbus.Flags, ch chan *dbus.Call, uid uint32, cookie string, identity Identity) *dbus.Call {
	mockArgs := v.Called(flags, ch, uid, cookie, identity)

	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 *MockInterfaceAuthority) AuthenticationAgentResponse2(flags dbus.Flags, uid uint32, cookie string, identity Identity) error {
	mockArgs := v.Called(flags, uid, cookie, identity)

	return mockArgs.Error(0)
}

// method EnumerateTemporaryAuthorizations

func (v *MockInterfaceAuthority) GoEnumerateTemporaryAuthorizations(flags dbus.Flags, ch chan *dbus.Call, subject Subject) *dbus.Call {
	mockArgs := v.Called(flags, ch, subject)

	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 *MockInterfaceAuthority) EnumerateTemporaryAuthorizations(flags dbus.Flags, subject Subject) (TemporaryAuthorization, error) {
	mockArgs := v.Called(flags, subject)

	ret0, ok := mockArgs.Get(0).(TemporaryAuthorization)
	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 RevokeTemporaryAuthorizations

func (v *MockInterfaceAuthority) GoRevokeTemporaryAuthorizations(flags dbus.Flags, ch chan *dbus.Call, subject Subject) *dbus.Call {
	mockArgs := v.Called(flags, ch, subject)

	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 *MockInterfaceAuthority) RevokeTemporaryAuthorizations(flags dbus.Flags, subject Subject) error {
	mockArgs := v.Called(flags, subject)

	return mockArgs.Error(0)
}

// method RevokeTemporaryAuthorizationById

func (v *MockInterfaceAuthority) GoRevokeTemporaryAuthorizationById(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call {
	mockArgs := v.Called(flags, ch, id)

	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 *MockInterfaceAuthority) RevokeTemporaryAuthorizationById(flags dbus.Flags, id string) error {
	mockArgs := v.Called(flags, id)

	return mockArgs.Error(0)
}

// signal Changed

func (v *MockInterfaceAuthority) ConnectChanged(cb func()) (dbusutil.SignalHandlerId, error) {
	mockArgs := v.Called(cb)

	ret0, ok := mockArgs.Get(0).(dbusutil.SignalHandlerId)
	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)
}

// property BackendName s

func (v *MockInterfaceAuthority) BackendName() 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 BackendVersion s

func (v *MockInterfaceAuthority) BackendVersion() 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 BackendFeatures u

func (v *MockInterfaceAuthority) BackendFeatures() proxy.PropUint32 {
	mockArgs := v.Called()

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

	return ret0
}
