toJson method

Map<String, dynamic> toJson()

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,
  };
}