/*This file is automatically generated by pkg.deepin.io/dbus-generator. Don't edit it*/
package accounts

import "pkg.deepin.io/lib/dbus"
import "pkg.deepin.io/lib/dbus/property"
import "reflect"
import "sync"
import "runtime"
import "fmt"
import "errors"

/*prevent compile error*/
var _ = fmt.Println
var _ = runtime.SetFinalizer
var _ = sync.NewCond
var _ = reflect.TypeOf
var _ = property.BaseObserver{}

type User struct {
	Path     dbus.ObjectPath
	DestName string
	core     *dbus.Object

	signals       map[<-chan *dbus.Signal]struct{}
	signalsLocker sync.Mutex

	Uid                *dbusPropertyUserUid
	Shell              *dbusPropertyUserShell
	XSession           *dbusPropertyUserXSession
	NoPasswdLogin      *dbusPropertyUserNoPasswdLogin
	HistoryLayout      *dbusPropertyUserHistoryLayout
	DesktopBackgrounds *dbusPropertyUserDesktopBackgrounds
	AutomaticLogin     *dbusPropertyUserAutomaticLogin
	UserName           *dbusPropertyUserUserName
	Gid                *dbusPropertyUserGid
	Locale             *dbusPropertyUserLocale
	SystemAccount      *dbusPropertyUserSystemAccount
	AccountType        *dbusPropertyUserAccountType
	FullName           *dbusPropertyUserFullName
	HomeDir            *dbusPropertyUserHomeDir
	Layout             *dbusPropertyUserLayout
	IconFile           *dbusPropertyUserIconFile
	GreeterBackground  *dbusPropertyUserGreeterBackground
	Locked             *dbusPropertyUserLocked
	LoginTime          *dbusPropertyUserLoginTime
	IconList           *dbusPropertyUserIconList
}

func (obj *User) _createSignalChan() <-chan *dbus.Signal {
	obj.signalsLocker.Lock()
	ch := getBus().Signal()
	obj.signals[ch] = struct{}{}
	obj.signalsLocker.Unlock()
	return ch
}
func (obj *User) _deleteSignalChan(ch <-chan *dbus.Signal) {
	obj.signalsLocker.Lock()
	delete(obj.signals, ch)
	getBus().DetachSignal(ch)
	obj.signalsLocker.Unlock()
}
func DestroyUser(obj *User) {
	obj.signalsLocker.Lock()
	defer obj.signalsLocker.Unlock()
	if obj.signals == nil {
		return
	}
	for ch, _ := range obj.signals {
		getBus().DetachSignal(ch)
	}
	obj.signals = nil

	runtime.SetFinalizer(obj, nil)

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.DBus.Properties',sender='" + obj.DestName + "',member='PropertiesChanged'")
	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='com.deepin.daemon.Accounts.User',sender='" + obj.DestName + "',member='PropertiesChanged'")

	obj.Uid.Reset()
	obj.Shell.Reset()
	obj.XSession.Reset()
	obj.NoPasswdLogin.Reset()
	obj.HistoryLayout.Reset()
	obj.DesktopBackgrounds.Reset()
	obj.AutomaticLogin.Reset()
	obj.UserName.Reset()
	obj.Gid.Reset()
	obj.Locale.Reset()
	obj.SystemAccount.Reset()
	obj.AccountType.Reset()
	obj.FullName.Reset()
	obj.HomeDir.Reset()
	obj.Layout.Reset()
	obj.IconFile.Reset()
	obj.GreeterBackground.Reset()
	obj.Locked.Reset()
	obj.LoginTime.Reset()
	obj.IconList.Reset()
}

