package com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.FieldDefaults;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@FieldDefaults(level = AccessLevel.PRIVATE)
public class EntityLogEntry {

    String id;
    String type;
    EntryType entryType;
    EntryState state;
    String value;
    String reason;
    String matchedRule;
    String legalBasis;

    boolean imported;

    String section;
    float[] color;

    @Builder.Default
    List<Position> positions = new ArrayList<>();
    int sectionNumber;

    String textBefore;
    String textAfter;

    int startOffset;
    int endOffset;

    boolean imageHasTransparency;

    boolean dictionaryEntry;
    boolean dossierDictionaryEntry;

    boolean excluded;

    @EqualsAndHashCode.Exclude
    @Builder.Default
    List<Change> changes = new ArrayList<>();

    @EqualsAndHashCode.Exclude
    @Builder.Default
    List<ManualChange> manualChanges = new ArrayList<>();

    @Builder.Default
    Set<Engine> engines = new HashSet<>();

    @Builder.Default
    Set<String> reference = new HashSet<>();

    @Builder.Default
    Set<String> importedRedactionIntersections = new HashSet<>();

}
