it.auties.whatsapp.model.message.button.TemplateReplyMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of whatsappweb4j Show documentation
Show all versions of whatsappweb4j Show documentation
Standalone fully-featured Whatsapp Web API for Java and Kotlin
package it.auties.whatsapp.model.message.button;
import it.auties.protobuf.base.ProtobufName;
import it.auties.protobuf.base.ProtobufProperty;
import it.auties.whatsapp.model.info.ContextInfo;
import it.auties.whatsapp.model.message.model.ButtonReplyMessage;
import it.auties.whatsapp.model.message.model.MessageType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import lombok.extern.jackson.Jacksonized;
import static it.auties.protobuf.base.ProtobufType.*;
/**
* A model class that represents a message that contains a response to a previous
* {@link HighlyStructuredMessage}
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Jacksonized
@Accessors(fluent = true)
@ProtobufName("TemplateButtonReplyMessage")
public final class TemplateReplyMessage extends ButtonReplyMessage {
/**
* The id of the button that was selected from the previous template message
*/
@ProtobufProperty(index = 1, type = STRING)
private String id;
/**
* The text of the button that was selected from the previous template message
*/
@ProtobufProperty(index = 2, type = STRING)
private String buttonText;
/**
* The context info of this message
*/
@ProtobufProperty(index = 3, type = MESSAGE, implementation = ContextInfo.class)
private ContextInfo contextInfo;
/**
* The index of the button that was selected from the previous template message
*/
@ProtobufProperty(index = 4, type = UINT32)
private int index;
@Override
public MessageType type() {
return MessageType.TEMPLATE_REPLY;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy