org.graylog2.contentstream.db.AutoValue_ContentStreamUserSettings Maven / Gradle / Ivy
package org.graylog2.contentstream.db;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
import org.mongojack.Id;
import org.mongojack.ObjectId;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ContentStreamUserSettings extends ContentStreamUserSettings {
@Nullable
private final String id;
private final String userId;
private final Boolean contentStreamEnabled;
private final Boolean releasesEnabled;
private final List topics;
private AutoValue_ContentStreamUserSettings(
@Nullable String id,
String userId,
Boolean contentStreamEnabled,
Boolean releasesEnabled,
List topics) {
this.id = id;
this.userId = userId;
this.contentStreamEnabled = contentStreamEnabled;
this.releasesEnabled = releasesEnabled;
this.topics = topics;
}
@JsonProperty
@Nullable
@Id
@ObjectId
@Override
public String id() {
return id;
}
@JsonProperty("user_id")
@Override
public String userId() {
return userId;
}
@JsonProperty("content_stream_enabled")
@Override
public Boolean contentStreamEnabled() {
return contentStreamEnabled;
}
@JsonProperty("releases_enabled")
@Override
public Boolean releasesEnabled() {
return releasesEnabled;
}
@JsonProperty("content_stream_topics")
@Override
public List topics() {
return topics;
}
@Override
public String toString() {
return "ContentStreamUserSettings{"
+ "id=" + id + ", "
+ "userId=" + userId + ", "
+ "contentStreamEnabled=" + contentStreamEnabled + ", "
+ "releasesEnabled=" + releasesEnabled + ", "
+ "topics=" + topics
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ContentStreamUserSettings) {
ContentStreamUserSettings that = (ContentStreamUserSettings) o;
return (this.id == null ? that.id() == null : this.id.equals(that.id()))
&& this.userId.equals(that.userId())
&& this.contentStreamEnabled.equals(that.contentStreamEnabled())
&& this.releasesEnabled.equals(that.releasesEnabled())
&& this.topics.equals(that.topics());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= (id == null) ? 0 : id.hashCode();
h$ *= 1000003;
h$ ^= userId.hashCode();
h$ *= 1000003;
h$ ^= contentStreamEnabled.hashCode();
h$ *= 1000003;
h$ ^= releasesEnabled.hashCode();
h$ *= 1000003;
h$ ^= topics.hashCode();
return h$;
}
static final class Builder extends ContentStreamUserSettings.Builder {
private String id;
private String userId;
private Boolean contentStreamEnabled;
private Boolean releasesEnabled;
private List topics;
Builder() {
}
@Override
public ContentStreamUserSettings.Builder id(String id) {
this.id = id;
return this;
}
@Override
public ContentStreamUserSettings.Builder userId(String userId) {
if (userId == null) {
throw new NullPointerException("Null userId");
}
this.userId = userId;
return this;
}
@Override
public ContentStreamUserSettings.Builder contentStreamEnabled(Boolean contentStreamEnabled) {
if (contentStreamEnabled == null) {
throw new NullPointerException("Null contentStreamEnabled");
}
this.contentStreamEnabled = contentStreamEnabled;
return this;
}
@Override
public ContentStreamUserSettings.Builder releasesEnabled(Boolean releasesEnabled) {
if (releasesEnabled == null) {
throw new NullPointerException("Null releasesEnabled");
}
this.releasesEnabled = releasesEnabled;
return this;
}
@Override
public ContentStreamUserSettings.Builder topics(List topics) {
if (topics == null) {
throw new NullPointerException("Null topics");
}
this.topics = topics;
return this;
}
@Override
public ContentStreamUserSettings build() {
if (this.userId == null
|| this.contentStreamEnabled == null
|| this.releasesEnabled == null
|| this.topics == null) {
StringBuilder missing = new StringBuilder();
if (this.userId == null) {
missing.append(" userId");
}
if (this.contentStreamEnabled == null) {
missing.append(" contentStreamEnabled");
}
if (this.releasesEnabled == null) {
missing.append(" releasesEnabled");
}
if (this.topics == null) {
missing.append(" topics");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ContentStreamUserSettings(
this.id,
this.userId,
this.contentStreamEnabled,
this.releasesEnabled,
this.topics);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy