Class 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 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 String
        objectMapper - 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 InputStream
        objectMapper - 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object