/// <summary>
        /// Create a new Participant in this Session.
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathSessionSid"> Session Sid. </param>
        /// <param name="identifier"> The Participant's contact identifier, normally a phone number. </param>
        /// <param name="friendlyName"> A human readable description of this resource </param>
        /// <param name="participantType"> The Type of this Participant </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Participant </returns>
        public static ParticipantResource Create(string pathServiceSid,
                                                 string pathSessionSid,
                                                 string identifier,
                                                 string friendlyName = null,
                                                 ParticipantResource.ParticipantTypeEnum participantType = null,
                                                 ITwilioRestClient client = null)
        {
            var options = new CreateParticipantOptions(pathServiceSid, pathSessionSid, identifier)
            {
                FriendlyName = friendlyName, ParticipantType = participantType
            };

            return(Create(options, client));
        }
        /// <summary>
        /// Update an s access to a specific Sync List.
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathSessionSid"> Session Sid. </param>
        /// <param name="pathSid"> A string that uniquely identifies this Participant. </param>
        /// <param name="participantType"> The Type of this Participant </param>
        /// <param name="identifier"> The Participant's contact identifier, normally a phone number. </param>
        /// <param name="friendlyName"> A human readable description of this resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Participant </returns>
        public static ParticipantResource Update(string pathServiceSid,
                                                 string pathSessionSid,
                                                 string pathSid,
                                                 ParticipantResource.ParticipantTypeEnum participantType = null,
                                                 string identifier        = null,
                                                 string friendlyName      = null,
                                                 ITwilioRestClient client = null)
        {
            var options = new UpdateParticipantOptions(pathServiceSid, pathSessionSid, pathSid)
            {
                ParticipantType = participantType, Identifier = identifier, FriendlyName = friendlyName
            };

            return(Update(options, client));
        }
        /// <summary>
        /// Retrieve a list of all Participants in this Session.
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathSessionSid"> Session Sid. </param>
        /// <param name="identifier"> The Participant's contact identifier, normally a phone number. </param>
        /// <param name="participantType"> The Type of this Participant </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 Participant </returns>
        public static ResourceSet <ParticipantResource> Read(string pathServiceSid,
                                                             string pathSessionSid,
                                                             string identifier = null,
                                                             ParticipantResource.ParticipantTypeEnum participantType = null,
                                                             int?pageSize             = null,
                                                             long?limit               = null,
                                                             ITwilioRestClient client = null)
        {
            var options = new ReadParticipantOptions(pathServiceSid, pathSessionSid)
            {
                Identifier = identifier, ParticipantType = participantType, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
        /// <summary>
        /// Update an s access to a specific Sync List.
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathSessionSid"> Session Sid. </param>
        /// <param name="pathSid"> A string that uniquely identifies this Participant. </param>
        /// <param name="participantType"> The Type of this Participant </param>
        /// <param name="identifier"> The Participant's contact identifier, normally a phone number. </param>
        /// <param name="friendlyName"> A human readable description of this resource </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Participant </returns>
        public static async System.Threading.Tasks.Task <ParticipantResource> UpdateAsync(string pathServiceSid,
                                                                                          string pathSessionSid,
                                                                                          string pathSid,
                                                                                          ParticipantResource.ParticipantTypeEnum participantType = null,
                                                                                          string identifier        = null,
                                                                                          string friendlyName      = null,
                                                                                          ITwilioRestClient client = null)
        {
            var options = new UpdateParticipantOptions(pathServiceSid, pathSessionSid, pathSid)
            {
                ParticipantType = participantType, Identifier = identifier, FriendlyName = friendlyName
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// Retrieve a list of all Participants in this Session.
        /// </summary>
        /// <param name="pathServiceSid"> Service Sid. </param>
        /// <param name="pathSessionSid"> Session Sid. </param>
        /// <param name="identifier"> The Participant's contact identifier, normally a phone number. </param>
        /// <param name="participantType"> The Type of this Participant </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 Participant </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <ParticipantResource> > ReadAsync(string pathServiceSid,
                                                                                                       string pathSessionSid,
                                                                                                       string identifier = null,
                                                                                                       ParticipantResource.ParticipantTypeEnum participantType = null,
                                                                                                       int?pageSize             = null,
                                                                                                       long?limit               = null,
                                                                                                       ITwilioRestClient client = null)
        {
            var options = new ReadParticipantOptions(pathServiceSid, pathSessionSid)
            {
                Identifier = identifier, ParticipantType = participantType, PageSize = pageSize, Limit = limit
            };

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