-
Notifications
You must be signed in to change notification settings - Fork 5
/
OAIJob_no_text_entry.cpp
490 lines (392 loc) · 13.7 KB
/
OAIJob_no_text_entry.cpp
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
/**
* 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: latest
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "OAIJob_no_text_entry.h"
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QObject>
#include "OAIHelpers.h"
namespace OpenAPI {
OAIJob_no_text_entry::OAIJob_no_text_entry(QString json) {
this->initializeModel();
this->fromJson(json);
}
OAIJob_no_text_entry::OAIJob_no_text_entry() {
this->initializeModel();
}
OAIJob_no_text_entry::~OAIJob_no_text_entry() {}
void OAIJob_no_text_entry::initializeModel() {
m_arguments_isSet = false;
m_arguments_isValid = false;
m_finished_at_isSet = false;
m_finished_at_isValid = false;
m_is_data_provided_isSet = false;
m_is_data_provided_isValid = false;
m_is_temporary_model_isSet = false;
m_is_temporary_model_isValid = false;
m_model_isSet = false;
m_model_isValid = false;
m_r_namespace_isSet = false;
m_r_namespace_isValid = false;
m_process_status_isSet = false;
m_process_status_isValid = false;
m_status_isSet = false;
m_status_isValid = false;
m_stdout_filename_isSet = false;
m_stdout_filename_isValid = false;
m_stream_entries_isSet = false;
m_stream_entries_isValid = false;
m_submitted_at_isSet = false;
m_submitted_at_isValid = false;
m_tag_isSet = false;
m_tag_isValid = false;
m_token_isSet = false;
m_token_isValid = false;
m_user_isSet = false;
m_user_isValid = false;
}
void OAIJob_no_text_entry::fromJson(QString jsonString) {
QByteArray array(jsonString.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
}
void OAIJob_no_text_entry::fromJsonObject(QJsonObject json) {
m_arguments_isValid = ::OpenAPI::fromJsonValue(arguments, json[QString("arguments")]);
m_arguments_isSet = !json[QString("arguments")].isNull() && m_arguments_isValid;
m_finished_at_isValid = ::OpenAPI::fromJsonValue(finished_at, json[QString("finished_at")]);
m_finished_at_isSet = !json[QString("finished_at")].isNull() && m_finished_at_isValid;
m_is_data_provided_isValid = ::OpenAPI::fromJsonValue(is_data_provided, json[QString("is_data_provided")]);
m_is_data_provided_isSet = !json[QString("is_data_provided")].isNull() && m_is_data_provided_isValid;
m_is_temporary_model_isValid = ::OpenAPI::fromJsonValue(is_temporary_model, json[QString("is_temporary_model")]);
m_is_temporary_model_isSet = !json[QString("is_temporary_model")].isNull() && m_is_temporary_model_isValid;
m_model_isValid = ::OpenAPI::fromJsonValue(model, json[QString("model")]);
m_model_isSet = !json[QString("model")].isNull() && m_model_isValid;
m_r_namespace_isValid = ::OpenAPI::fromJsonValue(r_namespace, json[QString("namespace")]);
m_r_namespace_isSet = !json[QString("namespace")].isNull() && m_r_namespace_isValid;
m_process_status_isValid = ::OpenAPI::fromJsonValue(process_status, json[QString("process_status")]);
m_process_status_isSet = !json[QString("process_status")].isNull() && m_process_status_isValid;
m_status_isValid = ::OpenAPI::fromJsonValue(status, json[QString("status")]);
m_status_isSet = !json[QString("status")].isNull() && m_status_isValid;
m_stdout_filename_isValid = ::OpenAPI::fromJsonValue(stdout_filename, json[QString("stdout_filename")]);
m_stdout_filename_isSet = !json[QString("stdout_filename")].isNull() && m_stdout_filename_isValid;
m_stream_entries_isValid = ::OpenAPI::fromJsonValue(stream_entries, json[QString("stream_entries")]);
m_stream_entries_isSet = !json[QString("stream_entries")].isNull() && m_stream_entries_isValid;
m_submitted_at_isValid = ::OpenAPI::fromJsonValue(submitted_at, json[QString("submitted_at")]);
m_submitted_at_isSet = !json[QString("submitted_at")].isNull() && m_submitted_at_isValid;
m_tag_isValid = ::OpenAPI::fromJsonValue(tag, json[QString("tag")]);
m_tag_isSet = !json[QString("tag")].isNull() && m_tag_isValid;
m_token_isValid = ::OpenAPI::fromJsonValue(token, json[QString("token")]);
m_token_isSet = !json[QString("token")].isNull() && m_token_isValid;
m_user_isValid = ::OpenAPI::fromJsonValue(user, json[QString("user")]);
m_user_isSet = !json[QString("user")].isNull() && m_user_isValid;
}
QString OAIJob_no_text_entry::asJson() const {
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
QByteArray bytes = doc.toJson();
return QString(bytes);
}
QJsonObject OAIJob_no_text_entry::asJsonObject() const {
QJsonObject obj;
if (arguments.size() > 0) {
obj.insert(QString("arguments"), ::OpenAPI::toJsonValue(arguments));
}
if (m_finished_at_isSet) {
obj.insert(QString("finished_at"), ::OpenAPI::toJsonValue(finished_at));
}
if (m_is_data_provided_isSet) {
obj.insert(QString("is_data_provided"), ::OpenAPI::toJsonValue(is_data_provided));
}
if (m_is_temporary_model_isSet) {
obj.insert(QString("is_temporary_model"), ::OpenAPI::toJsonValue(is_temporary_model));
}
if (m_model_isSet) {
obj.insert(QString("model"), ::OpenAPI::toJsonValue(model));
}
if (m_r_namespace_isSet) {
obj.insert(QString("namespace"), ::OpenAPI::toJsonValue(r_namespace));
}
if (m_process_status_isSet) {
obj.insert(QString("process_status"), ::OpenAPI::toJsonValue(process_status));
}
if (m_status_isSet) {
obj.insert(QString("status"), ::OpenAPI::toJsonValue(status));
}
if (m_stdout_filename_isSet) {
obj.insert(QString("stdout_filename"), ::OpenAPI::toJsonValue(stdout_filename));
}
if (stream_entries.size() > 0) {
obj.insert(QString("stream_entries"), ::OpenAPI::toJsonValue(stream_entries));
}
if (m_submitted_at_isSet) {
obj.insert(QString("submitted_at"), ::OpenAPI::toJsonValue(submitted_at));
}
if (m_tag_isSet) {
obj.insert(QString("tag"), ::OpenAPI::toJsonValue(tag));
}
if (m_token_isSet) {
obj.insert(QString("token"), ::OpenAPI::toJsonValue(token));
}
if (user.isSet()) {
obj.insert(QString("user"), ::OpenAPI::toJsonValue(user));
}
return obj;
}
QList<QString> OAIJob_no_text_entry::getArguments() const {
return arguments;
}
void OAIJob_no_text_entry::setArguments(const QList<QString> &arguments) {
this->arguments = arguments;
this->m_arguments_isSet = true;
}
bool OAIJob_no_text_entry::is_arguments_Set() const{
return m_arguments_isSet;
}
bool OAIJob_no_text_entry::is_arguments_Valid() const{
return m_arguments_isValid;
}
QDateTime OAIJob_no_text_entry::getFinishedAt() const {
return finished_at;
}
void OAIJob_no_text_entry::setFinishedAt(const QDateTime &finished_at) {
this->finished_at = finished_at;
this->m_finished_at_isSet = true;
}
bool OAIJob_no_text_entry::is_finished_at_Set() const{
return m_finished_at_isSet;
}
bool OAIJob_no_text_entry::is_finished_at_Valid() const{
return m_finished_at_isValid;
}
bool OAIJob_no_text_entry::isIsDataProvided() const {
return is_data_provided;
}
void OAIJob_no_text_entry::setIsDataProvided(const bool &is_data_provided) {
this->is_data_provided = is_data_provided;
this->m_is_data_provided_isSet = true;
}
bool OAIJob_no_text_entry::is_is_data_provided_Set() const{
return m_is_data_provided_isSet;
}
bool OAIJob_no_text_entry::is_is_data_provided_Valid() const{
return m_is_data_provided_isValid;
}
bool OAIJob_no_text_entry::isIsTemporaryModel() const {
return is_temporary_model;
}
void OAIJob_no_text_entry::setIsTemporaryModel(const bool &is_temporary_model) {
this->is_temporary_model = is_temporary_model;
this->m_is_temporary_model_isSet = true;
}
bool OAIJob_no_text_entry::is_is_temporary_model_Set() const{
return m_is_temporary_model_isSet;
}
bool OAIJob_no_text_entry::is_is_temporary_model_Valid() const{
return m_is_temporary_model_isValid;
}
QString OAIJob_no_text_entry::getModel() const {
return model;
}
void OAIJob_no_text_entry::setModel(const QString &model) {
this->model = model;
this->m_model_isSet = true;
}
bool OAIJob_no_text_entry::is_model_Set() const{
return m_model_isSet;
}
bool OAIJob_no_text_entry::is_model_Valid() const{
return m_model_isValid;
}
QString OAIJob_no_text_entry::getRNamespace() const {
return r_namespace;
}
void OAIJob_no_text_entry::setRNamespace(const QString &r_namespace) {
this->r_namespace = r_namespace;
this->m_r_namespace_isSet = true;
}
bool OAIJob_no_text_entry::is_r_namespace_Set() const{
return m_r_namespace_isSet;
}
bool OAIJob_no_text_entry::is_r_namespace_Valid() const{
return m_r_namespace_isValid;
}
qint32 OAIJob_no_text_entry::getProcessStatus() const {
return process_status;
}
void OAIJob_no_text_entry::setProcessStatus(const qint32 &process_status) {
this->process_status = process_status;
this->m_process_status_isSet = true;
}
bool OAIJob_no_text_entry::is_process_status_Set() const{
return m_process_status_isSet;
}
bool OAIJob_no_text_entry::is_process_status_Valid() const{
return m_process_status_isValid;
}
qint32 OAIJob_no_text_entry::getStatus() const {
return status;
}
void OAIJob_no_text_entry::setStatus(const qint32 &status) {
this->status = status;
this->m_status_isSet = true;
}
bool OAIJob_no_text_entry::is_status_Set() const{
return m_status_isSet;
}
bool OAIJob_no_text_entry::is_status_Valid() const{
return m_status_isValid;
}
QString OAIJob_no_text_entry::getStdoutFilename() const {
return stdout_filename;
}
void OAIJob_no_text_entry::setStdoutFilename(const QString &stdout_filename) {
this->stdout_filename = stdout_filename;
this->m_stdout_filename_isSet = true;
}
bool OAIJob_no_text_entry::is_stdout_filename_Set() const{
return m_stdout_filename_isSet;
}
bool OAIJob_no_text_entry::is_stdout_filename_Valid() const{
return m_stdout_filename_isValid;
}
QList<QString> OAIJob_no_text_entry::getStreamEntries() const {
return stream_entries;
}
void OAIJob_no_text_entry::setStreamEntries(const QList<QString> &stream_entries) {
this->stream_entries = stream_entries;
this->m_stream_entries_isSet = true;
}
bool OAIJob_no_text_entry::is_stream_entries_Set() const{
return m_stream_entries_isSet;
}
bool OAIJob_no_text_entry::is_stream_entries_Valid() const{
return m_stream_entries_isValid;
}
QDateTime OAIJob_no_text_entry::getSubmittedAt() const {
return submitted_at;
}
void OAIJob_no_text_entry::setSubmittedAt(const QDateTime &submitted_at) {
this->submitted_at = submitted_at;
this->m_submitted_at_isSet = true;
}
bool OAIJob_no_text_entry::is_submitted_at_Set() const{
return m_submitted_at_isSet;
}
bool OAIJob_no_text_entry::is_submitted_at_Valid() const{
return m_submitted_at_isValid;
}
QString OAIJob_no_text_entry::getTag() const {
return tag;
}
void OAIJob_no_text_entry::setTag(const QString &tag) {
this->tag = tag;
this->m_tag_isSet = true;
}
bool OAIJob_no_text_entry::is_tag_Set() const{
return m_tag_isSet;
}
bool OAIJob_no_text_entry::is_tag_Valid() const{
return m_tag_isValid;
}
QString OAIJob_no_text_entry::getToken() const {
return token;
}
void OAIJob_no_text_entry::setToken(const QString &token) {
this->token = token;
this->m_token_isSet = true;
}
bool OAIJob_no_text_entry::is_token_Set() const{
return m_token_isSet;
}
bool OAIJob_no_text_entry::is_token_Valid() const{
return m_token_isValid;
}
OAIModel_user OAIJob_no_text_entry::getUser() const {
return user;
}
void OAIJob_no_text_entry::setUser(const OAIModel_user &user) {
this->user = user;
this->m_user_isSet = true;
}
bool OAIJob_no_text_entry::is_user_Set() const{
return m_user_isSet;
}
bool OAIJob_no_text_entry::is_user_Valid() const{
return m_user_isValid;
}
bool OAIJob_no_text_entry::isSet() const {
bool isObjectUpdated = false;
do {
if (arguments.size() > 0) {
isObjectUpdated = true;
break;
}
if (m_finished_at_isSet) {
isObjectUpdated = true;
break;
}
if (m_is_data_provided_isSet) {
isObjectUpdated = true;
break;
}
if (m_is_temporary_model_isSet) {
isObjectUpdated = true;
break;
}
if (m_model_isSet) {
isObjectUpdated = true;
break;
}
if (m_r_namespace_isSet) {
isObjectUpdated = true;
break;
}
if (m_process_status_isSet) {
isObjectUpdated = true;
break;
}
if (m_status_isSet) {
isObjectUpdated = true;
break;
}
if (m_stdout_filename_isSet) {
isObjectUpdated = true;
break;
}
if (stream_entries.size() > 0) {
isObjectUpdated = true;
break;
}
if (m_submitted_at_isSet) {
isObjectUpdated = true;
break;
}
if (m_tag_isSet) {
isObjectUpdated = true;
break;
}
if (m_token_isSet) {
isObjectUpdated = true;
break;
}
if (user.isSet()) {
isObjectUpdated = true;
break;
}
} while (false);
return isObjectUpdated;
}
bool OAIJob_no_text_entry::isValid() const {
// only required properties are required for the object to be considered valid
return true;
}
} // namespace OpenAPI