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

      • 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 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.
      • 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object