Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
notificationdto.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_NOTIFICATIONDTO_H
31#define JELLYFIN_DTO_NOTIFICATIONDTO_H
32
33#include <QDateTime>
34#include <QJsonObject>
35#include <QJsonValue>
36#include <QString>
37#include <optional>
38
41
42namespace Jellyfin {
43// Forward declaration
44class ApiClient;
45}
46namespace Jellyfin {
47namespace DTO {
48
49
51public:
53 QDateTime date,
54 bool isRead,
56 );
57
58 NotificationDto(const NotificationDto &other);
59
63 void replaceData(NotificationDto &other);
64
65 static NotificationDto fromJson(QJsonObject source);
66 void setFromJson(QJsonObject source);
67 QJsonObject toJson() const;
68
69 // Properties
73 QString jellyfinId() const;
77 void setJellyfinId(QString newJellyfinId);
78 bool jellyfinIdNull() const;
79 void setJellyfinIdNull();
80
84 QString userId() const;
88 void setUserId(QString newUserId);
89 bool userIdNull() const;
90 void setUserIdNull();
91
95 QDateTime date() const;
99 void setDate(QDateTime newDate);
100
104 bool isRead() const;
108 void setIsRead(bool newIsRead);
109
113 QString name() const;
117 void setName(QString newName);
118 bool nameNull() const;
119 void setNameNull();
120
124 QString description() const;
128 void setDescription(QString newDescription);
129 bool descriptionNull() const;
130 void setDescriptionNull();
131
135 QString url() const;
139 void setUrl(QString newUrl);
140 bool urlNull() const;
141 void setUrlNull();
142
143
144 NotificationLevel level() const;
145
146 void setLevel(NotificationLevel newLevel);
147
148
149protected:
151 QString m_userId;
152 QDateTime m_date;
154 QString m_name;
156 QString m_url;
158
159private:
160 // Private constructor which generates an invalid object, for use withing NotificationDto::fromJson();
162};
163
164
165} // NS DTO
166
167namespace Support {
168
170
171template <>
173
174template<>
176
177} // NS DTO
178} // NS Jellyfin
179
180#endif // JELLYFIN_DTO_NOTIFICATIONDTO_H
Definition notificationdto.h:50
void setDescriptionNull()
Definition notificationdto.cpp:183
void setUserIdNull()
Definition notificationdto.cpp:145
void setLevel(NotificationLevel newLevel)
Definition notificationdto.cpp:202
QString jellyfinId() const
Gets or sets the notification ID. Defaults to an empty string.
Definition notificationdto.cpp:123
void setJellyfinIdNull()
Definition notificationdto.cpp:132
bool descriptionNull() const
Definition notificationdto.cpp:179
void setJellyfinId(QString newJellyfinId)
Gets or sets the notification ID. Defaults to an empty string.
Definition notificationdto.cpp:125
bool nameNull() const
Definition notificationdto.cpp:166
QString name() const
Gets or sets the notification's name. Defaults to an empty string.
Definition notificationdto.cpp:161
void setIsRead(bool newIsRead)
Gets or sets a value indicating whether the notification has been read. Defaults to false.
Definition notificationdto.cpp:157
NotificationLevel m_level
Definition notificationdto.h:157
void replaceData(NotificationDto &other)
Definition notificationdto.cpp:59
void setName(QString newName)
Gets or sets the notification's name. Defaults to an empty string.
Definition notificationdto.cpp:163
void setUrl(QString newUrl)
Gets or sets the notification's URL. Defaults to an empty string.
Definition notificationdto.cpp:189
QDateTime m_date
Definition notificationdto.h:152
void setUrlNull()
Definition notificationdto.cpp:196
QString url() const
Gets or sets the notification's URL. Defaults to an empty string.
Definition notificationdto.cpp:187
QString m_name
Definition notificationdto.h:154
static NotificationDto fromJson(QJsonObject source)
Definition notificationdto.cpp:70
QJsonObject toJson() const
Definition notificationdto.cpp:89
QString m_url
Definition notificationdto.h:156
NotificationLevel level() const
Definition notificationdto.cpp:200
void setFromJson(QJsonObject source)
Definition notificationdto.cpp:77
QString m_jellyfinId
Definition notificationdto.h:150
bool urlNull() const
Definition notificationdto.cpp:192
void setUserId(QString newUserId)
Gets or sets the notification's user ID. Defaults to an empty string.
Definition notificationdto.cpp:138
bool isRead() const
Gets or sets a value indicating whether the notification has been read. Defaults to false.
Definition notificationdto.cpp:155
void setDate(QDateTime newDate)
Gets or sets the notification date.
Definition notificationdto.cpp:151
QDateTime date() const
Gets or sets the notification date.
Definition notificationdto.cpp:149
QString m_description
Definition notificationdto.h:155
void setDescription(QString newDescription)
Gets or sets the notification's description. Defaults to an empty string.
Definition notificationdto.cpp:176
QString description() const
Gets or sets the notification's description. Defaults to an empty string.
Definition notificationdto.cpp:174
bool m_isRead
Definition notificationdto.h:153
bool userIdNull() const
Definition notificationdto.cpp:141
QString userId() const
Gets or sets the notification's user ID. Defaults to an empty string.
Definition notificationdto.cpp:136
void setNameNull()
Definition notificationdto.cpp:170
QString m_userId
Definition notificationdto.h:151
bool jellyfinIdNull() const
Definition notificationdto.cpp:128
Value
Definition notificationlevel.h:49
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