// Path: src/main/java/com/crozin/wykop/sdk/json/DateDeserializer.java
// public class DateDeserializer extends JsonDeserializer<Date> {
// 	private final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
// 	
// 	@Override
// 	public Date deserialize(JsonParser jp, DeserializationContext ctxt) {
// 		try {
// 			return format.parse(jp.getText());
// 		} catch (ParseException pe) {
// 			throw new RuntimeException(pe);
// 		} catch (IOException ioe) {
// 			throw new RuntimeException(ioe);
// 		}
// 	}
// }
// 
// Path: src/main/java/com/crozin/wykop/sdk/util/DeserializationUtils.java
// public class DeserializationUtils {
// 	private static Map<String, String> authorFields = new HashMap<String, String>();
// 	
// 	static {
// 		authorFields.put("", "username");
// 		authorFields.put("_avatar", "defaultAvatar");
// 		authorFields.put("_avatar_lo", "lowQualityAvatar");
// 		authorFields.put("_avatar_med", "mediumQualityAvatar");
// 		authorFields.put("_avatar_big", "highQualityAvatar");
// 		authorFields.put("_group", "group");
// 		authorFields.put("_sex", "gender");
// 	}
// 	
// 	public static Author readAuthor(Object o) {
// 		return readAuthor(o, "author");
// 	}
// 	
// 	public static Author readAuthor(Object object, String fieldNamePrefix) {
// 		try {
// 			Author author = new Author();
// 			
// 			for (String fieldName : authorFields.keySet()) {
// 				Field objectField = object.getClass().getDeclaredField(fieldNamePrefix + fieldName);
// 				Field authorField = author.getClass().getDeclaredField(authorFields.get(fieldName));
// 				
// 				objectField.setAccessible(true);
// 				authorField.setAccessible(true);
// 				
// 				authorField.set(author, objectField.get(object));
// 			}
// 			
// 			return author;
// 		} catch (NoSuchFieldException nsfe) {
// 			throw new RuntimeException(nsfe);
// 		} catch (IllegalArgumentException iae) {
// 			throw new RuntimeException(iae);
// 		} catch (IllegalAccessException iae) {
// 			throw new RuntimeException(iae);
// 		}
// 	}
// }


import java.net.URL;
import java.util.Date;
import com.crozin.wykop.sdk.json.DateDeserializer;
import com.crozin.wykop.sdk.util.DeserializationUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
package com.crozin.wykop.sdk.domain;



@JsonIgnoreProperties({ "link", "user_vote" })
public class Comment {
	public enum Status {
		OWN, NEW, READED
	}
	
	private Integer id;
	
	@JsonProperty("parent_id")
	private Integer parentId;
	
	@JsonProperty("body")
	private String content;
	
	@JsonDeserialize(using = DateDeserializer.class)
	private Date date;

	@JsonProperty("vote_count_plus")
	private Integer possitiveVotes;
	
// Path: src/main/java/com/crozin/wykop/sdk/json/DateDeserializer.java
// public class DateDeserializer extends JsonDeserializer<Date> {
// 	private final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
// 	
// 	@Override
// 	public Date deserialize(JsonParser jp, DeserializationContext ctxt) {
// 		try {
// 			return format.parse(jp.getText());
// 		} catch (ParseException pe) {
// 			throw new RuntimeException(pe);
// 		} catch (IOException ioe) {
// 			throw new RuntimeException(ioe);
// 		}
// 	}
// }
// 
// Path: src/main/java/com/crozin/wykop/sdk/util/DeserializationUtils.java
// public class DeserializationUtils {
// 	private static Map<String, String> authorFields = new HashMap<String, String>();
// 	
// 	static {
// 		authorFields.put("", "username");
// 		authorFields.put("_avatar", "defaultAvatar");
// 		authorFields.put("_avatar_lo", "lowQualityAvatar");
// 		authorFields.put("_avatar_med", "mediumQualityAvatar");
// 		authorFields.put("_avatar_big", "highQualityAvatar");
// 		authorFields.put("_group", "group");
// 		authorFields.put("_sex", "gender");
// 	}
// 	
// 	public static Author readAuthor(Object o) {
// 		return readAuthor(o, "author");
// 	}
// 	
// 	public static Author readAuthor(Object object, String fieldNamePrefix) {
// 		try {
// 			Author author = new Author();
// 			
// 			for (String fieldName : authorFields.keySet()) {
// 				Field objectField = object.getClass().getDeclaredField(fieldNamePrefix + fieldName);
// 				Field authorField = author.getClass().getDeclaredField(authorFields.get(fieldName));
// 				
// 				objectField.setAccessible(true);
// 				authorField.setAccessible(true);
// 				
// 				authorField.set(author, objectField.get(object));
// 			}
// 			
// 			return author;
// 		} catch (NoSuchFieldException nsfe) {
// 			throw new RuntimeException(nsfe);
// 		} catch (IllegalArgumentException iae) {
// 			throw new RuntimeException(iae);
// 		} catch (IllegalAccessException iae) {
// 			throw new RuntimeException(iae);
// 		}
// 	}
// }


// Path: src/main/java/com/crozin/wykop/sdk/domain/Comment.java
import java.net.URL;
import java.util.Date;
import com.crozin.wykop.sdk.json.DateDeserializer;
import com.crozin.wykop.sdk.util.DeserializationUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

package com.crozin.wykop.sdk.domain;



@JsonIgnoreProperties({ "link", "user_vote" })
public class Comment {
	public enum Status {
		OWN, NEW, READED
	}
	
	private Integer id;
	
	@JsonProperty("parent_id")
	private Integer parentId;
	
	@JsonProperty("body")
	private String content;
	
	@JsonDeserialize(using = DateDeserializer.class)
	private Date date;

	@JsonProperty("vote_count_plus")
	private Integer possitiveVotes;
	
	@JsonProperty("vote_count_minus")