func (obj *User) DeleteIconFile(iconFile string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.DeleteIconFile", 0, iconFile).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) EnableNoPasswdLogin(enabled bool) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.EnableNoPasswdLogin", 0, enabled).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetAccountType(accountType int32) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetAccountType", 0, accountType).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetAutomaticLogin(auto bool) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetAutomaticLogin", 0, auto).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetDesktopBackgrounds(backgrounds []string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetDesktopBackgrounds", 0, backgrounds).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetFullName(name string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetFullName", 0, name).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetGreeterBackground(background string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetGreeterBackground", 0, background).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetHistoryLayout(layouts []string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetHistoryLayout", 0, layouts).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetHomeDir(home string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetHomeDir", 0, home).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetIconFile(iconFile string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetIconFile", 0, iconFile).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetLayout(layout string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetLayout", 0, layout).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetLocale(locale string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetLocale", 0, locale).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetLocked(locked bool) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetLocked", 0, locked).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetPassword(password string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetPassword", 0, password).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *User) SetShell(shell string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Accounts.User.SetShell", 0, shell).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

type dbusPropertyUserUid struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserUid) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.Uid is not writable")
}

func (this *dbusPropertyUserUid) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyUserUid) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "Uid").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyUserUid) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyUserShell struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserShell) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.Shell is not writable")
}

func (this *dbusPropertyUserShell) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyUserShell) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "Shell").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyUserShell) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyUserXSession struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserXSession) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.XSession is not writable")
}

func (this *dbusPropertyUserXSession) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyUserXSession) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "XSession").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyUserXSession) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyUserNoPasswdLogin struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserNoPasswdLogin) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.NoPasswdLogin is not writable")
}

