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

import com.epam.ta.reportportal.ws.annotations.NotEmpty;
import com.fasterxml.jackson.annotation.JsonInclude;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author <a href="mailto:ivan_budayeu@epam.com">Ivan Budayeu</a>
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UpdatePluginStateRQ implements Serializable {

	@NotNull
	@NotEmpty
	private String name;

	@NotNull
	private Boolean isEnabled;

	public UpdatePluginStateRQ() {
	}

	public String getName() {
		return name;
	}

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

	public Boolean getEnabled() {
		return isEnabled;
	}

	public void setEnabled(Boolean enabled) {
		isEnabled = enabled;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}

		UpdatePluginStateRQ that = (UpdatePluginStateRQ) o;

		if (name != null ? !name.equals(that.name) : that.name != null) {
			return false;
		}
		return isEnabled != null ? isEnabled.equals(that.isEnabled) : that.isEnabled == null;
	}

	@Override
	public int hashCode() {
		int result = name != null ? name.hashCode() : 0;
		result = 31 * result + (isEnabled != null ? isEnabled.hashCode() : 0);
		return result;
	}
}

@@ -53,65 +53,8 @@
 n;%0A%0A
-import com.epam.ta.reportportal.ws.annotations.NotEmpty;%0A
 impo
@@ -102,16 +102,16 @@
 nclude;%0A
+
 %0Aimport 
@@ -360,52 +360,8 @@
  %7B%0A%0A
-%09@NotNull%0A%09@NotEmpty%0A%09private String name;%0A%0A
 %09@No
@@ -435,114 +435,8 @@
 %09%7D%0A%0A
-%09public String getName() %7B%0A%09%09return name;%0A%09%7D%0A%0A%09public void setName(String name) %7B%0A%09%09this.name = name;%0A%09%7D%0A%0A
 %09pub
@@ -771,97 +771,8 @@
 o;%0A%0A
-%09%09if (name != null ? !name.equals(that.name) : that.name != null) %7B%0A%09%09%09return false;%0A%09%09%7D%0A
 %09%09re
@@ -901,83 +901,15 @@
 %7B%0A%09%09
-int result = name != null ? name.hashCode() : 0;%0A%09%09result = 31 * result + (
+return 
 isEn
@@ -952,26 +952,8 @@
  : 0
-);%0A%09%09return result
 ;%0A%09%7D

Update Plugin state entity refactoring