Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
taskresult.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_TASKRESULT_H
31#define JELLYFIN_DTO_TASKRESULT_H
32
33#include <QDateTime>
34#include <QJsonObject>
35#include <QJsonValue>
36#include <QString>
37#include <optional>
38
41
42namespace Jellyfin {
43// Forward declaration
44class ApiClient;
45}
46namespace Jellyfin {
47namespace DTO {
48
49
51public:
53 QDateTime startTimeUtc,
54 QDateTime endTimeUtc,
56 );
57
58 TaskResult(const TaskResult &other);
59
63 void replaceData(TaskResult &other);
64
65 static TaskResult fromJson(QJsonObject source);
66 void setFromJson(QJsonObject source);
67 QJsonObject toJson() const;
68
69 // Properties
73 QDateTime startTimeUtc() const;
77 void setStartTimeUtc(QDateTime newStartTimeUtc);
78
82 QDateTime endTimeUtc() const;
86 void setEndTimeUtc(QDateTime newEndTimeUtc);
87
88
90
91 void setStatus(TaskCompletionStatus newStatus);
92
96 QString name() const;
100 void setName(QString newName);
101 bool nameNull() const;
102 void setNameNull();
103
107 QString key() const;
111 void setKey(QString newKey);
112 bool keyNull() const;
113 void setKeyNull();
114
118 QString jellyfinId() const;
122 void setJellyfinId(QString newJellyfinId);
123 bool jellyfinIdNull() const;
124 void setJellyfinIdNull();
125
129 QString errorMessage() const;
133 void setErrorMessage(QString newErrorMessage);
134 bool errorMessageNull() const;
135 void setErrorMessageNull();
136
140 QString longErrorMessage() const;
144 void setLongErrorMessage(QString newLongErrorMessage);
145 bool longErrorMessageNull() const;
147
148
149protected:
150 QDateTime m_startTimeUtc;
151 QDateTime m_endTimeUtc;
153 QString m_name;
154 QString m_key;
158
159private:
160 // Private constructor which generates an invalid object, for use withing TaskResult::fromJson();
161 TaskResult();
162};
163
164
165} // NS DTO
166
167namespace Support {
168
170
171template <>
172TaskResult fromJsonValue(const QJsonValue &source, convertType<TaskResult>);
173
174template<>
175QJsonValue toJsonValue(const TaskResult &source, convertType<TaskResult>);
176
177} // NS DTO
178} // NS Jellyfin
179
180#endif // JELLYFIN_DTO_TASKRESULT_H
Value
Definition taskcompletionstatus.h:49
Definition taskresult.h:50
static TaskResult fromJson(QJsonObject source)
Definition taskresult.cpp:70
QDateTime startTimeUtc() const
Gets or sets the start time UTC.
Definition taskresult.cpp:123
QJsonObject toJson() const
Definition taskresult.cpp:89
bool keyNull() const
Definition taskresult.cpp:159
TaskCompletionStatus status() const
Definition taskresult.cpp:135
TaskCompletionStatus m_status
Definition taskresult.h:152
void setJellyfinIdNull()
Definition taskresult.cpp:176
void setErrorMessageNull()
Definition taskresult.cpp:189
bool jellyfinIdNull() const
Definition taskresult.cpp:172
QString errorMessage() const
Gets or sets the error message.
Definition taskresult.cpp:180
QDateTime m_endTimeUtc
Definition taskresult.h:151
void setEndTimeUtc(QDateTime newEndTimeUtc)
Gets or sets the end time UTC.
Definition taskresult.cpp:131
QString longErrorMessage() const
Gets or sets the long error message.
Definition taskresult.cpp:193
void replaceData(TaskResult &other)
Definition taskresult.cpp:59
void setStartTimeUtc(QDateTime newStartTimeUtc)
Gets or sets the start time UTC.
Definition taskresult.cpp:125
void setLongErrorMessageNull()
Definition taskresult.cpp:202
void setJellyfinId(QString newJellyfinId)
Gets or sets the id.
Definition taskresult.cpp:169
QString m_longErrorMessage
Definition taskresult.h:157
QDateTime m_startTimeUtc
Definition taskresult.h:150
void setKey(QString newKey)
Gets or sets the key.
Definition taskresult.cpp:156
QString m_name
Definition taskresult.h:153
void setStatus(TaskCompletionStatus newStatus)
Definition taskresult.cpp:137
void setErrorMessage(QString newErrorMessage)
Gets or sets the error message.
Definition taskresult.cpp:182
void setLongErrorMessage(QString newLongErrorMessage)
Gets or sets the long error message.
Definition taskresult.cpp:195
QString m_jellyfinId
Definition taskresult.h:155
void setKeyNull()
Definition taskresult.cpp:163
QString name() const
Gets or sets the name.
Definition taskresult.cpp:141
void setNameNull()
Definition taskresult.cpp:150
QString m_key
Definition taskresult.h:154
QString jellyfinId() const
Gets or sets the id.
Definition taskresult.cpp:167
bool nameNull() const
Definition taskresult.cpp:146
QDateTime endTimeUtc() const
Gets or sets the end time UTC.
Definition taskresult.cpp:129
void setFromJson(QJsonObject source)
Definition taskresult.cpp:77
void setName(QString newName)
Gets or sets the name.
Definition taskresult.cpp:143
QString key() const
Gets or sets the key.
Definition taskresult.cpp:154
QString m_errorMessage
Definition taskresult.h:156
bool longErrorMessageNull() const
Definition taskresult.cpp:198
bool errorMessageNull() const
Definition taskresult.cpp:185
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