package org.sagebionetworks.bridge.sdk.models.studies;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.Objects;

import static org.sagebionetworks.bridge.sdk.utils.BridgeUtils.TO_STRING_STYLE;

/**
 * Represent a study summary object
 */
@JsonDeserialize(as=StudySummary.class)
public class StudySummary {
    private String name;
    private String identifier;
    private String type;

    public String getName() {
        return this.name;
    }

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

    public String getIdentifier() {
        return this.identifier;
    }

    public void setIdentifier(String identifier) {
        this.identifier = identifier;
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, identifier, type);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null || getClass() != obj.getClass())
            return false;
        StudySummary other = (StudySummary) obj;
        return (Objects.equals(name, other.name)
                && Objects.equals(identifier, other.identifier)
                && Objects.equals(type, other.type));
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, TO_STRING_STYLE)
                .append("name", name)
                .append("identifier", identifier)
                .append("type", type)
                .toString();
    }
}

@@ -452,33 +452,8 @@
 ier;
-%0A    private String type;
 %0A%0A  
@@ -760,143 +760,8 @@
  %7D%0A%0A
-    public String getType() %7B%0A        return this.type;%0A    %7D%0A%0A    public void setType(String type) %7B%0A        this.type = type;%0A    %7D%0A%0A
     
@@ -842,22 +842,16 @@
 entifier
-, type
 );%0A    %7D
@@ -1204,60 +1204,8 @@
 ier)
-%0A                && Objects.equals(type, other.type)
 );%0A 
@@ -1405,46 +1405,8 @@
 er)%0A
-                .append(%22type%22, type)%0A
     

remove not necessary attribute