org.graylog.plugins.views.migrations.V20191125144500_MigrateDashboardsToViewsSupport.AutoValue_Search Maven / Gradle / Ivy
package org.graylog.plugins.views.migrations.V20191125144500_MigrateDashboardsToViewsSupport;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Optional;
import java.util.Set;
import javax.annotation.Generated;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
import org.mongojack.Id;
import org.mongojack.ObjectId;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_Search extends Search {
private final String id;
private final Set queries;
private final Optional owner;
private final DateTime createdAt;
AutoValue_Search(
@Nullable String id,
Set queries,
Optional owner,
DateTime createdAt) {
this.id = id;
if (queries == null) {
throw new NullPointerException("Null queries");
}
this.queries = queries;
if (owner == null) {
throw new NullPointerException("Null owner");
}
this.owner = owner;
if (createdAt == null) {
throw new NullPointerException("Null createdAt");
}
this.createdAt = createdAt;
}
@Id
@ObjectId
@Nullable
@JsonProperty
@Override
String id() {
return id;
}
@JsonProperty
@Override
Set queries() {
return queries;
}
@JsonProperty("owner")
@Override
Optional owner() {
return owner;
}
@JsonProperty("created_at")
@Override
DateTime createdAt() {
return createdAt;
}
@Override
public String toString() {
return "Search{"
+ "id=" + id + ", "
+ "queries=" + queries + ", "
+ "owner=" + owner + ", "
+ "createdAt=" + createdAt
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Search) {
Search that = (Search) o;
return (this.id == null ? that.id() == null : this.id.equals(that.id()))
&& this.queries.equals(that.queries())
&& 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$ ^= queries.hashCode();
h$ *= 1000003;
h$ ^= owner.hashCode();
h$ *= 1000003;
h$ ^= createdAt.hashCode();
return h$;
}
}