CronJobSpec.fromJson constructor
Creates a CronJobSpec from JSON data.
Implementation
factory CronJobSpec.fromJson(Map<String, dynamic> json) {
final tempConcurrencyPolicyJson = json['concurrencyPolicy'];
final tempFailedJobsHistoryLimitJson = json['failedJobsHistoryLimit'];
final tempJobTemplateJson = json['jobTemplate'];
final tempScheduleJson = json['schedule'];
final tempStartingDeadlineSecondsJson = json['startingDeadlineSeconds'];
final tempSuccessfulJobsHistoryLimitJson =
json['successfulJobsHistoryLimit'];
final tempSuspendJson = json['suspend'];
final tempTimeZoneJson = json['timeZone'];
final String? tempConcurrencyPolicy = tempConcurrencyPolicyJson;
final int? tempFailedJobsHistoryLimit = tempFailedJobsHistoryLimitJson;
final JobTemplateSpec tempJobTemplate =
JobTemplateSpec.fromJson(tempJobTemplateJson);
final String tempSchedule = tempScheduleJson;
final int? tempStartingDeadlineSeconds = tempStartingDeadlineSecondsJson;
final int? tempSuccessfulJobsHistoryLimit =
tempSuccessfulJobsHistoryLimitJson;
final bool? tempSuspend = tempSuspendJson;
final String? tempTimeZone = tempTimeZoneJson;
return CronJobSpec(
concurrencyPolicy: tempConcurrencyPolicy,
failedJobsHistoryLimit: tempFailedJobsHistoryLimit,
jobTemplate: tempJobTemplate,
schedule: tempSchedule,
startingDeadlineSeconds: tempStartingDeadlineSeconds,
successfulJobsHistoryLimit: tempSuccessfulJobsHistoryLimit,
suspend: tempSuspend,
timeZone: tempTimeZone,
);
}