-
Notifications
You must be signed in to change notification settings - Fork 5
/
OAIJob_no_text_entry_page.cpp
190 lines (152 loc) · 4.94 KB
/
OAIJob_no_text_entry_page.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
/**
* 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_page.h"
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QObject>
#include "OAIHelpers.h"
namespace OpenAPI {
OAIJob_no_text_entry_page::OAIJob_no_text_entry_page(QString json) {
this->initializeModel();
this->fromJson(json);
}
OAIJob_no_text_entry_page::OAIJob_no_text_entry_page() {
this->initializeModel();
}
OAIJob_no_text_entry_page::~OAIJob_no_text_entry_page() {}
void OAIJob_no_text_entry_page::initializeModel() {
m_count_isSet = false;
m_count_isValid = false;
m_next_isSet = false;
m_next_isValid = false;
m_previous_isSet = false;
m_previous_isValid = false;
m_results_isSet = false;
m_results_isValid = false;
}
void OAIJob_no_text_entry_page::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_page::fromJsonObject(QJsonObject json) {
m_count_isValid = ::OpenAPI::fromJsonValue(count, json[QString("count")]);
m_count_isSet = !json[QString("count")].isNull() && m_count_isValid;
m_next_isValid = ::OpenAPI::fromJsonValue(next, json[QString("next")]);
m_next_isSet = !json[QString("next")].isNull() && m_next_isValid;
m_previous_isValid = ::OpenAPI::fromJsonValue(previous, json[QString("previous")]);
m_previous_isSet = !json[QString("previous")].isNull() && m_previous_isValid;
m_results_isValid = ::OpenAPI::fromJsonValue(results, json[QString("results")]);
m_results_isSet = !json[QString("results")].isNull() && m_results_isValid;
}
QString OAIJob_no_text_entry_page::asJson() const {
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
QByteArray bytes = doc.toJson();
return QString(bytes);
}
QJsonObject OAIJob_no_text_entry_page::asJsonObject() const {
QJsonObject obj;
if (m_count_isSet) {
obj.insert(QString("count"), ::OpenAPI::toJsonValue(count));
}
if (m_next_isSet) {
obj.insert(QString("next"), ::OpenAPI::toJsonValue(next));
}
if (m_previous_isSet) {
obj.insert(QString("previous"), ::OpenAPI::toJsonValue(previous));
}
if (results.size() > 0) {
obj.insert(QString("results"), ::OpenAPI::toJsonValue(results));
}
return obj;
}
qint32 OAIJob_no_text_entry_page::getCount() const {
return count;
}
void OAIJob_no_text_entry_page::setCount(const qint32 &count) {
this->count = count;
this->m_count_isSet = true;
}
bool OAIJob_no_text_entry_page::is_count_Set() const{
return m_count_isSet;
}
bool OAIJob_no_text_entry_page::is_count_Valid() const{
return m_count_isValid;
}
QString OAIJob_no_text_entry_page::getNext() const {
return next;
}
void OAIJob_no_text_entry_page::setNext(const QString &next) {
this->next = next;
this->m_next_isSet = true;
}
bool OAIJob_no_text_entry_page::is_next_Set() const{
return m_next_isSet;
}
bool OAIJob_no_text_entry_page::is_next_Valid() const{
return m_next_isValid;
}
QString OAIJob_no_text_entry_page::getPrevious() const {
return previous;
}
void OAIJob_no_text_entry_page::setPrevious(const QString &previous) {
this->previous = previous;
this->m_previous_isSet = true;
}
bool OAIJob_no_text_entry_page::is_previous_Set() const{
return m_previous_isSet;
}
bool OAIJob_no_text_entry_page::is_previous_Valid() const{
return m_previous_isValid;
}
QList<OAIJob_no_text_entry> OAIJob_no_text_entry_page::getResults() const {
return results;
}
void OAIJob_no_text_entry_page::setResults(const QList<OAIJob_no_text_entry> &results) {
this->results = results;
this->m_results_isSet = true;
}
bool OAIJob_no_text_entry_page::is_results_Set() const{
return m_results_isSet;
}
bool OAIJob_no_text_entry_page::is_results_Valid() const{
return m_results_isValid;
}
bool OAIJob_no_text_entry_page::isSet() const {
bool isObjectUpdated = false;
do {
if (m_count_isSet) {
isObjectUpdated = true;
break;
}
if (m_next_isSet) {
isObjectUpdated = true;
break;
}
if (m_previous_isSet) {
isObjectUpdated = true;
break;
}
if (results.size() > 0) {
isObjectUpdated = true;
break;
}
} while (false);
return isObjectUpdated;
}
bool OAIJob_no_text_entry_page::isValid() const {
// only required properties are required for the object to be considered valid
return true;
}
} // namespace OpenAPI