Class Message

    • 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 from
        pathChannelSid - The unique ID of the Channel the message to fetch belongs to
        pathSid - 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 under
        pathChannelSid - The unique ID of the channel the new resource belongs to
        body - 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 from
        pathChannelSid - 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 from
        pathChannelSid - The unique ID of the channel the message to delete belongs to
        pathSid - 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 from
        pathChannelSid - he unique ID of the Channel the message belongs to
        pathSid - 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 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
      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object