-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathOAIHypercube_page.cpp
More file actions
190 lines (152 loc) · 4.68 KB
/
OAIHypercube_page.cpp
File metadata and controls
190 lines (152 loc) · 4.68 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
/**
* 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: 25.04.23
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "OAIHypercube_page.h"
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QObject>
#include "OAIHelpers.h"
namespace OpenAPI {
OAIHypercube_page::OAIHypercube_page(QString json) {
this->initializeModel();
this->fromJson(json);
}
OAIHypercube_page::OAIHypercube_page() {
this->initializeModel();
}
OAIHypercube_page::~OAIHypercube_page() {}
void OAIHypercube_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 OAIHypercube_page::fromJson(QString jsonString) {
QByteArray array(jsonString.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
}
void OAIHypercube_page::fromJsonObject(QJsonObject json) {
m_count_isValid = ::OpenAPI::fromJsonValue(m_count, json[QString("count")]);
m_count_isSet = !json[QString("count")].isNull() && m_count_isValid;
m_next_isValid = ::OpenAPI::fromJsonValue(m_next, json[QString("next")]);
m_next_isSet = !json[QString("next")].isNull() && m_next_isValid;
m_previous_isValid = ::OpenAPI::fromJsonValue(m_previous, json[QString("previous")]);
m_previous_isSet = !json[QString("previous")].isNull() && m_previous_isValid;
m_results_isValid = ::OpenAPI::fromJsonValue(m_results, json[QString("results")]);
m_results_isSet = !json[QString("results")].isNull() && m_results_isValid;
}
QString OAIHypercube_page::asJson() const {
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
QByteArray bytes = doc.toJson();
return QString(bytes);
}
QJsonObject OAIHypercube_page::asJsonObject() const {
QJsonObject obj;
if (m_count_isSet) {
obj.insert(QString("count"), ::OpenAPI::toJsonValue(m_count));
}
if (m_next_isSet) {
obj.insert(QString("next"), ::OpenAPI::toJsonValue(m_next));
}
if (m_previous_isSet) {
obj.insert(QString("previous"), ::OpenAPI::toJsonValue(m_previous));
}
if (m_results.size() > 0) {
obj.insert(QString("results"), ::OpenAPI::toJsonValue(m_results));
}
return obj;
}
qint32 OAIHypercube_page::getCount() const {
return m_count;
}
void OAIHypercube_page::setCount(const qint32 &count) {
m_count = count;
m_count_isSet = true;
}
bool OAIHypercube_page::is_count_Set() const{
return m_count_isSet;
}
bool OAIHypercube_page::is_count_Valid() const{
return m_count_isValid;
}
QString OAIHypercube_page::getNext() const {
return m_next;
}
void OAIHypercube_page::setNext(const QString &next) {
m_next = next;
m_next_isSet = true;
}
bool OAIHypercube_page::is_next_Set() const{
return m_next_isSet;
}
bool OAIHypercube_page::is_next_Valid() const{
return m_next_isValid;
}
QString OAIHypercube_page::getPrevious() const {
return m_previous;
}
void OAIHypercube_page::setPrevious(const QString &previous) {
m_previous = previous;
m_previous_isSet = true;
}
bool OAIHypercube_page::is_previous_Set() const{
return m_previous_isSet;
}
bool OAIHypercube_page::is_previous_Valid() const{
return m_previous_isValid;
}
QList<OAIHypercube> OAIHypercube_page::getResults() const {
return m_results;
}
void OAIHypercube_page::setResults(const QList<OAIHypercube> &results) {
m_results = results;
m_results_isSet = true;
}
bool OAIHypercube_page::is_results_Set() const{
return m_results_isSet;
}
bool OAIHypercube_page::is_results_Valid() const{
return m_results_isValid;
}
bool OAIHypercube_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 (m_results.size() > 0) {
isObjectUpdated = true;
break;
}
} while (false);
return isObjectUpdated;
}
bool OAIHypercube_page::isValid() const {
// only required properties are required for the object to be considered valid
return true;
}
} // namespace OpenAPI