19#ifndef LIB_QUENTIER_TYPES_USER_H
20#define LIB_QUENTIER_TYPES_USER_H
22#include <quentier/types/ErrorString.h>
23#include <quentier/utility/Printable.h>
25#include <qt5qevercloud/QEverCloud.h>
31QT_FORWARD_DECLARE_CLASS(UserData)
36 using PrivilegeLevel = qevercloud::PrivilegeLevel;
37 using ServiceLevel = qevercloud::ServiceLevel;
41 explicit User(
const qevercloud::User & user);
42 explicit User(qevercloud::User && user);
45 User & operator=(
const User & other);
47 virtual ~User()
override;
49 bool operator==(
const User & other)
const;
50 bool operator!=(
const User & other)
const;
52 const qevercloud::User & qevercloudUser()
const;
53 qevercloud::User & qevercloudUser();
58 void setDirty(
const bool dirty);
61 void setLocal(
const bool local);
63 bool checkParameters(
ErrorString & errorDescription)
const;
67 void setId(
const qint32
id);
69 bool hasUsername()
const;
70 const QString & username()
const;
71 void setUsername(
const QString & username);
73 bool hasEmail()
const;
74 const QString & email()
const;
75 void setEmail(
const QString & email);
78 const QString & name()
const;
79 void setName(
const QString & name);
81 bool hasTimezone()
const;
82 const QString & timezone()
const;
83 void setTimezone(
const QString & timezone);
85 bool hasPrivilegeLevel()
const;
86 PrivilegeLevel privilegeLevel()
const;
87 void setPrivilegeLevel(
const qint8 level);
89 bool hasServiceLevel()
const;
90 ServiceLevel serviceLevel()
const;
91 void setServiceLevel(
const qint8 level);
93 bool hasCreationTimestamp()
const;
94 qint64 creationTimestamp()
const;
95 void setCreationTimestamp(
const qint64 timestamp);
97 bool hasModificationTimestamp()
const;
98 qint64 modificationTimestamp()
const;
99 void setModificationTimestamp(
const qint64 timestamp);
101 bool hasDeletionTimestamp()
const;
102 qint64 deletionTimestamp()
const;
103 void setDeletionTimestamp(
const qint64 timestamp);
105 bool hasActive()
const;
107 void setActive(
const bool active);
109 bool hasShardId()
const;
110 const QString & shardId()
const;
111 void setShardId(
const QString & shardId);
113 bool hasUserAttributes()
const;
114 const qevercloud::UserAttributes & userAttributes()
const;
115 void setUserAttributes(qevercloud::UserAttributes && attributes);
117 bool hasAccounting()
const;
118 const qevercloud::Accounting & accounting()
const;
119 void setAccounting(qevercloud::Accounting && accounting);
121 bool hasBusinessUserInfo()
const;
122 const qevercloud::BusinessUserInfo & businessUserInfo()
const;
123 void setBusinessUserInfo(qevercloud::BusinessUserInfo && info);
125 bool hasPhotoUrl()
const;
126 QString photoUrl()
const;
127 void setPhotoUrl(
const QString & photoUrl);
129 bool hasPhotoLastUpdateTimestamp()
const;
130 qint64 photoLastUpdateTimestamp()
const;
131 void setPhotoLastUpdateTimestamp(
const qint64 timestamp);
133 bool hasAccountLimits()
const;
134 const qevercloud::AccountLimits & accountLimits()
const;
135 void setAccountLimits(qevercloud::AccountLimits && limits);
137 virtual QTextStream & print(QTextStream & strm)
const override;
142 QSharedDataPointer<UserData> d;
The ErrorString class encapsulates two (or more) strings which are meant to contain translatable (bas...
Definition ErrorString.h:44
The Printable class is the interface for Quentier's internal classes which should be able to write th...
Definition Printable.h:38