private IndexableMessage()

in mailbox/opensearch/src/main/java/org/apache/james/mailbox/opensearch/json/IndexableMessage.java [266:327]


    private IndexableMessage(List<MimePart> attachments,
                             EMailers bcc,
                             Optional<String> bodyHtml,
                             Optional<String> bodyText,
                             EMailers cc,
                             String date,
                             EMailers from,
                             boolean hasAttachment,
                             List<HeaderCollection.Header> headers,
                             boolean isAnswered,
                             boolean isDeleted,
                             boolean isDraft,
                             boolean isFlagged,
                             boolean isRecent,
                             boolean isUnRead,
                             String mailboxId,
                             String mediaType, String messageId,
                             String threadId, String user,
                             ModSeq modSeq,
                             String sentDate,
                             Optional<String> saveDate, long size,
                             Subjects subjects,
                             String subType,
                             EMailers to,
                             long uid,
                             String[] userFlags,
                             Optional<String> mimeMessageID) {
        this.attachments = attachments.stream()
            .map(MimePartDto::from)
            .toList();
        this.bcc = EMailersDto.from(bcc);
        this.bodyHtml = bodyHtml;
        this.bodyText = bodyText;
        this.cc = EMailersDto.from(cc);
        this.date = date;
        this.from = EMailersDto.from(from);
        this.hasAttachment = hasAttachment;
        this.headers = headers.stream()
            .map(HeaderDto::from)
            .collect(Collectors.toList());
        this.isAnswered = isAnswered;
        this.isDeleted = isDeleted;
        this.isDraft = isDraft;
        this.isFlagged = isFlagged;
        this.isRecent = isRecent;
        this.isUnRead = isUnRead;
        this.mailboxId = mailboxId;
        this.mediaType = mediaType;
        this.messageId = messageId;
        this.threadId = threadId;
        this.user = user;
        this.modSeq = modSeq.asLong();
        this.sentDate = sentDate;
        this.saveDate = saveDate;
        this.size = size;
        this.subjects = new SubjectsDto(subjects.getSubjects());
        this.subType = subType;
        this.to = EMailersDto.from(to);
        this.uid = uid;
        this.userFlags = userFlags;
        this.mimeMessageID = mimeMessageID;
    }