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 originalTitle() const;
85 void setOriginalTitle(QString newOriginalTitle);
86 bool originalTitleNull() const;
88
92 QString path() const;
96 void setPath(QString newPath);
97 bool pathNull() const;
98 void setPathNull();
99
103 QString metadataLanguage() const;
107 void setMetadataLanguage(QString newMetadataLanguage);
108 bool metadataLanguageNull() const;
110
114 QString metadataCountryCode() const;
118 void setMetadataCountryCode(QString newMetadataCountryCode);
119 bool metadataCountryCodeNull() const;
121
125 QJsonObject providerIds() const;
129 void setProviderIds(QJsonObject newProviderIds);
130 bool providerIdsNull() const;
131 void setProviderIdsNull();
132
136 std::optional<qint32> year() const;
140 void setYear(std::optional<qint32> newYear);
141 bool yearNull() const;
142 void setYearNull();
143
144
145 std::optional<qint32> indexNumber() const;
146
147 void setIndexNumber(std::optional<qint32> newIndexNumber);
148 bool indexNumberNull() const;
149 void setIndexNumberNull();
150
151
152 std::optional<qint32> parentIndexNumber() const;
153
154 void setParentIndexNumber(std::optional<qint32> newParentIndexNumber);
155 bool parentIndexNumberNull() const;
157
158
159 QDateTime premiereDate() const;
160
161 void setPremiereDate(QDateTime newPremiereDate);
162 bool premiereDateNull() const;
163 void setPremiereDateNull();
164
165
166 bool isAutomated() const;
167
168 void setIsAutomated(bool newIsAutomated);
169
170
171 QString seriesName() const;
172
173 void setSeriesName(QString newSeriesName);
174 bool seriesNameNull() const;
175 void setSeriesNameNull();
176
177
178protected:
179 QString m_name;
181 QString m_path;
184 QJsonObject m_providerIds;
185 std::optional<qint32> m_year = std::nullopt;
186 std::optional<qint32> m_indexNumber = std::nullopt;
187 std::optional<qint32> m_parentIndexNumber = std::nullopt;
188 QDateTime m_premiereDate;
191
192private:
193 // Private constructor which generates an invalid object, for use withing BookInfo::fromJson();
194 BookInfo();
195};
196
197
198} // NS DTO
199
200namespace Support {
201
203
204template <>
205BookInfo fromJsonValue(const QJsonValue &source, convertType<BookInfo>);
206
207template<>
208QJsonValue toJsonValue(const BookInfo &source, convertType<BookInfo>);
209
210} // NS DTO
211} // NS Jellyfin
212
213#endif // JELLYFIN_DTO_BOOKINFO_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition bookinfo.h:49
std::optional< qint32 > m_year
Definition bookinfo.h:185
void setPath(QString newPath)
Gets or sets the path.
Definition bookinfo.cpp:187
QString metadataCountryCode() const
Gets or sets the metadata country code.
Definition bookinfo.cpp:211
void setYear(std::optional< qint32 > newYear)
Gets or sets the year.
Definition bookinfo.cpp:239
void setMetadataCountryCode(QString newMetadataCountryCode)
Gets or sets the metadata country code.
Definition bookinfo.cpp:213
bool yearNull() const
Definition bookinfo.cpp:242
void setIndexNumber(std::optional< qint32 > newIndexNumber)
Definition bookinfo.cpp:252
QString m_seriesName
Definition bookinfo.h:190
QDateTime m_premiereDate
Definition bookinfo.h:188
void setName(QString newName)
Gets or sets the name.
Definition bookinfo.cpp:161
void setOriginalTitle(QString newOriginalTitle)
Gets or sets the original title.
Definition bookinfo.cpp:174
bool premiereDateNull() const
Definition bookinfo.cpp:281
void setIsAutomated(bool newIsAutomated)
Definition bookinfo.cpp:291
void setSeriesNameNull()
Definition bookinfo.cpp:304
void setYearNull()
Definition bookinfo.cpp:246
QString path() const
Gets or sets the path.
Definition bookinfo.cpp:185
BookInfo(bool isAutomated)
Definition bookinfo.cpp:36
void setParentIndexNumber(std::optional< qint32 > newParentIndexNumber)
Definition bookinfo.cpp:265
QJsonObject providerIds() const
Gets or sets the provider ids.
Definition bookinfo.cpp:224
std::optional< qint32 > year() const
Gets or sets the year.
Definition bookinfo.cpp:237
QString m_metadataCountryCode
Definition bookinfo.h:183
bool pathNull() const
Definition bookinfo.cpp:190
void setIndexNumberNull()
Definition bookinfo.cpp:259
static BookInfo fromJson(QJsonObject source)
Definition bookinfo.cpp:74
void setSeriesName(QString newSeriesName)
Definition bookinfo.cpp:297
void setPathNull()
Definition bookinfo.cpp:194
bool nameNull() const
Definition bookinfo.cpp:164
bool parentIndexNumberNull() const
Definition bookinfo.cpp:268
QString originalTitle() const
Gets or sets the original title.
Definition bookinfo.cpp:172
QDateTime premiereDate() const
Definition bookinfo.cpp:276
void setOriginalTitleNull()
Definition bookinfo.cpp:181
void setFromJson(QJsonObject source)
Definition bookinfo.cpp:81
void setPremiereDate(QDateTime newPremiereDate)
Definition bookinfo.cpp:278
void setProviderIdsNull()
Definition bookinfo.cpp:233
void setPremiereDateNull()
Definition bookinfo.cpp:285
QString m_name
Definition bookinfo.h:179
QJsonObject toJson() const
Definition bookinfo.cpp:97
bool providerIdsNull() const
Definition bookinfo.cpp:229
bool m_isAutomated
Definition bookinfo.h:189
QString name() const
Gets or sets the name.
Definition bookinfo.cpp:159
bool isAutomated() const
Definition bookinfo.cpp:289
std::optional< qint32 > indexNumber() const
Definition bookinfo.cpp:250
QString m_metadataLanguage
Definition bookinfo.h:182
std::optional< qint32 > m_indexNumber
Definition bookinfo.h:186
QString seriesName() const
Definition bookinfo.cpp:295
QJsonObject m_providerIds
Definition bookinfo.h:184
bool indexNumberNull() const
Definition bookinfo.cpp:255
void setMetadataLanguage(QString newMetadataLanguage)
Gets or sets the metadata language.
Definition bookinfo.cpp:200
bool originalTitleNull() const
Definition bookinfo.cpp:177
void setProviderIds(QJsonObject newProviderIds)
Gets or sets the provider ids.
Definition bookinfo.cpp:226
void replaceData(BookInfo &other)
Definition bookinfo.cpp:59
void setParentIndexNumberNull()
Definition bookinfo.cpp:272
std::optional< qint32 > m_parentIndexNumber
Definition bookinfo.h:187
QString m_path
Definition bookinfo.h:181
void setMetadataCountryCodeNull()
Definition bookinfo.cpp:220
QString metadataLanguage() const
Gets or sets the metadata language.
Definition bookinfo.cpp:198
void setMetadataLanguageNull()
Definition bookinfo.cpp:207
bool metadataCountryCodeNull() const
Definition bookinfo.cpp:216
void setNameNull()
Definition bookinfo.cpp:168
std::optional< qint32 > parentIndexNumber() const
Definition bookinfo.cpp:263
bool metadataLanguageNull() const
Definition bookinfo.cpp:203
QString m_originalTitle
Definition bookinfo.h:180
bool seriesNameNull() const
Definition bookinfo.cpp:300
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
Definition accessschedule.h:128
Jellyfin::DTO::BookInfo BookInfo
Definition bookinfo.h:202
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