Add API return entities as POJO'S

pull/2/head
Hammy 3 years ago
parent 1286a42652
commit 6d71d60e28

@ -0,0 +1,101 @@
package org.goudham.me.api.entity;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* {@link PaginationData}
* <p>Contains standard Pagination data from the API</p>
*
* <li>{@link Integer currentPage}</li>
* <li>{@link Integer lastPage}</li>
* <li>{@link Integer perPage}</li>
* <li>{@link Integer total}</li>
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"current_page",
"last_page",
"per_page",
"total"
})
@Generated("jsonschema2pojo")
public class PaginationData {
/**
* Current requested page
*
*/
@JsonProperty("current_page")
@JsonPropertyDescription("Current requested page")
private Integer currentPage;
/**
* Last available page
*
*/
@JsonProperty("last_page")
@JsonPropertyDescription("Last available page")
private Integer lastPage;
/**
* Total number of items per page
*
*/
@JsonProperty("per_page")
@JsonPropertyDescription("Total number of items per page")
private Integer perPage;
/**
* Total number of items
*
*/
@JsonProperty("total")
@JsonPropertyDescription("Total number of items")
private Integer total;
@JsonProperty("current_page")
public Integer getCurrentPage() {
return currentPage;
}
@JsonProperty("current_page")
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
@JsonProperty("last_page")
public Integer getLastPage() {
return lastPage;
}
@JsonProperty("last_page")
public void setLastPage(Integer lastPage) {
this.lastPage = lastPage;
}
@JsonProperty("per_page")
public Integer getPerPage() {
return perPage;
}
@JsonProperty("per_page")
public void setPerPage(Integer perPage) {
this.perPage = perPage;
}
@JsonProperty("total")
public Integer getTotal() {
return total;
}
@JsonProperty("total")
public void setTotal(Integer total) {
this.total = total;
}
}

@ -0,0 +1,102 @@
package org.goudham.me.api.entity;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.Objects;
/**
* {@link Studio}
* <p> Contains information on a given animation or game development studio </p>
*
* <p>Fields included are:</p>
* <li>{@link Integer id}</li>
* <li>{@link String name}</li>
* <li>{@link String originalName}</li>
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id",
"name",
"original_name"
})
@Generated("jsonschema2pojo")
public class Studio {
/**
* {@link Studio} ID
*/
@JsonProperty("id")
@JsonPropertyDescription("Studio ID")
private Integer id;
/**
* {@link Studio} Name
*/
@JsonProperty("name")
@JsonPropertyDescription("Studio Name")
private String name;
/**
* {@link Studio}'s Original Name
*/
@JsonProperty("original_name")
@JsonPropertyDescription("Studio's Original Name")
private String originalName;
@JsonProperty("id")
public Integer getId() {
return id;
}
@JsonProperty("id")
public void setId(Integer id) {
this.id = id;
}
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@JsonProperty("original_name")
public String getOriginalName() {
return originalName;
}
@JsonProperty("original_name")
public void setOriginalName(String originalName) {
this.originalName = originalName;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Studio studio = (Studio) o;
return Objects.equals(id, studio.id) && Objects.equals(name, studio.name) && Objects.equals(originalName, studio.originalName);
}
@Override
public int hashCode() {
return Objects.hash(id, name, originalName);
}
@Override
public String toString() {
return "Studio{" +
"id=" + id +
", name='" + name + '\'' +
", originalName='" + originalName + '\'' +
'}';
}
}

@ -0,0 +1,189 @@
package org.goudham.me.api.entity.series;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.Objects;
/**
* {@link FilteredSeries}
* <p> Contains basic series information for most endpoints </p>
*
* <p> Fields included are: </p>
* <li>{@link String name}</li>
* <li>{@link String originalName}</li>
* <li>{@link String romajiName}</li>
* <li>{@link String slug}</li>
* <li>{@link String description}</li>
* <li>{@link String url}</li>
* <li>{@link Integer id}</li>
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"name",
"original_name",
"romaji_name",
"slug",
"description",
"url",
"id"
})
@Generated("jsonschema2pojo")
public class FilteredSeries {
/**
* Full name, in English.
*
*/
@JsonProperty("name")
@JsonPropertyDescription("Full name, in English.")
private String name;
/**
* Name in the original language ()
*
*/
@JsonProperty("original_name")
@JsonPropertyDescription("Name in the original language (\u65e5\u672c\u8a9e)")
private String originalName;
/**
* If this {@link Series} has a romaji name, we'll put it here.
*
*/
@JsonProperty("romaji_name")
@JsonPropertyDescription("if this character has a romaji name, we'll put it here. ")
private String romajiName;
/**
* Readable URL's for this {@link Series}
*
*/
@JsonProperty("slug")
@JsonPropertyDescription("Used to generate readable URL's for the Waifu")
private String slug;
/**
* Truncated, spoiler-free description of this {@link Series}
*
*/
@JsonProperty("description")
@JsonPropertyDescription("Truncated, spoiler-free description of this Waifu")
private String description;
/**
* URL to view in browser
*
*/
@JsonProperty("url")
@JsonPropertyDescription("URL to view in browser")
private String url;
/**
* Interal ID of this {@link Series}
*/
@JsonProperty("id")
@JsonPropertyDescription("Internal ID of the series")
private Integer id;
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@JsonProperty("original_name")
public String getOriginalName() {
return originalName;
}
@JsonProperty("original_name")
public void setOriginalName(String originalName) {
this.originalName = originalName;
}
@JsonProperty("romaji_name")
public String getRomajiName() {
return romajiName;
}
@JsonProperty("romaji_name")
public void setRomajiName(String romajiName) {
this.romajiName = romajiName;
}
@JsonProperty("slug")
public String getSlug() {
return slug;
}
@JsonProperty("slug")
public void setSlug(String slug) {
this.slug = slug;
}
@JsonProperty("description")
public String getDescription() {
return description;
}
@JsonProperty("description")
public void setDescription(String description) {
this.description = description;
}
@JsonProperty("url")
public String getUrl() {
return url;
}
@JsonProperty("url")
public void setUrl(String url) {
this.url = url;
}
@JsonProperty("id")
public Integer getId() {
return id;
}
@JsonProperty("id")
public void setId(Integer id) {
this.id = id;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FilteredSeries that = (FilteredSeries) o;
return Objects.equals(name, that.name) && Objects.equals(originalName, that.originalName) && Objects.equals(romajiName, that.romajiName) && Objects.equals(slug, that.slug) && Objects.equals(description, that.description) && Objects.equals(url, that.url) && Objects.equals(id, that.id);
}
@Override
public int hashCode() {
return Objects.hash(name, originalName, romajiName, slug, description, url, id);
}
@Override
public String toString() {
return "FilteredSeries{" +
"name='" + name + '\'' +
", originalName='" + originalName + '\'' +
", romajiName='" + romajiName + '\'' +
", slug='" + slug + '\'' +
", description='" + description + '\'' +
", url='" + url + '\'' +
", id=" + id +
'}';
}
}

