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 );
57
58 AlbumInfo(const AlbumInfo &other);
59
63 void replaceData(AlbumInfo &other);
64
65 static AlbumInfo fromJson(QJsonObject source);
66 void setFromJson(QJsonObject source);
67 QJsonObject toJson() const;
68
69 // Properties
73 QString name() const;
77 void setName(QString newName);
78 bool nameNull() const;
79 void setNameNull();
80
84 QString path() const;
88 void setPath(QString newPath);
89 bool pathNull() const;
90 void setPathNull();
91
95 QString metadataLanguage() const;
99 void setMetadataLanguage(QString newMetadataLanguage);
100 bool metadataLanguageNull() const;
102
106 QString metadataCountryCode() const;
110 void setMetadataCountryCode(QString newMetadataCountryCode);
111 bool metadataCountryCodeNull() const;
113
117 QJsonObject providerIds() const;
121 void setProviderIds(QJsonObject newProviderIds);
122 bool providerIdsNull() const;
123 void setProviderIdsNull();
124
128 std::optional<qint32> year() const;
132 void setYear(std::optional<qint32> newYear);
133 bool yearNull() const;
134 void setYearNull();
135
136
137 std::optional<qint32> indexNumber() const;
138
139 void setIndexNumber(std::optional<qint32> newIndexNumber);
140 bool indexNumberNull() const;
141 void setIndexNumberNull();
142
143
144 std::optional<qint32> parentIndexNumber() const;
145
146 void setParentIndexNumber(std::optional<qint32> newParentIndexNumber);
147 bool parentIndexNumberNull() const;
149
150
151 QDateTime premiereDate() const;
152
153 void setPremiereDate(QDateTime newPremiereDate);
154 bool premiereDateNull() const;
155 void setPremiereDateNull();
156
157
158 bool isAutomated() const;
159
160 void setIsAutomated(bool newIsAutomated);
161
165 QStringList albumArtists() const;
169 void setAlbumArtists(QStringList newAlbumArtists);
170 bool albumArtistsNull() const;
171 void setAlbumArtistsNull();
172
176 QJsonObject artistProviderIds() const;
180 void setArtistProviderIds(QJsonObject newArtistProviderIds);
181 bool artistProviderIdsNull() const;
183
184
186
187 void setSongInfos(QList<SongInfo> newSongInfos);
188 bool songInfosNull() const;
189 void setSongInfosNull();
190
191
192protected:
193 QString m_name;
194 QString m_path;
197 QJsonObject m_providerIds;
198 std::optional<qint32> m_year = std::nullopt;
199 std::optional<qint32> m_indexNumber = std::nullopt;
200 std::optional<qint32> m_parentIndexNumber = std::nullopt;
201 QDateTime m_premiereDate;
203 QStringList m_albumArtists;
206
207private:
208 // Private constructor which generates an invalid object, for use withing AlbumInfo::fromJson();
209 AlbumInfo();
210};
211
212
213} // NS DTO
214
215namespace Support {
216
218
219template <>
220AlbumInfo fromJsonValue(const QJsonValue &source, convertType<AlbumInfo>);
221
222template<>
223QJsonValue toJsonValue(const AlbumInfo &source, convertType<AlbumInfo>);
224
225} // NS DTO
226} // NS Jellyfin
227
228#endif // JELLYFIN_DTO_ALBUMINFO_H
Definition albuminfo.h:52
void setSongInfos(QList< SongInfo > newSongInfos)
Definition albuminfo.cpp:318
void setArtistProviderIdsNull()
Definition albuminfo.cpp:312
QJsonObject providerIds() const
Gets or sets the provider ids.
Definition albuminfo.cpp:219
QString m_path
Definition albuminfo.h:194
QString m_name
Definition albuminfo.h:193
QJsonObject toJson() const
Definition albuminfo.cpp:100
std::optional< qint32 > m_indexNumber
Definition albuminfo.h:199
bool metadataCountryCodeNull() const
Definition albuminfo.cpp:211
QJsonObject m_artistProviderIds
Definition albuminfo.h:204
void setFromJson(QJsonObject source)
Definition albuminfo.cpp:83
void setYear(std::optional< qint32 > newYear)
Gets or sets the year.
Definition albuminfo.cpp:234
void setMetadataCountryCodeNull()
Definition albuminfo.cpp:215
void setMetadataLanguage(QString newMetadataLanguage)
Gets or sets the metadata language.
Definition albuminfo.cpp:195
void setArtistProviderIds(QJsonObject newArtistProviderIds)
Gets or sets the artist provider ids.
Definition albuminfo.cpp:305
bool yearNull() const
Definition albuminfo.cpp:237
QDateTime premiereDate() const
Definition albuminfo.cpp:271
bool premiereDateNull() const
Definition albuminfo.cpp:276
void setProviderIdsNull()
Definition albuminfo.cpp:228
QJsonObject artistProviderIds() const
Gets or sets the artist provider ids.
Definition albuminfo.cpp:303
void setAlbumArtistsNull()
Definition albuminfo.cpp:299
bool nameNull() const
Definition albuminfo.cpp:172
QString metadataCountryCode() const
Gets or sets the metadata country code.
Definition albuminfo.cpp:206
QStringList albumArtists() const
Gets or sets the album artist.
Definition albuminfo.cpp:290
std::optional< qint32 > parentIndexNumber() const
Definition albuminfo.cpp:258
QList< SongInfo > songInfos() const
Definition albuminfo.cpp:316
void setMetadataLanguageNull()
Definition albuminfo.cpp:202
bool m_isAutomated
Definition albuminfo.h:202
bool albumArtistsNull() const
Definition albuminfo.cpp:295
std::optional< qint32 > year() const
Gets or sets the year.
Definition albuminfo.cpp:232
void setProviderIds(QJsonObject newProviderIds)
Gets or sets the provider ids.
Definition albuminfo.cpp:221
std::optional< qint32 > m_parentIndexNumber
Definition albuminfo.h:200
bool providerIdsNull() const
Definition albuminfo.cpp:224
void setNameNull()
Definition albuminfo.cpp:176
QList< SongInfo > m_songInfos
Definition albuminfo.h:205
void setIndexNumberNull()
Definition albuminfo.cpp:254
void setAlbumArtists(QStringList newAlbumArtists)
Gets or sets the album artist.
Definition albuminfo.cpp:292
QDateTime m_premiereDate
Definition albuminfo.h:201
bool songInfosNull() const
Definition albuminfo.cpp:321
bool artistProviderIdsNull() const
Definition albuminfo.cpp:308
QString m_metadataCountryCode
Definition albuminfo.h:196
void setIsAutomated(bool newIsAutomated)
Definition albuminfo.cpp:286
bool isAutomated() const
Definition albuminfo.cpp:284
std::optional< qint32 > m_year
Definition albuminfo.h:198
QStringList m_albumArtists
Definition albuminfo.h:203
void setPremiereDate(QDateTime newPremiereDate)
Definition albuminfo.cpp:273
void setSongInfosNull()
Definition albuminfo.cpp:325
void setPathNull()
Definition albuminfo.cpp:189
bool parentIndexNumberNull() const
Definition albuminfo.cpp:263
void setIndexNumber(std::optional< qint32 > newIndexNumber)
Definition albuminfo.cpp:247
void setPath(QString newPath)
Gets or sets the path.
Definition albuminfo.cpp:182
static AlbumInfo fromJson(QJsonObject source)
Definition albuminfo.cpp:76
void setParentIndexNumber(std::optional< qint32 > newParentIndexNumber)
Definition albuminfo.cpp:260
QString name() const
Gets or sets the name.
Definition albuminfo.cpp:167
QString m_metadataLanguage
Definition albuminfo.h:195
void setPremiereDateNull()
Definition albuminfo.cpp:280
QString metadataLanguage() const
Gets or sets the metadata language.
Definition albuminfo.cpp:193
QString path() const
Gets or sets the path.
Definition albuminfo.cpp:180
bool indexNumberNull() const
Definition albuminfo.cpp:250
void setMetadataCountryCode(QString newMetadataCountryCode)
Gets or sets the metadata country code.
Definition albuminfo.cpp:208
void setYearNull()
Definition albuminfo.cpp:241
void replaceData(AlbumInfo &other)
Definition albuminfo.cpp:60
std::optional< qint32 > indexNumber() const
Definition albuminfo.cpp:245
void setName(QString newName)
Gets or sets the name.
Definition albuminfo.cpp:169
QJsonObject m_providerIds
Definition albuminfo.h:197
void setParentIndexNumberNull()
Definition albuminfo.cpp:267
bool pathNull() const
Definition albuminfo.cpp:185
bool metadataLanguageNull() const
Definition albuminfo.cpp:198
Definition mediaplayer2.h:20
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