Package com.marigold.sdk.model
Class Message
-
- All Implemented Interfaces:
-
android.os.Parcelable,kotlin.Comparable
public final class Message implements Comparable<Message>, Parcelable
Marigold Message representation
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringTYPE_TEXTpublic final static StringTYPE_VIDEOpublic final static StringTYPE_LINKpublic final static StringTYPE_IMAGEpublic final static StringTYPE_PUSHpublic final static Parcelable.Creator<Message>CREATORprivate final Stringtitleprivate final StringmessageIDprivate final Stringtextprivate final Stringtypeprivate final StringcontentURLprivate final StringmediaURLprivate final StringimageURLprivate final StringhtmlTextprivate final BooleanisShareableprivate final BooleanisReadprivate final DatecreatedAtprivate final HashMap<String, String>attributes
-
Method Summary
Modifier and Type Method Description final StringgetTitle()final StringgetMessageID()final StringgetText()final StringgetType()final StringgetContentURL()final StringgetMediaURL()final StringgetImageURL()final StringgetHtmlText()final BooleanisShareable()final BooleanisRead()final DategetCreatedAt()final HashMap<String, String>getAttributes()final JSONObjecttoJSON()Converts Message to JSON. UnitwriteToParcel(Parcel dest, Integer flags)IntegercompareTo(Message other)Compares this object to the specified object to determine their relative order by created date in descending order. Booleanequals(Object other)IntegerhashCode()IntegerdescribeContents()-
-
Method Detail
-
getMessageID
final String getMessageID()
-
getContentURL
final String getContentURL()
-
getMediaURL
final String getMediaURL()
-
getImageURL
final String getImageURL()
-
getHtmlText
final String getHtmlText()
-
isShareable
final Boolean isShareable()
-
getCreatedAt
final Date getCreatedAt()
-
getAttributes
final HashMap<String, String> getAttributes()
-
toJSON
final JSONObject toJSON()
Converts Message to JSON. Do not alter the signature of this method without updating the Cordova/Unity/etc wrappers. Wrappers use reflection to access this method.
- Returns:
JSON representation of a Message
-
writeToParcel
Unit writeToParcel(Parcel dest, Integer flags)
-
compareTo
Integer compareTo(Message other)
Compares this object to the specified object to determine their relative order by created date in descending order.
- Parameters:
other- the object to compare to this instance.- Returns:
a negative integer if this instance is less than another; a positive integer if this instance is greater than another; 0 if this instance has the same order as another
-
describeContents
Integer describeContents()
-
-
-
-