Skip to content

Instantly share code, notes, and snippets.

@rygelouv
Created April 10, 2016 16:03
Show Gist options
  • Save rygelouv/b8a45c4c17dff0387fb78fb4913a71c3 to your computer and use it in GitHub Desktop.
Save rygelouv/b8a45c4c17dff0387fb78fb4913a71c3 to your computer and use it in GitHub Desktop.
Class message for pubnub
package fr.koonda.koonda.koondamessagerie.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
/**
* Created by rygel on 11/12/15.
*/
public class Message
{
public static final int MESSAGE_TYPE_SEND = 0;
public static final int MESSAGE_TYPE_RECEIVED = 1;
@SerializedName("data")
@Expose
private Data data;
@SerializedName("message_type")
@Expose
private String messageType;
private class Data
{
@SerializedName("message_content")
@Expose
private String messageContent;
@SerializedName("author_id")
@Expose
private long authorId;
@SerializedName("timestamp")
@Expose
private String timestamp;
public String getMessageContent()
{
return messageContent;
}
public void setMessageContent(String messageContent)
{
this.messageContent = messageContent;
}
public long getAuthorId()
{
return authorId;
}
public void setAuthorId(long authorId)
{
this.authorId = authorId;
}
public String getTimestamp()
{
return timestamp;
}
public void setTimestamp(String timestamp)
{
this.timestamp = timestamp;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment