org.graylog.plugins.views.migrations.V20191125144500_MigrateDashboardsToViewsSupport.$AutoValue_View Maven / Gradle / Ivy
package org.graylog.plugins.views.migrations.V20191125144500_MigrateDashboardsToViewsSupport;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Generated;
import javax.annotation.Nullable;
import javax.validation.constraints.NotBlank;
import org.joda.time.DateTime;
import org.mongojack.Id;
import org.mongojack.ObjectId;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_View extends View {
private final String id;
private final View.Type type;
private final @NotBlank String title;
private final String summary;
private final String description;
private final String searchId;
private final Map state;
private final Optional owner;
private final DateTime createdAt;
$AutoValue_View(
@Nullable String id,
View.Type type,
@NotBlank String title,
String summary,
String description,
String searchId,
Map state,
Optional owner,
DateTime createdAt) {
this.id = id;
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
if (title == null) {
throw new NullPointerException("Null title");
}
this.title = title;
if (summary == null) {
throw new NullPointerException("Null summary");
}
this.summary = summary;
if (description == null) {
throw new NullPointerException("Null description");
}
this.description = description;
if (searchId == null) {
throw new NullPointerException("Null searchId");
}
this.searchId = searchId;
if (state == null) {
throw new NullPointerException("Null state");
}
this.state = state;
if (owner == null) {
throw new NullPointerException("Null owner");
}
this.owner = owner;
if (createdAt == null) {
throw new NullPointerException("Null createdAt");
}
this.createdAt = createdAt;
}
@ObjectId
@Id
@Nullable
@JsonProperty("id")
@Override
String id() {
return id;
}
@JsonProperty("type")
@Override
View.Type type() {
return type;
}
@JsonProperty("title")
@Override
@NotBlank String title() {
return title;
}
@JsonProperty("summary")
@Override
String summary() {
return summary;
}
@JsonProperty("description")
@Override
String description() {
return description;
}
@JsonProperty("search_id")
@Override
String searchId() {
return searchId;
}
@JsonProperty("state")
@Override
Map state() {
return state;
}
@JsonProperty("owner")
@Override
Optional owner() {
return owner;
}
@JsonProperty("created_at")
@Override
DateTime createdAt() {
return createdAt;
}
@Override
public String toString() {
return "View{"
+ "id=" + id + ", "
+ "type=" + type + ", "
+ "title=" + title + ", "
+ "summary=" + summary + ", "
+ "description=" + description + ", "
+ "searchId=" + searchId + ", "
+ "state=" + state + ", "
+ "owner=" + owner + ", "
+ "createdAt=" + createdAt
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof View) {
View that = (View) o;
return (this.id == null ? that.id() == null : this.id.equals(that.id()))
&& this.type.equals(that.type())
&& this.title.equals(that.title())
&& this.summary.equals(that.summary())
&& this.description.equals(that.description())
&& this.searchId.equals(that.searchId())
&& this.state.equals(that.state())
&& this.owner.equals(that.owner())
&& this.createdAt.equals(that.createdAt());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= (id == null) ? 0 : id.hashCode();
h$ *= 1000003;
h$ ^= type.hashCode();
h$ *= 1000003;
h$ ^= title.hashCode();
h$ *= 1000003;
h$ ^= summary.hashCode();
h$ *= 1000003;
h$ ^= description.hashCode();
h$ *= 1000003;
h$ ^= searchId.hashCode();
h$ *= 1000003;
h$ ^= state.hashCode();
h$ *= 1000003;
h$ ^= owner.hashCode();
h$ *= 1000003;
h$ ^= createdAt.hashCode();
return h$;
}
}