com.github.messenger4j.messengerprofile.persistentmenu.action.CallToAction Maven / Gradle / Ivy
// Generated by delombok at Tue May 07 22:31:27 CEST 2019
package com.github.messenger4j.messengerprofile.persistentmenu.action;
/**
* @author Andriy Koretskyy
* @author Max Grabenhorst
* @since 1.0.0
*/
public abstract class CallToAction {
private final Type type;
private final String title;
CallToAction(Type type, String title) {
this.type = type;
this.title = title;
}
public Type type() {
return type;
}
public String title() {
return title;
}
/** @since 1.0.0 */
public enum Type {
WEB_URL,
POSTBACK,
NESTED;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
return "CallToAction(type=" + this.type + ", title=" + this.title + ")";
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof CallToAction)) return false;
final CallToAction other = (CallToAction) 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;
final java.lang.Object this$title = this.title;
final java.lang.Object other$title = other.title;
if (this$title == null ? other$title != null : !this$title.equals(other$title)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof CallToAction;
}
@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());
final java.lang.Object $title = this.title;
result = result * PRIME + ($title == null ? 43 : $title.hashCode());
return result;
}
}