package com.emailclue.api.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

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

public class EmailSend {

    private final List<EmailAddress> to;
    private final List<EmailAddress> cc;
    private final List<EmailAddress> bcc;
    private final String subject;
    private final List<EmailAttachment> attachments;
    private final Map<String, Object> data;

    @JsonCreator
    public EmailSend(
            @JsonProperty("to") List<EmailAddress> to,
            @JsonProperty("cc") List<EmailAddress> cc,
            @JsonProperty("bcc") List<EmailAddress> bcc,
            @JsonProperty("subject") String subject,
            @JsonProperty("attachments") List<EmailAttachment> attachments,
            @JsonProperty("data") Map<String, Object> data
    ) {
        this.to = to;
        this.cc = cc;
        this.bcc = bcc;
        this.subject = subject;
        this.attachments = attachments;
        this.data = data;
    }

    public List<EmailAddress> getTo() {
        return to;
    }

    public List<EmailAddress> getCc() {
        return cc;
    }

    public List<EmailAddress> getBcc() {
        return bcc;
    }

    public String getSubject() {
        return subject;
    }

    public List<EmailAttachment> getAttachments() {
        return attachments;
    }

    public Map<String, Object> getData() {
        return data;
    }
}

@@ -133,16 +133,56 @@
 roperty;
+%0Aimport com.sun.istack.internal.NotNull;
 %0A%0Aimport
@@ -247,16 +247,29 @@
 Send %7B%0A%0A
+    @NotNull%0A
     priv
@@ -380,24 +380,61 @@
 dress%3E bcc;%0A
+    private final EmailAddress from;%0A
     private 
@@ -755,24 +755,77 @@
 dress%3E bcc,%0A
+            @JsonProperty(%22from%22) EmailAddress from,%0A
             
@@ -1072,24 +1072,50 @@
 .bcc = bcc;%0A
+        this.from = from;%0A
         this
@@ -1399,32 +1399,96 @@
 urn bcc;%0A    %7D%0A%0A
+    public EmailAddress getFrom() %7B%0A        return from;%0A    %7D%0A%0A
     public Strin
@@ -1686,16 +1686,17 @@
 n data;%0A
-
     %7D%0A
+%0A
 %7D%0A

Add from