package org.zendesk.client.v2.model;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
* @author stephenc
* @since 09/04/2013 15:09
*/
public class Comment {
    private Integer id;
    private String body;
    private Integer authorId;
    private List<String> uploads;
    private List<Attachment> attachments;
    private Date createdAt;

    public Comment() {
    }

    public Comment(String body) {
        this.body = body;
    }

    public Comment(String body, String... uploads) {
        this.body = body;
        this.uploads = uploads.length == 0 ? null : Arrays.asList(uploads);
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public List<String> getUploads() {
        return uploads;
    }

    public void setUploads(List<String> uploads) {
        this.uploads = uploads;
    }

    public List<Attachment> getAttachments() {
        return attachments;
    }

    public void setAttachments(List<Attachment> attachments) {
        this.attachments = attachments;
    }

    @JsonProperty("author_id")
    public Integer getAuthorId() {
        return authorId;
    }

    public void setAuthorId(Integer authorId) {
        this.authorId = authorId;
    }

    @JsonProperty("created_at")
    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Comment{");
        sb.append("id=").append(id);
        sb.append(", body='").append(body).append('\'');
        sb.append(", authorId=").append(authorId);
        sb.append(", attachments=").append(attachments);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", uploads=").append(uploads);
        sb.append('}');
        return sb.toString();
    }
}

@@ -162,16 +162,17 @@
 t;%0A%0A/**%0A
+ 
 * @autho
@@ -182,16 +182,17 @@
 tephenc%0A
+ 
 * @since
@@ -209,16 +209,17 @@
 3 15:09%0A
+ 
 */%0Apubli
@@ -418,16 +418,51 @@
 eatedAt;
+%0A    private Boolean publicComment;
 %0A%0A    pu
@@ -1687,24 +1687,213 @@
  id;%0A    %7D%0A%0A
+    @JsonProperty(%22public%22)%0A    public Boolean isPublic() %7B%0A        return publicComment;%0A    %7D%0A%0A    public void setPublic(Boolean isPublic) %7B%0A        this.publicComment = isPublic;%0A    %7D%0A%0A
     @Overrid

Add Comment.public attribute - defaults to null (absent in JSON)