Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
bookinfo.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_BOOKINFO_H
31#define JELLYFIN_DTO_BOOKINFO_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
49class BookInfo {
50public:
51 BookInfo(
52 bool isAutomated
53 );
54
55 BookInfo(const BookInfo &other);
56
60 void replaceData(BookInfo &other);
61
62 static BookInfo fromJson(QJsonObject source);
63 void setFromJson(QJsonObject source);
64 QJsonObject toJson() const;
65
66 // Properties
70 QString name() const;
74 void setName(QString newName);
75 bool nameNull() const;
76 void setNameNull();
77
81 QString path() const;
85 void setPath(QString newPath);
86 bool pathNull() const;
87 void setPathNull();
88
92 QString metadataLanguage() const;
96 void setMetadataLanguage(QString newMetadataLanguage);
97 bool metadataLanguageNull() const;
99
103 QString metadataCountryCode() const;
107 void setMetadataCountryCode(QString newMetadataCountryCode);
108 bool metadataCountryCodeNull() const;
110
114 QJsonObject providerIds() const;
118 void setProviderIds(QJsonObject newProviderIds);
119 bool providerIdsNull() const;
120 void setProviderIdsNull();
121
125 std::optional<qint32> year() const;
129 void setYear(std::optional<qint32> newYear);
130 bool yearNull() const;
131 void setYearNull();
132
133
134 std::optional<qint32> indexNumber() const;
135
136 void setIndexNumber(std::optional<qint32> newIndexNumber);
137 bool indexNumberNull() const;
138 void setIndexNumberNull();
139
140
141 std::optional<qint32> parentIndexNumber() const;
142
143 void setParentIndexNumber(std::optional<qint32> newParentIndexNumber);
144 bool parentIndexNumberNull() const;
146
147
148 QDateTime premiereDate() const;
149
150 void setPremiereDate(QDateTime newPremiereDate);
151 bool premiereDateNull() const;
152 void setPremiereDateNull();
153
154
155 bool isAutomated() const;
156
157 void setIsAutomated(bool newIsAutomated);
158
159
160 QString seriesName() const;
161
162 void setSeriesName(QString newSeriesName);
163 bool seriesNameNull() const;
164 void setSeriesNameNull();
165
166
167protected:
168 QString m_name;
169 QString m_path;
172 QJsonObject m_providerIds;
173 std::optional<qint32> m_year = std::nullopt;
174 std::optional<qint32> m_indexNumber = std::nullopt;
175 std::optional<qint32> m_parentIndexNumber = std::nullopt;
176 QDateTime m_premiereDate;
179
180private:
181 // Private constructor which generates an invalid object, for use withing BookInfo::fromJson();
182 BookInfo();
183};
184
185
186} // NS DTO
187
188namespace Support {
189
191
192template <>
193BookInfo fromJsonValue(const QJsonValue &source, convertType<BookInfo>);
194
195template<>
196QJsonValue toJsonValue(const BookInfo &source, convertType<BookInfo>);
197
198} // NS DTO
199} // NS Jellyfin
200
201#endif // JELLYFIN_DTO_BOOKINFO_H
Definition bookinfo.h:49
std::optional< qint32 > m_year
Definition bookinfo.h:173
void setPath(QString newPath)
Gets or sets the path.
Definition bookinfo.cpp:166
QString metadataCountryCode() const
Gets or sets the metadata country code.
Definition bookinfo.cpp:190
void setYear(std::optional< qint32 > newYear)
Gets or sets the year.
Definition bookinfo.cpp:218
void setMetadataCountryCode(QString newMetadataCountryCode)
Gets or sets the metadata country code.
Definition bookinfo.cpp:192
bool yearNull() const
Definition bookinfo.cpp:221
void setIndexNumber(std::optional< qint32 > newIndexNumber)
Definition bookinfo.cpp:231
QString m_seriesName
Definition bookinfo.h:178
QDateTime m_premiereDate
Definition bookinfo.h:176
void setName(QString newName)
Gets or sets the name.
Definition bookinfo.cpp:153
bool premiereDateNull() const
Definition bookinfo.cpp:260
void setIsAutomated(bool newIsAutomated)
Definition bookinfo.cpp:270
void setSeriesNameNull()
Definition bookinfo.cpp:283
void setYearNull()
Definition bookinfo.cpp:225
QString path() const
Gets or sets the path.
Definition bookinfo.cpp:164
void setParentIndexNumber(std::optional< qint32 > newParentIndexNumber)
Definition bookinfo.cpp:244
QJsonObject providerIds() const
Gets or sets the provider ids.
Definition bookinfo.cpp:203
std::optional< qint32 > year() const
Gets or sets the year.
Definition bookinfo.cpp:216
QString m_metadataCountryCode
Definition bookinfo.h:171
bool pathNull() const
Definition bookinfo.cpp:169
void setIndexNumberNull()
Definition bookinfo.cpp:238
static BookInfo fromJson(QJsonObject source)
Definition bookinfo.cpp:72
void setSeriesName(QString newSeriesName)
Definition bookinfo.cpp:276
void setPathNull()
Definition bookinfo.cpp:173
bool nameNull() const
Definition bookinfo.cpp:156
bool parentIndexNumberNull() const
Definition bookinfo.cpp:247
QDateTime premiereDate() const
Definition bookinfo.cpp:255
void setFromJson(QJsonObject source)
Definition bookinfo.cpp:79
void setPremiereDate(QDateTime newPremiereDate)
Definition bookinfo.cpp:257
void setProviderIdsNull()
Definition bookinfo.cpp:212
void setPremiereDateNull()
Definition bookinfo.cpp:264
QString m_name
Definition bookinfo.h:168
QJsonObject toJson() const
Definition bookinfo.cpp:94
bool providerIdsNull() const
Definition bookinfo.cpp:208
bool m_isAutomated
Definition bookinfo.h:177
QString name() const
Gets or sets the name.
Definition bookinfo.cpp:151
bool isAutomated() const
Definition bookinfo.cpp:268
std::optional< qint32 > indexNumber() const
Definition bookinfo.cpp:229
QString m_metadataLanguage
Definition bookinfo.h:170
std::optional< qint32 > m_indexNumber
Definition bookinfo.h:174
QString seriesName() const
Definition bookinfo.cpp:274
QJsonObject m_providerIds
Definition bookinfo.h:172
bool indexNumberNull() const
Definition bookinfo.cpp:234
void setMetadataLanguage(QString newMetadataLanguage)
Gets or sets the metadata language.
Definition bookinfo.cpp:179
void setProviderIds(QJsonObject newProviderIds)
Gets or sets the provider ids.
Definition bookinfo.cpp:205
void replaceData(BookInfo &other)
Definition bookinfo.cpp:58
void setParentIndexNumberNull()
Definition bookinfo.cpp:251
std::optional< qint32 > m_parentIndexNumber
Definition bookinfo.h:175
QString m_path
Definition bookinfo.h:169
void setMetadataCountryCodeNull()
Definition bookinfo.cpp:199
QString metadataLanguage() const
Gets or sets the metadata language.
Definition bookinfo.cpp:177
void setMetadataLanguageNull()
Definition bookinfo.cpp:186
bool metadataCountryCodeNull() const
Definition bookinfo.cpp:195
void setNameNull()
Definition bookinfo.cpp:160
std::optional< qint32 > parentIndexNumber() const
Definition bookinfo.cpp:242
bool metadataLanguageNull() const
Definition bookinfo.cpp:182
bool seriesNameNull() const
Definition bookinfo.cpp:279
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