Update User.java to better reflect the API

pull/9/head
Hammy 4 years ago
parent 8e64742fde
commit 087a2ce3d2

@ -1,11 +1,6 @@
package me.goudham.api.entity.user; package me.goudham.api.entity.user;
import javax.annotation.processing.Generated; import com.fasterxml.jackson.annotation.*;
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 me.goudham.api.entity.waifu.Waifu; import me.goudham.api.entity.waifu.Waifu;
import java.util.Objects; import java.util.Objects;
@ -17,6 +12,7 @@ import java.util.Objects;
* *
* <p> Fields included are: </p> * <p> Fields included are: </p>
* <ul> * <ul>
* <li>{@link String avatar}</li>
* <li>{@link Integer id}</li> * <li>{@link Integer id}</li>
* <li>{@link String name}</li> * <li>{@link String name}</li>
* <li>{@link String twitter}</li> * <li>{@link String twitter}</li>
@ -30,6 +26,7 @@ import java.util.Objects;
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ @JsonPropertyOrder({
"avatar",
"id", "id",
"name", "name",
"twitter", "twitter",
@ -39,13 +36,20 @@ import java.util.Objects;
"waifus_trashed", "waifus_trashed",
"true_love" "true_love"
}) })
@Generated("jsonschema2pojo") @JsonIgnoreProperties(ignoreUnknown = true)
public class User { public class User {
/**
* {@link User} Avatar
*/
@JsonProperty("avatar")
@JsonPropertyDescription("User Avatar")
private String avatar;
/** /**
* {@link User} ID * {@link User} ID
*/ */
@JsonProperty("id") @JsonProperty("id")
@JsonPropertyDescription("User ID")
private Integer id; private Integer id;
/** /**
@ -97,11 +101,19 @@ public class User {
private Integer waifusTrashed; private Integer waifusTrashed;
/** /**
* <p>User's {@link TrueLove}</p> * <p>{@link User}'s {@link TrueLove}</p>
*
*/ */
@JsonProperty("true_love") @JsonProperty("true_love")
@JsonPropertyDescription("User's True Love")
private TrueLove trueLove; private TrueLove trueLove;
@JsonProperty("avatar")
public String getAvatar() { return avatar; }
@JsonProperty("avatar")
public void setAvatar(String avatar) { this.avatar = avatar; }
@JsonProperty("id") @JsonProperty("id")
public Integer getId() { public Integer getId() {
return id; return id;

Loading…
Cancel
Save