Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
artistinfo.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_ARTISTINFO_H
31#define JELLYFIN_DTO_ARTISTINFO_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
53public:
55 bool isAutomated
56 );
57
58 ArtistInfo(const ArtistInfo &other);
59
63 void replaceData(ArtistInfo &other);
64
65 static ArtistInfo 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
162
164
165 void setSongInfos(QList<SongInfo> newSongInfos);
166 bool songInfosNull() const;
167 void setSongInfosNull();
168
169
170protected:
171 QString m_name;
172 QString m_path;
175 QJsonObject m_providerIds;
176 std::optional<qint32> m_year = std::nullopt;
177 std::optional<qint32> m_indexNumber = std::nullopt;
178 std::optional<qint32> m_parentIndexNumber = std::nullopt;
179 QDateTime m_premiereDate;
182
183private:
184 // Private constructor which generates an invalid object, for use withing ArtistInfo::fromJson();
185 ArtistInfo();
186};
187
188
189} // NS DTO
190
191namespace Support {
192
194
195template <>
196ArtistInfo fromJsonValue(const QJsonValue &source, convertType<ArtistInfo>);
197
198template<>
199QJsonValue toJsonValue(const ArtistInfo &source, convertType<ArtistInfo>);
200
201} // NS DTO
202} // NS Jellyfin
203
204#endif // JELLYFIN_DTO_ARTISTINFO_H
Definition artistinfo.h:52
QJsonObject toJson() const
Definition artistinfo.cpp:94
void replaceData(ArtistInfo &other)
Definition artistinfo.cpp:58
QString m_metadataLanguage
Definition artistinfo.h:173
std::optional< qint32 > m_year
Definition artistinfo.h:176
void setPath(QString newPath)
Gets or sets the path.
Definition artistinfo.cpp:166
bool metadataCountryCodeNull() const
Definition artistinfo.cpp:195
bool m_isAutomated
Definition artistinfo.h:180
QString path() const
Gets or sets the path.
Definition artistinfo.cpp:164
QString m_metadataCountryCode
Definition artistinfo.h:174
void setName(QString newName)
Gets or sets the name.
Definition artistinfo.cpp:153
QJsonObject m_providerIds
Definition artistinfo.h:175
std::optional< qint32 > m_parentIndexNumber
Definition artistinfo.h:178
bool isAutomated() const
Definition artistinfo.cpp:268
QList< SongInfo > songInfos() const
Definition artistinfo.cpp:274
void setMetadataLanguage(QString newMetadataLanguage)
Gets or sets the metadata language.
Definition artistinfo.cpp:179
QString name() const
Gets or sets the name.
Definition artistinfo.cpp:151
void setPathNull()
Definition artistinfo.cpp:173
bool parentIndexNumberNull() const
Definition artistinfo.cpp:247
std::optional< qint32 > parentIndexNumber() const
Definition artistinfo.cpp:242
bool pathNull() const
Definition artistinfo.cpp:169
void setPremiereDate(QDateTime newPremiereDate)
Definition artistinfo.cpp:257
void setMetadataLanguageNull()
Definition artistinfo.cpp:186
void setPremiereDateNull()
Definition artistinfo.cpp:264
QString m_path
Definition artistinfo.h:172
void setNameNull()
Definition artistinfo.cpp:160
bool metadataLanguageNull() const
Definition artistinfo.cpp:182
void setIsAutomated(bool newIsAutomated)
Definition artistinfo.cpp:270
void setSongInfosNull()
Definition artistinfo.cpp:283
void setMetadataCountryCodeNull()
Definition artistinfo.cpp:199
std::optional< qint32 > year() const
Gets or sets the year.
Definition artistinfo.cpp:216
void setSongInfos(QList< SongInfo > newSongInfos)
Definition artistinfo.cpp:276
void setProviderIdsNull()
Definition artistinfo.cpp:212
bool premiereDateNull() const
Definition artistinfo.cpp:260
void setProviderIds(QJsonObject newProviderIds)
Gets or sets the provider ids.
Definition artistinfo.cpp:205
std::optional< qint32 > m_indexNumber
Definition artistinfo.h:177
void setIndexNumber(std::optional< qint32 > newIndexNumber)
Definition artistinfo.cpp:231
QList< SongInfo > m_songInfos
Definition artistinfo.h:181
QJsonObject providerIds() const
Gets or sets the provider ids.
Definition artistinfo.cpp:203
std::optional< qint32 > indexNumber() const
Definition artistinfo.cpp:229
bool indexNumberNull() const
Definition artistinfo.cpp:234
void setFromJson(QJsonObject source)
Definition artistinfo.cpp:79
void setParentIndexNumber(std::optional< qint32 > newParentIndexNumber)
Definition artistinfo.cpp:244
bool yearNull() const
Definition artistinfo.cpp:221
void setParentIndexNumberNull()
Definition artistinfo.cpp:251
bool nameNull() const
Definition artistinfo.cpp:156
QString m_name
Definition artistinfo.h:171
void setYear(std::optional< qint32 > newYear)
Gets or sets the year.
Definition artistinfo.cpp:218
void setYearNull()
Definition artistinfo.cpp:225
QString metadataLanguage() const
Gets or sets the metadata language.
Definition artistinfo.cpp:177
void setIndexNumberNull()
Definition artistinfo.cpp:238
bool songInfosNull() const
Definition artistinfo.cpp:279
void setMetadataCountryCode(QString newMetadataCountryCode)
Gets or sets the metadata country code.
Definition artistinfo.cpp:192
bool providerIdsNull() const
Definition artistinfo.cpp:208
QDateTime m_premiereDate
Definition artistinfo.h:179
QString metadataCountryCode() const
Gets or sets the metadata country code.
Definition artistinfo.cpp:190
QDateTime premiereDate() const
Definition artistinfo.cpp:255
static ArtistInfo fromJson(QJsonObject source)
Definition artistinfo.cpp:72
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