Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
authenticationinfo.h
Go to the documentation of this file.
1/*
2 * Sailfin: a Jellyfin client written using Qt
3 * Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19/*
20 * WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
21 * OVERWRITTEN AT SOME POINT!
22 *
23 * If there is a bug in this file, please fix the code generator used to generate this file found in
24 * core/openapigenerator.d.
25 *
26 * This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
27 * file with a newer file if needed instead of manually updating the files.
28 */
29
30#ifndef JELLYFIN_DTO_AUTHENTICATIONINFO_H
31#define JELLYFIN_DTO_AUTHENTICATIONINFO_H
32
33#include <QDateTime>
34#include <QJsonObject>
35#include <QJsonValue>
36#include <QString>
37#include <optional>
38
40
41namespace Jellyfin {
42// Forward declaration
43class ApiClient;
44}
45namespace Jellyfin {
46namespace DTO {
47
48
50public:
52 qint64 jellyfinId,
53 QString userId,
54 bool isActive,
55 QDateTime dateCreated,
56 QDateTime dateLastActivity
57 );
58
60
65
66 static AuthenticationInfo fromJson(QJsonObject source);
67 void setFromJson(QJsonObject source);
68 QJsonObject toJson() const;
69
70 // Properties
74 qint64 jellyfinId() const;
78 void setJellyfinId(qint64 newJellyfinId);
79
83 QString accessToken() const;
87 void setAccessToken(QString newAccessToken);
88 bool accessTokenNull() const;
89 void setAccessTokenNull();
90
94 QString deviceId() const;
98 void setDeviceId(QString newDeviceId);
99 bool deviceIdNull() const;
100 void setDeviceIdNull();
101
105 QString appName() const;
109 void setAppName(QString newAppName);
110 bool appNameNull() const;
111 void setAppNameNull();
112
116 QString appVersion() const;
120 void setAppVersion(QString newAppVersion);
121 bool appVersionNull() const;
122 void setAppVersionNull();
123
127 QString deviceName() const;
131 void setDeviceName(QString newDeviceName);
132 bool deviceNameNull() const;
133 void setDeviceNameNull();
134
138 QString userId() const;
142 void setUserId(QString newUserId);
143
147 bool isActive() const;
151 void setIsActive(bool newIsActive);
152
156 QDateTime dateCreated() const;
160 void setDateCreated(QDateTime newDateCreated);
161
165 QDateTime dateRevoked() const;
169 void setDateRevoked(QDateTime newDateRevoked);
170 bool dateRevokedNull() const;
171 void setDateRevokedNull();
172
173
174 QDateTime dateLastActivity() const;
175
176 void setDateLastActivity(QDateTime newDateLastActivity);
177
178
179 QString userName() const;
180
181 void setUserName(QString newUserName);
182 bool userNameNull() const;
183 void setUserNameNull();
184
185
186protected:
189 QString m_deviceId;
190 QString m_appName;
193 QString m_userId;
195 QDateTime m_dateCreated;
196 QDateTime m_dateRevoked;
198 QString m_userName;
199
200private:
201 // Private constructor which generates an invalid object, for use withing AuthenticationInfo::fromJson();
203};
204
205
206} // NS DTO
207
208namespace Support {
209
211
212template <>
214
215template<>
217
218} // NS DTO
219} // NS Jellyfin
220
221#endif // JELLYFIN_DTO_AUTHENTICATIONINFO_H
Definition authenticationinfo.h:49
QDateTime m_dateRevoked
Definition authenticationinfo.h:196
bool deviceNameNull() const
Definition authenticationinfo.cpp:214
bool accessTokenNull() const
Definition authenticationinfo.cpp:162
QString appName() const
Gets or sets the name of the application.
Definition authenticationinfo.cpp:183
QString deviceId() const
Gets or sets the device identifier.
Definition authenticationinfo.cpp:170
bool m_isActive
Definition authenticationinfo.h:194
bool deviceIdNull() const
Definition authenticationinfo.cpp:175
QDateTime dateCreated() const
Gets or sets the date created.
Definition authenticationinfo.cpp:234
void setFromJson(QJsonObject source)
Definition authenticationinfo.cpp:89
bool dateRevokedNull() const
Definition authenticationinfo.cpp:245
void setJellyfinId(qint64 newJellyfinId)
Gets or sets the identifier.
Definition authenticationinfo.cpp:153
QString m_appVersion
Definition authenticationinfo.h:191
QString m_deviceId
Definition authenticationinfo.h:189
QString m_userName
Definition authenticationinfo.h:198
QString m_userId
Definition authenticationinfo.h:193
bool isActive() const
Gets or sets a value indicating whether this instance is active.
Definition authenticationinfo.cpp:228
void setAccessTokenNull()
Definition authenticationinfo.cpp:166
void setIsActive(bool newIsActive)
Gets or sets a value indicating whether this instance is active.
Definition authenticationinfo.cpp:230
bool appVersionNull() const
Definition authenticationinfo.cpp:201
QString deviceName() const
Gets or sets the name of the device.
Definition authenticationinfo.cpp:209
void setDateRevokedNull()
Definition authenticationinfo.cpp:249
QDateTime dateRevoked() const
Gets or sets the date revoked.
Definition authenticationinfo.cpp:240
void setAppVersionNull()
Definition authenticationinfo.cpp:205
QString m_appName
Definition authenticationinfo.h:190
void setDateRevoked(QDateTime newDateRevoked)
Gets or sets the date revoked.
Definition authenticationinfo.cpp:242
bool userNameNull() const
Definition authenticationinfo.cpp:264
void setDeviceIdNull()
Definition authenticationinfo.cpp:179
QDateTime dateLastActivity() const
Definition authenticationinfo.cpp:253
bool appNameNull() const
Definition authenticationinfo.cpp:188
qint64 jellyfinId() const
Gets or sets the identifier.
Definition authenticationinfo.cpp:151
void setUserName(QString newUserName)
Definition authenticationinfo.cpp:261
void setAppName(QString newAppName)
Gets or sets the name of the application.
Definition authenticationinfo.cpp:185
qint64 m_jellyfinId
Definition authenticationinfo.h:187
QString userId() const
Gets or sets the user identifier.
Definition authenticationinfo.cpp:222
QString userName() const
Definition authenticationinfo.cpp:259
QString m_deviceName
Definition authenticationinfo.h:192
QString accessToken() const
Gets or sets the access token.
Definition authenticationinfo.cpp:157
void setAccessToken(QString newAccessToken)
Gets or sets the access token.
Definition authenticationinfo.cpp:159
void setDateCreated(QDateTime newDateCreated)
Gets or sets the date created.
Definition authenticationinfo.cpp:236
static AuthenticationInfo fromJson(QJsonObject source)
Definition authenticationinfo.cpp:82
QDateTime m_dateCreated
Definition authenticationinfo.h:195
void replaceData(AuthenticationInfo &other)
Definition authenticationinfo.cpp:67
QString appVersion() const
Gets or sets the application version.
Definition authenticationinfo.cpp:196
void setUserNameNull()
Definition authenticationinfo.cpp:268
QJsonObject toJson() const
Definition authenticationinfo.cpp:105
QDateTime m_dateLastActivity
Definition authenticationinfo.h:197
void setDeviceId(QString newDeviceId)
Gets or sets the device identifier.
Definition authenticationinfo.cpp:172
void setDeviceName(QString newDeviceName)
Gets or sets the name of the device.
Definition authenticationinfo.cpp:211
void setAppVersion(QString newAppVersion)
Gets or sets the application version.
Definition authenticationinfo.cpp:198
void setAppNameNull()
Definition authenticationinfo.cpp:192
void setUserId(QString newUserId)
Gets or sets the user identifier.
Definition authenticationinfo.cpp:224
QString m_accessToken
Definition authenticationinfo.h:188
void setDateLastActivity(QDateTime newDateLastActivity)
Definition authenticationinfo.cpp:255
void setDeviceNameNull()
Definition authenticationinfo.cpp:218
AccessSchedule fromJsonValue(const QJsonValue &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:133
QJsonValue toJsonValue(const AccessSchedule &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:139
Definition jsonconvimpl.h:45