package pwc.taxtech.atms.dpo;

import com.fasterxml.jackson.annotation.JsonProperty;

public class RoleInfo {

    @JsonProperty("ID")
    private String id;

    private String name;

    private Boolean isAccessible;

    private Boolean isHeritable;

    private Integer roleSource;
    @JsonProperty("dimensionID")
    private String dimensionId;
    @JsonProperty("dimensionValueID")
    private String dimensionValueId;

    private String dimensionValue;

    /**
     *
     */
    public RoleInfo() {
        super();
    }

    /**
     * @param id
     * @param name
     */
    public RoleInfo(String id, String name) {
        super();
        id = id;
        this.name = name;
    }

    public String getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

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

    public Boolean getIsAccessible() {
        return isAccessible;
    }

    public void setIsAccessible(Boolean isAccessible) {
        this.isAccessible = isAccessible;
    }

    public Boolean getIsHeritable() {
        return isHeritable;
    }

    public void setIsHeritable(Boolean isHeritable) {
        this.isHeritable = isHeritable;
    }

    public Integer getRoleSource() {
        return roleSource;
    }

    public void setRoleSource(Integer roleSource) {
        this.roleSource = roleSource;
    }

    public String getDimensionId() {
        return dimensionId;
    }

    public void setDimensionId(String dimensionId) {
        this.dimensionId = dimensionId;
    }

    public String getDimensionValueId() {
        return dimensionValueId;
    }

    public void setDimensionValueId(String dimensionValueId) {
        this.dimensionValueId = dimensionValueId;
    }

    public String getDimensionValue() {
        return dimensionValue;
    }

    public void setDimensionValue(String dimensionValue) {
        this.dimensionValue = dimensionValue;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        result = prime * result + ((dimensionId == null) ? 0 : dimensionId.hashCode());
        result = prime * result + ((dimensionValue == null) ? 0 : dimensionValue.hashCode());
        result = prime * result + ((dimensionValueId == null) ? 0 : dimensionValueId.hashCode());
        result = prime * result + ((isAccessible == null) ? 0 : isAccessible.hashCode());
        result = prime * result + ((isHeritable == null) ? 0 : isHeritable.hashCode());
        result = prime * result + ((name == null) ? 0 : name.hashCode());
        result = prime * result + ((roleSource == null) ? 0 : roleSource.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        RoleInfo other = (RoleInfo) obj;
        if (id == null) {
            if (other.id != null)
                return false;
        } else if (!id.equals(other.id))
            return false;
        if (dimensionId == null) {
            if (other.dimensionId != null)
                return false;
        } else if (!dimensionId.equals(other.dimensionId))
            return false;
        if (dimensionValue == null) {
            if (other.dimensionValue != null)
                return false;
        } else if (!dimensionValue.equals(other.dimensionValue))
            return false;
        if (dimensionValueId == null) {
            if (other.dimensionValueId != null)
                return false;
        } else if (!dimensionValueId.equals(other.dimensionValueId))
            return false;
        if (isAccessible == null) {
            if (other.isAccessible != null)
                return false;
        } else if (!isAccessible.equals(other.isAccessible))
            return false;
        if (isHeritable == null) {
            if (other.isHeritable != null)
                return false;
        } else if (!isHeritable.equals(other.isHeritable))
            return false;
        if (name == null) {
            if (other.name != null)
                return false;
        } else if (!name.equals(other.name))
            return false;
        if (roleSource == null) {
            if (other.roleSource != null)
                return false;
        } else if (!roleSource.equals(other.roleSource))
            return false;
        return true;
    }


}