toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final startTime = this.startTime;
  final endTime = this.endTime;
  final eventFilter = this.eventFilter;
  final frequency = this.frequency;
  final isLocalTime = this.isLocalTime;
  final quietTime = this.quietTime;
  final timezone = this.timezone;
  return {
    'StartTime': startTime,
    if (endTime != null) 'EndTime': endTime,
    if (eventFilter != null) 'EventFilter': eventFilter,
    if (frequency != null) 'Frequency': frequency.toValue(),
    if (isLocalTime != null) 'IsLocalTime': isLocalTime,
    if (quietTime != null) 'QuietTime': quietTime,
    if (timezone != null) 'Timezone': timezone,
  };
}