package io.iron.ironworker.client.entities;

import com.google.gson.annotations.SerializedName;

import java.util.Date;

public class TaskEntity extends BaseEntity {
    @SerializedName("id")
    String id;
    @SerializedName("project_id")
    String projectId;
    @SerializedName("code_id")
    String codeId;
    @SerializedName("code_name")
    String codeName;
    @SerializedName("priority")
    int priority;
    @SerializedName("timeout")
    int timeout;
    @SerializedName("status")
    String status;
    @SerializedName("cluster")
    String cluster;
    @SerializedName("label")
    String label;
    @SerializedName("start_time")
    String startTime;
    @SerializedName("end_time")
    String endTime;
    @SerializedName("duration")
    int duration;
    @SerializedName("run_times")
    int runTimes;
    @SerializedName("payload")
    String payload;
    @SerializedName("percent")
    int percent;
    @SerializedName("msg")
    String msg;
    @SerializedName("created_at")
    String createdAt;
    @SerializedName("updated_at")
    String updatedAt;

    protected TaskEntity() {
    }

    public String getId() {
        return id;
    }

    public String getProjectId() {
        return projectId;
    }

    public String getCodeId() {
        return codeId;
    }

    public String getCodeName() {
        return codeName;
    }

    public int getPriority() {
        return priority;
    }

    public int getTimeout() {
        return timeout;
    }

    public String getStatus() {
        return status;
    }

    public String getCluster() {
        return cluster;
    }

    public String getLabel() {
        return label;
    }

    public Date getStartTime() {
        return parseDate(startTime);
    }

    public Date getEndTime() {
        return parseDate(endTime);
    }

    public int getDuration() {
        return duration;
    }

    public int getRunTimes() {
        return runTimes;
    }

    public String getPayload() {
        return payload;
    }

    public int getPercent() {
        return percent;
    }

    public String getMsg() {
        return msg;
    }

    public Date getCreatedAt() {
        if (createdAt != null) {
            return parseDate(createdAt);
        }
        return null;
    }

    public Date getUpdatedAt() {
        if (updatedAt != null) {
            return parseDate(updatedAt);
        }
        return null;
    }
}

@@ -952,24 +952,82 @@
 String msg;%0A
+    @SerializedName(%22schedule_id%22)%0A    String scheduleId;%0A
     @Seriali
@@ -2172,32 +2172,102 @@
 urn msg;%0A    %7D%0A%0A
+    public String getScheduleId() %7B%0A        return scheduleId;%0A    %7D%0A%0A
     public Date 

add schedule_id to TaskInfo