package com.epam.ta.reportportal.database.entity;

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

/**
 * @author Andrei Varabyeu
 */
public class OAuth2LoginDetails implements Serializable {

	private String id;

	private String clientId;

	private String accessTokenUri;

	private List<String> scope;

	private String clientSecret;

	private String authenticationScheme;

	private String grantType;

	private String tokenName = "access_token";

	private Map<String, ?> restrictions;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getClientId() {
		return clientId;
	}

	public void setClientId(String clientId) {
		this.clientId = clientId;
	}

	public String getAccessTokenUri() {
		return accessTokenUri;
	}

	public void setAccessTokenUri(String accessTokenUri) {
		this.accessTokenUri = accessTokenUri;
	}

	public List<String> getScope() {
		return scope;
	}

	public void setScope(List<String> scope) {
		this.scope = scope;
	}

	public String getClientSecret() {
		return clientSecret;
	}

	public void setClientSecret(String clientSecret) {
		this.clientSecret = clientSecret;
	}

	public String getAuthenticationScheme() {
		return authenticationScheme;
	}

	public void setAuthenticationScheme(String authenticationScheme) {
		this.authenticationScheme = authenticationScheme;
	}

	public String getGrantType() {
		return grantType;
	}

	public void setGrantType(String grantType) {
		this.grantType = grantType;
	}

	public String getTokenName() {
		return tokenName;
	}

	public void setTokenName(String tokenName) {
		this.tokenName = tokenName;
	}

	public Map<String, ?> getRestrictions() {
		return restrictions;
	}

	public void setRestrictions(Map<String, ?> restrictions) {
		this.restrictions = restrictions;
	}
}

@@ -44,16 +44,60 @@
 ntity;%0A%0A
+import com.google.common.base.MoreObjects;%0A%0A
 import j
@@ -117,16 +117,16 @@
 izable;%0A
-
 import j
@@ -161,16 +161,42 @@
 til.Map;
+%0Aimport java.util.Objects;
 %0A%0A/**%0A *
@@ -364,16 +364,55 @@
 enUri;%0A%0A
+%09private String userAuthorizationUri;%0A%0A
 %09private
@@ -1883,24 +1883,24 @@
 rictions) %7B%0A
-
 %09%09this.restr
@@ -1925,11 +1925,1569 @@
 ions;%0A%09%7D
+%0A%0A%09public String getUserAuthorizationUri() %7B%0A%09%09return userAuthorizationUri;%0A%09%7D%0A%0A%09public void setUserAuthorizationUri(String userAuthorizationUri) %7B%0A%09%09this.userAuthorizationUri = userAuthorizationUri;%0A%09%7D%0A%0A%09@Override%0A%09public boolean equals(Object o) %7B%0A%09%09if (this == o)%0A%09%09%09return true;%0A%09%09if (o == null %7C%7C getClass() != o.getClass())%0A%09%09%09return false;%0A%09%09OAuth2LoginDetails that = (OAuth2LoginDetails) o;%0A%09%09return Objects.equals(id, that.id) && Objects.equals(clientId, that.clientId) && Objects.equals(accessTokenUri, that.accessTokenUri)%0A%09%09%09%09&& Objects.equals(userAuthorizationUri, that.userAuthorizationUri) && Objects.equals(scope, that.scope) && Objects%0A%09%09%09%09.equals(clientSecret, that.clientSecret) && Objects.equals(authenticationScheme, that.authenticationScheme) && Objects%0A%09%09%09%09.equals(grantType, that.grantType) && Objects.equals(tokenName, that.tokenName) && Objects%0A%09%09%09%09.equals(restrictions, that.restrictions);%0A%09%7D%0A%0A%09@Override%0A%09public int hashCode() %7B%0A%09%09return Objects%0A%09%09%09%09.hash(id, clientId, accessTokenUri, userAuthorizationUri, scope, clientSecret, authenticationScheme, grantType, tokenName,%0A%09%09%09%09%09%09restrictions);%0A%09%7D%0A%0A%09@Override%0A%09public String toString() %7B%0A%09%09return MoreObjects.toStringHelper(this).add(%22id%22, id).add(%22clientId%22, clientId).add(%22accessTokenUri%22, accessTokenUri)%0A%09%09%09%09.add(%22userAuthorizationUri%22, userAuthorizationUri).add(%22scope%22, scope).add(%22clientSecret%22, clientSecret)%0A%09%09%09%09.add(%22authenticationScheme%22, authenticationScheme).add(%22grantType%22, grantType).add(%22tokenName%22, tokenName)%0A%09%09%09%09.add(%22restrictions%22, restrictions).toString();%0A%09%7D
 %0A%7D%0A

add one more field