@Override
protected RequestBody finalizeData()
{
JSONObject body = new JSONObject().put("name", getGuild().getName());
if (shouldUpdate(NAME))
body.put("name", name);
if (shouldUpdate(REGION))
body.put("region", region);
if (shouldUpdate(AFK_TIMEOUT))
body.put("afk_timeout", afkTimeout);
if (shouldUpdate(ICON))
body.put("icon", icon == null ? JSONObject.NULL : icon.getEncoding());
if (shouldUpdate(SPLASH))
body.put("splash", splash == null ? JSONObject.NULL : splash.getEncoding());
if (shouldUpdate(AFK_CHANNEL))
body.put("afk_channel_id", opt(afkChannel));
if (shouldUpdate(SYSTEM_CHANNEL))
body.put("system_channel_id", opt(systemChannel));
if (shouldUpdate(VERIFICATION_LEVEL))
body.put("verification_level", verificationLevel);
if (shouldUpdate(NOTIFICATION_LEVEL))
body.put("default_message_notifications", notificationLevel);
if (shouldUpdate(MFA_LEVEL))
body.put("mfa_level", mfaLevel);
if (shouldUpdate(EXPLICIT_CONTENT_LEVEL))
body.put("explicit_content_filter", explicitContentLevel);
reset();
return getRequestBody(body);
}