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

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

+ 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
 
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...
 
std::string build_json (bool with_id=false) const
 Convert object to json string. More...
 

Public Attributes

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...
 
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...
 

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()

application_role_connection & dpp::json_interface< application_role_connection >::fill_from_json ( nlohmann::json *  j)
inlineinherited

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()

virtual 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).

D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0