001/*
002 * Copyright 2020 Global Biodiversity Information Facility (GBIF)
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.gbif.api.model.collections.duplicates;
017
018import org.gbif.api.jackson.LocalDateTimeSerDe;
019
020import java.io.Serializable;
021import java.time.LocalDateTime;
022import java.util.ArrayList;
023import java.util.List;
024import java.util.Set;
025
026import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
027import com.fasterxml.jackson.databind.annotation.JsonSerialize;
028
029/** Result to be used for the GRSciColl API duplicates services. */
030public class DuplicatesResult implements Serializable {
031
032  @JsonSerialize(using = LocalDateTimeSerDe.LocalDateTimeSerializer.class)
033  @JsonDeserialize(using = LocalDateTimeSerDe.LocalDateTimeDeserializer.class)
034  private LocalDateTime generationDate;
035
036  private List<Set<Duplicate>> duplicates = new ArrayList<>();
037
038  public LocalDateTime getGenerationDate() {
039    return generationDate;
040  }
041
042  public void setGenerationDate(LocalDateTime generationDate) {
043    this.generationDate = generationDate;
044  }
045
046  public List<Set<Duplicate>> getDuplicates() {
047    return duplicates;
048  }
049
050  public void setDuplicates(List<Set<Duplicate>> duplicates) {
051    this.duplicates = duplicates;
052  }
053}