package uk.ac.ebi.biosamples.model.entities;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import uk.ac.ebi.biosamples.model.enums.BioSamplesRelationType;
import uk.ac.ebi.biosamples.model.util.CharacteristicsDeserializer;

import java.util.List;
import java.util.Map;

@JsonIgnoreProperties(ignoreUnknown = true)

public class Sample implements BioSamplesEntity{

    private String accession;
    private String name;
    private String description;
    private String updateDate;
    private String releaseDate;


    @JsonDeserialize(using = CharacteristicsDeserializer.class)
    private List<BioSamplesCharacteristic> characteristics;

    private Map<BioSamplesRelationType, List<BioSamplesRelation>> relations;


    public String getAccession() {
        return accession;
    }

    public void setAccession(String accession) {
        this.accession = accession;
    }

    public String getName() {
        return name;
    }

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

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(String updateDate) {
        this.updateDate = updateDate;
    }

    public String getReleaseDate() {
        return releaseDate;
    }

    @Override
    public Map<BioSamplesRelationType, List<BioSamplesRelation>> getRelations() {
        return this.relations;
    }

    @Override
    public Class getEntityType() {
        return Sample.class;
    }

    public void setRelations(Map<BioSamplesRelationType, List<BioSamplesRelation>> relations) {
        this.relations = relations;
    }

    public void setReleaseDate(String releaseDate) {
        this.releaseDate = releaseDate;
    }

    public List<BioSamplesCharacteristic> getCharacteristics() {
        return characteristics;
    }

    public void setCharacteristics(List<BioSamplesCharacteristic> characteristics) {
        this.characteristics = characteristics;
    }

}

@@ -101,16 +101,68 @@
 erties;%0A
+import com.fasterxml.jackson.annotation.JsonSetter;%0A
 import c
@@ -1373,32 +1373,62 @@
 ateDate;%0A    %7D%0A%0A
+    @JsonSetter(%22updateDate%22)%0A
     public void 
@@ -1515,55 +1515,443 @@
     
-public String getReleaseDate() %7B%0A        return
+@JsonSetter(%22update%22)%0A    public void setUpdateDateTime(String updateDate) %7B%0A        this.updateDate = updateDate;%0A    %7D%0A%0A    public String getReleaseDate() %7B%0A        return releaseDate;%0A    %7D%0A%0A    @JsonSetter(%22releaseDate%22)%0A    public void setReleaseDate(String releaseDate) %7B%0A        this.releaseDate = releaseDate;%0A    %7D%0A%0A    @JsonSetter(%22release%22)%0A    public void setReleaseDateTime(String releaseDate) %7B%0A        this.releaseDate =
  rel
@@ -2329,107 +2329,8 @@
  %7D%0A%0A
-    public void setReleaseDate(String releaseDate) %7B%0A        this.releaseDate = releaseDate;%0A    %7D%0A
 %0A   

Add JsonSetter annotation on sample for v4 compatibility