/// <summary> /// create /// </summary> /// <param name="pathWorkspaceSid"> The SID of the Workspace that the new TaskQueue belongs to </param> /// <param name="friendlyName"> A string to describe the resource </param> /// <param name="targetWorkers"> A string describing the Worker selection criteria for any Tasks that enter the /// TaskQueue </param> /// <param name="maxReservedWorkers"> The maximum number of Workers to reserve </param> /// <param name="taskOrder"> How Tasks will be assigned to Workers </param> /// <param name="reservationActivitySid"> The SID of the Activity to assign Workers when a task is reserved for them /// </param> /// <param name="assignmentActivitySid"> The SID of the Activity to assign Workers once a task is assigned to them /// </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of TaskQueue </returns> public static TaskQueueResource Create(string pathWorkspaceSid, string friendlyName, string targetWorkers = null, int?maxReservedWorkers = null, TaskQueueResource.TaskOrderEnum taskOrder = null, string reservationActivitySid = null, string assignmentActivitySid = null, ITwilioRestClient client = null) { var options = new CreateTaskQueueOptions(pathWorkspaceSid, friendlyName) { TargetWorkers = targetWorkers, MaxReservedWorkers = maxReservedWorkers, TaskOrder = taskOrder, ReservationActivitySid = reservationActivitySid, AssignmentActivitySid = assignmentActivitySid }; return(Create(options, client)); }
/// <summary> /// update /// </summary> /// <param name="pathWorkspaceSid"> The SID of the Workspace with the TaskQueue to update </param> /// <param name="pathSid"> The SID of the resource to update </param> /// <param name="friendlyName"> A string to describe the resource </param> /// <param name="targetWorkers"> A string describing the Worker selection criteria for any Tasks that enter the /// TaskQueue </param> /// <param name="reservationActivitySid"> The SID of the Activity to assign Workers when a task is reserved for them /// </param> /// <param name="assignmentActivitySid"> The SID of the Activity to assign Workers when a task is assigned for them /// </param> /// <param name="maxReservedWorkers"> The maximum number of Workers to create reservations for the assignment of a task /// while in the queue </param> /// <param name="taskOrder"> How Tasks will be assigned to Workers </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of TaskQueue </returns> public static async System.Threading.Tasks.Task <TaskQueueResource> UpdateAsync(string pathWorkspaceSid, string pathSid, string friendlyName = null, string targetWorkers = null, string reservationActivitySid = null, string assignmentActivitySid = null, int?maxReservedWorkers = null, TaskQueueResource.TaskOrderEnum taskOrder = null, ITwilioRestClient client = null) { var options = new UpdateTaskQueueOptions(pathWorkspaceSid, pathSid) { FriendlyName = friendlyName, TargetWorkers = targetWorkers, ReservationActivitySid = reservationActivitySid, AssignmentActivitySid = assignmentActivitySid, MaxReservedWorkers = maxReservedWorkers, TaskOrder = taskOrder }; return(await UpdateAsync(options, client)); }