Skip to content

Commit 8012084

Browse files
viditZimdasiyogesh
authored andcommittedMar 11, 2025·
ZCS-16660 UpdateD SOAP API Documentation for SendMsg, SaveDraft and SecureSendMsg
Indentation
1 parent 65a1c3e commit 8012084

File tree

4 files changed

+28
-15
lines changed

4 files changed

+28
-15
lines changed
 

‎common/src/java/com/zimbra/common/gql/GqlConstants.java

+1
Original file line numberDiff line numberDiff line change
@@ -710,4 +710,5 @@ public class GqlConstants {
710710

711711
// GetAccount - admin api
712712
public static final String APPLY_COS = "applyCos";
713+
public static final String DELIVERY_RECEIPT_NOTIFICATION = "deliveryReport";
713714
}

‎soap/src/java/com/zimbra/soap/mail/message/SendMsgRequest.java

-13
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,6 @@ public class SendMsgRequest {
105105
@XmlElement(name=MailConstants.E_MSG /* m */, required=false)
106106
private MsgToSend msg;
107107

108-
/**
109-
* @zm-api-field-tag delivery-receipt-notification
110-
* @zm-api-field-description If set, delivery receipt notification will be sent.
111-
*/
112-
@XmlAttribute(name=MailConstants.A_DELIVERY_RECEIPT_NOTIFICATION /* deliveryReport */, required=false)
113-
private ZmBoolean deliveryReport;
114-
115108
public SendMsgRequest() {
116109
}
117110

@@ -131,10 +124,6 @@ public void setFetchSavedMsg(Boolean fetchSavedMsg) {
131124
this.fetchSavedMsg = ZmBoolean.fromBool(fetchSavedMsg);
132125
}
133126

134-
public void setDeliveryReport(Boolean deliveryReport) {
135-
this.deliveryReport = ZmBoolean.fromBool(deliveryReport);
136-
}
137-
138127
public void setSendUid(String sendUid) { this.sendUid = sendUid; }
139128
public void setMsg(MsgToSend msg) { this.msg = msg; }
140129

@@ -143,7 +132,6 @@ public void setDeliveryReport(Boolean deliveryReport) {
143132
public Boolean getNoSaveToSent() { return ZmBoolean.toBool(noSaveToSent); }
144133
public Boolean getFetchSavedMsg() { return ZmBoolean.toBool(fetchSavedMsg); }
145134
public String getSendUid() { return sendUid; }
146-
public Boolean getDeliveryReport() { return ZmBoolean.toBool(deliveryReport); }
147135
public MsgToSend getMsg() { return msg; }
148136

149137
public MoreObjects.ToStringHelper addToStringInfo(MoreObjects.ToStringHelper helper) {
@@ -153,7 +141,6 @@ public MoreObjects.ToStringHelper addToStringInfo(MoreObjects.ToStringHelper hel
153141
.add("noSaveToSent", noSaveToSent)
154142
.add("fetchSavedMsg", fetchSavedMsg)
155143
.add("sendUid", sendUid)
156-
.add("deliveryReport", deliveryReport)
157144
.add("msg", msg);
158145
}
159146

‎soap/src/java/com/zimbra/soap/mail/type/MsgToSend.java

+13-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ public class MsgToSend
5656
@XmlAttribute(name=MailConstants.A_DATASOURCE_ID /* dsId */, required=false)
5757
private String dataSourceId;
5858

59+
/**
60+
* @zm-api-field-tag delivery-receipt-notification
61+
* @zm-api-field-description If set, delivery receipt notification will be sent.
62+
*/
63+
@XmlAttribute(name=MailConstants.A_DELIVERY_RECEIPT_NOTIFICATION /* deliveryReport */, required=false)
64+
private ZmBoolean deliveryReport;
65+
5966
public MsgToSend() {
6067
}
6168

@@ -73,13 +80,18 @@ public void setSendFromDraft(Boolean sendFromDraft) {
7380
public void setDataSourceId(String dsId) { this.dataSourceId = dsId; }
7481
public String getDataSourceId() { return dataSourceId; }
7582

83+
@GraphQLInputField(name=GqlConstants.DELIVERY_RECEIPT_NOTIFICATION, description="Whether to enable DSN for the outgoing message")
84+
public void setDeliveryReport(Boolean deliveryReport) { this.deliveryReport = ZmBoolean.fromBool(deliveryReport); }
85+
public Boolean getDeliveryReport() { return ZmBoolean.toBool(deliveryReport); }
86+
7687
@Override
7788
public MoreObjects.ToStringHelper addToStringInfo(MoreObjects.ToStringHelper helper) {
7889
helper = super.addToStringInfo(helper);
7990
return helper
8091
.add("draftId", draftId)
8192
.add("sendFromDraft", sendFromDraft)
82-
.add("dataSourceId", dataSourceId);
93+
.add("dataSourceId", dataSourceId)
94+
.add("deliveryReport", deliveryReport);
8395
}
8496

8597
@Override

‎soap/src/java/com/zimbra/soap/mail/type/SaveDraftMsg.java

+14-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import com.google.common.base.MoreObjects;
2525
import com.zimbra.common.soap.MailConstants;
26+
import com.zimbra.soap.type.ZmBoolean;
2627

2728
@XmlAccessorType(XmlAccessType.NONE)
2829
public class SaveDraftMsg extends Msg {
@@ -77,6 +78,13 @@ public class SaveDraftMsg extends Msg {
7778
@XmlAttribute(name=MailConstants.A_AUTO_SEND_TIME /* autoSendTime */, required=false)
7879
private Long autoSendTime;
7980

81+
/**
82+
* @zm-api-field-tag delivery-receipt-notification
83+
* @zm-api-field-description If set, delivery receipt notification will be sent.
84+
*/
85+
@XmlAttribute(name=MailConstants.A_DELIVERY_RECEIPT_NOTIFICATION /* deliveryReport */, required=false)
86+
private ZmBoolean deliveryReport;
87+
8088
public SaveDraftMsg() {
8189
}
8290

@@ -92,6 +100,9 @@ public void setDraftAccountId(String draftAccountId) {
92100
public void setAutoSendTime(Long autoSendTime) {
93101
this.autoSendTime = autoSendTime;
94102
}
103+
public void setDeliveryReport(Boolean deliveryReport) {
104+
this.deliveryReport = ZmBoolean.fromBool(deliveryReport);
105+
}
95106

96107
public Integer getId() { return id; }
97108
public String getDraftAccountId() { return draftAccountId; }
@@ -101,6 +112,7 @@ public void setAutoSendTime(Long autoSendTime) {
101112
public String getRgb() { return rgb; }
102113
public Byte getColor() { return color; }
103114
public Long getAutoSendTime() { return autoSendTime; }
115+
public Boolean getDeliveryReport() { return ZmBoolean.toBool(deliveryReport); }
104116

105117
@Override
106118
public MoreObjects.ToStringHelper addToStringInfo(MoreObjects.ToStringHelper helper) {
@@ -112,7 +124,8 @@ public MoreObjects.ToStringHelper addToStringInfo(MoreObjects.ToStringHelper hel
112124
.add("tagNames", tagNames)
113125
.add("rgb", rgb)
114126
.add("color", color)
115-
.add("autoSendTime", autoSendTime);
127+
.add("autoSendTime", autoSendTime)
128+
.add("deliveryReport", deliveryReport);
116129
}
117130

118131
@Override

0 commit comments

Comments
 (0)
Please sign in to comment.