-
Notifications
You must be signed in to change notification settings - Fork 5
/
OAIEngine_license.cpp
160 lines (128 loc) · 4.08 KB
/
OAIEngine_license.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
/**
* 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 "OAIEngine_license.h"
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QObject>
#include "OAIHelpers.h"
namespace OpenAPI {
OAIEngine_license::OAIEngine_license(QString json) {
this->initializeModel();
this->fromJson(json);
}
OAIEngine_license::OAIEngine_license() {
this->initializeModel();
}
OAIEngine_license::~OAIEngine_license() {}
void OAIEngine_license::initializeModel() {
m_expiration_date_isSet = false;
m_expiration_date_isValid = false;
m_license_isSet = false;
m_license_isValid = false;
m_usi_isSet = false;
m_usi_isValid = false;
}
void OAIEngine_license::fromJson(QString jsonString) {
QByteArray array(jsonString.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
}
void OAIEngine_license::fromJsonObject(QJsonObject json) {
m_expiration_date_isValid = ::OpenAPI::fromJsonValue(expiration_date, json[QString("expiration_date")]);
m_expiration_date_isSet = !json[QString("expiration_date")].isNull() && m_expiration_date_isValid;
m_license_isValid = ::OpenAPI::fromJsonValue(license, json[QString("license")]);
m_license_isSet = !json[QString("license")].isNull() && m_license_isValid;
m_usi_isValid = ::OpenAPI::fromJsonValue(usi, json[QString("usi")]);
m_usi_isSet = !json[QString("usi")].isNull() && m_usi_isValid;
}
QString OAIEngine_license::asJson() const {
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
QByteArray bytes = doc.toJson();
return QString(bytes);
}
QJsonObject OAIEngine_license::asJsonObject() const {
QJsonObject obj;
if (m_expiration_date_isSet) {
obj.insert(QString("expiration_date"), ::OpenAPI::toJsonValue(expiration_date));
}
if (m_license_isSet) {
obj.insert(QString("license"), ::OpenAPI::toJsonValue(license));
}
if (m_usi_isSet) {
obj.insert(QString("usi"), ::OpenAPI::toJsonValue(usi));
}
return obj;
}
QDateTime OAIEngine_license::getExpirationDate() const {
return expiration_date;
}
void OAIEngine_license::setExpirationDate(const QDateTime &expiration_date) {
this->expiration_date = expiration_date;
this->m_expiration_date_isSet = true;
}
bool OAIEngine_license::is_expiration_date_Set() const{
return m_expiration_date_isSet;
}
bool OAIEngine_license::is_expiration_date_Valid() const{
return m_expiration_date_isValid;
}
QString OAIEngine_license::getLicense() const {
return license;
}
void OAIEngine_license::setLicense(const QString &license) {
this->license = license;
this->m_license_isSet = true;
}
bool OAIEngine_license::is_license_Set() const{
return m_license_isSet;
}
bool OAIEngine_license::is_license_Valid() const{
return m_license_isValid;
}
QString OAIEngine_license::getUsi() const {
return usi;
}
void OAIEngine_license::setUsi(const QString &usi) {
this->usi = usi;
this->m_usi_isSet = true;
}
bool OAIEngine_license::is_usi_Set() const{
return m_usi_isSet;
}
bool OAIEngine_license::is_usi_Valid() const{
return m_usi_isValid;
}
bool OAIEngine_license::isSet() const {
bool isObjectUpdated = false;
do {
if (m_expiration_date_isSet) {
isObjectUpdated = true;
break;
}
if (m_license_isSet) {
isObjectUpdated = true;
break;
}
if (m_usi_isSet) {
isObjectUpdated = true;
break;
}
} while (false);
return isObjectUpdated;
}
bool OAIEngine_license::isValid() const {
// only required properties are required for the object to be considered valid
return true;
}
} // namespace OpenAPI