Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
searchhint.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_SEARCHHINT_H
31#define JELLYFIN_DTO_SEARCHHINT_H
32
33#include <QDateTime>
34#include <QJsonObject>
35#include <QJsonValue>
36#include <QList>
37#include <QString>
38#include <QStringList>
39#include <optional>
40
42
43namespace Jellyfin {
44// Forward declaration
45class ApiClient;
46}
47namespace Jellyfin {
48namespace DTO {
49
50
52public:
54 QString itemId,
55 QString jellyfinId,
56 QString albumId,
57 QString channelId
58 );
59
60 SearchHint(const SearchHint &other);
61
65 void replaceData(SearchHint &other);
66
67 static SearchHint fromJson(QJsonObject source);
68 void setFromJson(QJsonObject source);
69 QJsonObject toJson() const;
70
71 // Properties
75 QString itemId() const;
79 void setItemId(QString newItemId);
80
81
82 QString jellyfinId() const;
83
84 void setJellyfinId(QString newJellyfinId);
85
89 QString name() const;
93 void setName(QString newName);
94 bool nameNull() const;
95 void setNameNull();
96
100 QString matchedTerm() const;
104 void setMatchedTerm(QString newMatchedTerm);
105 bool matchedTermNull() const;
106 void setMatchedTermNull();
107
111 std::optional<qint32> indexNumber() const;
115 void setIndexNumber(std::optional<qint32> newIndexNumber);
116 bool indexNumberNull() const;
117 void setIndexNumberNull();
118
122 std::optional<qint32> productionYear() const;
126 void setProductionYear(std::optional<qint32> newProductionYear);
127 bool productionYearNull() const;
129
133 std::optional<qint32> parentIndexNumber() const;
137 void setParentIndexNumber(std::optional<qint32> newParentIndexNumber);
138 bool parentIndexNumberNull() const;
140
144 QString primaryImageTag() const;
148 void setPrimaryImageTag(QString newPrimaryImageTag);
149 bool primaryImageTagNull() const;
151
155 QString thumbImageTag() const;
159 void setThumbImageTag(QString newThumbImageTag);
160 bool thumbImageTagNull() const;
162
166 QString thumbImageItemId() const;
170 void setThumbImageItemId(QString newThumbImageItemId);
171 bool thumbImageItemIdNull() const;
173
177 QString backdropImageTag() const;
181 void setBackdropImageTag(QString newBackdropImageTag);
182 bool backdropImageTagNull() const;
184
188 QString backdropImageItemId() const;
192 void setBackdropImageItemId(QString newBackdropImageItemId);
193 bool backdropImageItemIdNull() const;
195
199 QString type() const;
203 void setType(QString newType);
204 bool typeNull() const;
205 void setTypeNull();
206
207
208 std::optional<bool> isFolder() const;
209
210 void setIsFolder(std::optional<bool> newIsFolder);
211 bool isFolderNull() const;
212 void setIsFolderNull();
213
217 std::optional<qint64> runTimeTicks() const;
221 void setRunTimeTicks(std::optional<qint64> newRunTimeTicks);
222 bool runTimeTicksNull() const;
223 void setRunTimeTicksNull();
224
228 QString mediaType() const;
232 void setMediaType(QString newMediaType);
233 bool mediaTypeNull() const;
234 void setMediaTypeNull();
235
236
237 QDateTime startDate() const;
238
239 void setStartDate(QDateTime newStartDate);
240 bool startDateNull() const;
241 void setStartDateNull();
242
243
244 QDateTime endDate() const;
245
246 void setEndDate(QDateTime newEndDate);
247 bool endDateNull() const;
248 void setEndDateNull();
249
253 QString series() const;
257 void setSeries(QString newSeries);
258 bool seriesNull() const;
259 void setSeriesNull();
260
261
262 QString status() const;
263
264 void setStatus(QString newStatus);
265 bool statusNull() const;
266 void setStatusNull();
267
271 QString album() const;
275 void setAlbum(QString newAlbum);
276 bool albumNull() const;
277 void setAlbumNull();
278
279
280 QString albumId() const;
281
282 void setAlbumId(QString newAlbumId);
283
287 QString albumArtist() const;
291 void setAlbumArtist(QString newAlbumArtist);
292 bool albumArtistNull() const;
293 void setAlbumArtistNull();
294
298 QStringList artists() const;
302 void setArtists(QStringList newArtists);
303 bool artistsNull() const;
304 void setArtistsNull();
305
309 std::optional<qint32> songCount() const;
313 void setSongCount(std::optional<qint32> newSongCount);
314 bool songCountNull() const;
315 void setSongCountNull();
316
320 std::optional<qint32> episodeCount() const;
324 void setEpisodeCount(std::optional<qint32> newEpisodeCount);
325 bool episodeCountNull() const;
326 void setEpisodeCountNull();
327
331 QString channelId() const;
335 void setChannelId(QString newChannelId);
336
340 QString channelName() const;
344 void setChannelName(QString newChannelName);
345 bool channelNameNull() const;
346 void setChannelNameNull();
347
351 std::optional<double> primaryImageAspectRatio() const;
355 void setPrimaryImageAspectRatio(std::optional<double> newPrimaryImageAspectRatio);
356 bool primaryImageAspectRatioNull() const;
358
359
360protected:
361 QString m_itemId;
363 QString m_name;
365 std::optional<qint32> m_indexNumber = std::nullopt;
366 std::optional<qint32> m_productionYear = std::nullopt;
367 std::optional<qint32> m_parentIndexNumber = std::nullopt;
373 QString m_type;
374 std::optional<bool> m_isFolder = std::nullopt;
375 std::optional<qint64> m_runTimeTicks = std::nullopt;
376 QString m_mediaType;
377 QDateTime m_startDate;
378 QDateTime m_endDate;
379 QString m_series;
380 QString m_status;
381 QString m_album;
382 QString m_albumId;
384 QStringList m_artists;
385 std::optional<qint32> m_songCount = std::nullopt;
386 std::optional<qint32> m_episodeCount = std::nullopt;
387 QString m_channelId;
389 std::optional<double> m_primaryImageAspectRatio = std::nullopt;
390
391private:
392 // Private constructor which generates an invalid object, for use withing SearchHint::fromJson();
393 SearchHint();
394};
395
396
397} // NS DTO
398
399namespace Support {
400
402
403template <>
404SearchHint fromJsonValue(const QJsonValue &source, convertType<SearchHint>);
405
406template<>
407QJsonValue toJsonValue(const SearchHint &source, convertType<SearchHint>);
408
409} // NS DTO
410} // NS Jellyfin
411
412#endif // JELLYFIN_DTO_SEARCHHINT_H
Definition searchhint.h:51
bool backdropImageItemIdNull() const
Definition searchhint.cpp:423
void setChannelName(QString newChannelName)
Gets or sets the name of the channel.
Definition searchhint.cpp:614
QString matchedTerm() const
Gets or sets the matched term.
Definition searchhint.cpp:314
void setSeriesNull()
Definition searchhint.cpp:518
QString m_thumbImageItemId
Definition searchhint.h:370
static SearchHint fromJson(QJsonObject source)
Definition searchhint.cpp:114
void setChannelNameNull()
Definition searchhint.cpp:621
QString primaryImageTag() const
Gets or sets the image tag.
Definition searchhint.cpp:366
QString m_series
Definition searchhint.h:379
void setMediaTypeNull()
Definition searchhint.cpp:479
QString name() const
Gets or sets the name.
Definition searchhint.cpp:301
QString channelName() const
Gets or sets the name of the channel.
Definition searchhint.cpp:612
bool nameNull() const
Definition searchhint.cpp:306
bool indexNumberNull() const
Definition searchhint.cpp:332
void setArtists(QStringList newArtists)
Gets or sets the artists.
Definition searchhint.cpp:569
bool endDateNull() const
Definition searchhint.cpp:501
bool songCountNull() const
Definition searchhint.cpp:585
bool primaryImageTagNull() const
Definition searchhint.cpp:371
QString albumId() const
Definition searchhint.cpp:548
std::optional< qint32 > m_episodeCount
Definition searchhint.h:386
QStringList artists() const
Gets or sets the artists.
Definition searchhint.cpp:567
void setType(QString newType)
Gets or sets the type.
Definition searchhint.cpp:433
void setMatchedTerm(QString newMatchedTerm)
Gets or sets the matched term.
Definition searchhint.cpp:316
QString backdropImageItemId() const
Gets or sets the backdrop image item identifier.
Definition searchhint.cpp:418
QDateTime m_startDate
Definition searchhint.h:377
void setStatus(QString newStatus)
Definition searchhint.cpp:524
bool thumbImageItemIdNull() const
Definition searchhint.cpp:397
void setIndexNumberNull()
Definition searchhint.cpp:336
QString m_mediaType
Definition searchhint.h:376
QString m_albumArtist
Definition searchhint.h:383
bool runTimeTicksNull() const
Definition searchhint.cpp:462
void setStatusNull()
Definition searchhint.cpp:531
void setThumbImageItemIdNull()
Definition searchhint.cpp:401
bool typeNull() const
Definition searchhint.cpp:436
QDateTime m_endDate
Definition searchhint.h:378
bool matchedTermNull() const
Definition searchhint.cpp:319
QString status() const
Definition searchhint.cpp:522
QString m_albumId
Definition searchhint.h:382
QString thumbImageItemId() const
Gets or sets the thumb image item identifier.
Definition searchhint.cpp:392
bool productionYearNull() const
Definition searchhint.cpp:345
void setThumbImageItemId(QString newThumbImageItemId)
Gets or sets the thumb image item identifier.
Definition searchhint.cpp:394
void setRunTimeTicks(std::optional< qint64 > newRunTimeTicks)
Gets or sets the run time ticks.
Definition searchhint.cpp:459
void setAlbumId(QString newAlbumId)
Definition searchhint.cpp:550
std::optional< qint32 > songCount() const
Gets or sets the song count.
Definition searchhint.cpp:580
QString m_backdropImageTag
Definition searchhint.h:371
bool albumArtistNull() const
Definition searchhint.cpp:559
QString type() const
Gets or sets the type.
Definition searchhint.cpp:431
void setIsFolderNull()
Definition searchhint.cpp:453
void setEpisodeCount(std::optional< qint32 > newEpisodeCount)
Gets or sets the episode count.
Definition searchhint.cpp:595
QString jellyfinId() const
Definition searchhint.cpp:295
std::optional< qint32 > m_songCount
Definition searchhint.h:385
void setArtistsNull()
Definition searchhint.cpp:576
QString m_name
Definition searchhint.h:363
QString thumbImageTag() const
Gets or sets the thumb image tag.
Definition searchhint.cpp:379
void setName(QString newName)
Gets or sets the name.
Definition searchhint.cpp:303
bool statusNull() const
Definition searchhint.cpp:527
QString mediaType() const
Gets or sets the type of the media.
Definition searchhint.cpp:470
void setAlbumArtist(QString newAlbumArtist)
Gets or sets the album artist.
Definition searchhint.cpp:556
bool thumbImageTagNull() const
Definition searchhint.cpp:384
QJsonObject toJson() const
Definition searchhint.cpp:154
void setStartDateNull()
Definition searchhint.cpp:492
void setFromJson(QJsonObject source)
Definition searchhint.cpp:121
void setPrimaryImageAspectRatio(std::optional< double > newPrimaryImageAspectRatio)
Gets or sets the primary image aspect ratio.
Definition searchhint.cpp:627
QString album() const
Gets or sets the album.
Definition searchhint.cpp:535
QString m_channelName
Definition searchhint.h:388
void setIndexNumber(std::optional< qint32 > newIndexNumber)
Gets or sets the index number.
Definition searchhint.cpp:329
QString m_primaryImageTag
Definition searchhint.h:368
void setThumbImageTagNull()
Definition searchhint.cpp:388
bool parentIndexNumberNull() const
Definition searchhint.cpp:358
void setBackdropImageTag(QString newBackdropImageTag)
Gets or sets the backdrop image tag.
Definition searchhint.cpp:407
std::optional< qint32 > parentIndexNumber() const
Gets or sets the parent index number.
Definition searchhint.cpp:353
bool channelNameNull() const
Definition searchhint.cpp:617
void setProductionYear(std::optional< qint32 > newProductionYear)
Gets or sets the production year.
Definition searchhint.cpp:342
void setProductionYearNull()
Definition searchhint.cpp:349
QDateTime startDate() const
Definition searchhint.cpp:483
std::optional< qint32 > productionYear() const
Gets or sets the production year.
Definition searchhint.cpp:340
void setEndDate(QDateTime newEndDate)
Definition searchhint.cpp:498
void setAlbumArtistNull()
Definition searchhint.cpp:563
std::optional< qint64 > m_runTimeTicks
Definition searchhint.h:375
QDateTime endDate() const
Definition searchhint.cpp:496
std::optional< qint32 > m_parentIndexNumber
Definition searchhint.h:367
void setAlbumNull()
Definition searchhint.cpp:544
void setBackdropImageTagNull()
Definition searchhint.cpp:414
std::optional< qint32 > m_productionYear
Definition searchhint.h:366
std::optional< qint32 > indexNumber() const
Gets or sets the index number.
Definition searchhint.cpp:327
void setBackdropImageItemId(QString newBackdropImageItemId)
Gets or sets the backdrop image item identifier.
Definition searchhint.cpp:420
QString m_type
Definition searchhint.h:373
void setParentIndexNumberNull()
Definition searchhint.cpp:362
void setEpisodeCountNull()
Definition searchhint.cpp:602
std::optional< double > primaryImageAspectRatio() const
Gets or sets the primary image aspect ratio.
Definition searchhint.cpp:625
QString itemId() const
Gets or sets the item id.
Definition searchhint.cpp:289
bool mediaTypeNull() const
Definition searchhint.cpp:475
QString backdropImageTag() const
Gets or sets the backdrop image tag.
Definition searchhint.cpp:405
QString series() const
Gets or sets the series.
Definition searchhint.cpp:509
QStringList m_artists
Definition searchhint.h:384
std::optional< bool > m_isFolder
Definition searchhint.h:374
bool startDateNull() const
Definition searchhint.cpp:488
QString channelId() const
Gets or sets the channel identifier.
Definition searchhint.cpp:606
QString albumArtist() const
Gets or sets the album artist.
Definition searchhint.cpp:554
void setItemId(QString newItemId)
Gets or sets the item id.
Definition searchhint.cpp:291
void setNameNull()
Definition searchhint.cpp:310
bool isFolderNull() const
Definition searchhint.cpp:449
void setAlbum(QString newAlbum)
Gets or sets the album.
Definition searchhint.cpp:537
bool seriesNull() const
Definition searchhint.cpp:514
QString m_backdropImageItemId
Definition searchhint.h:372
void setRunTimeTicksNull()
Definition searchhint.cpp:466
void setParentIndexNumber(std::optional< qint32 > newParentIndexNumber)
Gets or sets the parent index number.
Definition searchhint.cpp:355
bool albumNull() const
Definition searchhint.cpp:540
void setPrimaryImageTag(QString newPrimaryImageTag)
Gets or sets the image tag.
Definition searchhint.cpp:368
void setMatchedTermNull()
Definition searchhint.cpp:323
void setSongCount(std::optional< qint32 > newSongCount)
Gets or sets the song count.
Definition searchhint.cpp:582
void setMediaType(QString newMediaType)
Gets or sets the type of the media.
Definition searchhint.cpp:472
QString m_itemId
Definition searchhint.h:361
void setPrimaryImageAspectRatioNull()
Definition searchhint.cpp:634
bool backdropImageTagNull() const
Definition searchhint.cpp:410
QString m_album
Definition searchhint.h:381
QString m_thumbImageTag
Definition searchhint.h:369
std::optional< qint32 > episodeCount() const
Gets or sets the episode count.
Definition searchhint.cpp:593
void setBackdropImageItemIdNull()
Definition searchhint.cpp:427
void setJellyfinId(QString newJellyfinId)
Definition searchhint.cpp:297
void setTypeNull()
Definition searchhint.cpp:440
void setStartDate(QDateTime newStartDate)
Definition searchhint.cpp:485
std::optional< bool > isFolder() const
Definition searchhint.cpp:444
bool episodeCountNull() const
Definition searchhint.cpp:598
void setChannelId(QString newChannelId)
Gets or sets the channel identifier.
Definition searchhint.cpp:608
QString m_jellyfinId
Definition searchhint.h:362
QString m_channelId
Definition searchhint.h:387
std::optional< qint32 > m_indexNumber
Definition searchhint.h:365
void setIsFolder(std::optional< bool > newIsFolder)
Definition searchhint.cpp:446
bool primaryImageAspectRatioNull() const
Definition searchhint.cpp:630
void setThumbImageTag(QString newThumbImageTag)
Gets or sets the thumb image tag.
Definition searchhint.cpp:381
bool artistsNull() const
Definition searchhint.cpp:572
void setEndDateNull()
Definition searchhint.cpp:505
void replaceData(SearchHint &other)
Definition searchhint.cpp:82
std::optional< qint64 > runTimeTicks() const
Gets or sets the run time ticks.
Definition searchhint.cpp:457
void setPrimaryImageTagNull()
Definition searchhint.cpp:375
void setSeries(QString newSeries)
Gets or sets the series.
Definition searchhint.cpp:511
QString m_matchedTerm
Definition searchhint.h:364
std::optional< double > m_primaryImageAspectRatio
Definition searchhint.h:389
void setSongCountNull()
Definition searchhint.cpp:589
QString m_status
Definition searchhint.h:380
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