toJson method
Implementation
Map<String, dynamic> toJson() {
final action = this.action;
final name = this.name;
final period = this.period;
return {
'Action': action.toValue(),
'Name': name.toValue(),
if (period != null) 'Period': period,
};
}