Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
albuminfo.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_ALBUMINFO_H
31#define JELLYFIN_DTO_ALBUMINFO_H
32
33#include <QDateTime>
34#include <QJsonObject>
35#include <QJsonValue>
36#include <QList>
37#include <QString>
38#include <QStringList>
39#include <optional>
40
43
44namespace Jellyfin {
45// Forward declaration
46class ApiClient;
47}
48namespace Jellyfin {
49namespace DTO {
50
51
52class AlbumInfo {
53public:
54 AlbumInfo(
55 bool isAutomated,
56 QStringList albumArtists,
57 QJsonObject artistProviderIds,
59 );
60
61 AlbumInfo(const AlbumInfo &other);
62
66 void replaceData(AlbumInfo &other);
67
68 static AlbumInfo fromJson(QJsonObject source);
69 void setFromJson(QJsonObject source);
70 QJsonObject toJson() const;
71
72 // Properties
76 QString name() const;
80 void setName(QString newName);
81 bool nameNull() const;
82 void setNameNull();
83
87 QString originalTitle() const;
91 void setOriginalTitle(QString newOriginalTitle);
92 bool originalTitleNull() const;
94
98 QString path() const;
102 void setPath(QString newPath);
103 bool pathNull() const;
104 void setPathNull();
105
109 QString metadataLanguage() const;
113 void setMetadataLanguage(QString newMetadataLanguage);
114 bool metadataLanguageNull() const;
116
120 QString metadataCountryCode() const;
124 void setMetadataCountryCode(QString newMetadataCountryCode);
125 bool metadataCountryCodeNull() const;
127
131 QJsonObject providerIds() const;
135 void setProviderIds(QJsonObject newProviderIds);
136 bool providerIdsNull() const;
137 void setProviderIdsNull();
138
142 std::optional<qint32> year() const;
146 void setYear(std::optional<qint32> newYear);
147 bool yearNull() const;
148 void setYearNull();
149
150
151 std::optional<qint32> indexNumber() const;
152
153 void setIndexNumber(std::optional<qint32> newIndexNumber);
154 bool indexNumberNull() const;
155 void setIndexNumberNull();
156
157
158 std::optional<qint32> parentIndexNumber() const;
159
160 void setParentIndexNumber(std::optional<qint32> newParentIndexNumber);
161 bool parentIndexNumberNull() const;
163
164
165 QDateTime premiereDate() const;
166
167 void setPremiereDate(QDateTime newPremiereDate);
168 bool premiereDateNull() const;
169 void setPremiereDateNull();
170
171
172 bool isAutomated() const;
173
174 void setIsAutomated(bool newIsAutomated);
175
179 QStringList albumArtists() const;
183 void setAlbumArtists(QStringList newAlbumArtists);
184
188 QJsonObject artistProviderIds() const;
192 void setArtistProviderIds(QJsonObject newArtistProviderIds);
193
194
196
197 void setSongInfos(QList<SongInfo> newSongInfos);
198
199
200protected:
201 QString m_name;
203 QString m_path;
206 QJsonObject m_providerIds;
207 std::optional<qint32> m_year = std::nullopt;
208 std::optional<qint32> m_indexNumber = std::nullopt;
209 std::optional<qint32> m_parentIndexNumber = std::nullopt;
210 QDateTime m_premiereDate;
212 QStringList m_albumArtists;
215
216private:
217 // Private constructor which generates an invalid object, for use withing AlbumInfo::fromJson();
218 AlbumInfo();
219};
220
221
222} // NS DTO
223
224namespace Support {
225
227
228template <>
229AlbumInfo fromJsonValue(const QJsonValue &source, convertType<AlbumInfo>);
230
231template<>
232QJsonValue toJsonValue(const AlbumInfo &source, convertType<AlbumInfo>);
233
234} // NS DTO
235} // NS Jellyfin
236
237#endif // JELLYFIN_DTO_ALBUMINFO_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition albuminfo.h:52
void setSongInfos(QList< SongInfo > newSongInfos)
Definition albuminfo.cpp:319
QJsonObject providerIds() const
Gets or sets the provider ids.
Definition albuminfo.cpp:234
QString m_path
Definition albuminfo.h:203
QString m_name
Definition albuminfo.h:201
QJsonObject toJson() const
Definition albuminfo.cpp:109
std::optional< qint32 > m_indexNumber
Definition albuminfo.h:208
bool metadataCountryCodeNull() const
Definition albuminfo.cpp:226
QJsonObject m_artistProviderIds
Definition albuminfo.h:213
void setFromJson(QJsonObject source)
Definition albuminfo.cpp:91
void setYear(std::optional< qint32 > newYear)
Gets or sets the year.
Definition albuminfo.cpp:249
void setMetadataCountryCodeNull()
Definition albuminfo.cpp:230
void setMetadataLanguage(QString newMetadataLanguage)
Gets or sets the metadata language.
Definition albuminfo.cpp:210
void setArtistProviderIds(QJsonObject newArtistProviderIds)
Gets or sets the artist provider ids.
Definition albuminfo.cpp:313
bool yearNull() const
Definition albuminfo.cpp:252
QDateTime premiereDate() const
Definition albuminfo.cpp:286
bool premiereDateNull() const
Definition albuminfo.cpp:291
void setProviderIdsNull()
Definition albuminfo.cpp:243
QJsonObject artistProviderIds() const
Gets or sets the artist provider ids.
Definition albuminfo.cpp:311
bool nameNull() const
Definition albuminfo.cpp:174
QString metadataCountryCode() const
Gets or sets the metadata country code.
Definition albuminfo.cpp:221
QStringList albumArtists() const
Gets or sets the album artist.
Definition albuminfo.cpp:305
std::optional< qint32 > parentIndexNumber() const
Definition albuminfo.cpp:273
QList< SongInfo > songInfos() const
Definition albuminfo.cpp:317
void setMetadataLanguageNull()
Definition albuminfo.cpp:217
bool m_isAutomated
Definition albuminfo.h:211
void setOriginalTitle(QString newOriginalTitle)
Gets or sets the original title.
Definition albuminfo.cpp:184
std::optional< qint32 > year() const
Gets or sets the year.
Definition albuminfo.cpp:247
void setProviderIds(QJsonObject newProviderIds)
Gets or sets the provider ids.
Definition albuminfo.cpp:236
std::optional< qint32 > m_parentIndexNumber
Definition albuminfo.h:209
bool providerIdsNull() const
Definition albuminfo.cpp:239
void setNameNull()
Definition albuminfo.cpp:178
QList< SongInfo > m_songInfos
Definition albuminfo.h:214
void setIndexNumberNull()
Definition albuminfo.cpp:269
void setAlbumArtists(QStringList newAlbumArtists)
Gets or sets the album artist.
Definition albuminfo.cpp:307
QDateTime m_premiereDate
Definition albuminfo.h:210
bool originalTitleNull() const
Definition albuminfo.cpp:187
QString m_metadataCountryCode
Definition albuminfo.h:205
void setIsAutomated(bool newIsAutomated)
Definition albuminfo.cpp:301
bool isAutomated() const
Definition albuminfo.cpp:299
std::optional< qint32 > m_year
Definition albuminfo.h:207
QStringList m_albumArtists
Definition albuminfo.h:212
void setPremiereDate(QDateTime newPremiereDate)
Definition albuminfo.cpp:288
QString originalTitle() const
Gets or sets the original title.
Definition albuminfo.cpp:182
void setPathNull()
Definition albuminfo.cpp:204
bool parentIndexNumberNull() const
Definition albuminfo.cpp:278
void setIndexNumber(std::optional< qint32 > newIndexNumber)
Definition albuminfo.cpp:262
void setPath(QString newPath)
Gets or sets the path.
Definition albuminfo.cpp:197
static AlbumInfo fromJson(QJsonObject source)
Definition albuminfo.cpp:84
void setParentIndexNumber(std::optional< qint32 > newParentIndexNumber)
Definition albuminfo.cpp:275
QString name() const
Gets or sets the name.
Definition albuminfo.cpp:169
QString m_metadataLanguage
Definition albuminfo.h:204
void setPremiereDateNull()
Definition albuminfo.cpp:295
QString metadataLanguage() const
Gets or sets the metadata language.
Definition albuminfo.cpp:208
void setOriginalTitleNull()
Definition albuminfo.cpp:191
QString path() const
Gets or sets the path.
Definition albuminfo.cpp:195
bool indexNumberNull() const
Definition albuminfo.cpp:265
AlbumInfo(bool isAutomated, QStringList albumArtists, QJsonObject artistProviderIds, QList< SongInfo > songInfos)
Definition albuminfo.cpp:36
void setMetadataCountryCode(QString newMetadataCountryCode)
Gets or sets the metadata country code.
Definition albuminfo.cpp:223
void setYearNull()
Definition albuminfo.cpp:256
void replaceData(AlbumInfo &other)
Definition albuminfo.cpp:67
std::optional< qint32 > indexNumber() const
Definition albuminfo.cpp:260
void setName(QString newName)
Gets or sets the name.
Definition albuminfo.cpp:171
QJsonObject m_providerIds
Definition albuminfo.h:206
void setParentIndexNumberNull()
Definition albuminfo.cpp:282
bool pathNull() const
Definition albuminfo.cpp:200
QString m_originalTitle
Definition albuminfo.h:202
bool metadataLanguageNull() const
Definition albuminfo.cpp:213
Definition mediaplayer2.h:20
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
Definition accessschedule.h:128
Jellyfin::DTO::AlbumInfo AlbumInfo
Definition albuminfo.h:226
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