Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
profilecondition.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_PROFILECONDITION_H
31#define JELLYFIN_DTO_PROFILECONDITION_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QString>
36#include <optional>
37
41
42namespace Jellyfin {
43// Forward declaration
44class ApiClient;
45}
46namespace Jellyfin {
47namespace DTO {
48
49
51public:
55 bool isRequired
56 );
57
59
63 void replaceData(ProfileCondition &other);
64
65 static ProfileCondition fromJson(QJsonObject source);
66 void setFromJson(QJsonObject source);
67 QJsonObject toJson() const;
68
69 // Properties
70
72
73 void setCondition(ProfileConditionType newCondition);
74
75
77
78 void setProperty(ProfileConditionValue newProperty);
79
80
81 QString value() const;
82
83 void setValue(QString newValue);
84 bool valueNull() const;
85 void setValueNull();
86
87
88 bool isRequired() const;
89
90 void setIsRequired(bool newIsRequired);
91
92
93protected:
96 QString m_value;
98
99private:
100 // Private constructor which generates an invalid object, for use withing ProfileCondition::fromJson();
102};
103
104
105} // NS DTO
106
107namespace Support {
108
110
111template <>
113
114template<>
116
117} // NS DTO
118} // NS Jellyfin
119
120#endif // JELLYFIN_DTO_PROFILECONDITION_H
Value
Definition profileconditiontype.h:49
Value
Definition profileconditionvalue.h:49
Definition profilecondition.h:50
void setProperty(ProfileConditionValue newProperty)
Definition profilecondition.cpp:99
void setIsRequired(bool newIsRequired)
Definition profilecondition.cpp:118
void setValueNull()
Definition profilecondition.cpp:112
bool m_isRequired
Definition profilecondition.h:97
bool isRequired() const
Definition profilecondition.cpp:116
ProfileConditionType condition() const
Definition profilecondition.cpp:91
void setFromJson(QJsonObject source)
Definition profilecondition.cpp:69
QString m_value
Definition profilecondition.h:96
bool valueNull() const
Definition profilecondition.cpp:108
ProfileConditionValue m_property
Definition profilecondition.h:95
ProfileConditionValue property() const
Definition profilecondition.cpp:97
QJsonObject toJson() const
Definition profilecondition.cpp:77
ProfileConditionType m_condition
Definition profilecondition.h:94
static ProfileCondition fromJson(QJsonObject source)
Definition profilecondition.cpp:62
QString value() const
Definition profilecondition.cpp:103
void setCondition(ProfileConditionType newCondition)
Definition profilecondition.cpp:93
void setValue(QString newValue)
Definition profilecondition.cpp:105
void replaceData(ProfileCondition &other)
Definition profilecondition.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