/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2022-05-20 16:18:36
 * @LastEditTime : 2022-05-20 16:19:20
 * @Description  : Do not edit
 */
class TimingDetailModel {
  String? name;
  String? taskName;
  String? startTime;
  String? endTime;
  String? cronExpression;
  String? createdAt;
  String? createdBy;
  bool? enable;
  List<ArgsOfTimingDetailModel>? args;
  String? nextFireTime;

  TimingDetailModel({
    this.name,
    this.taskName,
    this.startTime,
    this.endTime,
    this.cronExpression,
    this.createdAt,
    this.createdBy,
    this.enable,
    this.args,
    this.nextFireTime,
  });

  TimingDetailModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    name = map['name'];
    taskName = map['taskName'];
    startTime = map['startTime'];
    endTime = map['endTime'];
    cronExpression = map['cronExpression'];
    createdAt = map['createdAt'];
    createdBy = map['createdBy'];
    enable = map['enable'];
    args = List<ArgsOfTimingDetailModel>.from(
        (map["args"] ?? []).map((x) => ArgsOfTimingDetailModel.fromJson(x)));
    nextFireTime = map['nextFireTime'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['name'] = this.name;
    json['taskName'] = this.taskName;
    json['startTime'] = this.startTime;
    json['endTime'] = this.endTime;
    json['cronExpression'] = this.cronExpression;
    json['createdAt'] = this.createdAt;
    json['createdBy'] = this.createdBy;
    json['enable'] = this.enable;
    json['args'] = List<dynamic>.from((args ?? []).map((x) => x.toJson()));
    json['nextFireTime'] = this.nextFireTime;

    return json;
  }
}

class ArgsOfTimingDetailModel {
  String? name;
  String? value;

  ArgsOfTimingDetailModel({
    this.name,
    this.value,
  });

  ArgsOfTimingDetailModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    name = map['name'];
    value = map['value'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['name'] = this.name;
    json['value'] = this.value;

    return json;
  }
}
