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