@ -0,0 +1,313 @@
package org.goudham.me.api.entity.series;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.goudham.me.api.entity.Studio;
import org.goudham.me.api.entity.waifu.Waifu;
import java.util.Objects;
/**
* {@link Series}
* <p>Represents a grouping of various {@link Waifu}'s. This can be an anime, mobile game, video game, manga, or LN</p>
*
* <p> Fields included are: </p>
* <li>{@link String name}</li>
* <li>{@link String originalName}</li>
* <li>{@link String romajiName}</li>
* <li>{@link String slug}</li>
* <li>{@link String releaseDate}</li>
* <li>{@link String airingStart}</li>
* <li>{@link String airingEnd}</li>
* <li>{@link Integer episodeCount}</li>
* <li>{@link String image}</li>
* <li>{@link String url}</li>
* <li>{@link Studio}</li>
* <li>{@link Integer id}</li>
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"name",
"original_name",
"romaji_name",
"description",
"slug",
"release_date",
"airing_start",
"airing_end",
"episode_count",
"image",
"url",
"studio",
"id"
})
@Generated("jsonschema2pojo")
public class Series {
/**
* Full Name (in English)
*
*/
@JsonProperty("name")
@JsonPropertyDescription("Full Name (in English)")
private String name;
/**
* Name in the original language ()
*
*/
@JsonProperty("original_name")
@JsonPropertyDescription("Name in the original language (\u65e5\u672c\u8a9e)")
private String originalName;
/**
* Romanization of this {@link Series} name
*
*/
@JsonProperty("romaji_name")
@JsonPropertyDescription("Romanization of this Series name")
private String romajiName;
/**
* Spoiler-free description of the {@link Series}, work, etc
*
*/
@JsonProperty("description")
@JsonPropertyDescription("Spoiler-free description of the series, work, etc")
private String description;
/**
* Used to generate readable URL's for the {@link Series}
*
*/
@JsonProperty("slug")
@JsonPropertyDescription("Used to generate readable URL's for the Series")
private String slug;
/**
* Original works release date (
*
*/
@JsonProperty("release_date")
@JsonPropertyDescription("Original works release date (")
private String releaseDate;
/**
* The works airing start date
*
*/
@JsonProperty("airing_start")
@JsonPropertyDescription("The works airing start date")
private String airingStart;
/**
* The works airing end date
*
*/
@JsonProperty("airing_end")
@JsonPropertyDescription("The works airing end date")
private String airingEnd;
/**
* The number of episodes in this work. 1 if OVA or Movie.
*
*/
@JsonProperty("episode_count")
@JsonPropertyDescription("The number of episodes in this work. 1 if OVA or Movie.")
private Integer episodeCount;
/**
* URL of the display picture
*
*/
@JsonProperty("image")
@JsonPropertyDescription("URL of the display picture")
private String image;
/**
* URL of the {@link Series}
*/
@JsonProperty("url")
private String url;
/**
* {@link Studio}
* <p>
* Contains information on a given animation or game development studio
*
*/
@JsonProperty("studio")
@JsonPropertyDescription("Contains information on a given animation or game development studio")
private Studio studio;
/**
* The internal ID of the {@link Series}
*
*/
@JsonProperty("id")
@JsonPropertyDescription("The internal ID of the Series")
private Integer id;
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@JsonProperty("original_name")
public String getOriginalName() {
return originalName;
}
@JsonProperty("original_name")
public void setOriginalName(String originalName) {
this.originalName = originalName;
}
@JsonProperty("romaji_name")
public String getRomajiName() {
return romajiName;
}
@JsonProperty("romaji_name")
public void setRomajiName(String romajiName) {
this.romajiName = romajiName;
}
@JsonProperty("description")
public String getDescription() {
return description;
}
@JsonProperty("description")
public void setDescription(String description) {
this.description = description;
}
@JsonProperty("slug")
public String getSlug() {
return slug;
}
@JsonProperty("slug")
public void setSlug(String slug) {
this.slug = slug;
}
@JsonProperty("release_date")
public String getReleaseDate() {
return releaseDate;
}
@JsonProperty("release_date")
public void setReleaseDate(String releaseDate) {
this.releaseDate = releaseDate;
}
public String getAiringStart() {
return airingStart;
}
public void setAiringStart(String airingStart) {
this.airingStart = airingStart;
}
@JsonProperty("airing_end")
public String getAiringEnd() {
return airingEnd;
}
@JsonProperty("airing_end")
public void setAiringEnd(String airingEnd) {
this.airingEnd = airingEnd;
}
@JsonProperty("episode_count")
public Integer getEpisodeCount() {
return episodeCount;
}
@JsonProperty("episode_count")
public void setEpisodeCount(Integer episodeCount) {
this.episodeCount = episodeCount;
}
@JsonProperty("image")
public String getImage() {
return image;
}
@JsonProperty("image")
public void setImage(String image) {
this.image = image;
}
@JsonProperty("url")
public String getUrl() {
return url;
}
@JsonProperty("url")
public void setUrl(String url) {
this.url = url;
}
@JsonProperty("studio")
public Studio getStudio() {
return studio;
}
@JsonProperty("studio")
public void setStudio(Studio studio) {
this.studio = studio;
}
@JsonProperty("id")
public Integer getId() {
return id;
}
@JsonProperty("id")
public void setId(Integer id) {
this.id = id;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Series series = (Series) o;
return Objects.equals(name, series.name) && Objects.equals(originalName, series.originalName) && Objects.equals(romajiName, series.romajiName) && Objects.equals(description, series.description) && Objects.equals(slug, series.slug) && Objects.equals(releaseDate, series.releaseDate) && Objects.equals(airingStart, series.airingStart) && Objects.equals(airingEnd, series.airingEnd) && Objects.equals(episodeCount, series.episodeCount) && Objects.equals(image, series.image) && Objects.equals(url, series.url) && Objects.equals(studio, series.studio) && Objects.equals(id, series.id);
}
@Override
public int hashCode() {
return Objects.hash(name, originalName, romajiName, description, slug, releaseDate, airingStart, airingEnd, episodeCount, image, url, studio, id);
}
@Override
public String toString() {
return "Series{" +
"name='" + name + '\'' +
", originalName='" + originalName + '\'' +
", romajiName='" + romajiName + '\'' +
", description='" + description + '\'' +
", slug='" + slug + '\'' +
", releaseDate='" + releaseDate + '\'' +
", airingStart='" + airingStart + '\'' +
", airingEnd='" + airingEnd + '\'' +
", episodeCount=" + episodeCount +
", image='" + image + '\'' +
", url='" + url + '\'' +
", studio=" + studio +
", id=" + id +
'}';
}
}

@ -0,0 +1,101 @@
package org.goudham.me.api.entity.user;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.goudham.me.api.entity.series.Series;
import javax.annotation.processing.Generated;
import java.util.Objects;
/**
* {@link TrueLove}
* <p>Represents a {@link User}'s True Love</p>
*
* <li>{@link String name}</li>
* <li>{@link String slug}</li>
* <li>{@link String series}</li>
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"name",
"slug",
"series"
})
@Generated("jsonschema2pojo")
public class TrueLove {
/**
* Name of {@link TrueLove}
*/
@JsonProperty("name")
@JsonPropertyDescription("Name of True Love")
private String name;
/**
* Slug value of {@link TrueLove}
*/
@JsonProperty("slug")
@JsonPropertyDescription("Slug value of True Love")
private String slug;
/**
* {@link Series} that this {@link TrueLove} is part of
*/
@JsonProperty("series")
@JsonPropertyDescription("Series that this TrueLove is part of")
private String series;
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@JsonProperty("slug")
public String getSlug() {
return slug;
}
@JsonProperty("slug")
public void setSlug(String slug) {
this.slug = slug;
}
@JsonProperty("series")
public String getSeries() {
return series;
}
@JsonProperty("series")
public void setSeries(String series) {
this.series = series;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TrueLove trueLove = (TrueLove) o;
return Objects.equals(name, trueLove.name) && Objects.equals(slug, trueLove.slug) && Objects.equals(series, trueLove.series);
}
@Override
public int hashCode() {
return Objects.hash(name, slug, series);
}
@Override
public String toString() {
return "TrueLove{" +
"name='" + name + '\'' +
", slug='" + slug + '\'' +
", series='" + series + '\'' +
'}';
}
}

