it.auties.whatsapp.model.message.server.DeviceSentMessageBuilder Maven / Gradle / Ivy
package it.auties.whatsapp.model.message.server;
public class DeviceSentMessageBuilder {
private it.auties.whatsapp.model.jid.Jid destinationJid;
private it.auties.whatsapp.model.message.model.MessageContainer message;
private java.util.Optional phash;
public DeviceSentMessageBuilder() {
destinationJid = null;
message = null;
phash = java.util.Optional.empty();
}
public DeviceSentMessageBuilder destinationJid(it.auties.whatsapp.model.jid.Jid destinationJid) {
this.destinationJid = destinationJid;
return this;
}
public DeviceSentMessageBuilder message(it.auties.whatsapp.model.message.model.MessageContainer message) {
this.message = message;
return this;
}
public DeviceSentMessageBuilder phash(java.util.Optional phash) {
this.phash = phash;
return this;
}
public DeviceSentMessageBuilder phash(java.lang.String phash) {
this.phash = java.util.Optional.ofNullable(phash);
return this;
}
public it.auties.whatsapp.model.message.server.DeviceSentMessage build() {
return new it.auties.whatsapp.model.message.server.DeviceSentMessage(destinationJid, message, phash);
}
}