
de.blackrose01.model.Genre Maven / Gradle / Ivy
package de.blackrose01.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.Gson;
import java.io.Serializable;
import java.util.Objects;
/**
* Genres of video game
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class Genre implements Serializable {
@JsonIgnore
@JsonProperty(value = "id")
private long id;
@JsonIgnore
@JsonProperty(value = "name")
private String name;
@JsonIgnore
@JsonProperty(value = "slug")
private String slug;
@JsonIgnore
@JsonProperty(value = "url")
private String url;
@JsonIgnore
@JsonProperty(value = "created_at")
private long createdAt;
@JsonIgnore
@JsonProperty(value = "updated_at")
private long updatedAt;
@JsonIgnore
@JsonProperty(value = "checksum")
private String checksum;
public Genre() {
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSlug() {
return slug;
}
public void setSlug(String slug) {
this.slug = slug;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public long getCreatedAt() {
return createdAt;
}
public void setCreatedAt(long createdAt) {
this.createdAt = createdAt;
}
public long getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(long updatedAt) {
this.updatedAt = updatedAt;
}
public String getChecksum() {
return checksum;
}
public void setChecksum(String checksum) {
this.checksum = checksum;
}
@Override
public String toString() {
return new Gson().toJson(this);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Genre keyword = (Genre) o;
return id == keyword.id &&
createdAt == keyword.createdAt &&
updatedAt == keyword.updatedAt &&
Objects.equals(name, keyword.name) &&
Objects.equals(slug, keyword.slug) &&
Objects.equals(url, keyword.url) &&
Objects.equals(checksum, keyword.checksum);
}
@Override
public int hashCode() {
return Objects.hash(id, name, slug, url, createdAt, updatedAt, checksum);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy