-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathOAIHypercube_token.cpp
More file actions
130 lines (104 loc) · 3.57 KB
/
OAIHypercube_token.cpp
File metadata and controls
130 lines (104 loc) · 3.57 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
/**
* 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_token.h"
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QObject>
#include "OAIHelpers.h"
namespace OpenAPI {
OAIHypercube_token::OAIHypercube_token(QString json) {
this->initializeModel();
this->fromJson(json);
}
OAIHypercube_token::OAIHypercube_token() {
this->initializeModel();
}
OAIHypercube_token::~OAIHypercube_token() {}
void OAIHypercube_token::initializeModel() {
m_hypercube_token_isSet = false;
m_hypercube_token_isValid = false;
m_quota_warning_isSet = false;
m_quota_warning_isValid = false;
}
void OAIHypercube_token::fromJson(QString jsonString) {
QByteArray array(jsonString.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
}
void OAIHypercube_token::fromJsonObject(QJsonObject json) {
m_hypercube_token_isValid = ::OpenAPI::fromJsonValue(m_hypercube_token, json[QString("hypercube_token")]);
m_hypercube_token_isSet = !json[QString("hypercube_token")].isNull() && m_hypercube_token_isValid;
m_quota_warning_isValid = ::OpenAPI::fromJsonValue(m_quota_warning, json[QString("quota_warning")]);
m_quota_warning_isSet = !json[QString("quota_warning")].isNull() && m_quota_warning_isValid;
}
QString OAIHypercube_token::asJson() const {
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
QByteArray bytes = doc.toJson();
return QString(bytes);
}
QJsonObject OAIHypercube_token::asJsonObject() const {
QJsonObject obj;
if (m_hypercube_token_isSet) {
obj.insert(QString("hypercube_token"), ::OpenAPI::toJsonValue(m_hypercube_token));
}
if (m_quota_warning.size() > 0) {
obj.insert(QString("quota_warning"), ::OpenAPI::toJsonValue(m_quota_warning));
}
return obj;
}
QString OAIHypercube_token::getHypercubeToken() const {
return m_hypercube_token;
}
void OAIHypercube_token::setHypercubeToken(const QString &hypercube_token) {
m_hypercube_token = hypercube_token;
m_hypercube_token_isSet = true;
}
bool OAIHypercube_token::is_hypercube_token_Set() const{
return m_hypercube_token_isSet;
}
bool OAIHypercube_token::is_hypercube_token_Valid() const{
return m_hypercube_token_isValid;
}
QList<OAIQuota> OAIHypercube_token::getQuotaWarning() const {
return m_quota_warning;
}
void OAIHypercube_token::setQuotaWarning(const QList<OAIQuota> "a_warning) {
m_quota_warning = quota_warning;
m_quota_warning_isSet = true;
}
bool OAIHypercube_token::is_quota_warning_Set() const{
return m_quota_warning_isSet;
}
bool OAIHypercube_token::is_quota_warning_Valid() const{
return m_quota_warning_isValid;
}
bool OAIHypercube_token::isSet() const {
bool isObjectUpdated = false;
do {
if (m_hypercube_token_isSet) {
isObjectUpdated = true;
break;
}
if (m_quota_warning.size() > 0) {
isObjectUpdated = true;
break;
}
} while (false);
return isObjectUpdated;
}
bool OAIHypercube_token::isValid() const {
// only required properties are required for the object to be considered valid
return true;
}
} // namespace OpenAPI