Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
logfile.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_LOGFILE_H
31#define JELLYFIN_DTO_LOGFILE_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 LogFile {
50public:
51 LogFile(
52 QDateTime dateCreated,
53 QDateTime dateModified,
54 qint64 size
55 );
56
57 LogFile(const LogFile &other);
58
62 void replaceData(LogFile &other);
63
64 static LogFile fromJson(QJsonObject source);
65 void setFromJson(QJsonObject source);
66 QJsonObject toJson() const;
67
68 // Properties
72 QDateTime dateCreated() const;
76 void setDateCreated(QDateTime newDateCreated);
77
81 QDateTime dateModified() const;
85 void setDateModified(QDateTime newDateModified);
86
90 qint64 size() const;
94 void setSize(qint64 newSize);
95
99 QString name() const;
103 void setName(QString newName);
104 bool nameNull() const;
105 void setNameNull();
106
107
108protected:
109 QDateTime m_dateCreated;
110 QDateTime m_dateModified;
111 qint64 m_size;
112 QString m_name;
113
114private:
115 // Private constructor which generates an invalid object, for use withing LogFile::fromJson();
116 LogFile();
117};
118
119
120} // NS DTO
121
122namespace Support {
123
125
126template <>
127LogFile fromJsonValue(const QJsonValue &source, convertType<LogFile>);
128
129template<>
130QJsonValue toJsonValue(const LogFile &source, convertType<LogFile>);
131
132} // NS DTO
133} // NS Jellyfin
134
135#endif // JELLYFIN_DTO_LOGFILE_H
Definition logfile.h:49
qint64 size() const
Gets or sets the size.
Definition logfile.cpp:103
void setDateCreated(QDateTime newDateCreated)
Gets or sets the date created.
Definition logfile.cpp:93
void setFromJson(QJsonObject source)
Definition logfile.cpp:69
QDateTime dateModified() const
Gets or sets the date modified.
Definition logfile.cpp:97
bool nameNull() const
Definition logfile.cpp:114
QString name() const
Gets or sets the name.
Definition logfile.cpp:109
QDateTime dateCreated() const
Gets or sets the date created.
Definition logfile.cpp:91
void setName(QString newName)
Gets or sets the name.
Definition logfile.cpp:111
void setSize(qint64 newSize)
Gets or sets the size.
Definition logfile.cpp:105
void setDateModified(QDateTime newDateModified)
Gets or sets the date modified.
Definition logfile.cpp:99
qint64 m_size
Definition logfile.h:111
QDateTime m_dateModified
Definition logfile.h:110
void setNameNull()
Definition logfile.cpp:118
QDateTime m_dateCreated
Definition logfile.h:109
QString m_name
Definition logfile.h:112
static LogFile fromJson(QJsonObject source)
Definition logfile.cpp:62
QJsonObject toJson() const
Definition logfile.cpp:77
void replaceData(LogFile &other)
Definition logfile.cpp:55
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