org.graylog.security.AutoValue_CapabilityDescriptor Maven / Gradle / Ivy
package org.graylog.security;
import java.util.Set;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_CapabilityDescriptor extends CapabilityDescriptor {
private final Capability capability;
private final String title;
private final Set permissions;
private AutoValue_CapabilityDescriptor(
Capability capability,
String title,
Set permissions) {
this.capability = capability;
this.title = title;
this.permissions = permissions;
}
@Override
public Capability capability() {
return capability;
}
@Override
public String title() {
return title;
}
@Override
public Set permissions() {
return permissions;
}
@Override
public String toString() {
return "CapabilityDescriptor{"
+ "capability=" + capability + ", "
+ "title=" + title + ", "
+ "permissions=" + permissions
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof CapabilityDescriptor) {
CapabilityDescriptor that = (CapabilityDescriptor) o;
return this.capability.equals(that.capability())
&& this.title.equals(that.title())
&& this.permissions.equals(that.permissions());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= capability.hashCode();
h$ *= 1000003;
h$ ^= title.hashCode();
h$ *= 1000003;
h$ ^= permissions.hashCode();
return h$;
}
static final class Builder extends CapabilityDescriptor.Builder {
private Capability capability;
private String title;
private Set permissions;
Builder() {
}
@Override
public CapabilityDescriptor.Builder capability(Capability capability) {
if (capability == null) {
throw new NullPointerException("Null capability");
}
this.capability = capability;
return this;
}
@Override
public CapabilityDescriptor.Builder title(String title) {
if (title == null) {
throw new NullPointerException("Null title");
}
this.title = title;
return this;
}
@Override
public CapabilityDescriptor.Builder permissions(Set permissions) {
if (permissions == null) {
throw new NullPointerException("Null permissions");
}
this.permissions = permissions;
return this;
}
@Override
public CapabilityDescriptor build() {
if (this.capability == null
|| this.title == null
|| this.permissions == null) {
StringBuilder missing = new StringBuilder();
if (this.capability == null) {
missing.append(" capability");
}
if (this.title == null) {
missing.append(" title");
}
if (this.permissions == null) {
missing.append(" permissions");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_CapabilityDescriptor(
this.capability,
this.title,
this.permissions);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy