com.github.messenger4j.messengerprofile.targetaudience.BlacklistTargetAudience Maven / Gradle / Ivy
// Generated by delombok at Tue May 07 22:31:27 CEST 2019
package com.github.messenger4j.messengerprofile.targetaudience;
import com.github.messenger4j.common.SupportedCountry;
import java.util.List;
import lombok.NonNull;
/**
* @author Max Grabenhorst
* @since 1.0.0
*/
public final class BlacklistTargetAudience extends TargetAudience {
private final List countries;
private BlacklistTargetAudience(List countries) {
super(Type.CUSTOM);
this.countries = countries;
}
public static BlacklistTargetAudience create(@NonNull List countries) {
if (countries == null) {
throw new java.lang.IllegalArgumentException("countries is marked @NonNull but is null");
}
return new BlacklistTargetAudience(countries);
}
public List countries() {
return countries;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
return "BlacklistTargetAudience(super="
+ super.toString()
+ ", countries="
+ this.countries
+ ")";
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof BlacklistTargetAudience)) return false;
final BlacklistTargetAudience other = (BlacklistTargetAudience) o;
if (!other.canEqual((java.lang.Object) this)) return false;
if (!super.equals(o)) return false;
final java.lang.Object this$countries = this.countries;
final java.lang.Object other$countries = other.countries;
if (this$countries == null ? other$countries != null : !this$countries.equals(other$countries))
return false;
return true;
}
@java.lang.SuppressWarnings("all")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof BlacklistTargetAudience;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final java.lang.Object $countries = this.countries;
result = result * PRIME + ($countries == null ? 43 : $countries.hashCode());
return result;
}
}