@ -0,0 +1,208 @@
package org.goudham.me.api.entity.user;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.goudham.me.api.entity.waifu.Waifu;
import java.util.Objects;
/**
* {@link User}
* <p>Standard user information and counts of waifus created, liked, trashed. Also contains true love</p>
*
* <p> Fields included are: </p>
* <li>{@link Integer id}</li>
* <li>{@link String name}</li>
* <li>{@link String twitter}</li>
* <li>{@link String joined}</li>
* <li>{@link Integer waifusCreated}</li>
* <li>{@link Integer waifusLiked}</li>
* <li>{@link Integer waifusTrashed}</li>
* <li>{@link TrueLove trueLove}</li>
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id",
"name",
"twitter",
"joined",
"waifus_created",
"waifus_liked",
"waifus_trashed",
"true_love"
})
@Generated("jsonschema2pojo")
public class User {
/**
* {@link User} ID
*/
@JsonProperty("id")
private Integer id;
/**
* {@link User}'s display name, or twitter name
*
*/
@JsonProperty("name")
@JsonPropertyDescription("User's display name, or twitter name")
private String name;
/**
* {@link User}'s Twitter Handle
*
*/
@JsonProperty("twitter")
@JsonPropertyDescription("User's Twitter Handle")
private String twitter;
/**
* ISO 8601 date when {@link User} joined
*
*/
@JsonProperty("joined")
@JsonPropertyDescription("ISO 8601 date when user joined")
private String joined;
/**
* Number of {@link Waifu}'s this {@link User} has created
*
*/
@JsonProperty("waifus_created")
@JsonPropertyDescription("Number of Waifu's this user has created")
private Integer waifusCreated;
/**
* Number of {@link Waifu}'s this {@link User} has liked
*
*/
@JsonProperty("waifus_liked")
@JsonPropertyDescription("Number of Waifu's this user has liked")
private Integer waifusLiked;
/**
* Number of {@link Waifu}'s this {@link User} has trashed
*
*/
@JsonProperty("waifus_trashed")
@JsonPropertyDescription("Number of Waifu's this user has trashed")
private Integer waifusTrashed;
/**
* <p>User's {@link TrueLove}</p>
*/
@JsonProperty("true_love")
private TrueLove trueLove;
@JsonProperty("id")
public Integer getId() {
return id;
}
@JsonProperty("id")
public void setId(Integer id) {
this.id = id;
}
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@JsonProperty("twitter")
public String getTwitter() {
return twitter;
}
@JsonProperty("twitter")
public void setTwitter(String twitter) {
this.twitter = twitter;
}
@JsonProperty("joined")
public String getJoined() {
return joined;
}
@JsonProperty("joined")
public void setJoined(String joined) {
this.joined = joined;
}
@JsonProperty("waifus_created")
public Integer getWaifusCreated() {
return waifusCreated;
}
@JsonProperty("waifus_created")
public void setWaifusCreated(Integer waifusCreated) {
this.waifusCreated = waifusCreated;
}
@JsonProperty("waifus_liked")
public Integer getWaifusLiked() {
return waifusLiked;
}
@JsonProperty("waifus_liked")
public void setWaifusLiked(Integer waifusLiked) {
this.waifusLiked = waifusLiked;
}
@JsonProperty("waifus_trashed")
public Integer getWaifusTrashed() {
return waifusTrashed;
}
@JsonProperty("waifus_trashed")
public void setWaifusTrashed(Integer waifusTrashed) {
this.waifusTrashed = waifusTrashed;
}
@JsonProperty("true_love")
public TrueLove getTrueLove() {
return trueLove;
}
@JsonProperty("true_love")
public void setTrueLove(TrueLove trueLove) {
this.trueLove = trueLove;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
User user = (User) o;
return Objects.equals(id, user.id) && Objects.equals(name, user.name) && Objects.equals(twitter, user.twitter) && Objects.equals(joined, user.joined) && Objects.equals(waifusCreated, user.waifusCreated) && Objects.equals(waifusLiked, user.waifusLiked) && Objects.equals(waifusTrashed, user.waifusTrashed) && Objects.equals(trueLove, user.trueLove);
}
@Override
public int hashCode() {
return Objects.hash(id, name, twitter, joined, waifusCreated, waifusLiked, waifusTrashed, trueLove);
}
@Override
public String toString() {
return "User{" +
"id=" + id +
", name='" + name + '\'' +
", twitter='" + twitter + '\'' +
", joined='" + joined + '\'' +
", waifusCreated=" + waifusCreated +
", waifusLiked=" + waifusLiked +
", waifusTrashed=" + waifusTrashed +
", trueLove=" + trueLove +
'}';
}
}

@ -0,0 +1,125 @@
package org.goudham.me.api.entity.user;
import java.util.List;
import java.util.Objects;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.goudham.me.api.entity.waifu.Waifu;
/**
* {@link UserList}
* <p>Get an array of all user lists on their profile</p>
*
* <li>{@link Integer id}</li>
* <li>{@link String name}</li>
* <li>{@link String order}</li>
* <li>{@link List< Waifu > waifus}</li>
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id",
"name",
"order",
"waifus"
})
@Generated("jsonschema2pojo")
public class UserList {
/**
* {@link UserList} ID
*
*/
@JsonProperty("id")
@JsonPropertyDescription("UserList ID")
private Integer id;
/**
* {@link UserList} Name
*
*/
@JsonProperty("name")
@JsonPropertyDescription("UserList Name")
private String name;
/**
* Order this appears in the {@link UserList}
*
*/
@JsonProperty("order")
@JsonPropertyDescription("Order this appears in the UserList")
private Integer order;
/**
* List of {@link Waifu}'s within the {@link UserList}
*
*/
@JsonProperty("waifus")
@JsonPropertyDescription("List of Waifu's within the UserList")
private List<Waifu> waifus;
@JsonProperty("id")
public Integer getId() {
return id;
}
@JsonProperty("id")
public void setId(Integer id) {
this.id = id;
}
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@JsonProperty("order")
public Integer getOrder() {
return order;
}
@JsonProperty("order")
public void setOrder(Integer order) {
this.order = order;
}
@JsonProperty("waifus")
public List<Waifu> getWaifus() {
return waifus;
}
@JsonProperty("waifus")
public void setWaifus(List<Waifu> waifus) {
this.waifus = waifus;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
UserList userList = (UserList) o;
return Objects.equals(id, userList.id) && Objects.equals(name, userList.name) && Objects.equals(order, userList.order) && Objects.equals(waifus, userList.waifus);
}
@Override
public int hashCode() {
return Objects.hash(id, name, order, waifus);
}
@Override
public String toString() {
return "UserList{" +
"id=" + id +
", name='" + name + '\'' +
", order=" + order +
", waifus=" + waifus +
'}';
}
}

@ -0,0 +1,122 @@
package org.goudham.me.api.entity.waifu;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import javax.annotation.processing.Generated;
/**
* {@link Appearance}
* <p>Contains basic series information for most endpoints</p>
*
* <p> Fields included are: </p>
* <li>{@link String name}</li>
* <li>{@link String originalName}</li>
* <li>{@link String romajiName}</li>
* <li>{@link String slug}</li>
* <li>{@link String description}</li>
* <li>{@link String url}</li>
* <li>{@link Integer id}</li>
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"name",
"original_name",
"romaji_name",
"slug",
"description",
"url",
"id"
})
@Generated("jsonschema2pojo")
public class Appearance {
@JsonProperty("name")
private String name;
@JsonProperty("original_name")
private String originalName;
@JsonProperty("romaji_name")
private String romajiName;
@JsonProperty("slug")
private String slug;
@JsonProperty("description")
private String description;
@JsonProperty("url")
private String url;
@JsonProperty("id")
@JsonPropertyDescription("Internal ID of the series")
private Integer id;
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@JsonProperty("original_name")
public String getOriginalName() {
return originalName;
}
@JsonProperty("original_name")
public void setOriginalName(String originalName) {
this.originalName = originalName;
}
@JsonProperty("romaji_name")
public String getRomajiName() {
return romajiName;
}
@JsonProperty("romaji_name")
public void setRomajiName(String romajiName) {
this.romajiName = romajiName;
}
@JsonProperty("slug")
public String getSlug() {
return slug;
}
@JsonProperty("slug")
public void setSlug(String slug) {
this.slug = slug;
}
@JsonProperty("description")
public String getDescription() {
return description;
}
@JsonProperty("description")
public void setDescription(String description) {
this.description = description;
}
@JsonProperty("url")
public String getUrl() {
return url;
}
@JsonProperty("url")
public void setUrl(String url) {
this.url = url;
}
@JsonProperty("id")
public Integer getId() {
return id;
}
@JsonProperty("id")
public void setId(Integer id) {
this.id = id;
}
}

@ -0,0 +1,270 @@
package org.goudham.me.api.entity.waifu;
import java.util.List;
import java.util.Objects;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Filtered Waifu
* <p>Contains Waifu data structure for endpoints other than the primary endpoint (/waifu/{slug})</p>
*
* <p> Fields included are: </p>
* <li>{@link String slug}</li>
* <li>{@link String name}</li>
* <li>{@link String originalName}</li>
* <li>{@link String romajiName}</li>
* <li>{@link String displayPicture}</li>
* <li>{@link Integer likes}</li>
* <li>{@link Integer trash}</li>
* <li>{@link Integer episodeCount}</li>
* <li>{@link String url}</li>
* <li>{@link List<Appearance> appearances}</li>
* <li>{@link Double id}</li>
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"slug",
"name",
"original_name",
"romaji_name",
"display_picture",
"description",
"likes",
"trash",
"url",
"appearances",
"id"
})
@Generated("jsonschema2pojo")
public class FilteredWaifu {
/**
* Used to generate readable URL's for the Waifu
*
*/
@JsonProperty("slug")
@JsonPropertyDescription("Used to generate readable URL's for the Waifu")
private String slug;
/**
* Full name, in English.
*
*/
@JsonProperty("name")
@JsonPropertyDescription("Full name, in English.")
private String name;
/**
* Name in the original language ()
*
*/
@JsonProperty("original_name")
@JsonPropertyDescription("Name in the original language (\u65e5\u672c\u8a9e)")
private String originalName;
/**
* If this character has a romaji name, we'll put it here.
*
*/
@JsonProperty("romaji_name")
@JsonPropertyDescription("if this character has a romaji name, we'll put it here. ")
private String romajiName;
/**
* URL of the display picture
*
*/
@JsonProperty("display_picture")
@JsonPropertyDescription("URL of the display picture")
private String displayPicture;
/**
* Truncated, spoiler-free description of this Waifu
*
*/
@JsonProperty("description")
@JsonPropertyDescription("Truncated, spoiler-free description of this Waifu")
private String description;
/**
* Number of likes for this Waifu
*
*/
@JsonProperty("likes")
@JsonPropertyDescription("Number of likes for this Waifu")
private Integer likes;
/**
* Number of trashes for this Waifu
*
*/
@JsonProperty("trash")
@JsonPropertyDescription("Number of trashes for this Waifu")
private Integer trash;
/**
* URL to view in browser
*
*/
@JsonProperty("url")
@JsonPropertyDescription("URL to view in browser")
private String url;
/**
* <p>{@link List<Appearance>} of Waifu's {@link Appearance}</p>
*/
@JsonProperty("appearances")
private List<Appearance> appearances;
/**
* {@link FilteredWaifu} ID
*/
@JsonProperty("id")
private Double id;
@JsonProperty("slug")
public String getSlug() {
return slug;
}
@JsonProperty("slug")
public void setSlug(String slug) {
this.slug = slug;
}
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@JsonProperty("original_name")
public String getOriginalName() {
return originalName;
}
@JsonProperty("original_name")
public void setOriginalName(String originalName) {
this.originalName = originalName;
}
@JsonProperty("romaji_name")
public String getRomajiName() {
return romajiName;
}
@JsonProperty("romaji_name")
public void setRomajiName(String romajiName) {
this.romajiName = romajiName;
}
@JsonProperty("display_picture")
public String getDisplayPicture() {
return displayPicture;
}
@JsonProperty("display_picture")
public void setDisplayPicture(String displayPicture) {
this.displayPicture = displayPicture;
}
@JsonProperty("description")
public String getDescription() {
return description;
}
@JsonProperty("description")
public void setDescription(String description) {
this.description = description;
}
@JsonProperty("likes")
public Integer getLikes() {
return likes;
}
@JsonProperty("likes")
public void setLikes(Integer likes) {
this.likes = likes;
}
@JsonProperty("trash")
public Integer getTrash() {
return trash;
}
@JsonProperty("trash")
public void setTrash(Integer trash) {
this.trash = trash;
}
@JsonProperty("url")
public String getUrl() {
return url;
}
@JsonProperty("url")
public void setUrl(String url) {
this.url = url;
}
@JsonProperty("appearances")
public List<Appearance> getAppearances() {
return appearances;
}
@JsonProperty("appearances")
public void setAppearances(List<Appearance> appearances) {
this.appearances = appearances;
}
@JsonProperty("id")
public Double getId() {
return id;
}
@JsonProperty("id")
public void setId(Double id) {
this.id = id;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FilteredWaifu that = (FilteredWaifu) o;
return Objects.equals(slug, that.slug) && Objects.equals(name, that.name) && Objects.equals(originalName, that.originalName) && Objects.equals(romajiName, that.romajiName) && Objects.equals(displayPicture, that.displayPicture) && Objects.equals(description, that.description) && Objects.equals(likes, that.likes) && Objects.equals(trash, that.trash) && Objects.equals(url, that.url) && Objects.equals(appearances, that.appearances) && Objects.equals(id, that.id);
}
@Override
public int hashCode() {
return Objects.hash(slug, name, originalName, romajiName, displayPicture, description, likes, trash, url, appearances, id);
}
@Override
public String toString() {
return "FilteredWaifu{" +
"slug='" + slug + '\'' +
", name='" + name + '\'' +
", originalName='" + originalName + '\'' +
", romajiName='" + romajiName + '\'' +
", displayPicture='" + displayPicture + '\'' +
", description='" + description + '\'' +
", likes=" + likes +
", trash=" + trash +
", url='" + url + '\'' +
", appearances=" + appearances +
", id=" + id +
'}';
}
}

@ -0,0 +1,683 @@
package org.goudham.me.api.entity.waifu;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import org.goudham.me.api.entity.series.Series;
/**
* {@link Waifu}
* <p>Contains most common attributes for {@link Waifu}'s based on various source material</p>
*
* <p> Fields included are: </p>
* <li>{@link Integer id}</li>
* <li>{@link String slug}</li>
* <li>{@link Integer creatorId}</li>
* <li>{@link String name}</li>
* <li>{@link String originalName}</li>
* <li>{@link String displayPicture}</li>
* <li>{@link String description}</li>
* <li>{@link Double weight}</li>
* <li>{@link Double height}</li>
* <li>{@link Double bust}</li>
* <li>{@link Double hip}</li>
* <li>{@link Double waist}</li>
* <li>{@link Waifu.BloodType bloodType}</li>
* <li>{@link String origin}</li>
* <li>{@link Integer age}</li>
* <li>{@link String birthdayMonth}</li>
* <li>{@link Integer birthdayDay}</li>
* <li>{@link Integer birthdayYear}</li>
* <li>{@link Integer likes}</li>
* <li>{@link Integer trash}</li>
* <li>{@link String url}</li>
* <li>{@link Boolean husbando}</li>
* <li>{@link Boolean nsfw}</li>
* <li>{@link Integer popularityRank}</li>
* <li>{@link Integer likeRank}</li>
* <li>{@link Integer trashRank}</li>
* <li>{@link List<Appearance> appearances}</li>
* <li>{@link Series series}</li>
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id",
"slug",
"creator_id",
"name",
"original_name",
"display_picture",
"description",
"weight",
"height",
"bust",
"hip",
"waist",
"blood_type",
"origin",
"age",
"birthday_month",
"birthday_day",
"birthday_year",
"likes",
"trash",
"url",
"husbando",
"nsfw",
"popularity_rank",
"like_rank",
"trash_rank",
"appearances",
"series"
})
@Generated("jsonschema2pojo")
public class Waifu {
/**
* {@link Waifu} ID
*
*/
@JsonProperty("id")
@JsonPropertyDescription("ID of this Waifu")
private Integer id;
/**
* Used to generate readable URL's for the {@link Waifu}
*
*/
@JsonProperty("slug")
@JsonPropertyDescription("Used to generate readable URL's for the Waifu")
private String slug;
/**
* ID of the user who created this {@link Waifu}
*
*/
@JsonProperty("creator_id")
@JsonPropertyDescription("ID of the user who created this Waifu")
private Integer creatorId;
/**
* Full name, in English.
*
*/
@JsonProperty("name")
@JsonPropertyDescription("Full name, in English.")
private String name;
/**
* Name in the original language ()
*
*/
@JsonProperty("original_name")
@JsonPropertyDescription("Name in the original language (\u65e5\u672c\u8a9e)")
private String originalName;
/**
* URL of the display picture
*
*/
@JsonProperty("display_picture")
@JsonPropertyDescription("URL of the display picture")
private String displayPicture;
/**
* Spoiler-free description of this {@link Waifu}
*
*/
@JsonProperty("description")
@JsonPropertyDescription("Spoiler-free description of this Waifu")
private String description;
/**
* Weight (kg)
*
*/
@JsonProperty("weight")
@JsonPropertyDescription("Weight (kg)")
private Double weight;
/**
* Height(cm)
*
*/
@JsonProperty("height")
@JsonPropertyDescription("Height(cm)")
private Double height;
/**
* Bust size (cm)
*
*/
@JsonProperty("bust")
@JsonPropertyDescription("Bust size (cm)")
private Double bust;
/**
* Hip size (cm)
*
*/
@JsonProperty("hip")
@JsonPropertyDescription("Hip size (cm)")
private Double hip;
/**
* Waist size (cm)
*
*/
@JsonProperty("waist")
@JsonPropertyDescription("Waist size (cm)")
private Double waist;
/**
* Common in Japanese culture as a potential reprenstation of personality types
*
*/
@JsonProperty("blood_type")
@JsonPropertyDescription("Common in Japanese culture as a potential reprenstation of personality types")
private Waifu.BloodType bloodType;
/**
* Birth location, home, etc.
*
*/
@JsonProperty("origin")
@JsonPropertyDescription("Birth location, home, etc.")
private String origin;
/**
* Age from the source material (e.g. 500 for 500 years old)
*
*/
@JsonProperty("age")
@JsonPropertyDescription("Age from the source material (e.g. 500 for 500 years old)")
private Integer age;
/**
* Birth month from source material
*
*/
@JsonProperty("birthday_month")
@JsonPropertyDescription("Birth month from source material")
private String birthdayMonth;
/**
* Birth day from source material
*
*/
@JsonProperty("birthday_day")
@JsonPropertyDescription("Birth day from source material")
private Integer birthdayDay;
/**
* Birth year from source material
*
*/
@JsonProperty("birthday_year")
@JsonPropertyDescription("Birth year from source material")
private Integer birthdayYear;
/**
* Number of likes for this {@link Waifu}
*
*/
@JsonProperty("likes")
@JsonPropertyDescription("Number of likes for this Waifu")
private Integer likes;
/**
* Number of trashes for this {@link Waifu}
*
*/
@JsonProperty("trash")
@JsonPropertyDescription("Number of trashes for this Waifu")
private Integer trash;
/**
* URL to view in browser
*
*/
@JsonProperty("url")
@JsonPropertyDescription("URL to view in browser")
private String url;
/**
* If this character is a husbando
*
*/
@JsonProperty("husbando")
@JsonPropertyDescription("If this character is a husbando")
private Boolean husbando;
/**
* If this {@link Waifu}\husbando appears in an NSFW work
*
*/
@JsonProperty("nsfw")
@JsonPropertyDescription("If this waifu\\husbando appears in an NSFW work")
private Boolean nsfw;
/**
* Site-wide popularity ranking
*
*/
@JsonProperty("popularity_rank")
@JsonPropertyDescription("Site-wide popularity ranking")
private Integer popularityRank;
/**
* Site-wide "like" or "claim" ranking
*
*/
@JsonProperty("like_rank")
@JsonPropertyDescription("Site-wide \"like\" or \"claim\" ranking")
private Integer likeRank;
/**
* Site-wide trash ranking - lower is worse.
*
*/
@JsonProperty("trash_rank")
@JsonPropertyDescription("Site-wide trash ranking - lower is worse")
private Integer trashRank;
/**
* An array of series or works that this character appears in.
*
*/
@JsonProperty("appearances")
@JsonPropertyDescription("An array of series or works that this character appears in")
private List<Appearance> appearances = null;
/**
* {@link Series}
* <p>Contains basic series information for most endpoints</p>
*
*/
@JsonProperty("series")
@JsonPropertyDescription("Contains basic series information for most endpoints")
private Series series;
@JsonProperty("id")
public Integer getId() {
return id;
}
@JsonProperty("id")
public void setId(Integer id) {
this.id = id;
}
@JsonProperty("slug")
public String getSlug() {
return slug;
}
@JsonProperty("slug")
public void setSlug(String slug) {
this.slug = slug;
}
@JsonProperty("creator_id")
public Integer getCreatorId() {
return creatorId;
}
@JsonProperty("creator_id")
public void setCreatorId(Integer creatorId) {
this.creatorId = creatorId;
}
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@JsonProperty("original_name")
public String getOriginalName() {
return originalName;
}
@JsonProperty("original_name")
public void setOriginalName(String originalName) {
this.originalName = originalName;
}
@JsonProperty("display_picture")
public String getDisplayPicture() {
return displayPicture;
}
@JsonProperty("display_picture")
public void setDisplayPicture(String displayPicture) {
this.displayPicture = displayPicture;
}
@JsonProperty("description")
public String getDescription() {
return description;
}
@JsonProperty("description")
public void setDescription(String description) {
this.description = description;
}
@JsonProperty("weight")
public Double getWeight() {
return weight;
}
@JsonProperty("weight")
public void setWeight(Double weight) {
this.weight = weight;
}
@JsonProperty("height")
public Double getHeight() {
return height;
}
@JsonProperty("height")
public void setHeight(Double height) {
this.height = height;
}
@JsonProperty("bust")
public Double getBust() {
return bust;
}
@JsonProperty("bust")
public void setBust(Double bust) {
this.bust = bust;
}
@JsonProperty("hip")
public Double getHip() {
return hip;
}
@JsonProperty("hip")
public void setHip(Double hip) {
this.hip = hip;
}
@JsonProperty("waist")
public Double getWaist() {
return waist;
}
@JsonProperty("waist")
public void setWaist(Double waist) {
this.waist = waist;
}
@JsonProperty("blood_type")
public Waifu.BloodType getBloodType() {
return bloodType;
}
@JsonProperty("blood_type")
public void setBloodType(Waifu.BloodType bloodType) {
this.bloodType = bloodType;
}
@JsonProperty("origin")
public String getOrigin() {
return origin;
}
@JsonProperty("origin")
public void setOrigin(String origin) {
this.origin = origin;
}
@JsonProperty("age")
public Integer getAge() {
return age;
}
@JsonProperty("age")
public void setAge(Integer age) {
this.age = age;
}
@JsonProperty("birthday_month")
public String getBirthdayMonth() {
return birthdayMonth;
}
@JsonProperty("birthday_month")
public void setBirthdayMonth(String birthdayMonth) {
this.birthdayMonth = birthdayMonth;
}
@JsonProperty("birthday_day")
public Integer getBirthdayDay() {
return birthdayDay;
}
@JsonProperty("birthday_day")
public void setBirthdayDay(Integer birthdayDay) {
this.birthdayDay = birthdayDay;
}
@JsonProperty("birthday_year")
public Integer getBirthdayYear() {
return birthdayYear;
}
@JsonProperty("birthday_year")
public void setBirthdayYear(Integer birthdayYear) {
this.birthdayYear = birthdayYear;
}
@JsonProperty("likes")
public Integer getLikes() {
return likes;
}
@JsonProperty("likes")
public void setLikes(Integer likes) {
this.likes = likes;
}
@JsonProperty("trash")
public Integer getTrash() {
return trash;
}
@JsonProperty("trash")
public void setTrash(Integer trash) {
this.trash = trash;
}
@JsonProperty("url")
public String getUrl() {
return url;
}
@JsonProperty("url")
public void setUrl(String url) {
this.url = url;
}
@JsonProperty("husbando")
public Boolean getHusbando() {
return husbando;
}
@JsonProperty("husbando")
public void setHusbando(Boolean husbando) {
this.husbando = husbando;
}
@JsonProperty("nsfw")
public Boolean getNsfw() {
return nsfw;
}
@JsonProperty("nsfw")
public void setNsfw(Boolean nsfw) {
this.nsfw = nsfw;
}
@JsonProperty("popularity_rank")
public Integer getPopularityRank() {
return popularityRank;
}
@JsonProperty("popularity_rank")
public void setPopularityRank(Integer popularityRank) {
this.popularityRank = popularityRank;
}
@JsonProperty("like_rank")
public Integer getLikeRank() {
return likeRank;
}
@JsonProperty("like_rank")
public void setLikeRank(Integer likeRank) {
this.likeRank = likeRank;
}
@JsonProperty("trash_rank")
public Integer getTrashRank() {
return trashRank;
}
@JsonProperty("trash_rank")
public void setTrashRank(Integer trashRank) {
this.trashRank = trashRank;
}
@JsonProperty("appearances")
public List<Appearance> getAppearances() {
return appearances;
}
@JsonProperty("appearances")
public void setAppearances(List<Appearance> appearances) {
this.appearances = appearances;
}
@JsonProperty("series")
public Series getSeries() {
return series;
}
@JsonProperty("series")
public void setSeries(Series series) {
this.series = series;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Waifu waifu = (Waifu) o;
return Objects.equals(id, waifu.id) && Objects.equals(slug, waifu.slug) && Objects.equals(creatorId, waifu.creatorId) && Objects.equals(name, waifu.name) && Objects.equals(originalName, waifu.originalName) && Objects.equals(displayPicture, waifu.displayPicture) && Objects.equals(description, waifu.description) && Objects.equals(weight, waifu.weight) && Objects.equals(height, waifu.height) && Objects.equals(bust, waifu.bust) && Objects.equals(hip, waifu.hip) && Objects.equals(waist, waifu.waist) && bloodType == waifu.bloodType && Objects.equals(origin, waifu.origin) && Objects.equals(age, waifu.age) && Objects.equals(birthdayMonth, waifu.birthdayMonth) && Objects.equals(birthdayDay, waifu.birthdayDay) && Objects.equals(birthdayYear, waifu.birthdayYear) && Objects.equals(likes, waifu.likes) && Objects.equals(trash, waifu.trash) && Objects.equals(url, waifu.url) && Objects.equals(husbando, waifu.husbando) && Objects.equals(nsfw, waifu.nsfw) && Objects.equals(popularityRank, waifu.popularityRank) && Objects.equals(likeRank, waifu.likeRank) && Objects.equals(trashRank, waifu.trashRank) && Objects.equals(appearances, waifu.appearances) && Objects.equals(series, waifu.series);
}
@Override
public int hashCode() {
return Objects.hash(id, slug, creatorId, name, originalName, displayPicture, description, weight, height, bust, hip, waist, bloodType, origin, age, birthdayMonth, birthdayDay, birthdayYear, likes, trash, url, husbando, nsfw, popularityRank, likeRank, trashRank, appearances, series);
}
@Override
public String toString() {
return "Waifu{" +
"id=" + id +
", slug='" + slug + '\'' +
", creatorId=" + creatorId +
", name='" + name + '\'' +
", originalName='" + originalName + '\'' +
", displayPicture='" + displayPicture + '\'' +
", description='" + description + '\'' +
", weight=" + weight +
", height=" + height +
", bust=" + bust +
", hip=" + hip +
", waist=" + waist +
", bloodType=" + bloodType +
", origin='" + origin + '\'' +
", age=" + age +
", birthdayMonth='" + birthdayMonth + '\'' +
", birthdayDay=" + birthdayDay +
", birthdayYear=" + birthdayYear +
", likes=" + likes +
", trash=" + trash +
", url='" + url + '\'' +
", husbando=" + husbando +
", nsfw=" + nsfw +
", popularityRank=" + popularityRank +
", likeRank=" + likeRank +
", trashRank=" + trashRank +
", appearances=" + appearances +
", series=" + series +
'}';
}
/**
* {@link BloodType}
* <p>Common in Japanese culture as a potential representation of personality types</p>
*
*/
@Generated("jsonschema2pojo")
public enum BloodType {
A("A"),
B("B"),
O("O"),
AB("AB");
private final String value;
private final static Map<String, Waifu.BloodType> CONSTANTS = new HashMap<String, Waifu.BloodType>();
static {
for (Waifu.BloodType bloodType: values()) {
CONSTANTS.put(bloodType.value, bloodType);
}
}
BloodType(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static Waifu.BloodType fromValue(String value) {
Waifu.BloodType constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}

@ -0,0 +1,105 @@
package org.goudham.me.api.entity.waifu;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import javax.annotation.processing.Generated;
import java.util.Objects;
/**
* {@link WaifuImage}
* <p>Contains a thumbnail & full res image link for an image in a given Waifus gallery</p>
*
* <p>Fields included are:</p>
* <li>{@link Integer id}</li>
* <li>{@link String thumbnail}</li>
* <li>{@link String path}</li>
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id",
"thumbnail",
"path"
})
@Generated("jsonschema2pojo")
public class WaifuImage {
/**
* ID in the database
*
*/
@JsonProperty("id")
@JsonPropertyDescription("ID in the database")
private Integer id;
/**
* URL of the thumbnail to display
*
*/
@JsonProperty("thumbnail")
@JsonPropertyDescription("URL of the thumbnail to display")
private String thumbnail;
/**
* Final URL of the original resolution image
*
*/
@JsonProperty("path")
@JsonPropertyDescription("Final URL of the original resolution image")
private String path;
@JsonProperty("id")
public Integer getId() {
return id;
}
@JsonProperty("id")
public void setId(Integer id) {
this.id = id;
}
@JsonProperty("thumbnail")
public String getThumbnail() {
return thumbnail;
}
@JsonProperty("thumbnail")
public void setThumbnail(String thumbnail) {
this.thumbnail = thumbnail;
}
@JsonProperty("path")
public String getPath() {
return path;
}
@JsonProperty("path")
public void setPath(String path) {
this.path = path;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
WaifuImage that = (WaifuImage) o;
return Objects.equals(id, that.id) && Objects.equals(thumbnail, that.thumbnail) && Objects.equals(path, that.path);
}
@Override
public int hashCode() {
return Objects.hash(id, thumbnail, path);
}
@Override
public String toString() {
return "WaifuImage{" +
"id=" + id +
", thumbnail='" + thumbnail + '\'' +
", path='" + path + '\'' +
'}';
}
}
Loading…
Cancel
Save