An individual audit log entry. More...
#include "auditlog.h"
Public Member Functions | |
audit_entry () | |
Constructor. More... | |
virtual | ~audit_entry ()=default |
Destructor. More... | |
std::string | build_json (bool with_id=false) const |
Convert object to json string. More... | |
audit_entry & | fill_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::vector< audit_change > | changes |
Optional: changes made to the target_id. More... | |
std::optional< audit_extra > | extra |
Optional: additional info for certain action types. More... | |
snowflake | id |
ID of the entry. More... | |
std::string | reason |
Optional: the reason for the change (1-512 characters). More... | |
snowflake | target_id |
ID of the affected entity (webhook, user, role, etc.) (may be empty) More... | |
audit_type | type |
Type of action that occurred. More... | |
snowflake | user_id |
The user or app that made the changes (may be empty). More... | |
Protected Member Functions | |
audit_entry & | fill_from_json_impl (nlohmann::json *j) |
Read class values from json object. More... | |
Friends | |
struct | json_interface< audit_entry > |
An individual audit log entry.
dpp::audit_entry::audit_entry | ( | ) |
Constructor.
|
virtualdefault |
Destructor.
|
inlineinherited |
Convert object to json string.
with_id | Whether to include the ID or not |
|
inlineinherited |
Convert object from nlohmann::json.
j | nlohmann::json object |
|
protected |
Read class values from json object.
j | A json object to read from |
References dpp::audit_extra::application_id, dpp::audit_extra::automod_rule_name, dpp::audit_extra::automod_rule_trigger_type, dpp::audit_extra::channel_id, dpp::audit_extra::count, dpp::audit_extra::delete_member_days, extra, dpp::audit_extra::id, dpp::audit_extra::members_removed, dpp::audit_extra::message_id, dpp::unicode_emoji::o, dpp::audit_extra::role_name, dpp::snowflake_not_null(), dpp::string_not_null(), and dpp::audit_extra::type.
|
inlineinherited |
Convert object to nlohmann::json.
with_id | Whether to include the ID or not |
|
friend |
std::vector<audit_change> dpp::audit_entry::changes |
Optional: changes made to the target_id.
std::optional<audit_extra> dpp::audit_entry::extra |
Optional: additional info for certain action types.
Referenced by fill_from_json_impl().
snowflake dpp::audit_entry::id |
ID of the entry.
std::string dpp::audit_entry::reason |
Optional: the reason for the change (1-512 characters).
snowflake dpp::audit_entry::target_id |
ID of the affected entity (webhook, user, role, etc.) (may be empty)
audit_type dpp::audit_entry::type |
Type of action that occurred.
snowflake dpp::audit_entry::user_id |
The user or app that made the changes (may be empty).