/*
 * Copyright 2017 Banco Bilbao Vizcaya Argentaria, S.A.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.bbva.arq.devops.ae.mirrorgate.core.dto;

import com.bbva.arq.devops.ae.mirrorgate.core.utils.IssueStatus;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * Created by alfonso on 26/05/17.
 */
public class IssueDTO implements Serializable {

    private Long id;
    private String name;
    private String type;
    private IssueStatus status;
    private Double estimate=0.0;
    private String jiraKey;
    private String parentKey;
    private List<String> piNames;

    private SprintDTO sprint;
    private ProjectDTO project;
    private Date updatedDate;

    private List<String> keywords = null;

    public Long getId() {
        return id;
    }

    public IssueDTO setId(Long id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public IssueDTO setName(String name) {
        this.name = name;
        return this;
    }

    public String getType() {
        return type;
    }

    public IssueDTO setType(String type) {
        this.type = type;
        return this;
    }

    public IssueStatus getStatus() {
        return status;
    }

    public IssueDTO setStatus(IssueStatus status) {
        this.status = status;
        return this;
    }

    public String getJiraKey() {
        return jiraKey;
    }

    public IssueDTO setJiraKey(String jiraKey) {
        this.jiraKey = jiraKey;
        return this;
    }

    public Double getEstimate() {
        return estimate;
    }

    public IssueDTO setEstimate(Double estimate) {
        this.estimate = estimate;
        return this;
    }

    public String getParentKey() {
        return parentKey;
    }

    public IssueDTO setParentKey(String parentKey) {
        this.parentKey = parentKey;
        return this;
    }

    public List<String> getPiNames() {
        return piNames;
    }

    public IssueDTO setPiNames(List<String> piNames) {
        this.piNames = piNames;
        return this;
    }

    public List<String> getKeywords() {
        return keywords;
    }

    public IssueDTO setKeywords(List<String> keyword) {
        this.keywords = keyword;
        return this;
    }

    public SprintDTO getSprint() {
        return sprint;
    }

    public IssueDTO setSprint(SprintDTO sprint) {
        this.sprint = sprint;
        return this;
    }

    public String toString() {
        return name + " - " + getEstimate();
    }

    public ProjectDTO getProject() {
        return project;
    }

    public IssueDTO setProject(ProjectDTO project) {
        this.project = project;
        return this;
    }

    public Date getUpdatedDate() {
        return updatedDate;
    }

    public IssueDTO setUpdatedDate(Date updatedDate) {
        this.updatedDate = updatedDate;
        return this;
    }
}

@@ -1092,24 +1092,53 @@
  parentKey;%0A
+    private String parentId;%0A
     private 
@@ -2451,32 +2451,186 @@
 rn this;%0A    %7D%0A%0A
+    public String getParentId() %7B%0A        return parentId;%0A    %7D%0A%0A    public void setParentId(String parentId) %7B%0A        this.parentId = parentId;%0A    %7D%0A%0A
     public List%3C

add parent Id field