toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
if (this.name != null) {
json[r'name'] = this.name;
} else {
json[r'name'] = null;
}
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
if (this.isDefault != null) {
json[r'is_default'] = this.isDefault;
} else {
json[r'is_default'] = null;
}
if (this.isEnabled != null) {
json[r'is_enabled'] = this.isEnabled;
} else {
json[r'is_enabled'] = null;
}
if (this.priority != null) {
json[r'priority'] = this.priority;
} else {
json[r'priority'] = null;
}
if (this.ruleCount != null) {
json[r'rule_count'] = this.ruleCount;
} else {
json[r'rule_count'] = null;
}
json[r'rules'] = this.rules;
if (this.createdAt != null) {
json[r'created_at'] = this.createdAt!.toUtc().toIso8601String();
} else {
json[r'created_at'] = null;
}
return json;
}