Package com.twilio.rest.chat.v1.service
Class Channel
- java.lang.Object
-
- com.twilio.base.Resource
-
- com.twilio.rest.chat.v1.service.Channel
-
- All Implemented Interfaces:
Serializable
public class Channel extends Resource
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Channel.ChannelType
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ChannelCreator
creator(String pathServiceSid)
Create a ChannelCreator to execute create.static ChannelDeleter
deleter(String pathServiceSid, String pathSid)
Create a ChannelDeleter to execute delete.boolean
equals(Object o)
static ChannelFetcher
fetcher(String pathServiceSid, String pathSid)
Create a ChannelFetcher to execute fetch.static Channel
fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Channel object using the provided ObjectMapper.static Channel
fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Channel object using the provided ObjectMapper.String
getAccountSid()
Returns The The SID of the Account that created the resource.String
getAttributes()
Returns The The JSON string that stores application-specific data.String
getCreatedBy()
Returns The The identity of the User that created the channel.org.joda.time.DateTime
getDateCreated()
Returns The The RFC 2822 date and time in GMT when the resource was created.org.joda.time.DateTime
getDateUpdated()
Returns The The RFC 2822 date and time in GMT when the resource was last updated.String
getFriendlyName()
Returns The The string that you assigned to describe the resource.Map<String,String>
getLinks()
Returns The Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel.Integer
getMembersCount()
Returns The The number of Members in the Channel.Integer
getMessagesCount()
Returns The The number of Messages in the Channel.String
getServiceSid()
Returns The The SID of the Service that the resource is associated with.String
getSid()
Returns The The unique string that identifies the resource.Channel.ChannelType
getType()
Returns The The visibility of the channel.String
getUniqueName()
Returns The An application-defined string that uniquely identifies the resource.URI
getUrl()
Returns The The absolute URL of the Channel resource.int
hashCode()
static ChannelReader
reader(String pathServiceSid)
Create a ChannelReader to execute read.String
toString()
static ChannelUpdater
updater(String pathServiceSid, String pathSid)
Create a ChannelUpdater to execute update.
-
-
-
Method Detail
-
fetcher
public static ChannelFetcher fetcher(String pathServiceSid, String pathSid)
Create a ChannelFetcher to execute fetch.- Parameters:
pathServiceSid
- The SID of the Service to fetch the resource frompathSid
- The unique string that identifies the resource- Returns:
- ChannelFetcher capable of executing the fetch
-
deleter
public static ChannelDeleter deleter(String pathServiceSid, String pathSid)
Create a ChannelDeleter to execute delete.- Parameters:
pathServiceSid
- The SID of the Service to delete the resource frompathSid
- The unique string that identifies the resource- Returns:
- ChannelDeleter capable of executing the delete
-
creator
public static ChannelCreator creator(String pathServiceSid)
Create a ChannelCreator to execute create.- Parameters:
pathServiceSid
- The SID of the Service to create the resource under- Returns:
- ChannelCreator capable of executing the create
-
reader
public static ChannelReader reader(String pathServiceSid)
Create a ChannelReader to execute read.- Parameters:
pathServiceSid
- The SID of the Service to read the resources from- Returns:
- ChannelReader capable of executing the read
-
updater
public static ChannelUpdater updater(String pathServiceSid, String pathSid)
Create a ChannelUpdater to execute update.- Parameters:
pathServiceSid
- The SID of the Service to update the resource frompathSid
- The unique string that identifies the resource- Returns:
- ChannelUpdater capable of executing the update
-
fromJson
public static Channel fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Channel object using the provided ObjectMapper.- Parameters:
json
- Raw JSON StringobjectMapper
- Jackson ObjectMapper- Returns:
- Channel object represented by the provided JSON
-
fromJson
public static Channel fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Channel object using the provided ObjectMapper.- Parameters:
json
- Raw JSON InputStreamobjectMapper
- Jackson ObjectMapper- Returns:
- Channel 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
-
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
-
getFriendlyName
public final String getFriendlyName()
Returns The The string that you assigned to describe the resource.- Returns:
- The string that you assigned to describe the resource
-
getUniqueName
public final String getUniqueName()
Returns The An application-defined string that uniquely identifies the resource.- Returns:
- An application-defined string that uniquely identifies 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
-
getType
public final Channel.ChannelType getType()
Returns The The visibility of the channel. Can be: `public` or `private`.- Returns:
- The visibility of the channel. Can be: `public` or `private`
-
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
-
getCreatedBy
public final String getCreatedBy()
Returns The The identity of the User that created the channel.- Returns:
- The identity of the User that created the channel
-
getMembersCount
public final Integer getMembersCount()
Returns The The number of Members in the Channel.- Returns:
- The number of Members in the Channel
-
getMessagesCount
public final Integer getMessagesCount()
Returns The The number of Messages in the Channel.- Returns:
- The number of Messages in the Channel
-
getUrl
public final URI getUrl()
Returns The The absolute URL of the Channel resource.- Returns:
- The absolute URL of the Channel resource
-
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
-
-