Created
March 25, 2019 20:55
-
-
Save mitchtabian/b3d3e69b6108bfb22faf05b9cfb7d12e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Post { | |
@SerializedName("userId") | |
@Expose() | |
private int userId; | |
@SerializedName("id") | |
@Expose() | |
private int id; | |
@SerializedName("title") | |
@Expose() | |
private String title; | |
@SerializedName("body") | |
@Expose() | |
private String body; | |
private List<Comment> comments; | |
public Post(int userId, int id, String title, String body, List<Comment> comments) { | |
this.userId = userId; | |
this.id = id; | |
this.title = title; | |
this.body = body; | |
this.comments = comments; | |
} | |
public int getUserId() { | |
return userId; | |
} | |
public void setUserId(int userId) { | |
this.userId = userId; | |
} | |
public int getId() { | |
return id; | |
} | |
public void setId(int id) { | |
this.id = id; | |
} | |
public String getTitle() { | |
return title; | |
} | |
public void setTitle(String title) { | |
this.title = title; | |
} | |
public String getBody() { | |
return body; | |
} | |
public void setBody(String body) { | |
this.body = body; | |
} | |
public List<Comment> getComments() { | |
return comments; | |
} | |
public void setComments(List<Comment> comments) { | |
this.comments = comments; | |
} | |
@Override | |
public String toString() { | |
return "Post{" + | |
"userId=" + userId + | |
", id=" + id + | |
", title='" + title + '\'' + | |
", body='" + body + '\'' + | |
'}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment