create static method
UserPrivacySettingRule
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "userPrivacySettingRule",
- bool special_is_json_scheme_class = true,
- String special_return_type = "userPrivacySettingRule",
- UserPrivacySettingRuleAllowAll? user_privacy_setting_rule_allow_all,
- UserPrivacySettingRuleAllowContacts? user_privacy_setting_rule_allow_contacts,
- UserPrivacySettingRuleAllowBots? user_privacy_setting_rule_allow_bots,
- UserPrivacySettingRuleAllowUsers? user_privacy_setting_rule_allow_users,
- UserPrivacySettingRuleAllowChatMembers? user_privacy_setting_rule_allow_chat_members,
- UserPrivacySettingRuleRestrictAll? user_privacy_setting_rule_restrict_all,
- UserPrivacySettingRuleRestrictContacts? user_privacy_setting_rule_restrict_contacts,
- UserPrivacySettingRuleRestrictBots? user_privacy_setting_rule_restrict_bots,
- UserPrivacySettingRuleRestrictUsers? user_privacy_setting_rule_restrict_users,
- UserPrivacySettingRuleRestrictChatMembers? user_privacy_setting_rule_restrict_chat_members,
- UserPrivacySettingRules? user_privacy_setting_rules,
override
Generate By General Universe Script Dont edit by hand or anything manual
Implementation
static UserPrivacySettingRule create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "userPrivacySettingRule",
bool special_is_json_scheme_class = true,
String special_return_type = "userPrivacySettingRule",
UserPrivacySettingRuleAllowAll? user_privacy_setting_rule_allow_all,
UserPrivacySettingRuleAllowContacts? user_privacy_setting_rule_allow_contacts,
UserPrivacySettingRuleAllowBots? user_privacy_setting_rule_allow_bots,
UserPrivacySettingRuleAllowPremiumUsers? user_privacy_setting_rule_allow_premium_users,
UserPrivacySettingRuleAllowUsers? user_privacy_setting_rule_allow_users,
UserPrivacySettingRuleAllowChatMembers? user_privacy_setting_rule_allow_chat_members,
UserPrivacySettingRuleRestrictAll? user_privacy_setting_rule_restrict_all,
UserPrivacySettingRuleRestrictContacts? user_privacy_setting_rule_restrict_contacts,
UserPrivacySettingRuleRestrictBots? user_privacy_setting_rule_restrict_bots,
UserPrivacySettingRuleRestrictUsers? user_privacy_setting_rule_restrict_users,
UserPrivacySettingRuleRestrictChatMembers? user_privacy_setting_rule_restrict_chat_members,
UserPrivacySettingRules? user_privacy_setting_rules,
}) {
// UserPrivacySettingRule userPrivacySettingRule = UserPrivacySettingRule({
final Map userPrivacySettingRule_data_create_json = {
"@type": special_type,
"@is_json_scheme_class": special_is_json_scheme_class,
"@return_type": special_return_type,
"user_privacy_setting_rule_allow_all": (user_privacy_setting_rule_allow_all != null) ? user_privacy_setting_rule_allow_all.toJson() : null,
"user_privacy_setting_rule_allow_contacts": (user_privacy_setting_rule_allow_contacts != null) ? user_privacy_setting_rule_allow_contacts.toJson() : null,
"user_privacy_setting_rule_allow_bots": (user_privacy_setting_rule_allow_bots != null) ? user_privacy_setting_rule_allow_bots.toJson() : null,
"user_privacy_setting_rule_allow_premium_users": (user_privacy_setting_rule_allow_premium_users != null) ? user_privacy_setting_rule_allow_premium_users.toJson() : null,
"user_privacy_setting_rule_allow_users": (user_privacy_setting_rule_allow_users != null) ? user_privacy_setting_rule_allow_users.toJson() : null,
"user_privacy_setting_rule_allow_chat_members": (user_privacy_setting_rule_allow_chat_members != null) ? user_privacy_setting_rule_allow_chat_members.toJson() : null,
"user_privacy_setting_rule_restrict_all": (user_privacy_setting_rule_restrict_all != null) ? user_privacy_setting_rule_restrict_all.toJson() : null,
"user_privacy_setting_rule_restrict_contacts": (user_privacy_setting_rule_restrict_contacts != null) ? user_privacy_setting_rule_restrict_contacts.toJson() : null,
"user_privacy_setting_rule_restrict_bots": (user_privacy_setting_rule_restrict_bots != null) ? user_privacy_setting_rule_restrict_bots.toJson() : null,
"user_privacy_setting_rule_restrict_users": (user_privacy_setting_rule_restrict_users != null) ? user_privacy_setting_rule_restrict_users.toJson() : null,
"user_privacy_setting_rule_restrict_chat_members": (user_privacy_setting_rule_restrict_chat_members != null) ? user_privacy_setting_rule_restrict_chat_members.toJson() : null,
"user_privacy_setting_rules": (user_privacy_setting_rules != null) ? user_privacy_setting_rules.toJson() : null,
};
userPrivacySettingRule_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (userPrivacySettingRule_data_create_json.containsKey(key) == false) {
userPrivacySettingRule_data_create_json[key] = value;
}
});
}
return UserPrivacySettingRule(userPrivacySettingRule_data_create_json);
}