Schedule.fromJson constructor

Schedule.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Schedule.fromJson(Map<String, dynamic> json) {
  return Schedule(
    startTime: json['StartTime'] as String,
    endTime: json['EndTime'] as String?,
    eventFilter: json['EventFilter'] != null
        ? CampaignEventFilter.fromJson(
            json['EventFilter'] as Map<String, dynamic>)
        : null,
    frequency: (json['Frequency'] as String?)?.toFrequency(),
    isLocalTime: json['IsLocalTime'] as bool?,
    quietTime: json['QuietTime'] != null
        ? QuietTime.fromJson(json['QuietTime'] as Map<String, dynamic>)
        : null,
    timezone: json['Timezone'] as String?,
  );
}