1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-06 02:32:44 +00:00

Adjust codegeneration to emit simpler classes

This commit is contained in:
Chris Josten 2021-03-20 03:30:50 +01:00
parent 05f79197eb
commit 0358418926
466 changed files with 21405 additions and 13956 deletions

View file

@ -32,92 +32,107 @@
namespace Jellyfin {
namespace DTO {
AuthenticationInfo::AuthenticationInfo(QObject *parent) : QObject(parent) {}
AuthenticationInfo::AuthenticationInfo(QObject *parent) {}
AuthenticationInfo *AuthenticationInfo::fromJSON(QJsonObject source, QObject *parent) {
AuthenticationInfo *instance = new AuthenticationInfo(parent);
instance->updateFromJSON(source);
AuthenticationInfo AuthenticationInfo::fromJson(QJsonObject source) {AuthenticationInfo instance;
instance->setFromJson(source, false);
return instance;
}
void AuthenticationInfo::updateFromJSON(QJsonObject source) {
Q_UNIMPLEMENTED();
void AuthenticationInfo::setFromJson(QJsonObject source) {
m_jellyfinId = fromJsonValue<qint64>(source["Id"]);
m_accessToken = fromJsonValue<QString>(source["AccessToken"]);
m_deviceId = fromJsonValue<QString>(source["DeviceId"]);
m_appName = fromJsonValue<QString>(source["AppName"]);
m_appVersion = fromJsonValue<QString>(source["AppVersion"]);
m_deviceName = fromJsonValue<QString>(source["DeviceName"]);
m_userId = fromJsonValue<QUuid>(source["UserId"]);
m_isActive = fromJsonValue<bool>(source["IsActive"]);
m_dateCreated = fromJsonValue<QDateTime>(source["DateCreated"]);
m_dateRevoked = fromJsonValue<QDateTime>(source["DateRevoked"]);
m_dateLastActivity = fromJsonValue<QDateTime>(source["DateLastActivity"]);
m_userName = fromJsonValue<QString>(source["UserName"]);
}
QJsonObject AuthenticationInfo::toJSON() {
Q_UNIMPLEMENTED();
QJsonObject AuthenticationInfo::toJson() {
QJsonObject result;
result["Id"] = toJsonValue<qint64>(m_jellyfinId);
result["AccessToken"] = toJsonValue<QString>(m_accessToken);
result["DeviceId"] = toJsonValue<QString>(m_deviceId);
result["AppName"] = toJsonValue<QString>(m_appName);
result["AppVersion"] = toJsonValue<QString>(m_appVersion);
result["DeviceName"] = toJsonValue<QString>(m_deviceName);
result["UserId"] = toJsonValue<QUuid>(m_userId);
result["IsActive"] = toJsonValue<bool>(m_isActive);
result["DateCreated"] = toJsonValue<QDateTime>(m_dateCreated);
result["DateRevoked"] = toJsonValue<QDateTime>(m_dateRevoked);
result["DateLastActivity"] = toJsonValue<QDateTime>(m_dateLastActivity);
result["UserName"] = toJsonValue<QString>(m_userName);
return result;
}
qint64 AuthenticationInfo::jellyfinId() const { return m_jellyfinId; }
void AuthenticationInfo::setJellyfinId(qint64 newJellyfinId) {
m_jellyfinId = newJellyfinId;
emit jellyfinIdChanged(newJellyfinId);
}
QString AuthenticationInfo::accessToken() const { return m_accessToken; }
void AuthenticationInfo::setAccessToken(QString newAccessToken) {
m_accessToken = newAccessToken;
emit accessTokenChanged(newAccessToken);
}
QString AuthenticationInfo::deviceId() const { return m_deviceId; }
void AuthenticationInfo::setDeviceId(QString newDeviceId) {
m_deviceId = newDeviceId;
emit deviceIdChanged(newDeviceId);
}
QString AuthenticationInfo::appName() const { return m_appName; }
void AuthenticationInfo::setAppName(QString newAppName) {
m_appName = newAppName;
emit appNameChanged(newAppName);
}
QString AuthenticationInfo::appVersion() const { return m_appVersion; }
void AuthenticationInfo::setAppVersion(QString newAppVersion) {
m_appVersion = newAppVersion;
emit appVersionChanged(newAppVersion);
}
QString AuthenticationInfo::deviceName() const { return m_deviceName; }
void AuthenticationInfo::setDeviceName(QString newDeviceName) {
m_deviceName = newDeviceName;
emit deviceNameChanged(newDeviceName);
}
QUuid AuthenticationInfo::userId() const { return m_userId; }
QString AuthenticationInfo::userId() const { return m_userId; }
void AuthenticationInfo::setUserId(QString newUserId) {
void AuthenticationInfo::setUserId(QUuid newUserId) {
m_userId = newUserId;
emit userIdChanged(newUserId);
}
bool AuthenticationInfo::isActive() const { return m_isActive; }
void AuthenticationInfo::setIsActive(bool newIsActive) {
m_isActive = newIsActive;
emit isActiveChanged(newIsActive);
}
QDateTime AuthenticationInfo::dateCreated() const { return m_dateCreated; }
void AuthenticationInfo::setDateCreated(QDateTime newDateCreated) {
m_dateCreated = newDateCreated;
emit dateCreatedChanged(newDateCreated);
}
QDateTime AuthenticationInfo::dateRevoked() const { return m_dateRevoked; }
void AuthenticationInfo::setDateRevoked(QDateTime newDateRevoked) {
m_dateRevoked = newDateRevoked;
emit dateRevokedChanged(newDateRevoked);
}
QDateTime AuthenticationInfo::dateLastActivity() const { return m_dateLastActivity; }
void AuthenticationInfo::setDateLastActivity(QDateTime newDateLastActivity) {
m_dateLastActivity = newDateLastActivity;
emit dateLastActivityChanged(newDateLastActivity);
}
QString AuthenticationInfo::userName() const { return m_userName; }
void AuthenticationInfo::setUserName(QString newUserName) {
m_userName = newUserName;
emit userNameChanged(newUserName);
}