private protected EntryChange(LogEntryChangeKey @event, EntryDataType dataType) { DataType = dataType; ChangeType = @event; }
private bool TryToParseKey(string key, out LogEntryChangeKey result) { bool state = true; result = default; switch (key) { case "name": result = LogEntryChangeKey.Name; break; case "icon_hash": result = LogEntryChangeKey.Icon; break; case "splash_hash": result = LogEntryChangeKey.Splash; break; case "owner_id": result = LogEntryChangeKey.Owner; break; case "region": result = LogEntryChangeKey.Region; break; case "afk_channel_id": result = LogEntryChangeKey.AfkChannel; break; case "afk_timeout": result = LogEntryChangeKey.AfkTimeout; break; case "mfa_level": result = LogEntryChangeKey.MFALevel; break; case "verification_level": result = LogEntryChangeKey.VerificationLevel; break; case "explicit_content_filter": result = LogEntryChangeKey.ExplicitContentFilter; break; case "default_message_notifications": result = LogEntryChangeKey.DefaultMessageNotifications; break; case "vanity_url_code": result = LogEntryChangeKey.VanityUrlCode; break; case "$add": result = LogEntryChangeKey.Added; break; case "$remove": result = LogEntryChangeKey.Removed; break; case "prune_delete_days": result = LogEntryChangeKey.PruneDaysCount; break; case "widget_enabled": result = LogEntryChangeKey.WidgetState; break; case "widget_channel_id": result = LogEntryChangeKey.WidgetChannel; break; case "system_channel_id": result = LogEntryChangeKey.SystemChannel; break; case "position": result = LogEntryChangeKey.Position; break; case "topic": result = LogEntryChangeKey.Topic; break; case "bitrate": result = LogEntryChangeKey.Bitrate; break; case "permission_overwrites": result = LogEntryChangeKey.PermissionsOverwrite; break; case "nsfw": result = LogEntryChangeKey.NsfwState; break; case "application_id": result = LogEntryChangeKey.ApplicationId; break; case "rate_limit_per_user": result = LogEntryChangeKey.RateLimitPerUser; break; case "permissions": result = LogEntryChangeKey.PermissionsLegacy; break; case "permissions_new": result = LogEntryChangeKey.PermissionsNew; break; case "color": result = LogEntryChangeKey.Color; break; case "hoist": result = LogEntryChangeKey.HoistState; break; case "mentionable": result = LogEntryChangeKey.MentionableState; break; case "allow": result = LogEntryChangeKey.AllowLegacy; break; case "allow_new": result = LogEntryChangeKey.AllowNew; break; case "deny": result = LogEntryChangeKey.DenyLegacy; break; case "deny_new": result = LogEntryChangeKey.DenyNew; break; case "code": result = LogEntryChangeKey.Code; break; case "channel_id": result = LogEntryChangeKey.ChannelId; break; case "inviter_id": result = LogEntryChangeKey.InviterId; break; case "max_uses": result = LogEntryChangeKey.MaxUses; break; case "uses": result = LogEntryChangeKey.Uses; break; case "max_age": result = LogEntryChangeKey.MaxAge; break; case "temporary": result = LogEntryChangeKey.Temporary; break; case "deaf": result = LogEntryChangeKey.Deaf; break; case "mute": result = LogEntryChangeKey.Mute; break; case "nick": result = LogEntryChangeKey.Nickname; break; case "avatar_hash": result = LogEntryChangeKey.Avatar; break; case "id": result = LogEntryChangeKey.Id; break; case "type": result = LogEntryChangeKey.Type; break; case "enable_emoticons": result = LogEntryChangeKey.EmoticonsState; break; case "expire_behavior": result = LogEntryChangeKey.BehaviorExpire; break; case "expire_grace_period": result = LogEntryChangeKey.GracePeriodExpire; break; default: state = false; break; } return(state); }