-
Notifications
You must be signed in to change notification settings - Fork 5
/
OAIModel_auth_token.cpp
100 lines (80 loc) · 2.44 KB
/
OAIModel_auth_token.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
/**
* 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 "OAIModel_auth_token.h"
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QObject>
#include "OAIHelpers.h"
namespace OpenAPI {
OAIModel_auth_token::OAIModel_auth_token(QString json) {
this->initializeModel();
this->fromJson(json);
}
OAIModel_auth_token::OAIModel_auth_token() {
this->initializeModel();
}
OAIModel_auth_token::~OAIModel_auth_token() {}
void OAIModel_auth_token::initializeModel() {
m_token_isSet = false;
m_token_isValid = false;
}
void OAIModel_auth_token::fromJson(QString jsonString) {
QByteArray array(jsonString.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
}
void OAIModel_auth_token::fromJsonObject(QJsonObject json) {
m_token_isValid = ::OpenAPI::fromJsonValue(token, json[QString("token")]);
m_token_isSet = !json[QString("token")].isNull() && m_token_isValid;
}
QString OAIModel_auth_token::asJson() const {
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
QByteArray bytes = doc.toJson();
return QString(bytes);
}
QJsonObject OAIModel_auth_token::asJsonObject() const {
QJsonObject obj;
if (m_token_isSet) {
obj.insert(QString("token"), ::OpenAPI::toJsonValue(token));
}
return obj;
}
QString OAIModel_auth_token::getToken() const {
return token;
}
void OAIModel_auth_token::setToken(const QString &token) {
this->token = token;
this->m_token_isSet = true;
}
bool OAIModel_auth_token::is_token_Set() const{
return m_token_isSet;
}
bool OAIModel_auth_token::is_token_Valid() const{
return m_token_isValid;
}
bool OAIModel_auth_token::isSet() const {
bool isObjectUpdated = false;
do {
if (m_token_isSet) {
isObjectUpdated = true;
break;
}
} while (false);
return isObjectUpdated;
}
bool OAIModel_auth_token::isValid() const {
// only required properties are required for the object to be considered valid
return true;
}
} // namespace OpenAPI