/// <summary>
        /// update
        /// </summary>
        /// <param name="pathSessionSid"> The unique id of the Session for this webhook. </param>
        /// <param name="pathSid"> A 34 character string that uniquely identifies this resource. </param>
        /// <param name="configurationUrl"> The absolute url the webhook request should be sent to. </param>
        /// <param name="configurationMethod"> The HTTP method to be used when sending a webhook request. </param>
        /// <param name="configurationFilters"> The list of events, firing webhook event for this Session. </param>
        /// <param name="configurationTriggers"> The list of keywords, firing webhook event for this Session. </param>
        /// <param name="configurationFlowSid"> The studio flow sid, where the webhook should be sent to. </param>
        /// <param name="configurationRetryCount"> The number of retries in case of webhook request failures. </param>
        /// <param name="configurationBufferMessages"> The flag whether buffering should be applied to messages. </param>
        /// <param name="configurationBufferWindow"> The period of buffering messages. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Webhook </returns>
        public static WebhookResource Update(string pathSessionSid,
                                             string pathSid,
                                             string configurationUrl = null,
                                             WebhookResource.MethodEnum configurationMethod = null,
                                             List <string> configurationFilters             = null,
                                             List <string> configurationTriggers            = null,
                                             string configurationFlowSid      = null,
                                             int?configurationRetryCount      = null,
                                             bool?configurationBufferMessages = null,
                                             int?configurationBufferWindow    = null,
                                             ITwilioRestClient client         = null)
        {
            var options = new UpdateWebhookOptions(pathSessionSid, pathSid)
            {
                ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid, ConfigurationRetryCount = configurationRetryCount, ConfigurationBufferMessages = configurationBufferMessages, ConfigurationBufferWindow = configurationBufferWindow
            };

            return(Update(options, client));
        }
        /// <summary>
        /// create
        /// </summary>
        /// <param name="pathSessionSid"> The unique id of the Session for this webhook. </param>
        /// <param name="target"> The target of this webhook. </param>
        /// <param name="configurationUrl"> The absolute url the webhook request should be sent to. </param>
        /// <param name="configurationMethod"> The HTTP method to be used when sending a webhook request. </param>
        /// <param name="configurationFilters"> The list of events, firing webhook event for this Session. </param>
        /// <param name="configurationTriggers"> The list of keywords, firing webhook event for this Session. </param>
        /// <param name="configurationFlowSid"> The studio flow sid, where the webhook should be sent to. </param>
        /// <param name="configurationRetryCount"> The number of retries in case of webhook request failures. </param>
        /// <param name="configurationReplayAfter"> The message index for which and it's successors the webhook will be
        ///                                replayed. </param>
        /// <param name="configurationBufferMessages"> The flag whether buffering should be applied to messages. </param>
        /// <param name="configurationBufferWindow"> The period of buffering messages. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Webhook </returns>
        public static async System.Threading.Tasks.Task <WebhookResource> CreateAsync(string pathSessionSid,
                                                                                      WebhookResource.TargetEnum target,
                                                                                      string configurationUrl = null,
                                                                                      WebhookResource.MethodEnum configurationMethod = null,
                                                                                      List <string> configurationFilters             = null,
                                                                                      List <string> configurationTriggers            = null,
                                                                                      string configurationFlowSid      = null,
                                                                                      int?configurationRetryCount      = null,
                                                                                      int?configurationReplayAfter     = null,
                                                                                      bool?configurationBufferMessages = null,
                                                                                      int?configurationBufferWindow    = null,
                                                                                      ITwilioRestClient client         = null)
        {
            var options = new CreateWebhookOptions(pathSessionSid, target)
            {
                ConfigurationUrl = configurationUrl, ConfigurationMethod = configurationMethod, ConfigurationFilters = configurationFilters, ConfigurationTriggers = configurationTriggers, ConfigurationFlowSid = configurationFlowSid, ConfigurationRetryCount = configurationRetryCount, ConfigurationReplayAfter = configurationReplayAfter, ConfigurationBufferMessages = configurationBufferMessages, ConfigurationBufferWindow = configurationBufferWindow
            };

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