/*
 * Copyright 2016 EPAM Systems
 * 
 * 
 * This file is part of EPAM Report Portal.
 * https://github.com/reportportal/commons-model
 * 
 * Report Portal is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Report Portal is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Report Portal.  If not, see <http://www.gnu.org/licenses/>.
 */ 

package com.epam.ta.reportportal.ws.model.project;

import java.util.Date;
import java.util.List;

import javax.validation.constraints.NotNull;

import com.epam.ta.reportportal.ws.annotations.NotEmpty;
import com.epam.ta.reportportal.ws.model.ModelViews;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonView;

/**
 * Project info resource representation for responses<br>
 * {@link com.epam.ta.reportportal.ws.model.ModelViews.DefaultView} used as
 * default fields output<br>
 * {@link com.epam.ta.reportportal.ws.model.ModelViews.FullProjectInfoView} used
 * as extended fields output<br>
 * 
 * @author Dzmitry_Kavalets
 * @author Andrei_Ramanchuk
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ProjectInfoResource {

	@NotNull
	@NotEmpty
	@JsonProperty(value = "projectId")
	private String projectId;

	@NotNull
	@JsonProperty(value = "usersQuantity")
	private Integer usersQuantity;

	@NotNull
	@JsonProperty(value = "launchesQuantity")
	private Long launchesQuantity;

	@JsonProperty(value = "launchesPerUser")
	@JsonView(ModelViews.FullProjectInfoView.class)
	private List<LaunchesPerUser> launchesPerUser;

	@JsonProperty(value = "uniqueTickets")
	@JsonView(ModelViews.FullProjectInfoView.class)
	private Integer uniqueTickets;

	@JsonProperty(value = "launchesPerWeek")
	@JsonView(ModelViews.FullProjectInfoView.class)
	private String launchesPerWeek;

	@NotNull
	@JsonProperty(value = "lastRun")
	private Date lastRun;

	@NotNull
	@JsonProperty(value = "creationDate")
	private Date creationDate;

	private String entryType;

	public ProjectInfoResource() {
	}

	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public Integer getUsersQuantity() {
		return usersQuantity;
	}

	public void setUsersQuantity(Integer usersQuantity) {
		this.usersQuantity = usersQuantity;
	}

	public Long getLaunchesQuantity() {
		return launchesQuantity;
	}

	public void setLaunchesQuantity(Long launchesQuantity) {
		this.launchesQuantity = launchesQuantity;
	}

	public void setLaunchesPerUser(List<LaunchesPerUser> value) {
		this.launchesPerUser = value;
	}

	public List<LaunchesPerUser> getLaunchesPerUser() {
		return launchesPerUser;
	}

	public void setUniqueTickets(Integer value) {
		this.uniqueTickets = value;
	}

	public Integer getUniqueTickets() {
		return uniqueTickets;
	}

	public void setLaunchesPerWeek(String value) {
		this.launchesPerWeek = value;
	}

	public String getLaunchesPerWeek() {
		return launchesPerWeek;
	}

	public Date getLastRun() {
		return lastRun;
	}

	public void setLastRun(Date lastRun) {
		this.lastRun = lastRun;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	public String getEntryType() {
		return entryType;
	}

	public void setEntryType(String entryType) {
		this.entryType = entryType;
	}
}

@@ -29,21 +29,19 @@
 stems%0A *
- 
 %0A *
- 
 %0A * This
@@ -128,17 +128,16 @@
 model%0A *
- 
 %0A * Repo
@@ -380,25 +380,24 @@
  version.%0A *
- 
 %0A * Report P
@@ -634,17 +634,16 @@
 ails.%0A *
- 
 %0A * You 
@@ -781,17 +781,16 @@
 s/%3E.%0A */
- 
 %0A%0Apackag
@@ -839,101 +839,8 @@
 t;%0A%0A
-import java.util.Date;%0Aimport java.util.List;%0A%0Aimport javax.validation.constraints.NotNull;%0A%0A
 impo
@@ -1103,16 +1103,108 @@
 nView;%0A%0A
+import javax.validation.constraints.NotNull;%0Aimport java.util.Date;%0Aimport java.util.List;%0A%0A
 /**%0A * P
@@ -1478,17 +1478,16 @@
 t%3Cbr%3E%0A *
- 
 %0A * @aut
@@ -1632,19 +1632,8 @@
 ull%0A
-%09@NotEmpty%0A
 %09@Js
@@ -1664,16 +1664,101 @@
 ectId%22)%0A
+%09private Long projectId;%0A%0A%09@NotNull%0A%09@NotEmpty%0A%09@JsonProperty(value = %22projectName%22)%0A
 %09private
@@ -1764,34 +1764,36 @@
 e String project
-Id
+Name
 ;%0A%0A%09@NotNull%0A%09@J
@@ -2549,28 +2549,26 @@
 %09%7D%0A%0A%09public 
-Stri
+Lo
 ng getProjec
@@ -2625,20 +2625,18 @@
 ojectId(
-Stri
+Lo
 ng proje
@@ -2669,32 +2669,180 @@
  projectId;%0A%09%7D%0A%0A
+%09public String getProjectName() %7B%0A%09%09return projectName;%0A%09%7D%0A%0A%09public void setProjectName(String projectName) %7B%0A%09%09this.projectName = projectName;%0A%09%7D%0A%0A
 %09public Integer 

fix id in project model classes