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

import java.time.OffsetDateTime;
import java.util.HashSet;
import java.util.Set;

import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.DossierTemplateStatus;
import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.DownloadFileType;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DossierTemplateModel {

    @Schema(description = "The Rule Set Id. Generated by the system on create.")
    private String dossierTemplateId;

    @Schema(description = "The name of this dossierTemplate. Must be set on create / update requests")
    private String name;

    @Schema(description = "The description of this dossierTemplate")
    private String description;

    @Schema(description = "The date when this dossierTemplate was created. Set by System on create.")
    private OffsetDateTime dateAdded;

    @Schema(description = "The date when this dossierTemplate was last modified. Set by System on create.")
    private OffsetDateTime dateModified;

    @Schema(description = "The userId of the user who created this DossierTemplate. Set by the system.")
    private String createdBy;

    @Schema(description = "The userId of the user who last modified this DossierTemplate. Set by the system.")
    private String modifiedBy;

    @Schema(description = "Validity of start this dossierTemplate.")
    private OffsetDateTime validFrom;

    @Schema(description = "Validity of end this dossierTemplate.")
    private OffsetDateTime validTo;

    @Schema(description = "Download File Types for this dossierTemplate's dossiers submission package.")
    @Builder.Default
    private Set<DownloadFileType> downloadFileTypes = new HashSet<>();

    @Schema(description = "Status of dossier template.")
    private DossierTemplateStatus dossierTemplateStatus;

    @Schema(description = "Representing the setting if the metadata of images in pdfs should get kept, or removed")
    private boolean keepImageMetadata;

    @Schema(description = "Representing the setting if the hidden text in pdfs should get kept, or removed")
    private boolean keepHiddenText;

    @Schema(description = "Representing the setting if the overlapping objects in pdfs should get kept or removed by flattening the pages")
    private boolean keepOverlappingObjects;

    @Schema(description = "Representing the setting if dictionary updates is applied to all dossiers")
    private boolean applyDictionaryUpdatesToAllDossiersByDefault;

    @Schema(description = "Flag that specifies if OCR is automatically performed on upload for all dossiers of this template")
    private boolean ocrByDefault;

    @Schema(description = "Flag that specifies the watermark removal in documents will be performed before the OCR processing")
    private boolean removeWatermark;

    public String getId() {

        return dossierTemplateId;
    }

}
