/// <summary>
        /// read
        /// </summary>
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="pathTaskSid"> The task_sid </param>
        /// <param name="reservationStatus"> Returns the list of reservations for a task with a specified ReservationStatus
        ///                         </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 Reservation </returns>
        public static ResourceSet <ReservationResource> Read(string pathWorkspaceSid,
                                                             string pathTaskSid,
                                                             ReservationResource.StatusEnum reservationStatus = null,
                                                             int?pageSize             = null,
                                                             long?limit               = null,
                                                             ITwilioRestClient client = null)
        {
            var options = new ReadReservationOptions(pathWorkspaceSid, pathTaskSid)
            {
                ReservationStatus = reservationStatus, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="pathTaskSid"> The task_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="reservationStatus"> Yes </param>
        /// <param name="workerActivitySid"> No </param>
        /// <param name="instruction"> Yes </param>
        /// <param name="dequeuePostWorkActivitySid"> No </param>
        /// <param name="dequeueFrom"> Yes </param>
        /// <param name="dequeueRecord"> No </param>
        /// <param name="dequeueTimeout"> No </param>
        /// <param name="dequeueTo"> No </param>
        /// <param name="dequeueStatusCallbackUrl"> No </param>
        /// <param name="callFrom"> Yes </param>
        /// <param name="callRecord"> No </param>
        /// <param name="callTimeout"> No </param>
        /// <param name="callTo"> No </param>
        /// <param name="callUrl"> Yes </param>
        /// <param name="callStatusCallbackUrl"> No </param>
        /// <param name="callAccept"> No </param>
        /// <param name="redirectCallSid"> Yes </param>
        /// <param name="redirectAccept"> No </param>
        /// <param name="redirectUrl"> Yes </param>
        /// <param name="to"> No </param>
        /// <param name="from"> No </param>
        /// <param name="statusCallback"> The status_callback </param>
        /// <param name="statusCallbackMethod"> The status_callback_method </param>
        /// <param name="statusCallbackEvent"> The status_callback_event </param>
        /// <param name="timeout"> No </param>
        /// <param name="record"> The record </param>
        /// <param name="muted"> The muted </param>
        /// <param name="beep"> The beep </param>
        /// <param name="startConferenceOnEnter"> The start_conference_on_enter </param>
        /// <param name="endConferenceOnExit"> The end_conference_on_exit </param>
        /// <param name="waitUrl"> The wait_url </param>
        /// <param name="waitMethod"> The wait_method </param>
        /// <param name="earlyMedia"> The early_media </param>
        /// <param name="maxParticipants"> The max_participants </param>
        /// <param name="conferenceStatusCallback"> The conference_status_callback </param>
        /// <param name="conferenceStatusCallbackMethod"> The conference_status_callback_method </param>
        /// <param name="conferenceStatusCallbackEvent"> The conference_status_callback_event </param>
        /// <param name="conferenceRecord"> The conference_record </param>
        /// <param name="conferenceTrim"> The conference_trim </param>
        /// <param name="recordingChannels"> The recording_channels </param>
        /// <param name="recordingStatusCallback"> The recording_status_callback </param>
        /// <param name="recordingStatusCallbackMethod"> The recording_status_callback_method </param>
        /// <param name="conferenceRecordingStatusCallback"> The conference_recording_status_callback </param>
        /// <param name="conferenceRecordingStatusCallbackMethod"> The conference_recording_status_callback_method </param>
        /// <param name="region"> The region </param>
        /// <param name="sipAuthUsername"> The sip_auth_username </param>
        /// <param name="sipAuthPassword"> The sip_auth_password </param>
        /// <param name="dequeueStatusCallbackEvent"> No </param>
        /// <param name="postWorkActivitySid"> No </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Reservation </returns>
        public static async System.Threading.Tasks.Task <ReservationResource> UpdateAsync(string pathWorkspaceSid,
                                                                                          string pathTaskSid,
                                                                                          string pathSid,
                                                                                          ReservationResource.StatusEnum reservationStatus = null,
                                                                                          string workerActivitySid          = null,
                                                                                          string instruction                = null,
                                                                                          string dequeuePostWorkActivitySid = null,
                                                                                          string dequeueFrom                = null,
                                                                                          string dequeueRecord              = null,
                                                                                          int?dequeueTimeout                = null,
                                                                                          string dequeueTo             = null,
                                                                                          Uri dequeueStatusCallbackUrl = null,
                                                                                          string callFrom           = null,
                                                                                          string callRecord         = null,
                                                                                          int?callTimeout           = null,
                                                                                          string callTo             = null,
                                                                                          Uri callUrl               = null,
                                                                                          Uri callStatusCallbackUrl = null,
                                                                                          bool?callAccept           = null,
                                                                                          string redirectCallSid    = null,
                                                                                          bool?redirectAccept       = null,
                                                                                          Uri redirectUrl           = null,
                                                                                          string to          = null,
                                                                                          string from        = null,
                                                                                          Uri statusCallback = null,
                                                                                          Twilio.Http.HttpMethod statusCallbackMethod = null,
                                                                                          List <ReservationResource.CallStatusEnum> statusCallbackEvent = null,
                                                                                          int?timeout = null,
                                                                                          bool?record = null,
                                                                                          bool?muted  = null,
                                                                                          string beep = null,
                                                                                          bool?startConferenceOnEnter = null,
                                                                                          bool?endConferenceOnExit    = null,
                                                                                          Uri waitUrl = null,
                                                                                          Twilio.Http.HttpMethod waitMethod = null,
                                                                                          bool?earlyMedia              = null,
                                                                                          int?maxParticipants          = null,
                                                                                          Uri conferenceStatusCallback = null,
                                                                                          Twilio.Http.HttpMethod conferenceStatusCallbackMethod = null,
                                                                                          List <ReservationResource.ConferenceEventEnum> conferenceStatusCallbackEvent = null,
                                                                                          string conferenceRecord     = null,
                                                                                          string conferenceTrim       = null,
                                                                                          string recordingChannels    = null,
                                                                                          Uri recordingStatusCallback = null,
                                                                                          Twilio.Http.HttpMethod recordingStatusCallbackMethod = null,
                                                                                          Uri conferenceRecordingStatusCallback = null,
                                                                                          Twilio.Http.HttpMethod conferenceRecordingStatusCallbackMethod = null,
                                                                                          string region          = null,
                                                                                          string sipAuthUsername = null,
                                                                                          string sipAuthPassword = null,
                                                                                          List <string> dequeueStatusCallbackEvent = null,
                                                                                          string postWorkActivitySid = null,
                                                                                          ITwilioRestClient client   = null)
        {
            var options = new UpdateReservationOptions(pathWorkspaceSid, pathTaskSid, pathSid)
            {
                ReservationStatus = reservationStatus, WorkerActivitySid = workerActivitySid, Instruction = instruction, DequeuePostWorkActivitySid = dequeuePostWorkActivitySid, DequeueFrom = dequeueFrom, DequeueRecord = dequeueRecord, DequeueTimeout = dequeueTimeout, DequeueTo = dequeueTo, DequeueStatusCallbackUrl = dequeueStatusCallbackUrl, CallFrom = callFrom, CallRecord = callRecord, CallTimeout = callTimeout, CallTo = callTo, CallUrl = callUrl, CallStatusCallbackUrl = callStatusCallbackUrl, CallAccept = callAccept, RedirectCallSid = redirectCallSid, RedirectAccept = redirectAccept, RedirectUrl = redirectUrl, To = to, From = from, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, StatusCallbackEvent = statusCallbackEvent, Timeout = timeout, Record = record, Muted = muted, Beep = beep, StartConferenceOnEnter = startConferenceOnEnter, EndConferenceOnExit = endConferenceOnExit, WaitUrl = waitUrl, WaitMethod = waitMethod, EarlyMedia = earlyMedia, MaxParticipants = maxParticipants, ConferenceStatusCallback = conferenceStatusCallback, ConferenceStatusCallbackMethod = conferenceStatusCallbackMethod, ConferenceStatusCallbackEvent = conferenceStatusCallbackEvent, ConferenceRecord = conferenceRecord, ConferenceTrim = conferenceTrim, RecordingChannels = recordingChannels, RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackMethod = recordingStatusCallbackMethod, ConferenceRecordingStatusCallback = conferenceRecordingStatusCallback, ConferenceRecordingStatusCallbackMethod = conferenceRecordingStatusCallbackMethod, Region = region, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword, DequeueStatusCallbackEvent = dequeueStatusCallbackEvent, PostWorkActivitySid = postWorkActivitySid
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// read
        /// </summary>
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="pathTaskSid"> The task_sid </param>
        /// <param name="reservationStatus"> Returns the list of reservations for a task with a specified ReservationStatus
        ///                         </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 Reservation </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <ReservationResource> > ReadAsync(string pathWorkspaceSid,
                                                                                                       string pathTaskSid,
                                                                                                       ReservationResource.StatusEnum reservationStatus = null,
                                                                                                       int?pageSize             = null,
                                                                                                       long?limit               = null,
                                                                                                       ITwilioRestClient client = null)
        {
            var options = new ReadReservationOptions(pathWorkspaceSid, pathTaskSid)
            {
                ReservationStatus = reservationStatus, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        ///
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="pathTaskSid"> The task_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="reservationStatus"> The reservation_status </param>
        /// <param name="workerActivitySid"> The worker_activity_sid </param>
        /// <param name="instruction"> The instruction </param>
        /// <param name="dequeuePostWorkActivitySid"> The dequeue_post_work_activity_sid </param>
        /// <param name="dequeueFrom"> The dequeue_from </param>
        /// <param name="dequeueRecord"> The dequeue_record </param>
        /// <param name="dequeueTimeout"> The dequeue_timeout </param>
        /// <param name="dequeueTo"> The dequeue_to </param>
        /// <param name="dequeueStatusCallbackUrl"> The dequeue_status_callback_url </param>
        /// <param name="callFrom"> The call_from </param>
        /// <param name="callRecord"> The call_record </param>
        /// <param name="callTimeout"> The call_timeout </param>
        /// <param name="callTo"> The call_to </param>
        /// <param name="callUrl"> The call_url </param>
        /// <param name="callStatusCallbackUrl"> The call_status_callback_url </param>
        /// <param name="callAccept"> The call_accept </param>
        /// <param name="redirectCallSid"> The redirect_call_sid </param>
        /// <param name="redirectAccept"> The redirect_accept </param>
        /// <param name="redirectUrl"> The redirect_url </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Reservation </returns>
        public static async System.Threading.Tasks.Task <ReservationResource> UpdateAsync(string pathWorkspaceSid, string pathTaskSid, string pathSid, ReservationResource.StatusEnum reservationStatus = null, string workerActivitySid = null, string instruction = null, string dequeuePostWorkActivitySid = null, string dequeueFrom = null, string dequeueRecord = null, int?dequeueTimeout = null, string dequeueTo = null, Uri dequeueStatusCallbackUrl = null, string callFrom = null, string callRecord = null, int?callTimeout = null, string callTo = null, Uri callUrl = null, Uri callStatusCallbackUrl = null, bool?callAccept = null, string redirectCallSid = null, bool?redirectAccept = null, Uri redirectUrl = null, ITwilioRestClient client = null)
        {
            var options = new UpdateReservationOptions(pathWorkspaceSid, pathTaskSid, pathSid)
            {
                ReservationStatus = reservationStatus, WorkerActivitySid = workerActivitySid, Instruction = instruction, DequeuePostWorkActivitySid = dequeuePostWorkActivitySid, DequeueFrom = dequeueFrom, DequeueRecord = dequeueRecord, DequeueTimeout = dequeueTimeout, DequeueTo = dequeueTo, DequeueStatusCallbackUrl = dequeueStatusCallbackUrl, CallFrom = callFrom, CallRecord = callRecord, CallTimeout = callTimeout, CallTo = callTo, CallUrl = callUrl, CallStatusCallbackUrl = callStatusCallbackUrl, CallAccept = callAccept, RedirectCallSid = redirectCallSid, RedirectAccept = redirectAccept, RedirectUrl = redirectUrl
            };

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