com.viber.bot.message.KeyboardMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of viber-bot Show documentation
Show all versions of viber-bot Show documentation
Use this library to communicate with the Viber API to develop a bot for https://developers.viber.com/.
The newest version!
package com.viber.bot.message;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Collections;
import java.util.Map;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
@Immutable
public class KeyboardMessage extends Message {
@JsonCreator
public KeyboardMessage(final @JsonProperty("keyboard") @Nullable MessageKeyboard keyboard,
final @JsonProperty("tracking_data") @Nullable TrackingData trackingData,
final @JsonProperty("min_api_version") @Nullable Integer minApiVersion) {
super("keyboard", keyboard, trackingData, minApiVersion);
checkNotNull(keyboard);
}
@Override
protected Map getPartialMapRepresentation() {
return Collections.emptyMap();
}
@Override
public String getType() {
return null; // keyboard message should not contain the type
}
@Override
public String toString() {
return "KeyboardMessage [messageStr=" + super.toString() + "]";
}
}