/// <summary>
        /// Start a new Session
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="uniqueName"> A unique, developer assigned name of this Session. </param>
        /// <param name="ttl"> How long will this session stay open, in seconds. </param>
        /// <param name="status"> The Status of this Session </param>
        /// <param name="participants"> The participants </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Session </returns>
        public static SessionResource Create(string pathServiceSid,
                                             string uniqueName = null,
                                             int?ttl           = null,
                                             SessionResource.StatusEnum status = null,
                                             List <string> participants        = null,
                                             ITwilioRestClient client          = null)
        {
            var options = new CreateSessionOptions(pathServiceSid)
            {
                UniqueName = uniqueName, Ttl = ttl, Status = status, Participants = participants
            };

            return(Create(options, client));
        }
        /// <summary>
        /// Retrieve a list of all Sessions for a Service.
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="uniqueName"> A unique, developer assigned name of this Session. </param>
        /// <param name="status"> The Status of this Session </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Session </returns>
        public static ResourceSet <SessionResource> Read(string pathServiceSid,
                                                         string uniqueName = null,
                                                         SessionResource.StatusEnum status = null,
                                                         int?pageSize             = null,
                                                         long?limit               = null,
                                                         ITwilioRestClient client = null)
        {
            var options = new ReadSessionOptions(pathServiceSid)
            {
                UniqueName = uniqueName, Status = status, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
        /// <summary>
        /// Update a specific Session.
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathSid"> A string that uniquely identifies this Session. </param>
        /// <param name="uniqueName"> A unique, developer assigned name of this Session. </param>
        /// <param name="ttl"> How long will this session stay open, in seconds. </param>
        /// <param name="status"> The Status of this Session </param>
        /// <param name="participants"> The participants </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Session </returns>
        public static async System.Threading.Tasks.Task <SessionResource> UpdateAsync(string pathServiceSid,
                                                                                      string pathSid,
                                                                                      string uniqueName = null,
                                                                                      int?ttl           = null,
                                                                                      SessionResource.StatusEnum status = null,
                                                                                      List <string> participants        = null,
                                                                                      ITwilioRestClient client          = null)
        {
            var options = new UpdateSessionOptions(pathServiceSid, pathSid)
            {
                UniqueName = uniqueName, Ttl = ttl, Status = status, Participants = participants
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// Retrieve a list of all Sessions for a Service.
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="uniqueName"> A unique, developer assigned name of this Session. </param>
        /// <param name="status"> The Status of this Session </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Session </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <SessionResource> > ReadAsync(string pathServiceSid,
                                                                                                   string uniqueName = null,
                                                                                                   SessionResource.StatusEnum status = null,
                                                                                                   int?pageSize             = null,
                                                                                                   long?limit               = null,
                                                                                                   ITwilioRestClient client = null)
        {
            var options = new ReadSessionOptions(pathServiceSid)
            {
                UniqueName = uniqueName, Status = status, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }