/// <summary>
        /// delete
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to delete the resource from </param>
        /// <param name="pathSid"> The SID of the Channel resource to delete </param>
        /// <param name="xTwilioWebhookEnabled"> The X-Twilio-Webhook-Enabled HTTP request header </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Channel </returns>
        public static async System.Threading.Tasks.Task <bool> DeleteAsync(string pathServiceSid,
                                                                           string pathSid,
                                                                           ChannelResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                                                           ITwilioRestClient client = null)
        {
            var options = new DeleteChannelOptions(pathServiceSid, pathSid)
            {
                XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(await DeleteAsync(options, client));
        }
        /// <summary>
        /// delete
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to delete the resource from </param>
        /// <param name="pathSid"> The SID of the Channel resource to delete </param>
        /// <param name="xTwilioWebhookEnabled"> The X-Twilio-Webhook-Enabled HTTP request header </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Channel </returns>
        public static bool Delete(string pathServiceSid,
                                  string pathSid,
                                  ChannelResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                  ITwilioRestClient client = null)
        {
            var options = new DeleteChannelOptions(pathServiceSid, pathSid)
            {
                XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(Delete(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to update the resource from </param>
        /// <param name="pathSid"> The SID of the Channel resource to update </param>
        /// <param name="friendlyName"> A string to describe the resource </param>
        /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param>
        /// <param name="attributes"> A valid JSON string that contains application-specific data </param>
        /// <param name="dateCreated"> The ISO 8601 date and time in GMT when the resource was created </param>
        /// <param name="dateUpdated"> The ISO 8601 date and time in GMT when the resource was updated </param>
        /// <param name="createdBy"> The identity of the User that created the Channel </param>
        /// <param name="xTwilioWebhookEnabled"> The X-Twilio-Webhook-Enabled HTTP request header </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Channel </returns>
        public static ChannelResource Update(string pathServiceSid,
                                             string pathSid,
                                             string friendlyName  = null,
                                             string uniqueName    = null,
                                             string attributes    = null,
                                             DateTime?dateCreated = null,
                                             DateTime?dateUpdated = null,
                                             string createdBy     = null,
                                             ChannelResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                             ITwilioRestClient client = null)
        {
            var options = new UpdateChannelOptions(pathServiceSid, pathSid)
            {
                FriendlyName = friendlyName, UniqueName = uniqueName, Attributes = attributes, DateCreated = dateCreated, DateUpdated = dateUpdated, CreatedBy = createdBy, XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

            return(Update(options, client));
        }
        /// <summary>
        /// create
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Service to create the Channel resource under </param>
        /// <param name="friendlyName"> A string to describe the new resource </param>
        /// <param name="uniqueName"> An application-defined string that uniquely identifies the Channel resource </param>
        /// <param name="attributes"> A valid JSON string that contains application-specific data </param>
        /// <param name="type"> The visibility of the channel </param>
        /// <param name="dateCreated"> The ISO 8601 date and time in GMT when the resource was created </param>
        /// <param name="dateUpdated"> The ISO 8601 date and time in GMT when the resource was updated </param>
        /// <param name="createdBy"> The identity of the User that created the Channel </param>
        /// <param name="xTwilioWebhookEnabled"> The X-Twilio-Webhook-Enabled HTTP request header </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Channel </returns>
        public static async System.Threading.Tasks.Task <ChannelResource> CreateAsync(string pathServiceSid,
                                                                                      string friendlyName = null,
                                                                                      string uniqueName   = null,
                                                                                      string attributes   = null,
                                                                                      ChannelResource.ChannelTypeEnum type = null,
                                                                                      DateTime?dateCreated = null,
                                                                                      DateTime?dateUpdated = null,
                                                                                      string createdBy     = null,
                                                                                      ChannelResource.WebhookEnabledTypeEnum xTwilioWebhookEnabled = null,
                                                                                      ITwilioRestClient client = null)
        {
            var options = new CreateChannelOptions(pathServiceSid)
            {
                FriendlyName = friendlyName, UniqueName = uniqueName, Attributes = attributes, Type = type, DateCreated = dateCreated, DateUpdated = dateUpdated, CreatedBy = createdBy, XTwilioWebhookEnabled = xTwilioWebhookEnabled
            };

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