com.github.messenger4j.send.recipient.UserRefRecipient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of messenger4j Show documentation
Show all versions of messenger4j Show documentation
A Java library for building Chatbots on the Facebook Messenger Platform - easy and fast
The newest version!
// Generated by delombok at Tue May 07 22:31:27 CEST 2019
package com.github.messenger4j.send.recipient;
import lombok.NonNull;
/**
* @author Joe Tindale
* @since 1.0.0
*/
public final class UserRefRecipient extends Recipient {
private final String userRef;
private UserRefRecipient(String userRef) {
this.userRef = userRef;
}
public static UserRefRecipient create(@NonNull String userRef) {
if (userRef == null) {
throw new java.lang.IllegalArgumentException("userRef is marked @NonNull but is null");
}
return new UserRefRecipient(userRef);
}
public String userRef() {
return userRef;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
return "UserRefRecipient(userRef=" + this.userRef + ")";
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof UserRefRecipient)) return false;
final UserRefRecipient other = (UserRefRecipient) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$userRef = this.userRef;
final java.lang.Object other$userRef = other.userRef;
if (this$userRef == null ? other$userRef != null : !this$userRef.equals(other$userRef))
return false;
return true;
}
@java.lang.SuppressWarnings("all")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof UserRefRecipient;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $userRef = this.userRef;
result = result * PRIME + ($userRef == null ? 43 : $userRef.hashCode());
return result;
}
}