org.graylog.security.events.AutoValue_EntitySharesUpdateEvent_Share Maven / Gradle / Ivy
package org.graylog.security.events;
import java.util.Optional;
import javax.annotation.processing.Generated;
import org.graylog.grn.GRN;
import org.graylog.security.Capability;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_EntitySharesUpdateEvent_Share extends EntitySharesUpdateEvent.Share {
private final GRN grantee;
private final Capability capability;
private final Optional formerCapability;
AutoValue_EntitySharesUpdateEvent_Share(
GRN grantee,
Capability capability,
Optional formerCapability) {
if (grantee == null) {
throw new NullPointerException("Null grantee");
}
this.grantee = grantee;
if (capability == null) {
throw new NullPointerException("Null capability");
}
this.capability = capability;
if (formerCapability == null) {
throw new NullPointerException("Null formerCapability");
}
this.formerCapability = formerCapability;
}
@Override
public GRN grantee() {
return grantee;
}
@Override
public Capability capability() {
return capability;
}
@Override
public Optional formerCapability() {
return formerCapability;
}
@Override
public String toString() {
return "Share{"
+ "grantee=" + grantee + ", "
+ "capability=" + capability + ", "
+ "formerCapability=" + formerCapability
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof EntitySharesUpdateEvent.Share) {
EntitySharesUpdateEvent.Share that = (EntitySharesUpdateEvent.Share) o;
return this.grantee.equals(that.grantee())
&& this.capability.equals(that.capability())
&& this.formerCapability.equals(that.formerCapability());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= grantee.hashCode();
h$ *= 1000003;
h$ ^= capability.hashCode();
h$ *= 1000003;
h$ ^= formerCapability.hashCode();
return h$;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy