/// <summary>
        /// Update an existing user role in your service
        /// </summary>
        /// <param name="pathChatServiceSid"> The SID of the Conversation Service to update the resource from </param>
        /// <param name="pathSid"> The SID of the Role resource to update </param>
        /// <param name="permission"> A permission the role should have </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Role </returns>
        public static RoleResource Update(string pathChatServiceSid,
                                          string pathSid,
                                          List <string> permission,
                                          ITwilioRestClient client = null)
        {
            var options = new UpdateRoleOptions(pathChatServiceSid, pathSid, permission);

            return(Update(options, client));
        }
        /// <summary>
        /// Update an existing user role in your service
        /// </summary>
        /// <param name="pathChatServiceSid"> The SID of the Conversation Service to update the resource from </param>
        /// <param name="pathSid"> The SID of the Role resource to update </param>
        /// <param name="permission"> A permission the role should have </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Role </returns>
        public static async System.Threading.Tasks.Task <RoleResource> UpdateAsync(string pathChatServiceSid,
                                                                                   string pathSid,
                                                                                   List <string> permission,
                                                                                   ITwilioRestClient client = null)
        {
            var options = new UpdateRoleOptions(pathChatServiceSid, pathSid, permission);

            return(await UpdateAsync(options, client));
        }
 private static Request BuildUpdateRequest(UpdateRoleOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Conversations,
                "/v1/Services/" + options.PathChatServiceSid + "/Roles/" + options.PathSid + "",
                postParams: options.GetParams(),
                headerParams: null
                ));
 }