Skip to content

Commit 31391b3

Browse files
committed
Merge pull request #73 from owncloud/identity-set-group
add identitySet group property
1 parent 0330a3c commit 31391b3

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

client/OAIIdentitySet.cpp

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ class OAIIdentitySetPrivate {
3838
OAIIdentity user;
3939
bool user_isSet;
4040
bool user_isValid;
41+
42+
OAIIdentity group;
43+
bool group_isSet;
44+
bool group_isValid;
4145
};
4246

4347
OAIIdentitySet::OAIIdentitySet()
@@ -73,6 +77,9 @@ void OAIIdentitySet::initializeModel() {
7377

7478
d->user_isSet = false;
7579
d->user_isValid = false;
80+
81+
d->group_isSet = false;
82+
d->group_isValid = false;
7683
}
7784
}
7885

@@ -96,6 +103,9 @@ void OAIIdentitySet::fromJsonObject(QJsonObject json) {
96103

97104
d->user_isValid = ::OpenAPI::fromJsonValue(d->user, json[QString("user")]);
98105
d->user_isSet = !json[QString("user")].isNull() && d->user_isValid;
106+
107+
d->group_isValid = ::OpenAPI::fromJsonValue(d->group, json[QString("group")]);
108+
d->group_isSet = !json[QString("group")].isNull() && d->group_isValid;
99109
}
100110

101111
QString OAIIdentitySet::asJson() const {
@@ -120,6 +130,9 @@ QJsonObject OAIIdentitySet::asJsonObject() const {
120130
if (d->user.isSet()) {
121131
obj.insert(QString("user"), ::OpenAPI::toJsonValue(d->user));
122132
}
133+
if (d->group.isSet()) {
134+
obj.insert(QString("group"), ::OpenAPI::toJsonValue(d->group));
135+
}
123136
return obj;
124137
}
125138

@@ -219,6 +232,38 @@ bool OAIIdentitySet::is_user_Valid() const{
219232
return d->user_isValid;
220233
}
221234

235+
OAIIdentity OAIIdentitySet::getGroup() const {
236+
Q_D(const OAIIdentitySet);
237+
if(!d){
238+
return {};
239+
}
240+
return d->group;
241+
}
242+
void OAIIdentitySet::setGroup(const OAIIdentity &group) {
243+
Q_D(OAIIdentitySet);
244+
Q_ASSERT(d);
245+
246+
d->group = group;
247+
d->group_isSet = true;
248+
}
249+
250+
bool OAIIdentitySet::is_group_Set() const{
251+
Q_D(const OAIIdentitySet);
252+
if(!d){
253+
return false;
254+
}
255+
256+
return d->group_isSet;
257+
}
258+
259+
bool OAIIdentitySet::is_group_Valid() const{
260+
Q_D(const OAIIdentitySet);
261+
if(!d){
262+
return false;
263+
}
264+
return d->group_isValid;
265+
}
266+
222267
bool OAIIdentitySet::isSet() const {
223268
Q_D(const OAIIdentitySet);
224269
if(!d){
@@ -240,6 +285,11 @@ bool OAIIdentitySet::isSet() const {
240285
isObjectUpdated = true;
241286
break;
242287
}
288+
289+
if (d->group.isSet()) {
290+
isObjectUpdated = true;
291+
break;
292+
}
243293
} while (false);
244294
return isObjectUpdated;
245295
}

client/OAIIdentitySet.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ class OAIIdentitySet : public OAIObject {
6262
bool is_user_Set() const;
6363
bool is_user_Valid() const;
6464

65+
OAIIdentity getGroup() const;
66+
void setGroup(const OAIIdentity &group);
67+
bool is_group_Set() const;
68+
bool is_group_Valid() const;
69+
6570
virtual bool isSet() const override;
6671
virtual bool isValid() const override;
6772

0 commit comments

Comments
 (0)