Class Message
- java.lang.Object
-
- com.twilio.base.Resource
-
- com.twilio.rest.messaging.v1.session.Message
-
- All Implemented Interfaces:
Serializable
public class Message extends Resource
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MessageCreator
creator(String pathSessionSid)
Create a MessageCreator to execute create.static MessageDeleter
deleter(String pathSessionSid, String pathSid)
Create a MessageDeleter to execute delete.boolean
equals(Object o)
static MessageFetcher
fetcher(String pathSessionSid, String pathSid)
Create a MessageFetcher to execute fetch.static Message
fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Message object using the provided ObjectMapper.static Message
fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Message object using the provided ObjectMapper.String
getAccountSid()
Returns The The unique id of the Account responsible for this message..String
getAttributes()
Returns The A string metadata field you can use to store any data you wish..String
getAuthor()
Returns The The identity or the address of the device of the message's author..String
getBody()
Returns The The contents of the message..org.joda.time.DateTime
getDateCreated()
Returns The The date that this resource was created..org.joda.time.DateTime
getDateUpdated()
Returns The The date that this resource was last updated..Integer
getIndex()
Returns The The index of the message within the Session.String
getMessagingServiceSid()
Returns The The unique id of the SMS Service this message belongs to..String
getServiceSid()
Returns The The unique id of the Chat Service this message belongs to..String
getSessionSid()
Returns The The unique id of the Session for this message..String
getSid()
Returns The A 34 character string that uniquely identifies this resource..URI
getUrl()
Returns The An absolute URL for this message..int
hashCode()
static MessageReader
reader(String pathSessionSid)
Create a MessageReader to execute read.String
toString()
static MessageUpdater
updater(String pathSessionSid, String pathSid)
Create a MessageUpdater to execute update.
-
-
-
Method Detail
-
fetcher
public static MessageFetcher fetcher(String pathSessionSid, String pathSid)
Create a MessageFetcher to execute fetch.- Parameters:
pathSessionSid
- The unique id of the Session for this message.pathSid
- A 34 character string that uniquely identifies this resource.- Returns:
- MessageFetcher capable of executing the fetch
-
creator
public static MessageCreator creator(String pathSessionSid)
Create a MessageCreator to execute create.- Parameters:
pathSessionSid
- The unique id of the Session for this message.- Returns:
- MessageCreator capable of executing the create
-
updater
public static MessageUpdater updater(String pathSessionSid, String pathSid)
Create a MessageUpdater to execute update.- Parameters:
pathSessionSid
- The unique id of the Session for this message.pathSid
- A 34 character string that uniquely identifies this resource.- Returns:
- MessageUpdater capable of executing the update
-
reader
public static MessageReader reader(String pathSessionSid)
Create a MessageReader to execute read.- Parameters:
pathSessionSid
- The unique id of the Session for this message.- Returns:
- MessageReader capable of executing the read
-
deleter
public static MessageDeleter deleter(String pathSessionSid, String pathSid)
Create a MessageDeleter to execute delete.- Parameters:
pathSessionSid
- The unique id of the Session for this message.pathSid
- A 34 character string that uniquely identifies this resource.- Returns:
- MessageDeleter capable of executing the delete
-
fromJson
public static Message fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Message object using the provided ObjectMapper.- Parameters:
json
- Raw JSON StringobjectMapper
- Jackson ObjectMapper- Returns:
- Message object represented by the provided JSON
-
fromJson
public static Message fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Message object using the provided ObjectMapper.- Parameters:
json
- Raw JSON InputStreamobjectMapper
- Jackson ObjectMapper- Returns:
- Message object represented by the provided JSON
-
getAccountSid
public final String getAccountSid()
Returns The The unique id of the Account responsible for this message..- Returns:
- The unique id of the Account responsible for this message.
-
getServiceSid
public final String getServiceSid()
Returns The The unique id of the Chat Service this message belongs to..- Returns:
- The unique id of the Chat Service this message belongs to.
-
getMessagingServiceSid
public final String getMessagingServiceSid()
Returns The The unique id of the SMS Service this message belongs to..- Returns:
- The unique id of the SMS Service this message belongs to.
-
getSessionSid
public final String getSessionSid()
Returns The The unique id of the Session for this message..- Returns:
- The unique id of the Session for this message.
-
getSid
public final String getSid()
Returns The A 34 character string that uniquely identifies this resource..- Returns:
- A 34 character string that uniquely identifies this resource.
-
getIndex
public final Integer getIndex()
Returns The The index of the message within the Session.- Returns:
- The index of the message within the Session
-
getAuthor
public final String getAuthor()
Returns The The identity or the address of the device of the message's author..- Returns:
- The identity or the address of the device of the message's author.
-
getBody
public final String getBody()
Returns The The contents of the message..- Returns:
- The contents of the message.
-
getAttributes
public final String getAttributes()
Returns The A string metadata field you can use to store any data you wish..- Returns:
- A string metadata field you can use to store any data you wish.
-
getDateCreated
public final org.joda.time.DateTime getDateCreated()
Returns The The date that this resource was created..- Returns:
- The date that this resource was created.
-
getDateUpdated
public final org.joda.time.DateTime getDateUpdated()
Returns The The date that this resource was last updated..- Returns:
- The date that this resource was last updated.
-
getUrl
public final URI getUrl()
Returns The An absolute URL for this message..- Returns:
- An absolute URL for this message.
-
-