Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
movieinfo.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_MOVIEINFO_H
31#define JELLYFIN_DTO_MOVIEINFO_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 MovieInfo {
50public:
51 MovieInfo(
52 bool isAutomated
53 );
54
55 MovieInfo(const MovieInfo &other);
56
60 void replaceData(MovieInfo &other);
61
62 static MovieInfo 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
160protected:
161 QString m_name;
162 QString m_path;
165 QJsonObject m_providerIds;
166 std::optional<qint32> m_year = std::nullopt;
167 std::optional<qint32> m_indexNumber = std::nullopt;
168 std::optional<qint32> m_parentIndexNumber = std::nullopt;
169 QDateTime m_premiereDate;
171
172private:
173 // Private constructor which generates an invalid object, for use withing MovieInfo::fromJson();
174 MovieInfo();
175};
176
177
178} // NS DTO
179
180namespace Support {
181
183
184template <>
185MovieInfo fromJsonValue(const QJsonValue &source, convertType<MovieInfo>);
186
187template<>
188QJsonValue toJsonValue(const MovieInfo &source, convertType<MovieInfo>);
189
190} // NS DTO
191} // NS Jellyfin
192
193#endif // JELLYFIN_DTO_MOVIEINFO_H
Definition movieinfo.h:49
void setFromJson(QJsonObject source)
Definition movieinfo.cpp:77
std::optional< qint32 > m_year
Definition movieinfo.h:166
QJsonObject providerIds() const
Gets or sets the provider ids.
Definition movieinfo.cpp:195
std::optional< qint32 > indexNumber() const
Definition movieinfo.cpp:221
void setIsAutomated(bool newIsAutomated)
Definition movieinfo.cpp:262
bool metadataCountryCodeNull() const
Definition movieinfo.cpp:187
QJsonObject m_providerIds
Definition movieinfo.h:165
void setMetadataLanguage(QString newMetadataLanguage)
Gets or sets the metadata language.
Definition movieinfo.cpp:171
void setPremiereDate(QDateTime newPremiereDate)
Definition movieinfo.cpp:249
QString m_path
Definition movieinfo.h:162
void setIndexNumberNull()
Definition movieinfo.cpp:230
bool providerIdsNull() const
Definition movieinfo.cpp:200
bool pathNull() const
Definition movieinfo.cpp:161
QString path() const
Gets or sets the path.
Definition movieinfo.cpp:156
std::optional< qint32 > m_indexNumber
Definition movieinfo.h:167
QDateTime m_premiereDate
Definition movieinfo.h:169
QDateTime premiereDate() const
Definition movieinfo.cpp:247
void setName(QString newName)
Gets or sets the name.
Definition movieinfo.cpp:145
void setMetadataCountryCode(QString newMetadataCountryCode)
Gets or sets the metadata country code.
Definition movieinfo.cpp:184
void setParentIndexNumberNull()
Definition movieinfo.cpp:243
static MovieInfo fromJson(QJsonObject source)
Definition movieinfo.cpp:70
bool nameNull() const
Definition movieinfo.cpp:148
bool metadataLanguageNull() const
Definition movieinfo.cpp:174
void setIndexNumber(std::optional< qint32 > newIndexNumber)
Definition movieinfo.cpp:223
void setPathNull()
Definition movieinfo.cpp:165
std::optional< qint32 > parentIndexNumber() const
Definition movieinfo.cpp:234
bool indexNumberNull() const
Definition movieinfo.cpp:226
QString name() const
Gets or sets the name.
Definition movieinfo.cpp:143
void setProviderIds(QJsonObject newProviderIds)
Gets or sets the provider ids.
Definition movieinfo.cpp:197
void replaceData(MovieInfo &other)
Definition movieinfo.cpp:57
QJsonObject toJson() const
Definition movieinfo.cpp:91
void setMetadataLanguageNull()
Definition movieinfo.cpp:178
void setYearNull()
Definition movieinfo.cpp:217
void setMetadataCountryCodeNull()
Definition movieinfo.cpp:191
void setProviderIdsNull()
Definition movieinfo.cpp:204
std::optional< qint32 > m_parentIndexNumber
Definition movieinfo.h:168
void setYear(std::optional< qint32 > newYear)
Gets or sets the year.
Definition movieinfo.cpp:210
void setPremiereDateNull()
Definition movieinfo.cpp:256
bool premiereDateNull() const
Definition movieinfo.cpp:252
QString m_name
Definition movieinfo.h:161
bool yearNull() const
Definition movieinfo.cpp:213
void setPath(QString newPath)
Gets or sets the path.
Definition movieinfo.cpp:158
bool isAutomated() const
Definition movieinfo.cpp:260
void setParentIndexNumber(std::optional< qint32 > newParentIndexNumber)
Definition movieinfo.cpp:236
QString m_metadataLanguage
Definition movieinfo.h:163
QString metadataCountryCode() const
Gets or sets the metadata country code.
Definition movieinfo.cpp:182
std::optional< qint32 > year() const
Gets or sets the year.
Definition movieinfo.cpp:208
bool parentIndexNumberNull() const
Definition movieinfo.cpp:239
QString metadataLanguage() const
Gets or sets the metadata language.
Definition movieinfo.cpp:169
QString m_metadataCountryCode
Definition movieinfo.h:164
void setNameNull()
Definition movieinfo.cpp:152
bool m_isAutomated
Definition movieinfo.h:170
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