Class UserChannel
- java.lang.Object
-
- com.twilio.base.Resource
-
- com.twilio.rest.chat.v2.service.user.UserChannel
-
- All Implemented Interfaces:
Serializable
public class UserChannel extends Resource
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UserChannel.ChannelStatus
static class
UserChannel.NotificationLevel
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static UserChannelFetcher
fetcher(String pathServiceSid, String pathUserSid, String pathChannelSid)
Create a UserChannelFetcher to execute fetch.static UserChannel
fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a UserChannel object using the provided ObjectMapper.static UserChannel
fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a UserChannel object using the provided ObjectMapper.String
getAccountSid()
Returns The The SID of the Account that created the resource.String
getChannelSid()
Returns The The SID of the Channel the resource belongs to.Integer
getLastConsumedMessageIndex()
Returns The The index of the last Message in the Channel the Member has read.Map<String,String>
getLinks()
Returns The Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel.String
getMemberSid()
Returns The The SID of the User as a Member in the Channel.UserChannel.NotificationLevel
getNotificationLevel()
Returns The The push notification level of the User for the Channel.String
getServiceSid()
Returns The The SID of the Service that the resource is associated with.UserChannel.ChannelStatus
getStatus()
Returns The The status of the User on the Channel.Integer
getUnreadMessagesCount()
Returns The The number of unread Messages in the Channel for the User.URI
getUrl()
Returns The The absolute URL of the resource.String
getUserSid()
Returns The The SID of the User the User Channel belongs to.int
hashCode()
static UserChannelReader
reader(String pathServiceSid, String pathUserSid)
Create a UserChannelReader to execute read.String
toString()
static UserChannelUpdater
updater(String pathServiceSid, String pathUserSid, String pathChannelSid, UserChannel.NotificationLevel notificationLevel)
Create a UserChannelUpdater to execute update.
-
-
-
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 frompathUserSid
- 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 frompathUserSid
- The SID of the User to fetch the User Channel resource frompathChannelSid
- 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 frompathUserSid
- The SID of the User to update the User Channel resource frompathChannelSid
- The SID of the Channel with the User Channel resource to updatenotificationLevel
- 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 StringobjectMapper
- 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 InputStreamobjectMapper
- 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
-
-