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

#include <UserLoginDto.h>

Inheritance diagram for lintel::UserLoginDto:
lintel::JsonSerializable

Public Member Functions

 UserLoginDto (const UserLogin &userLogin)
 
 UserLoginDto (std::string userName, std::string password)
 
 UserLoginDto ()=default
 
const std::string & getUserName () const
 
const std::string & getPassword () const
 
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 user login credentials

Constructor & Destructor Documentation

◆ UserLoginDto() [1/3]

lintel::UserLoginDto::UserLoginDto ( const UserLogin &  userLogin)
explicit

Construct from a UserLogin model

Parameters
userLoginThe source user login

◆ UserLoginDto() [2/3]

lintel::UserLoginDto::UserLoginDto ( std::string  userName,
std::string  password 
)

Construct from user name and password

Parameters
userNameThe user name
passwordThe password

◆ UserLoginDto() [3/3]

lintel::UserLoginDto::UserLoginDto ( )
default

Default constructor

Member Function Documentation

◆ deserialize()

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

Deserialize from JSON

Parameters
objThe JSON value
Returns
True on success

Reimplemented from lintel::JsonSerializable.

◆ getPassword()

const std::string & lintel::UserLoginDto::getPassword ( ) const

Get the password

Returns
The password

◆ getUserName()

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

Get the user name

Returns
The user name

◆ serialize()

void lintel::UserLoginDto::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: