Class Message
- java.lang.Object
-
- com.twilio.base.Resource
-
- com.twilio.rest.ipmessaging.v1.service.channel.Message
-
- All Implemented Interfaces:
Serializable
public class Message extends Resource
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Message.OrderType
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MessageCreator
creator(String pathServiceSid, String pathChannelSid, String body)
Create a MessageCreator to execute create.static MessageDeleter
deleter(String pathServiceSid, String pathChannelSid, String pathSid)
Create a MessageDeleter to execute delete.boolean
equals(Object o)
static MessageFetcher
fetcher(String pathServiceSid, String pathChannelSid, 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 SID of the Account that created the resource.String
getAttributes()
Returns The The JSON string that stores application-specific data.String
getBody()
Returns The The content of the message.String
getChannelSid()
Returns The The unique ID of the Channel the Message resource belongs to.org.joda.time.DateTime
getDateCreated()
Returns The The RFC 2822 date and time in GMT when the resource was created.org.joda.time.DateTime
getDateUpdated()
Returns The The RFC 2822 date and time in GMT when the resource was last updated.String
getFrom()
Returns The The identity of the message's author.Integer
getIndex()
Returns The The index of the message within the Channel.String
getServiceSid()
Returns The The SID of the Service that the resource is associated with.String
getSid()
Returns The The unique string that identifies the resource.String
getTo()
Returns The The SID of the Channel that the message was sent to.URI
getUrl()
Returns The The absolute URL of the Message resource.Boolean
getWasEdited()
Returns The Whether the message has been edited since it was created.int
hashCode()
static MessageReader
reader(String pathServiceSid, String pathChannelSid)
Create a MessageReader to execute read.String
toString()
static MessageUpdater
updater(String pathServiceSid, String pathChannelSid, String pathSid)
Create a MessageUpdater to execute update.
-
-
-
Method Detail
-
fetcher
public static MessageFetcher fetcher(String pathServiceSid, String pathChannelSid, String pathSid)
Create a MessageFetcher to execute fetch.- Parameters:
pathServiceSid
- The SID of the Service to fetch the resource frompathChannelSid
- The unique ID of the Channel the message to fetch belongs topathSid
- The unique string that identifies the resource- Returns:
- MessageFetcher capable of executing the fetch
-
creator
public static MessageCreator creator(String pathServiceSid, String pathChannelSid, String body)
Create a MessageCreator to execute create.- Parameters:
pathServiceSid
- The SID of the Service to create the resource underpathChannelSid
- The unique ID of the channel the new resource belongs tobody
- The message to send to the channel- Returns:
- MessageCreator capable of executing the create
-
reader
public static MessageReader reader(String pathServiceSid, String pathChannelSid)
Create a MessageReader to execute read.- Parameters:
pathServiceSid
- The SID of the Service to read the resources frompathChannelSid
- The unique ID of the Channel the message to read belongs to- Returns:
- MessageReader capable of executing the read
-
deleter
public static MessageDeleter deleter(String pathServiceSid, String pathChannelSid, String pathSid)
Create a MessageDeleter to execute delete.- Parameters:
pathServiceSid
- The SID of the Service to delete the resource frompathChannelSid
- The unique ID of the channel the message to delete belongs topathSid
- The unique string that identifies the resource- Returns:
- MessageDeleter capable of executing the delete
-
updater
public static MessageUpdater updater(String pathServiceSid, String pathChannelSid, String pathSid)
Create a MessageUpdater to execute update.- Parameters:
pathServiceSid
- The SID of the Service to update the resource frompathChannelSid
- he unique ID of the Channel the message belongs topathSid
- The unique string that identifies the resource- Returns:
- MessageUpdater capable of executing the update
-
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
-
getSid
public final String getSid()
Returns The The unique string that identifies the resource.- Returns:
- The unique string that identifies the resource
-
getAccountSid
public final String getAccountSid()
Returns The The SID of the Account that created the resource.- Returns:
- The SID of the Account that created the resource
-
getAttributes
public final String getAttributes()
Returns The The JSON string that stores application-specific data.- Returns:
- The JSON string that stores application-specific data
-
getServiceSid
public final String getServiceSid()
Returns The The SID of the Service that the resource is associated with.- Returns:
- The SID of the Service that the resource is associated with
-
getTo
public final String getTo()
Returns The The SID of the Channel that the message was sent to.- Returns:
- The SID of the Channel that the message was sent to
-
getChannelSid
public final String getChannelSid()
Returns The The unique ID of the Channel the Message resource belongs to.- Returns:
- The unique ID of the Channel the Message resource belongs to
-
getDateCreated
public final org.joda.time.DateTime getDateCreated()
Returns The The RFC 2822 date and time in GMT when the resource was created.- Returns:
- The RFC 2822 date and time in GMT when the resource was created
-
getDateUpdated
public final org.joda.time.DateTime getDateUpdated()
Returns The The RFC 2822 date and time in GMT when the resource was last updated.- Returns:
- The RFC 2822 date and time in GMT when the resource was last updated
-
getWasEdited
public final Boolean getWasEdited()
Returns The Whether the message has been edited since it was created.- Returns:
- Whether the message has been edited since it was created
-
getFrom
public final String getFrom()
Returns The The identity of the message's author.- Returns:
- The identity of the message's author
-
getBody
public final String getBody()
Returns The The content of the message.- Returns:
- The content of the message
-
getIndex
public final Integer getIndex()
Returns The The index of the message within the Channel.- Returns:
- The index of the message within the Channel
-
getUrl
public final URI getUrl()
Returns The The absolute URL of the Message resource.- Returns:
- The absolute URL of the Message resource
-
-