Class Message
- java.lang.Object
-
- com.twilio.base.Resource
-
- com.twilio.rest.conversations.v1.conversation.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Message.WebhookEnabledType
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MessageCreator
creator(String pathConversationSid)
Create a MessageCreator to execute create.static MessageDeleter
deleter(String pathConversationSid, String pathSid)
Create a MessageDeleter to execute delete.boolean
equals(Object o)
static MessageFetcher
fetcher(String pathConversationSid, 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 channel specific identifier of the message's author..String
getBody()
Returns The The content of the message..String
getConversationSid()
Returns The The unique id of the Conversation for this 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 Conversation..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 pathConversationSid)
Create a MessageReader to execute read.String
toString()
static MessageUpdater
updater(String pathConversationSid, String pathSid)
Create a MessageUpdater to execute update.
-
-
-
Method Detail
-
creator
public static MessageCreator creator(String pathConversationSid)
Create a MessageCreator to execute create.- Parameters:
pathConversationSid
- The unique id of the Conversation for this message.- Returns:
- MessageCreator capable of executing the create
-
updater
public static MessageUpdater updater(String pathConversationSid, String pathSid)
Create a MessageUpdater to execute update.- Parameters:
pathConversationSid
- The unique id of the Conversation for this message.pathSid
- A 34 character string that uniquely identifies this resource.- Returns:
- MessageUpdater capable of executing the update
-
deleter
public static MessageDeleter deleter(String pathConversationSid, String pathSid)
Create a MessageDeleter to execute delete.- Parameters:
pathConversationSid
- The unique id of the Conversation for this message.pathSid
- A 34 character string that uniquely identifies this resource.- Returns:
- MessageDeleter capable of executing the delete
-
fetcher
public static MessageFetcher fetcher(String pathConversationSid, String pathSid)
Create a MessageFetcher to execute fetch.- Parameters:
pathConversationSid
- The unique id of the Conversation for this message.pathSid
- A 34 character string that uniquely identifies this resource.- Returns:
- MessageFetcher capable of executing the fetch
-
reader
public static MessageReader reader(String pathConversationSid)
Create a MessageReader to execute read.- Parameters:
pathConversationSid
- The unique id of the Conversation for messages.- Returns:
- MessageReader capable of executing the read
-
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.
-
getConversationSid
public final String getConversationSid()
Returns The The unique id of the Conversation for this message..- Returns:
- The unique id of the Conversation 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 Conversation..- Returns:
- The index of the message within the Conversation.
-
getAuthor
public final String getAuthor()
Returns The The channel specific identifier of the message's author..- Returns:
- The channel specific identifier of the message's author.
-
getBody
public final String getBody()
Returns The The content of the message..- Returns:
- The content 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.
-
-