Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
useritemdatadto.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_USERITEMDATADTO_H
31#define JELLYFIN_DTO_USERITEMDATADTO_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:
53 qint32 playCount,
54 bool isFavorite,
55 bool played,
56 QString key,
57 QString itemId
58 );
59
60 UserItemDataDto(const UserItemDataDto &other);
61
65 void replaceData(UserItemDataDto &other);
66
67 static UserItemDataDto fromJson(QJsonObject source);
68 void setFromJson(QJsonObject source);
69 QJsonObject toJson() const;
70
71 // Properties
75 std::optional<double> rating() const;
79 void setRating(std::optional<double> newRating);
80 bool ratingNull() const;
81 void setRatingNull();
82
86 std::optional<double> playedPercentage() const;
90 void setPlayedPercentage(std::optional<double> newPlayedPercentage);
91 bool playedPercentageNull() const;
93
97 std::optional<qint32> unplayedItemCount() const;
101 void setUnplayedItemCount(std::optional<qint32> newUnplayedItemCount);
102 bool unplayedItemCountNull() const;
104
108 qint64 playbackPositionTicks() const;
112 void setPlaybackPositionTicks(qint64 newPlaybackPositionTicks);
113
117 qint32 playCount() const;
121 void setPlayCount(qint32 newPlayCount);
122
126 bool isFavorite() const;
130 void setIsFavorite(bool newIsFavorite);
131
135 std::optional<bool> likes() const;
139 void setLikes(std::optional<bool> newLikes);
140 bool likesNull() const;
141 void setLikesNull();
142
146 QDateTime lastPlayedDate() const;
150 void setLastPlayedDate(QDateTime newLastPlayedDate);
151 bool lastPlayedDateNull() const;
153
157 bool played() const;
161 void setPlayed(bool newPlayed);
162
166 QString key() const;
170 void setKey(QString newKey);
171
175 QString itemId() const;
179 void setItemId(QString newItemId);
180
181
182protected:
183 std::optional<double> m_rating = std::nullopt;
184 std::optional<double> m_playedPercentage = std::nullopt;
185 std::optional<qint32> m_unplayedItemCount = std::nullopt;
189 std::optional<bool> m_likes = std::nullopt;
192 QString m_key;
193 QString m_itemId;
194
195private:
196 // Private constructor which generates an invalid object, for use withing UserItemDataDto::fromJson();
198};
199
200
201} // NS DTO
202
203namespace Support {
204
206
207template <>
209
210template<>
212
213} // NS DTO
214} // NS Jellyfin
215
216#endif // JELLYFIN_DTO_USERITEMDATADTO_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition useritemdatadto.h:49
void setPlayedPercentage(std::optional< double > newPlayedPercentage)
Gets or sets the played percentage.
Definition useritemdatadto.cpp:156
qint64 m_playbackPositionTicks
Definition useritemdatadto.h:186
void replaceData(UserItemDataDto &other)
Definition useritemdatadto.cpp:68
void setUnplayedItemCount(std::optional< qint32 > newUnplayedItemCount)
Gets or sets the unplayed item count.
Definition useritemdatadto.cpp:169
bool unplayedItemCountNull() const
Definition useritemdatadto.cpp:172
std::optional< bool > m_likes
Definition useritemdatadto.h:189
bool lastPlayedDateNull() const
Definition useritemdatadto.cpp:216
qint64 playbackPositionTicks() const
Gets or sets the playback position ticks.
Definition useritemdatadto.cpp:180
void setKey(QString newKey)
Gets or sets the key.
Definition useritemdatadto.cpp:232
std::optional< double > m_rating
Definition useritemdatadto.h:183
void setPlayed(bool newPlayed)
Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is played.
Definition useritemdatadto.cpp:226
static UserItemDataDto fromJson(QJsonObject source)
Definition useritemdatadto.cpp:82
QString key() const
Gets or sets the key.
Definition useritemdatadto.cpp:230
bool playedPercentageNull() const
Definition useritemdatadto.cpp:159
std::optional< double > playedPercentage() const
Gets or sets the played percentage.
Definition useritemdatadto.cpp:154
bool ratingNull() const
Definition useritemdatadto.cpp:146
std::optional< double > rating() const
Gets or sets the rating.
Definition useritemdatadto.cpp:141
void setPlayCount(qint32 newPlayCount)
Gets or sets the play count.
Definition useritemdatadto.cpp:188
bool m_isFavorite
Definition useritemdatadto.h:188
void setLastPlayedDate(QDateTime newLastPlayedDate)
Gets or sets the last played date.
Definition useritemdatadto.cpp:213
void setLastPlayedDateNull()
Definition useritemdatadto.cpp:220
std::optional< qint32 > m_unplayedItemCount
Definition useritemdatadto.h:185
QDateTime lastPlayedDate() const
Gets or sets the last played date.
Definition useritemdatadto.cpp:211
bool isFavorite() const
Gets or sets a value indicating whether this instance is favorite.
Definition useritemdatadto.cpp:192
void setRatingNull()
Definition useritemdatadto.cpp:150
void setRating(std::optional< double > newRating)
Gets or sets the rating.
Definition useritemdatadto.cpp:143
std::optional< qint32 > unplayedItemCount() const
Gets or sets the unplayed item count.
Definition useritemdatadto.cpp:167
std::optional< double > m_playedPercentage
Definition useritemdatadto.h:184
bool played() const
Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is played.
Definition useritemdatadto.cpp:224
bool likesNull() const
Definition useritemdatadto.cpp:203
void setPlayedPercentageNull()
Definition useritemdatadto.cpp:163
QJsonObject toJson() const
Definition useritemdatadto.cpp:104
void setIsFavorite(bool newIsFavorite)
Gets or sets a value indicating whether this instance is favorite.
Definition useritemdatadto.cpp:194
qint32 playCount() const
Gets or sets the play count.
Definition useritemdatadto.cpp:186
void setPlaybackPositionTicks(qint64 newPlaybackPositionTicks)
Gets or sets the playback position ticks.
Definition useritemdatadto.cpp:182
QString m_itemId
Definition useritemdatadto.h:193
QString itemId() const
Gets or sets the item identifier.
Definition useritemdatadto.cpp:236
QString m_key
Definition useritemdatadto.h:192
std::optional< bool > likes() const
Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is likes.
Definition useritemdatadto.cpp:198
qint32 m_playCount
Definition useritemdatadto.h:187
void setItemId(QString newItemId)
Gets or sets the item identifier.
Definition useritemdatadto.cpp:238
void setLikesNull()
Definition useritemdatadto.cpp:207
void setLikes(std::optional< bool > newLikes)
Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is likes.
Definition useritemdatadto.cpp:200
void setFromJson(QJsonObject source)
Definition useritemdatadto.cpp:89
QDateTime m_lastPlayedDate
Definition useritemdatadto.h:190
UserItemDataDto(qint64 playbackPositionTicks, qint32 playCount, bool isFavorite, bool played, QString key, QString itemId)
Definition useritemdatadto.cpp:36
void setUnplayedItemCountNull()
Definition useritemdatadto.cpp:176
bool m_played
Definition useritemdatadto.h:191
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
Definition accessschedule.h:128
Jellyfin::DTO::UserItemDataDto UserItemDataDto
Definition useritemdatadto.h:205
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