com.github.messenger4j.send.message.template.button.Button Maven / Gradle / Ivy
// Generated by delombok at Tue May 07 22:31:27 CEST 2019
package com.github.messenger4j.send.message.template.button;
/**
* @author Max Grabenhorst
* @since 1.0.0
*/
public abstract class Button {
private final Type type;
Button(Type type) {
this.type = type;
}
public Type type() {
return type;
}
/** @since 1.0.0 */
public enum Type {
WEB_URL,
POSTBACK,
PHONE_NUMBER,
ELEMENT_SHARE,
ACCOUNT_LINK,
ACCOUNT_UNLINK;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
return "Button(type=" + this.type + ")";
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Button)) return false;
final Button other = (Button) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$type = this.type;
final java.lang.Object other$type = other.type;
if (this$type == null ? other$type != null : !this$type.equals(other$type)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof Button;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $type = this.type;
result = result * PRIME + ($type == null ? 43 : $type.hashCode());
return result;
}
}