| D++ (DPP) C++ Discord API Bot Library

Search
Loading...
Searching...
No Matches
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:
[legend]
Collaboration diagram for dpp::application_role_connection:
[legend]

## Public Member Functions

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

## Public Attributes

std::variant< std::monostate, application_role_connection_metadata > | 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.
std::string | platform_name
| Optional: The vanity name of the platform a bot has connected (max 50 characters).
std::string | platform_username
| Optional: The username on the platform a bot has connected (max 100 characters).

## Protected Member Functions

application_role_connection & | fill_from_json_impl (nlohmann::json *j)
| Fill this record from json.
virtual json | to_json_impl (bool with_id=false) const
| Convert to JSON.

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

virtual default

## Member Function Documentation

## ◆ build_json()

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

inline inherited

Convert object to json string.

Parameters

  with_id | Whether 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 | ) |

inline inherited

Convert object from nlohmann::json.

Parameters

  j | nlohmann::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

  j | The 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

inline inherited

Convert object to nlohmann::json.

Parameters

  with_id | Whether 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

protected virtual

Convert to JSON.

Parameters

  with_id | include ID in output

Returns
  json JSON output

## Friends And Related Symbol Documentation

## ◆ json_interface< application_role_connection >

friend struct json_interface< application_role_connection >

friend

## 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.13 D++ Library version 9.0.12 D++ Library version 9.0.11 D++ Library version 9.0.10 D++ Library version 9.0.9 D++ Library version 9.0.8 D++ Library version 9.0.7 D++ Library version 9.0.6 D++ Library version 9.0.5 D++ Library version 9.0.4 D++ Library version 9.0.3 D++ Library version 9.0.2 D++ Library version 9.0.1 D++ Library version 9.0.0 D++ Library version 1.0.2 D++ Library version 1.0.1 D++ Library version 1.0.0