package kr.co.hanwha.hifive.data.model;

import java.util.ArrayList;

/**
 * Created by sanghoonkwon on 2018. 1. 22..
 */

public class TaskDetailRoot extends BaseData {
    TaskDetailData taskResult;

    ArrayList<String> listResTasksHashtags;

    ArrayList<TaskHistoryData> listTasksHistory;

    ArrayList<CampaignData> listCampaigns;

    public TaskDetailData getTaskResult() {
        return taskResult;
    }

    public ArrayList<String> getListResTasksHashtags() {
        return listResTasksHashtags;
    }

    public ArrayList<CampaignData> getListCampaigns() {
        return listCampaigns;
    }

    public void setTaskResult(TaskDetailData taskResult) {
        this.taskResult = taskResult;
    }

    public void setListResTasksHashtags(ArrayList<String> listResTasksHashtags) {
        this.listResTasksHashtags = listResTasksHashtags;
    }

    public ArrayList<TaskHistoryData> getListTasksHistory() {
        return listTasksHistory;
    }

    @Override
    public String toString() {
        String listCampaignsStr = "";
        if (listCampaigns != null) {
            for (CampaignData data : listCampaigns) {
                listCampaignsStr += data.toString() + "\n";
            }
        }
        String listTaskhistoryStr = "";
        if (listTasksHistory != null) {
            for (TaskHistoryData data : listTasksHistory) {
                listTaskhistoryStr += data.toString() + "\n";
            }
        }
        String listResTasksHashtagsStr = "";
        if (listResTasksHashtags != null) {
            for (String data : listResTasksHashtags) {
                listResTasksHashtagsStr += data + "\n";
            }
        }
        return "TaskDetailRoot{" +
                "\nrtn_code=" + rtn_code +
                "\n, taskResult=" + (taskResult != null ? taskResult.toString() : taskResult) +
                "\n, rtn_message='" + rtn_message + '\'' +
                "\n, listResTasksHashtags=" + listResTasksHashtagsStr +
                "\n, listTasksHistory=" + listTaskhistoryStr +
                "\n, listCampaigns=" + listCampaignsStr +
                "\n, server_time='" + server_time + '\'' +
                '}';
    }
}