-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathOAIInex.cpp
More file actions
160 lines (128 loc) · 3.83 KB
/
OAIInex.cpp
File metadata and controls
160 lines (128 loc) · 3.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/**
* GAMS Engine
* With GAMS Engine you can register and solve GAMS models. It has a namespace management system, so you can restrict your users to certain models.
*
* The version of the OpenAPI document: 26.01.08
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "OAIInex.h"
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QObject>
#include "OAIHelpers.h"
namespace OpenAPI {
OAIInex::OAIInex(QString json) {
this->initializeModel();
this->fromJson(json);
}
OAIInex::OAIInex() {
this->initializeModel();
}
OAIInex::~OAIInex() {}
void OAIInex::initializeModel() {
m_files_isSet = false;
m_files_isValid = false;
m_globbing_enabled_isSet = false;
m_globbing_enabled_isValid = false;
m_type_isSet = false;
m_type_isValid = false;
}
void OAIInex::fromJson(QString jsonString) {
QByteArray array(jsonString.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
}
void OAIInex::fromJsonObject(QJsonObject json) {
m_files_isValid = ::OpenAPI::fromJsonValue(m_files, json[QString("files")]);
m_files_isSet = !json[QString("files")].isNull() && m_files_isValid;
m_globbing_enabled_isValid = ::OpenAPI::fromJsonValue(m_globbing_enabled, json[QString("globbing_enabled")]);
m_globbing_enabled_isSet = !json[QString("globbing_enabled")].isNull() && m_globbing_enabled_isValid;
m_type_isValid = ::OpenAPI::fromJsonValue(m_type, json[QString("type")]);
m_type_isSet = !json[QString("type")].isNull() && m_type_isValid;
}
QString OAIInex::asJson() const {
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
QByteArray bytes = doc.toJson();
return QString(bytes);
}
QJsonObject OAIInex::asJsonObject() const {
QJsonObject obj;
if (m_files.size() > 0) {
obj.insert(QString("files"), ::OpenAPI::toJsonValue(m_files));
}
if (m_globbing_enabled_isSet) {
obj.insert(QString("globbing_enabled"), ::OpenAPI::toJsonValue(m_globbing_enabled));
}
if (m_type_isSet) {
obj.insert(QString("type"), ::OpenAPI::toJsonValue(m_type));
}
return obj;
}
QList<QString> OAIInex::getFiles() const {
return m_files;
}
void OAIInex::setFiles(const QList<QString> &files) {
m_files = files;
m_files_isSet = true;
}
bool OAIInex::is_files_Set() const{
return m_files_isSet;
}
bool OAIInex::is_files_Valid() const{
return m_files_isValid;
}
bool OAIInex::isGlobbingEnabled() const {
return m_globbing_enabled;
}
void OAIInex::setGlobbingEnabled(const bool &globbing_enabled) {
m_globbing_enabled = globbing_enabled;
m_globbing_enabled_isSet = true;
}
bool OAIInex::is_globbing_enabled_Set() const{
return m_globbing_enabled_isSet;
}
bool OAIInex::is_globbing_enabled_Valid() const{
return m_globbing_enabled_isValid;
}
QString OAIInex::getType() const {
return m_type;
}
void OAIInex::setType(const QString &type) {
m_type = type;
m_type_isSet = true;
}
bool OAIInex::is_type_Set() const{
return m_type_isSet;
}
bool OAIInex::is_type_Valid() const{
return m_type_isValid;
}
bool OAIInex::isSet() const {
bool isObjectUpdated = false;
do {
if (m_files.size() > 0) {
isObjectUpdated = true;
break;
}
if (m_globbing_enabled_isSet) {
isObjectUpdated = true;
break;
}
if (m_type_isSet) {
isObjectUpdated = true;
break;
}
} while (false);
return isObjectUpdated;
}
bool OAIInex::isValid() const {
// only required properties are required for the object to be considered valid
return true;
}
} // namespace OpenAPI