All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.auties.whatsapp.model.message.button.InteractiveMessageBuilder Maven / Gradle / Ivy

package it.auties.whatsapp.model.message.button;

public class InteractiveMessageBuilder {
    private java.util.Optional header;
    private java.util.Optional body;
    private java.util.Optional footer;
    private java.util.Optional contentShop;
    private java.util.Optional contentCollection;
    private java.util.Optional contentNativeFlow;
    private java.util.Optional contextInfo;

    public InteractiveMessageBuilder() {
        header = java.util.Optional.empty();
        body = java.util.Optional.empty();
        footer = java.util.Optional.empty();
        contentShop = java.util.Optional.empty();
        contentCollection = java.util.Optional.empty();
        contentNativeFlow = java.util.Optional.empty();
        contextInfo = java.util.Optional.empty();
    }

    public InteractiveMessageBuilder header(java.util.Optional header) {
        this.header = header;
        return this;
    }
    public InteractiveMessageBuilder header(it.auties.whatsapp.model.button.interactive.InteractiveHeader header) {
        this.header = java.util.Optional.ofNullable(header);
        return this;
    }
    public InteractiveMessageBuilder body(java.util.Optional body) {
        this.body = body;
        return this;
    }
    public InteractiveMessageBuilder body(it.auties.whatsapp.model.button.interactive.InteractiveBody body) {
        this.body = java.util.Optional.ofNullable(body);
        return this;
    }
    public InteractiveMessageBuilder footer(java.util.Optional footer) {
        this.footer = footer;
        return this;
    }
    public InteractiveMessageBuilder footer(it.auties.whatsapp.model.button.interactive.InteractiveFooter footer) {
        this.footer = java.util.Optional.ofNullable(footer);
        return this;
    }
    public InteractiveMessageBuilder contentShop(java.util.Optional contentShop) {
        this.contentShop = contentShop;
        return this;
    }
    public InteractiveMessageBuilder contentShop(it.auties.whatsapp.model.button.interactive.InteractiveShop contentShop) {
        this.contentShop = java.util.Optional.ofNullable(contentShop);
        return this;
    }
    public InteractiveMessageBuilder contentCollection(java.util.Optional contentCollection) {
        this.contentCollection = contentCollection;
        return this;
    }
    public InteractiveMessageBuilder contentCollection(it.auties.whatsapp.model.button.interactive.InteractiveCollection contentCollection) {
        this.contentCollection = java.util.Optional.ofNullable(contentCollection);
        return this;
    }
    public InteractiveMessageBuilder contentNativeFlow(java.util.Optional contentNativeFlow) {
        this.contentNativeFlow = contentNativeFlow;
        return this;
    }
    public InteractiveMessageBuilder contentNativeFlow(it.auties.whatsapp.model.button.interactive.InteractiveNativeFlow contentNativeFlow) {
        this.contentNativeFlow = java.util.Optional.ofNullable(contentNativeFlow);
        return this;
    }
    public InteractiveMessageBuilder contextInfo(java.util.Optional contextInfo) {
        this.contextInfo = contextInfo;
        return this;
    }
    public InteractiveMessageBuilder contextInfo(it.auties.whatsapp.model.info.ContextInfo contextInfo) {
        this.contextInfo = java.util.Optional.ofNullable(contextInfo);
        return this;
    }

    public it.auties.whatsapp.model.message.button.InteractiveMessage build() {
        return new it.auties.whatsapp.model.message.button.InteractiveMessage(header, body, footer, contentShop, contentCollection, contentNativeFlow, contextInfo);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy