Class Channel

    • 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 from
        pathSid - 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 from
        pathSid - 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 from
        pathSid - 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 String
        objectMapper - 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 InputStream
        objectMapper - 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object