-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathOAIIdentity_provider.cpp
More file actions
280 lines (224 loc) · 7.79 KB
/
OAIIdentity_provider.cpp
File metadata and controls
280 lines (224 loc) · 7.79 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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
/**
* 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: 26.01.08
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "OAIIdentity_provider.h"
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QObject>
#include "OAIHelpers.h"
namespace OpenAPI {
OAIIdentity_provider::OAIIdentity_provider(QString json) {
this->initializeModel();
this->fromJson(json);
}
OAIIdentity_provider::OAIIdentity_provider() {
this->initializeModel();
}
OAIIdentity_provider::~OAIIdentity_provider() {}
void OAIIdentity_provider::initializeModel() {
m_hidden_isSet = false;
m_hidden_isValid = false;
m_is_ldap_identity_provider_isSet = false;
m_is_ldap_identity_provider_isValid = false;
m_is_main_identity_provider_isSet = false;
m_is_main_identity_provider_isValid = false;
m_label_isSet = false;
m_label_isValid = false;
m_name_isSet = false;
m_name_isValid = false;
m_oauth2_isSet = false;
m_oauth2_isValid = false;
m_oidc_isSet = false;
m_oidc_isValid = false;
}
void OAIIdentity_provider::fromJson(QString jsonString) {
QByteArray array(jsonString.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
}
void OAIIdentity_provider::fromJsonObject(QJsonObject json) {
m_hidden_isValid = ::OpenAPI::fromJsonValue(m_hidden, json[QString("hidden")]);
m_hidden_isSet = !json[QString("hidden")].isNull() && m_hidden_isValid;
m_is_ldap_identity_provider_isValid = ::OpenAPI::fromJsonValue(m_is_ldap_identity_provider, json[QString("is_ldap_identity_provider")]);
m_is_ldap_identity_provider_isSet = !json[QString("is_ldap_identity_provider")].isNull() && m_is_ldap_identity_provider_isValid;
m_is_main_identity_provider_isValid = ::OpenAPI::fromJsonValue(m_is_main_identity_provider, json[QString("is_main_identity_provider")]);
m_is_main_identity_provider_isSet = !json[QString("is_main_identity_provider")].isNull() && m_is_main_identity_provider_isValid;
m_label_isValid = ::OpenAPI::fromJsonValue(m_label, json[QString("label")]);
m_label_isSet = !json[QString("label")].isNull() && m_label_isValid;
m_name_isValid = ::OpenAPI::fromJsonValue(m_name, json[QString("name")]);
m_name_isSet = !json[QString("name")].isNull() && m_name_isValid;
m_oauth2_isValid = ::OpenAPI::fromJsonValue(m_oauth2, json[QString("oauth2")]);
m_oauth2_isSet = !json[QString("oauth2")].isNull() && m_oauth2_isValid;
m_oidc_isValid = ::OpenAPI::fromJsonValue(m_oidc, json[QString("oidc")]);
m_oidc_isSet = !json[QString("oidc")].isNull() && m_oidc_isValid;
}
QString OAIIdentity_provider::asJson() const {
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
QByteArray bytes = doc.toJson();
return QString(bytes);
}
QJsonObject OAIIdentity_provider::asJsonObject() const {
QJsonObject obj;
if (m_hidden_isSet) {
obj.insert(QString("hidden"), ::OpenAPI::toJsonValue(m_hidden));
}
if (m_is_ldap_identity_provider_isSet) {
obj.insert(QString("is_ldap_identity_provider"), ::OpenAPI::toJsonValue(m_is_ldap_identity_provider));
}
if (m_is_main_identity_provider_isSet) {
obj.insert(QString("is_main_identity_provider"), ::OpenAPI::toJsonValue(m_is_main_identity_provider));
}
if (m_label_isSet) {
obj.insert(QString("label"), ::OpenAPI::toJsonValue(m_label));
}
if (m_name_isSet) {
obj.insert(QString("name"), ::OpenAPI::toJsonValue(m_name));
}
if (m_oauth2.isSet()) {
obj.insert(QString("oauth2"), ::OpenAPI::toJsonValue(m_oauth2));
}
if (m_oidc.isSet()) {
obj.insert(QString("oidc"), ::OpenAPI::toJsonValue(m_oidc));
}
return obj;
}
bool OAIIdentity_provider::isHidden() const {
return m_hidden;
}
void OAIIdentity_provider::setHidden(const bool &hidden) {
m_hidden = hidden;
m_hidden_isSet = true;
}
bool OAIIdentity_provider::is_hidden_Set() const{
return m_hidden_isSet;
}
bool OAIIdentity_provider::is_hidden_Valid() const{
return m_hidden_isValid;
}
bool OAIIdentity_provider::isIsLdapIdentityProvider() const {
return m_is_ldap_identity_provider;
}
void OAIIdentity_provider::setIsLdapIdentityProvider(const bool &is_ldap_identity_provider) {
m_is_ldap_identity_provider = is_ldap_identity_provider;
m_is_ldap_identity_provider_isSet = true;
}
bool OAIIdentity_provider::is_is_ldap_identity_provider_Set() const{
return m_is_ldap_identity_provider_isSet;
}
bool OAIIdentity_provider::is_is_ldap_identity_provider_Valid() const{
return m_is_ldap_identity_provider_isValid;
}
bool OAIIdentity_provider::isIsMainIdentityProvider() const {
return m_is_main_identity_provider;
}
void OAIIdentity_provider::setIsMainIdentityProvider(const bool &is_main_identity_provider) {
m_is_main_identity_provider = is_main_identity_provider;
m_is_main_identity_provider_isSet = true;
}
bool OAIIdentity_provider::is_is_main_identity_provider_Set() const{
return m_is_main_identity_provider_isSet;
}
bool OAIIdentity_provider::is_is_main_identity_provider_Valid() const{
return m_is_main_identity_provider_isValid;
}
QString OAIIdentity_provider::getLabel() const {
return m_label;
}
void OAIIdentity_provider::setLabel(const QString &label) {
m_label = label;
m_label_isSet = true;
}
bool OAIIdentity_provider::is_label_Set() const{
return m_label_isSet;
}
bool OAIIdentity_provider::is_label_Valid() const{
return m_label_isValid;
}
QString OAIIdentity_provider::getName() const {
return m_name;
}
void OAIIdentity_provider::setName(const QString &name) {
m_name = name;
m_name_isSet = true;
}
bool OAIIdentity_provider::is_name_Set() const{
return m_name_isSet;
}
bool OAIIdentity_provider::is_name_Valid() const{
return m_name_isValid;
}
OAIIdentity_provider_oauth2 OAIIdentity_provider::getOauth2() const {
return m_oauth2;
}
void OAIIdentity_provider::setOauth2(const OAIIdentity_provider_oauth2 &oauth2) {
m_oauth2 = oauth2;
m_oauth2_isSet = true;
}
bool OAIIdentity_provider::is_oauth2_Set() const{
return m_oauth2_isSet;
}
bool OAIIdentity_provider::is_oauth2_Valid() const{
return m_oauth2_isValid;
}
OAIIdentity_provider_oidc OAIIdentity_provider::getOidc() const {
return m_oidc;
}
void OAIIdentity_provider::setOidc(const OAIIdentity_provider_oidc &oidc) {
m_oidc = oidc;
m_oidc_isSet = true;
}
bool OAIIdentity_provider::is_oidc_Set() const{
return m_oidc_isSet;
}
bool OAIIdentity_provider::is_oidc_Valid() const{
return m_oidc_isValid;
}
bool OAIIdentity_provider::isSet() const {
bool isObjectUpdated = false;
do {
if (m_hidden_isSet) {
isObjectUpdated = true;
break;
}
if (m_is_ldap_identity_provider_isSet) {
isObjectUpdated = true;
break;
}
if (m_is_main_identity_provider_isSet) {
isObjectUpdated = true;
break;
}
if (m_label_isSet) {
isObjectUpdated = true;
break;
}
if (m_name_isSet) {
isObjectUpdated = true;
break;
}
if (m_oauth2.isSet()) {
isObjectUpdated = true;
break;
}
if (m_oidc.isSet()) {
isObjectUpdated = true;
break;
}
} while (false);
return isObjectUpdated;
}
bool OAIIdentity_provider::isValid() const {
// only required properties are required for the object to be considered valid
return true;
}
} // namespace OpenAPI