lintel 0.2.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
lintel::UserGroupDto Class Reference

#include <UserGroupDto.h>

Inheritance diagram for lintel::UserGroupDto:
lintel::JsonSerializable

Public Member Functions

 UserGroupDto ()=default
 
 UserGroupDto (std::set< std::string > groupAdds, std::set< std::string > groupRemoves, std::string userName)
 
const std::string & getUserName ()
 
const std::set< std::string > & getGroupAdds ()
 
const std::set< std::string > & getGroupRemoves ()
 
void serialize (rapidjson::Writer< rapidjson::StringBuffer > *writer) const override
 
bool deserialize (const rapidjson::Value &obj) override
 
- Public Member Functions inherited from lintel::JsonSerializable
 JsonSerializable ()=default
 
virtual ~JsonSerializable ()=default
 
virtual std::string serialize () const
 
virtual void deserialize (const std::string &json)
 

Detailed Description

DTO for modifying a user's group memberships

Constructor & Destructor Documentation

◆ UserGroupDto() [1/2]

lintel::UserGroupDto::UserGroupDto ( )
default

Default constructor

◆ UserGroupDto() [2/2]

lintel::UserGroupDto::UserGroupDto ( std::set< std::string >  groupAdds,
std::set< std::string >  groupRemoves,
std::string  userName 
)

Construct a user group modification DTO

Parameters
groupAddsSet of groups to add
groupRemovesSet of groups to remove
userNameThe target user name

Member Function Documentation

◆ deserialize()

bool lintel::UserGroupDto::deserialize ( const rapidjson::Value &  obj)
overridevirtual

Deserialize from JSON

Parameters
objThe JSON value
Returns
True on success

Reimplemented from lintel::JsonSerializable.

◆ getGroupAdds()

const std::set< std::string > & lintel::UserGroupDto::getGroupAdds ( )

Get the groups to add

Returns
Set of group names

◆ getGroupRemoves()

const std::set< std::string > & lintel::UserGroupDto::getGroupRemoves ( )

Get the groups to remove

Returns
Set of group names

◆ getUserName()

const std::string & lintel::UserGroupDto::getUserName ( )

Get the user name

Returns
The user name

◆ serialize()

void lintel::UserGroupDto::serialize ( rapidjson::Writer< rapidjson::StringBuffer > *  writer) const
overridevirtual

Serialize to JSON

Parameters
writerThe rapidjson writer

Implements lintel::JsonSerializable.


The documentation for this class was generated from the following file: