-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathOAICleanable_job_result.cpp
More file actions
280 lines (224 loc) · 7.29 KB
/
Copy pathOAICleanable_job_result.cpp
File metadata and controls
280 lines (224 loc) · 7.29 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
/**
* 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 "OAICleanable_job_result.h"
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QObject>
#include "OAIHelpers.h"
namespace OpenAPI {
OAICleanable_job_result::OAICleanable_job_result(QString json) {
this->initializeModel();
this->fromJson(json);
}
OAICleanable_job_result::OAICleanable_job_result() {
this->initializeModel();
}
OAICleanable_job_result::~OAICleanable_job_result() {}
void OAICleanable_job_result::initializeModel() {
m_filename_isSet = false;
m_filename_isValid = false;
m_length_isSet = false;
m_length_isValid = false;
m_r_namespace_isSet = false;
m_r_namespace_isValid = false;
m_token_isSet = false;
m_token_isValid = false;
m_type_isSet = false;
m_type_isValid = false;
m_upload_date_isSet = false;
m_upload_date_isValid = false;
m_user_isSet = false;
m_user_isValid = false;
}
void OAICleanable_job_result::fromJson(QString jsonString) {
QByteArray array(jsonString.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
}
void OAICleanable_job_result::fromJsonObject(QJsonObject json) {
m_filename_isValid = ::OpenAPI::fromJsonValue(m_filename, json[QString("filename")]);
m_filename_isSet = !json[QString("filename")].isNull() && m_filename_isValid;
m_length_isValid = ::OpenAPI::fromJsonValue(m_length, json[QString("length")]);
m_length_isSet = !json[QString("length")].isNull() && m_length_isValid;
m_r_namespace_isValid = ::OpenAPI::fromJsonValue(m_r_namespace, json[QString("namespace")]);
m_r_namespace_isSet = !json[QString("namespace")].isNull() && m_r_namespace_isValid;
m_token_isValid = ::OpenAPI::fromJsonValue(m_token, json[QString("token")]);
m_token_isSet = !json[QString("token")].isNull() && m_token_isValid;
m_type_isValid = ::OpenAPI::fromJsonValue(m_type, json[QString("type")]);
m_type_isSet = !json[QString("type")].isNull() && m_type_isValid;
m_upload_date_isValid = ::OpenAPI::fromJsonValue(m_upload_date, json[QString("upload_date")]);
m_upload_date_isSet = !json[QString("upload_date")].isNull() && m_upload_date_isValid;
m_user_isValid = ::OpenAPI::fromJsonValue(m_user, json[QString("user")]);
m_user_isSet = !json[QString("user")].isNull() && m_user_isValid;
}
QString OAICleanable_job_result::asJson() const {
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
QByteArray bytes = doc.toJson();
return QString(bytes);
}
QJsonObject OAICleanable_job_result::asJsonObject() const {
QJsonObject obj;
if (m_filename_isSet) {
obj.insert(QString("filename"), ::OpenAPI::toJsonValue(m_filename));
}
if (m_length_isSet) {
obj.insert(QString("length"), ::OpenAPI::toJsonValue(m_length));
}
if (m_r_namespace_isSet) {
obj.insert(QString("namespace"), ::OpenAPI::toJsonValue(m_r_namespace));
}
if (m_token_isSet) {
obj.insert(QString("token"), ::OpenAPI::toJsonValue(m_token));
}
if (m_type_isSet) {
obj.insert(QString("type"), ::OpenAPI::toJsonValue(m_type));
}
if (m_upload_date_isSet) {
obj.insert(QString("upload_date"), ::OpenAPI::toJsonValue(m_upload_date));
}
if (m_user.isSet()) {
obj.insert(QString("user"), ::OpenAPI::toJsonValue(m_user));
}
return obj;
}
QString OAICleanable_job_result::getFilename() const {
return m_filename;
}
void OAICleanable_job_result::setFilename(const QString &filename) {
m_filename = filename;
m_filename_isSet = true;
}
bool OAICleanable_job_result::is_filename_Set() const{
return m_filename_isSet;
}
bool OAICleanable_job_result::is_filename_Valid() const{
return m_filename_isValid;
}
qint32 OAICleanable_job_result::getLength() const {
return m_length;
}
void OAICleanable_job_result::setLength(const qint32 &length) {
m_length = length;
m_length_isSet = true;
}
bool OAICleanable_job_result::is_length_Set() const{
return m_length_isSet;
}
bool OAICleanable_job_result::is_length_Valid() const{
return m_length_isValid;
}
QString OAICleanable_job_result::getRNamespace() const {
return m_r_namespace;
}
void OAICleanable_job_result::setRNamespace(const QString &r_namespace) {
m_r_namespace = r_namespace;
m_r_namespace_isSet = true;
}
bool OAICleanable_job_result::is_r_namespace_Set() const{
return m_r_namespace_isSet;
}
bool OAICleanable_job_result::is_r_namespace_Valid() const{
return m_r_namespace_isValid;
}
QString OAICleanable_job_result::getToken() const {
return m_token;
}
void OAICleanable_job_result::setToken(const QString &token) {
m_token = token;
m_token_isSet = true;
}
bool OAICleanable_job_result::is_token_Set() const{
return m_token_isSet;
}
bool OAICleanable_job_result::is_token_Valid() const{
return m_token_isValid;
}
QString OAICleanable_job_result::getType() const {
return m_type;
}
void OAICleanable_job_result::setType(const QString &type) {
m_type = type;
m_type_isSet = true;
}
bool OAICleanable_job_result::is_type_Set() const{
return m_type_isSet;
}
bool OAICleanable_job_result::is_type_Valid() const{
return m_type_isValid;
}
QDateTime OAICleanable_job_result::getUploadDate() const {
return m_upload_date;
}
void OAICleanable_job_result::setUploadDate(const QDateTime &upload_date) {
m_upload_date = upload_date;
m_upload_date_isSet = true;
}
bool OAICleanable_job_result::is_upload_date_Set() const{
return m_upload_date_isSet;
}
bool OAICleanable_job_result::is_upload_date_Valid() const{
return m_upload_date_isValid;
}
OAIModel_user OAICleanable_job_result::getUser() const {
return m_user;
}
void OAICleanable_job_result::setUser(const OAIModel_user &user) {
m_user = user;
m_user_isSet = true;
}
bool OAICleanable_job_result::is_user_Set() const{
return m_user_isSet;
}
bool OAICleanable_job_result::is_user_Valid() const{
return m_user_isValid;
}
bool OAICleanable_job_result::isSet() const {
bool isObjectUpdated = false;
do {
if (m_filename_isSet) {
isObjectUpdated = true;
break;
}
if (m_length_isSet) {
isObjectUpdated = true;
break;
}
if (m_r_namespace_isSet) {
isObjectUpdated = true;
break;
}
if (m_token_isSet) {
isObjectUpdated = true;
break;
}
if (m_type_isSet) {
isObjectUpdated = true;
break;
}
if (m_upload_date_isSet) {
isObjectUpdated = true;
break;
}
if (m_user.isSet()) {
isObjectUpdated = true;
break;
}
} while (false);
return isObjectUpdated;
}
bool OAICleanable_job_result::isValid() const {
// only required properties are required for the object to be considered valid
return true;
}
} // namespace OpenAPI