func (this *dbusPropertyUserNoPasswdLogin) Get() bool {
	v, _ := this.GetValue()
	return v.(bool)
}
func (this *dbusPropertyUserNoPasswdLogin) GetValue() (interface{} /*bool*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "NoPasswdLogin").Store(&r)
	if err == nil && r.Signature().String() == "b" {
		return r.Value().(bool), nil
	}
	return *new(bool), err
}
func (this *dbusPropertyUserNoPasswdLogin) GetType() reflect.Type {
	return reflect.TypeOf((*bool)(nil)).Elem()
}

type dbusPropertyUserHistoryLayout struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserHistoryLayout) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.HistoryLayout is not writable")
}

func (this *dbusPropertyUserHistoryLayout) Get() []string {
	v, _ := this.GetValue()
	return v.([]string)
}
func (this *dbusPropertyUserHistoryLayout) GetValue() (interface{} /*[]string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "HistoryLayout").Store(&r)
	if err == nil && r.Signature().String() == "as" {
		return r.Value().([]string), nil
	}
	return *new([]string), err
}
func (this *dbusPropertyUserHistoryLayout) GetType() reflect.Type {
	return reflect.TypeOf((*[]string)(nil)).Elem()
}

type dbusPropertyUserDesktopBackgrounds struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserDesktopBackgrounds) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.DesktopBackgrounds is not writable")
}

func (this *dbusPropertyUserDesktopBackgrounds) Get() []string {
	v, _ := this.GetValue()
	return v.([]string)
}
func (this *dbusPropertyUserDesktopBackgrounds) GetValue() (interface{} /*[]string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "DesktopBackgrounds").Store(&r)
	if err == nil && r.Signature().String() == "as" {
		return r.Value().([]string), nil
	}
	return *new([]string), err
}
func (this *dbusPropertyUserDesktopBackgrounds) GetType() reflect.Type {
	return reflect.TypeOf((*[]string)(nil)).Elem()
}

type dbusPropertyUserAutomaticLogin struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserAutomaticLogin) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.AutomaticLogin is not writable")
}

func (this *dbusPropertyUserAutomaticLogin) Get() bool {
	v, _ := this.GetValue()
	return v.(bool)
}
func (this *dbusPropertyUserAutomaticLogin) GetValue() (interface{} /*bool*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "AutomaticLogin").Store(&r)
	if err == nil && r.Signature().String() == "b" {
		return r.Value().(bool), nil
	}
	return *new(bool), err
}
func (this *dbusPropertyUserAutomaticLogin) GetType() reflect.Type {
	return reflect.TypeOf((*bool)(nil)).Elem()
}

type dbusPropertyUserUserName struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserUserName) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.UserName is not writable")
}

func (this *dbusPropertyUserUserName) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyUserUserName) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "UserName").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyUserUserName) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyUserGid struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserGid) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.Gid is not writable")
}

func (this *dbusPropertyUserGid) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyUserGid) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "Gid").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyUserGid) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyUserLocale struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserLocale) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.Locale is not writable")
}

func (this *dbusPropertyUserLocale) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyUserLocale) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "Locale").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyUserLocale) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyUserSystemAccount struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserSystemAccount) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.SystemAccount is not writable")
}

func (this *dbusPropertyUserSystemAccount) Get() bool {
	v, _ := this.GetValue()
	return v.(bool)
}
func (this *dbusPropertyUserSystemAccount) GetValue() (interface{} /*bool*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "SystemAccount").Store(&r)
	if err == nil && r.Signature().String() == "b" {
		return r.Value().(bool), nil
	}
	return *new(bool), err
}
func (this *dbusPropertyUserSystemAccount) GetType() reflect.Type {
	return reflect.TypeOf((*bool)(nil)).Elem()
}

type dbusPropertyUserAccountType struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserAccountType) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.AccountType is not writable")
}

func (this *dbusPropertyUserAccountType) Get() int32 {
	v, _ := this.GetValue()
	return v.(int32)
}
func (this *dbusPropertyUserAccountType) GetValue() (interface{} /*int32*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "AccountType").Store(&r)
	if err == nil && r.Signature().String() == "i" {
		return r.Value().(int32), nil
	}
	return *new(int32), err
}
func (this *dbusPropertyUserAccountType) GetType() reflect.Type {
	return reflect.TypeOf((*int32)(nil)).Elem()
}

type dbusPropertyUserFullName struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserFullName) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.FullName is not writable")
}

func (this *dbusPropertyUserFullName) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyUserFullName) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "FullName").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyUserFullName) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyUserHomeDir struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserHomeDir) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.HomeDir is not writable")
}

func (this *dbusPropertyUserHomeDir) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyUserHomeDir) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "HomeDir").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyUserHomeDir) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyUserLayout struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserLayout) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.Layout is not writable")
}

func (this *dbusPropertyUserLayout) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyUserLayout) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "Layout").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyUserLayout) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyUserIconFile struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserIconFile) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.IconFile is not writable")
}

func (this *dbusPropertyUserIconFile) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyUserIconFile) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "IconFile").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyUserIconFile) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyUserGreeterBackground struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserGreeterBackground) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.GreeterBackground is not writable")
}

func (this *dbusPropertyUserGreeterBackground) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyUserGreeterBackground) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "GreeterBackground").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyUserGreeterBackground) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyUserLocked struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserLocked) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.Locked is not writable")
}

func (this *dbusPropertyUserLocked) Get() bool {
	v, _ := this.GetValue()
	return v.(bool)
}
func (this *dbusPropertyUserLocked) GetValue() (interface{} /*bool*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "Locked").Store(&r)
	if err == nil && r.Signature().String() == "b" {
		return r.Value().(bool), nil
	}
	return *new(bool), err
}
func (this *dbusPropertyUserLocked) GetType() reflect.Type {
	return reflect.TypeOf((*bool)(nil)).Elem()
}

type dbusPropertyUserLoginTime struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserLoginTime) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.LoginTime is not writable")
}

func (this *dbusPropertyUserLoginTime) Get() uint64 {
	v, _ := this.GetValue()
	return v.(uint64)
}
func (this *dbusPropertyUserLoginTime) GetValue() (interface{} /*uint64*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "LoginTime").Store(&r)
	if err == nil && r.Signature().String() == "t" {
		return r.Value().(uint64), nil
	}
	return *new(uint64), err
}
func (this *dbusPropertyUserLoginTime) GetType() reflect.Type {
	return reflect.TypeOf((*uint64)(nil)).Elem()
}

type dbusPropertyUserIconList struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyUserIconList) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Accounts.User.IconList is not writable")
}

func (this *dbusPropertyUserIconList) Get() []string {
	v, _ := this.GetValue()
	return v.([]string)
}
func (this *dbusPropertyUserIconList) GetValue() (interface{} /*[]string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "com.deepin.daemon.Accounts.User", "IconList").Store(&r)
	if err == nil && r.Signature().String() == "as" {
		return r.Value().([]string), nil
	}
	return *new([]string), err
}
func (this *dbusPropertyUserIconList) GetType() reflect.Type {
	return reflect.TypeOf((*[]string)(nil)).Elem()
}

func NewUser(destName string, path dbus.ObjectPath) (*User, error) {
	if !path.IsValid() {
		return nil, errors.New("The path of '" + string(path) + "' is invalid.")
	}

	core := getBus().Object(destName, path)

	obj := &User{Path: path, DestName: destName, core: core, signals: make(map[<-chan *dbus.Signal]struct{})}

	obj.Uid = &dbusPropertyUserUid{&property.BaseObserver{}, core}
	obj.Shell = &dbusPropertyUserShell{&property.BaseObserver{}, core}
	obj.XSession = &dbusPropertyUserXSession{&property.BaseObserver{}, core}
	obj.NoPasswdLogin = &dbusPropertyUserNoPasswdLogin{&property.BaseObserver{}, core}
	obj.HistoryLayout = &dbusPropertyUserHistoryLayout{&property.BaseObserver{}, core}
	obj.DesktopBackgrounds = &dbusPropertyUserDesktopBackgrounds{&property.BaseObserver{}, core}
	obj.AutomaticLogin = &dbusPropertyUserAutomaticLogin{&property.BaseObserver{}, core}
	obj.UserName = &dbusPropertyUserUserName{&property.BaseObserver{}, core}
	obj.Gid = &dbusPropertyUserGid{&property.BaseObserver{}, core}
	obj.Locale = &dbusPropertyUserLocale{&property.BaseObserver{}, core}
	obj.SystemAccount = &dbusPropertyUserSystemAccount{&property.BaseObserver{}, core}
	obj.AccountType = &dbusPropertyUserAccountType{&property.BaseObserver{}, core}
	obj.FullName = &dbusPropertyUserFullName{&property.BaseObserver{}, core}
	obj.HomeDir = &dbusPropertyUserHomeDir{&property.BaseObserver{}, core}
	obj.Layout = &dbusPropertyUserLayout{&property.BaseObserver{}, core}
	obj.IconFile = &dbusPropertyUserIconFile{&property.BaseObserver{}, core}
	obj.GreeterBackground = &dbusPropertyUserGreeterBackground{&property.BaseObserver{}, core}
	obj.Locked = &dbusPropertyUserLocked{&property.BaseObserver{}, core}
	obj.LoginTime = &dbusPropertyUserLoginTime{&property.BaseObserver{}, core}
	obj.IconList = &dbusPropertyUserIconList{&property.BaseObserver{}, core}

	dbusAddMatch("type='signal',path='" + string(path) + "',interface='org.freedesktop.DBus.Properties',sender='" + destName + "',member='PropertiesChanged'")
	dbusAddMatch("type='signal',path='" + string(path) + "',interface='com.deepin.daemon.Accounts.User',sender='" + destName + "',member='PropertiesChanged'")
	sigChan := obj._createSignalChan()
	go func() {
		typeString := reflect.TypeOf("")
		typeKeyValues := reflect.TypeOf(map[string]dbus.Variant{})
		typeArrayValues := reflect.TypeOf([]string{})
		for v := range sigChan {
			if v.Name == "org.freedesktop.DBus.Properties.PropertiesChanged" &&
				len(v.Body) == 3 &&
				reflect.TypeOf(v.Body[0]) == typeString &&
				reflect.TypeOf(v.Body[1]) == typeKeyValues &&
				reflect.TypeOf(v.Body[2]) == typeArrayValues &&
				v.Body[0].(string) == "com.deepin.daemon.Accounts.User" {
				props := v.Body[1].(map[string]dbus.Variant)
				for key, _ := range props {
					if false {
					} else if key == "Uid" {
						obj.Uid.Notify()

					} else if key == "Shell" {
						obj.Shell.Notify()

					} else if key == "XSession" {
						obj.XSession.Notify()

					} else if key == "NoPasswdLogin" {
						obj.NoPasswdLogin.Notify()

					} else if key == "HistoryLayout" {
						obj.HistoryLayout.Notify()

					} else if key == "DesktopBackgrounds" {
						obj.DesktopBackgrounds.Notify()

					} else if key == "AutomaticLogin" {
						obj.AutomaticLogin.Notify()

					} else if key == "UserName" {
						obj.UserName.Notify()

					} else if key == "Gid" {
						obj.Gid.Notify()

					} else if key == "Locale" {
						obj.Locale.Notify()

					} else if key == "SystemAccount" {
						obj.SystemAccount.Notify()

					} else if key == "AccountType" {
						obj.AccountType.Notify()

					} else if key == "FullName" {
						obj.FullName.Notify()

					} else if key == "HomeDir" {
						obj.HomeDir.Notify()

					} else if key == "Layout" {
						obj.Layout.Notify()

					} else if key == "IconFile" {
						obj.IconFile.Notify()

					} else if key == "GreeterBackground" {
						obj.GreeterBackground.Notify()

					} else if key == "Locked" {
						obj.Locked.Notify()

					} else if key == "LoginTime" {
						obj.LoginTime.Notify()

					} else if key == "IconList" {
						obj.IconList.Notify()
					}
				}
			} else if v.Name == "com.deepin.daemon.Accounts.User.PropertiesChanged" && len(v.Body) == 1 && reflect.TypeOf(v.Body[0]) == typeKeyValues {
				for key, _ := range v.Body[0].(map[string]dbus.Variant) {
					if false {
					} else if key == "Uid" {
						obj.Uid.Notify()

					} else if key == "Shell" {
						obj.Shell.Notify()

					} else if key == "XSession" {
						obj.XSession.Notify()

					} else if key == "NoPasswdLogin" {
						obj.NoPasswdLogin.Notify()

					} else if key == "HistoryLayout" {
						obj.HistoryLayout.Notify()

					} else if key == "DesktopBackgrounds" {
						obj.DesktopBackgrounds.Notify()

					} else if key == "AutomaticLogin" {
						obj.AutomaticLogin.Notify()

					} else if key == "UserName" {
						obj.UserName.Notify()

					} else if key == "Gid" {
						obj.Gid.Notify()

					} else if key == "Locale" {
						obj.Locale.Notify()

					} else if key == "SystemAccount" {
						obj.SystemAccount.Notify()

					} else if key == "AccountType" {
						obj.AccountType.Notify()

					} else if key == "FullName" {
						obj.FullName.Notify()

					} else if key == "HomeDir" {
						obj.HomeDir.Notify()

					} else if key == "Layout" {
						obj.Layout.Notify()

					} else if key == "IconFile" {
						obj.IconFile.Notify()

					} else if key == "GreeterBackground" {
						obj.GreeterBackground.Notify()

					} else if key == "Locked" {
						obj.Locked.Notify()

					} else if key == "LoginTime" {
						obj.LoginTime.Notify()

					} else if key == "IconList" {
						obj.IconList.Notify()
					}
				}
			}
		}
	}()

	runtime.SetFinalizer(obj, func(_obj *User) { DestroyUser(_obj) })
	return obj, nil
}
