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

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.validation.constraints.NotNull;

/**
 * @author Pavel Bortnik
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AddWidgetRq {

	@JsonProperty("widget_id")
	@NotNull
	private Long widgetId;

	@JsonProperty("dashboard_id")
	@NotNull
	private Long dashboardId;

	public Long getWidgetId() {
		return widgetId;
	}

	public void setWidgetId(Long widgetId) {
		this.widgetId = widgetId;
	}

	public Long getDashboardId() {
		return dashboardId;
	}

	public void setDashboardId(Long dashboardId) {
		this.dashboardId = dashboardId;
	}
}

@@ -159,54 +159,8 @@
 y;%0A%0A
-import javax.validation.constraints.NotNull;%0A%0A
 /**%0A
@@ -278,96 +278,29 @@
 rty(
-%22widget_id%22)%0A%09@NotNull%0A%09private Long widgetId;%0A%0A%09@JsonProperty(%22dashboard_id%22)%0A%09@NotNull
+value = %22add_widget%22)
 %0A%09pr
@@ -305,30 +305,25 @@
 private 
-Long d
+D
 ashboard
 Id;%0A%0A%09pu
@@ -318,166 +318,107 @@
 oard
-Id;%0A%0A%09public Long getWidgetId() %7B%0A%09%09return widgetId;%0A%09%7D%0A%0A%09public void setWidgetId(Long widgetId) %7B%0A%09%09this.widgetId = widgetId;%0A%09%7D%0A%0A%09public Long getDashboardId
+Resource.WidgetObjectModel objectModel;%0A%0A%09public DashboardResource.WidgetObjectModel getObjectModel
 () %7B
@@ -427,27 +427,27 @@
 %09return 
-dashboardId
+objectModel
 ;%0A%09%7D%0A%0A%09p
@@ -464,72 +464,103 @@
  set
-DashboardId(Long dashboardId) %7B%0A%09%09this.dashboardId = dashboardId
+ObjectModel(DashboardResource.WidgetObjectModel objectModel) %7B%0A%09%09this.objectModel = objectModel
 ;%0A%09%7D

update request for adding widget to dashboard