Skip to content

Instantly share code, notes, and snippets.

@Riduidel
Created October 18, 2012 12:05
Show Gist options
  • Select an option

  • Save Riduidel/3911384 to your computer and use it in GitHub Desktop.

Select an option

Save Riduidel/3911384 to your computer and use it in GitHub Desktop.
item produced by jsonschema2pojo for a call to answers api
package org.agorava.stackexchange.model;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.codehaus.jackson.annotate.JsonAnyGetter;
import org.codehaus.jackson.annotate.JsonAnySetter;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.annotate.JsonPropertyOrder;
import org.codehaus.jackson.map.annotate.JsonSerialize;
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
@Generated("com.googlecode.jsonschema2pojo")
@JsonPropertyOrder({
"question_id",
"answer_id",
"creation_date",
"last_activity_date",
"score",
"is_accepted",
"owner",
"last_edit_date"
})
public class Item {
@JsonProperty("question_id")
private Integer questionId;
@JsonProperty("answer_id")
private Integer answerId;
@JsonProperty("creation_date")
private Integer creationDate;
@JsonProperty("last_activity_date")
private Integer lastActivityDate;
@JsonProperty("score")
private Integer score;
@JsonProperty("is_accepted")
private Boolean isAccepted;
@JsonProperty("owner")
private Owner owner;
@JsonProperty("last_edit_date")
private Integer lastEditDate;
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
@JsonProperty("question_id")
public Integer getQuestionId() {
return questionId;
}
@JsonProperty("question_id")
public void setQuestionId(Integer questionId) {
this.questionId = questionId;
}
public Item withQuestionId(Integer questionId) {
this.questionId = questionId;
return this;
}
@JsonProperty("answer_id")
public Integer getAnswerId() {
return answerId;
}
@JsonProperty("answer_id")
public void setAnswerId(Integer answerId) {
this.answerId = answerId;
}
public Item withAnswerId(Integer answerId) {
this.answerId = answerId;
return this;
}
@JsonProperty("creation_date")
public Integer getCreationDate() {
return creationDate;
}
@JsonProperty("creation_date")
public void setCreationDate(Integer creationDate) {
this.creationDate = creationDate;
}
public Item withCreationDate(Integer creationDate) {
this.creationDate = creationDate;
return this;
}
@JsonProperty("last_activity_date")
public Integer getLastActivityDate() {
return lastActivityDate;
}
@JsonProperty("last_activity_date")
public void setLastActivityDate(Integer lastActivityDate) {
this.lastActivityDate = lastActivityDate;
}
public Item withLastActivityDate(Integer lastActivityDate) {
this.lastActivityDate = lastActivityDate;
return this;
}
@JsonProperty("score")
public Integer getScore() {
return score;
}
@JsonProperty("score")
public void setScore(Integer score) {
this.score = score;
}
public Item withScore(Integer score) {
this.score = score;
return this;
}
@JsonProperty("is_accepted")
public Boolean getIsAccepted() {
return isAccepted;
}
@JsonProperty("is_accepted")
public void setIsAccepted(Boolean isAccepted) {
this.isAccepted = isAccepted;
}
public Item withIsAccepted(Boolean isAccepted) {
this.isAccepted = isAccepted;
return this;
}
@JsonProperty("owner")
public Owner getOwner() {
return owner;
}
@JsonProperty("owner")
public void setOwner(Owner owner) {
this.owner = owner;
}
public Item withOwner(Owner owner) {
this.owner = owner;
return this;
}
@JsonProperty("last_edit_date")
public Integer getLastEditDate() {
return lastEditDate;
}
@JsonProperty("last_edit_date")
public void setLastEditDate(Integer lastEditDate) {
this.lastEditDate = lastEditDate;
}
public Item withLastEditDate(Integer lastEditDate) {
this.lastEditDate = lastEditDate;
return this;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
@Override
public boolean equals(Object other) {
return EqualsBuilder.reflectionEquals(this, other);
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperties(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment