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

it.auties.whatsapp.model.button.interactive.InteractiveResponseBody Maven / Gradle / Ivy

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

import it.auties.protobuf.annotation.ProtobufMessage;
import it.auties.protobuf.annotation.ProtobufProperty;
import it.auties.protobuf.model.ProtobufType;

import java.util.Optional;

/**
 * A model class that represents the body of a product
 */
@ProtobufMessage(name = "Message.InteractiveResponseMessage.Body")
public record InteractiveResponseBody(
        @ProtobufProperty(index = 1, type = ProtobufType.STRING)
        String content
) {
    public static Optional ofNullable(String content) {
        return Optional.ofNullable(content)
                .map(InteractiveResponseBody::new);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy