Class UserChannel

    • Method Detail

      • reader

        public static UserChannelReader reader​(String pathServiceSid,
                                               String pathUserSid)
        Create a UserChannelReader to execute read.
        Parameters:
        pathServiceSid - The SID of the Service to read the resources from
        pathUserSid - The SID of the User to fetch the User Channel resources from
        Returns:
        UserChannelReader capable of executing the read
      • fetcher

        public static UserChannelFetcher fetcher​(String pathServiceSid,
                                                 String pathUserSid,
                                                 String pathChannelSid)
        Create a UserChannelFetcher to execute fetch.
        Parameters:
        pathServiceSid - The SID of the Service to fetch the User Channel resource from
        pathUserSid - The SID of the User to fetch the User Channel resource from
        pathChannelSid - The SID of the Channel that has the User Channel to fetch
        Returns:
        UserChannelFetcher capable of executing the fetch
      • updater

        public static UserChannelUpdater updater​(String pathServiceSid,
                                                 String pathUserSid,
                                                 String pathChannelSid,
                                                 UserChannel.NotificationLevel notificationLevel)
        Create a UserChannelUpdater to execute update.
        Parameters:
        pathServiceSid - The SID of the Service to update the resource from
        pathUserSid - The SID of the User to update the User Channel resource from
        pathChannelSid - The SID of the Channel with the User Channel resource to update
        notificationLevel - The push notification level to assign to the User Channel
        Returns:
        UserChannelUpdater capable of executing the update
      • fromJson

        public static UserChannel fromJson​(String json,
                                           com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Converts a JSON String into a UserChannel object using the provided ObjectMapper.
        Parameters:
        json - Raw JSON String
        objectMapper - Jackson ObjectMapper
        Returns:
        UserChannel object represented by the provided JSON
      • fromJson

        public static UserChannel fromJson​(InputStream json,
                                           com.fasterxml.jackson.databind.ObjectMapper objectMapper)
        Converts a JSON InputStream into a UserChannel object using the provided ObjectMapper.
        Parameters:
        json - Raw JSON InputStream
        objectMapper - Jackson ObjectMapper
        Returns:
        UserChannel object represented by the provided JSON
      • 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
      • 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
      • getChannelSid

        public final String getChannelSid()
        Returns The The SID of the Channel the resource belongs to.
        Returns:
        The SID of the Channel the resource belongs to
      • getUserSid

        public final String getUserSid()
        Returns The The SID of the User the User Channel belongs to.
        Returns:
        The SID of the User the User Channel belongs to
      • getMemberSid

        public final String getMemberSid()
        Returns The The SID of the User as a Member in the Channel.
        Returns:
        The SID of the User as a Member in the Channel
      • getStatus

        public final UserChannel.ChannelStatus getStatus()
        Returns The The status of the User on the Channel.
        Returns:
        The status of the User on the Channel
      • getLastConsumedMessageIndex

        public final Integer getLastConsumedMessageIndex()
        Returns The The index of the last Message in the Channel the Member has read.
        Returns:
        The index of the last Message in the Channel the Member has read
      • getUnreadMessagesCount

        public final Integer getUnreadMessagesCount()
        Returns The The number of unread Messages in the Channel for the User.
        Returns:
        The number of unread Messages in the Channel for the User
      • getLinks

        public final Map<String,​String> getLinks()
        Returns The Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel.
        Returns:
        Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel
      • getUrl

        public final URI getUrl()
        Returns The The absolute URL of the resource.
        Returns:
        The absolute URL of the resource
      • getNotificationLevel

        public final UserChannel.NotificationLevel getNotificationLevel()
        Returns The The push notification level of the User for the Channel.
        Returns:
        The push notification level of the User for the Channel
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object