/// <summary>
 /// Construct a new UpdateUserChannelOptions
 /// </summary>
 /// <param name="pathServiceSid"> The unique id of the Service those channels belong to. </param>
 /// <param name="pathUserSid"> The unique id of a User. </param>
 /// <param name="pathChannelSid"> The unique id of a Channel. </param>
 /// <param name="notificationLevel"> Push notification level to be assigned to Channel of the User. </param>
 public UpdateUserChannelOptions(string pathServiceSid,
                                 string pathUserSid,
                                 string pathChannelSid,
                                 UserChannelResource.NotificationLevelEnum notificationLevel)
 {
     PathServiceSid    = pathServiceSid;
     PathUserSid       = pathUserSid;
     PathChannelSid    = pathChannelSid;
     NotificationLevel = notificationLevel;
 }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The unique id of the Service those channels belong to. </param>
        /// <param name="pathUserSid"> The unique id of a User. </param>
        /// <param name="pathChannelSid"> The unique id of a Channel. </param>
        /// <param name="notificationLevel"> Push notification level to be assigned to Channel of the User. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of UserChannel </returns>
        public static UserChannelResource Update(string pathServiceSid,
                                                 string pathUserSid,
                                                 string pathChannelSid,
                                                 UserChannelResource.NotificationLevelEnum notificationLevel,
                                                 ITwilioRestClient client = null)
        {
            var options = new UpdateUserChannelOptions(pathServiceSid, pathUserSid, pathChannelSid, notificationLevel);

            return(Update(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to update the resource from </param>
        /// <param name="pathUserSid"> The SID of the User to update the User Channel resource from </param>
        /// <param name="pathChannelSid"> The SID of the Channel with the User Channel resource to update </param>
        /// <param name="notificationLevel"> The push notification level to assign to the User Channel </param>
        /// <param name="lastConsumedMessageIndex"> The index of the last Message that the Member has read within the Channel
        ///                                </param>
        /// <param name="lastConsumptionTimestamp"> The ISO 8601 based timestamp string that represents the datetime of the
        ///                                last Message read event for the Member within the Channel </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of UserChannel </returns>
        public static UserChannelResource Update(string pathServiceSid,
                                                 string pathUserSid,
                                                 string pathChannelSid,
                                                 UserChannelResource.NotificationLevelEnum notificationLevel = null,
                                                 int?lastConsumedMessageIndex      = null,
                                                 DateTime?lastConsumptionTimestamp = null,
                                                 ITwilioRestClient client          = null)
        {
            var options = new UpdateUserChannelOptions(pathServiceSid, pathUserSid, pathChannelSid)
            {
                NotificationLevel = notificationLevel, LastConsumedMessageIndex = lastConsumedMessageIndex, LastConsumptionTimestamp = lastConsumptionTimestamp
            };

            return(Update(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to update the resource from </param>
        /// <param name="pathUserSid"> The SID of the User to update the User Channel resource from </param>
        /// <param name="pathChannelSid"> The SID of the Channel with the User Channel resource to update </param>
        /// <param name="notificationLevel"> The push notification level to assign to the User Channel </param>
        /// <param name="lastConsumedMessageIndex"> The index of the last Message that the Member has read within the Channel
        ///                                </param>
        /// <param name="lastConsumptionTimestamp"> The ISO 8601 based timestamp string that represents the datetime of the
        ///                                last Message read event for the Member within the Channel </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of UserChannel </returns>
        public static async System.Threading.Tasks.Task <UserChannelResource> UpdateAsync(string pathServiceSid,
                                                                                          string pathUserSid,
                                                                                          string pathChannelSid,
                                                                                          UserChannelResource.NotificationLevelEnum notificationLevel = null,
                                                                                          int?lastConsumedMessageIndex      = null,
                                                                                          DateTime?lastConsumptionTimestamp = null,
                                                                                          ITwilioRestClient client          = null)
        {
            var options = new UpdateUserChannelOptions(pathServiceSid, pathUserSid, pathChannelSid)
            {
                NotificationLevel = notificationLevel, LastConsumedMessageIndex = lastConsumedMessageIndex, LastConsumptionTimestamp = lastConsumptionTimestamp
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The unique id of the Service those channels belong to. </param>
        /// <param name="pathUserSid"> The unique id of a User. </param>
        /// <param name="pathChannelSid"> The unique id of a Channel. </param>
        /// <param name="notificationLevel"> Push notification level to be assigned to Channel of the User. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of UserChannel </returns>
        public static async System.Threading.Tasks.Task <UserChannelResource> UpdateAsync(string pathServiceSid,
                                                                                          string pathUserSid,
                                                                                          string pathChannelSid,
                                                                                          UserChannelResource.NotificationLevelEnum notificationLevel,
                                                                                          ITwilioRestClient client = null)
        {
            var options = new UpdateUserChannelOptions(pathServiceSid, pathUserSid, pathChannelSid, notificationLevel);

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