D++ (DPP)  10.0.30
C++ Discord API Bot Library
dpp::application_role_connection Class Reference

The application role connection that an application has attached to a user. More...

#include "role.h"

Inheritance diagram for dpp::application_role_connection:
Collaboration diagram for dpp::application_role_connection:

Public Member Functions

 application_role_connection ()
 Constructor. More...
 
virtual ~application_role_connection ()=default
 
std::string build_json (bool with_id=false) const
 Convert object to json string. More...
 
application_role_connectionfill_from_json (nlohmann::json *j)
 Convert object from nlohmann::json. More...
 
auto to_json (bool with_id=false) const
 Convert object to nlohmann::json. More...
 

Public Attributes

std::variant< std::monostate, application_role_connection_metadatametadata
 Optional: Object mapping application role connection metadata keys to their "stringified" value (max 100 characters) for the user on the platform a bot has connected. More...
 
std::string platform_name
 Optional: The vanity name of the platform a bot has connected (max 50 characters). More...
 
std::string platform_username
 Optional: The username on the platform a bot has connected (max 100 characters). More...
 

Protected Member Functions

application_role_connectionfill_from_json_impl (nlohmann::json *j)
 Fill this record from json. More...
 
virtual json to_json_impl (bool with_id=false) const
 Convert to JSON. More...
 

Friends

struct json_interface< application_role_connection >
 

Detailed Description

The application role connection that an application has attached to a user.

Constructor & Destructor Documentation

◆ application_role_connection()

dpp::application_role_connection::application_role_connection ( )

Constructor.

◆ ~application_role_connection()

virtual dpp::application_role_connection::~application_role_connection ( )
virtualdefault

Member Function Documentation

◆ build_json()

std::string dpp::json_interface< application_role_connection >::build_json ( bool  with_id = false) const
inlineinherited

Convert object to json string.

Parameters
with_idWhether to include the ID or not
Note
Some fields are conditionally filled, do not rely on all fields being present
Returns
std::string Json built from the structure

◆ fill_from_json()

Convert object from nlohmann::json.

Parameters
jnlohmann::json object
Returns
T& Reference to self for fluent calling

◆ fill_from_json_impl()

application_role_connection & dpp::application_role_connection::fill_from_json_impl ( nlohmann::json j)
protected

Fill this record from json.

Parameters
jThe json to fill this record from
Returns
Reference to self

◆ to_json()

auto dpp::json_interface< application_role_connection >::to_json ( bool  with_id = false) const
inlineinherited

Convert object to nlohmann::json.

Parameters
with_idWhether to include the ID or not
Note
Some fields are conditionally filled, do not rely on all fields being present
Returns
json Json built from the structure

◆ to_json_impl()

json dpp::application_role_connection::to_json_impl ( bool  with_id = false) const
protectedvirtual

Convert to JSON.

Parameters
with_idinclude ID in output
Returns
json JSON output

Friends And Related Function Documentation

◆ json_interface< application_role_connection >

Member Data Documentation

◆ metadata

std::variant<std::monostate, application_role_connection_metadata> dpp::application_role_connection::metadata

Optional: Object mapping application role connection metadata keys to their "stringified" value (max 100 characters) for the user on the platform a bot has connected.

◆ platform_name

std::string dpp::application_role_connection::platform_name

Optional: The vanity name of the platform a bot has connected (max 50 characters).

◆ platform_username

std::string dpp::application_role_connection::platform_username

Optional: The username on the platform a bot has connected (max 100 characters).


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