edu.ksu.canvas.model.Conversation Maven / Gradle / Ivy
package edu.ksu.canvas.model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import com.google.gson.annotations.SerializedName;
import edu.ksu.canvas.annotation.CanvasObject;
@CanvasObject(postKey="conversation")
public class Conversation extends BaseCanvasModel implements Serializable {
public static final long serialVersionUID = 1L;
private Integer id;
private String subject;
private ConversationMessageState workflowState;
private String lastMessage;
private Date lastMessageAt;
private String lastAuthoredMessage;
private Date lastAuthoredMessageAt;
private Integer messageCount;
private Boolean subscribed;
@SerializedName("private") //can't name a variable "private" in java
private Boolean isPrivate;
private Boolean starred;
private List properties;
private List audience;
private Object audienceContexts; //TODO: Refine this object type
private String avatarUrl;
private List participants;
private Boolean visible;
private String contextName;
private List messages;
public enum ConversationMessageState { unread, read, archived; }
public enum ConversationFlags { last_author, attachments, media_objects }
public class Message {
private Integer id;
private Integer authorId;
private Date createdAt;
private Boolean generated;
private String body;
private List