Class Session

  • All Implemented Interfaces:
    Serializable

    public class Session
    extends Resource
    PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
    See Also:
    Serialized Form
    • Method Detail

      • fetcher

        public static SessionFetcher fetcher​(String pathServiceSid,
                                             String pathSid)
        Create a SessionFetcher to execute fetch.
        Parameters:
        pathServiceSid - The SID of the Service to fetch the resource from
        pathSid - The unique string that identifies the resource
        Returns:
        SessionFetcher capable of executing the fetch
      • reader

        public static SessionReader reader​(String pathServiceSid)
        Create a SessionReader to execute read.
        Parameters:
        pathServiceSid - The SID of the Service to fetch the resource from
        Returns:
        SessionReader capable of executing the read
      • creator

        public static SessionCreator creator​(String pathServiceSid)
        Create a SessionCreator to execute create.
        Parameters:
        pathServiceSid - The SID of the parent Service resource
        Returns:
        SessionCreator capable of executing the create
      • deleter

        public static SessionDeleter deleter​(String pathServiceSid,
                                             String pathSid)
        Create a SessionDeleter to execute delete.
        Parameters:
        pathServiceSid - The SID of the Service to delete the resource from
        pathSid - The unique string that identifies the resource
        Returns:
        SessionDeleter capable of executing the delete
      • updater

        public static SessionUpdater updater​(String pathServiceSid,
                                             String pathSid)
        Create a SessionUpdater to execute update.
        Parameters:
        pathServiceSid - The SID of the Service to update the resource from
        pathSid - The unique string that identifies the resource
        Returns:
        SessionUpdater capable of executing the update
      • fromJson

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

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

        public final String getServiceSid()
        Returns The The SID of the resource's parent Service.
        Returns:
        The SID of the resource's parent Service
      • 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
      • getDateStarted

        public final org.joda.time.DateTime getDateStarted()
        Returns The The ISO 8601 date when the Session started.
        Returns:
        The ISO 8601 date when the Session started
      • getDateEnded

        public final org.joda.time.DateTime getDateEnded()
        Returns The The ISO 8601 date when the Session ended.
        Returns:
        The ISO 8601 date when the Session ended
      • getDateLastInteraction

        public final org.joda.time.DateTime getDateLastInteraction()
        Returns The The ISO 8601 date when the Session last had an interaction.
        Returns:
        The ISO 8601 date when the Session last had an interaction
      • getDateExpiry

        public final org.joda.time.DateTime getDateExpiry()
        Returns The The ISO 8601 date when the Session should expire.
        Returns:
        The ISO 8601 date when the Session should expire
      • 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
      • getStatus

        public final Session.Status getStatus()
        Returns The The status of the Session.
        Returns:
        The status of the Session
      • getClosedReason

        public final String getClosedReason()
        Returns The The reason the Session ended.
        Returns:
        The reason the Session ended
      • getTtl

        public final Integer getTtl()
        Returns The When the session will expire.
        Returns:
        When the session will expire
      • getMode

        public final Session.Mode getMode()
        Returns The The Mode of the Session.
        Returns:
        The Mode of the Session
      • getDateCreated

        public final org.joda.time.DateTime getDateCreated()
        Returns The The ISO 8601 date and time in GMT when the resource was created.
        Returns:
        The ISO 8601 date and time in GMT when the resource was created
      • getDateUpdated

        public final org.joda.time.DateTime getDateUpdated()
        Returns The The ISO 8601 date and time in GMT when the resource was last updated.
        Returns:
        The ISO 8601 date and time in GMT when the resource was last updated
      • getUrl

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

        public final Map<String,​String> getLinks()
        Returns The The URLs of resources related to the Session.
        Returns:
        The URLs of resources related to the Session
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object