Class WorkerChannelUpdater
- java.lang.Object
-
- com.twilio.base.Updater<WorkerChannel>
-
- com.twilio.rest.taskrouter.v1.workspace.worker.WorkerChannelUpdater
-
public class WorkerChannelUpdater extends Updater<WorkerChannel>
-
-
Constructor Summary
Constructors Constructor Description WorkerChannelUpdater(String pathWorkspaceSid, String pathWorkerSid, String pathSid)
Construct a new WorkerChannelUpdater.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkerChannelUpdater
setAvailable(Boolean available)
Toggle the availability of the WorkerChannel.WorkerChannelUpdater
setCapacity(Integer capacity)
The total number of Tasks worker should handle for this TaskChannel type.WorkerChannel
update(TwilioRestClient client)
Make the request to the Twilio API to perform the update.-
Methods inherited from class com.twilio.base.Updater
update, updateAsync, updateAsync
-
-
-
-
Method Detail
-
setCapacity
public WorkerChannelUpdater setCapacity(Integer capacity)
The total number of Tasks worker should handle for this TaskChannel type. TaskRouter will only create reservations for Tasks of this TaskChannel type up to the capacity configured. If the capacity is 0, no new reservations will be created.- Parameters:
capacity
- The total number of Tasks worker should handle for this TaskChannel type.- Returns:
- this
-
setAvailable
public WorkerChannelUpdater setAvailable(Boolean available)
Toggle the availability of the WorkerChannel. Set this to 'False' to make worker unavailable to receive any new Tasks of this TaskChannel type..- Parameters:
available
- Toggle the availability of the WorkerChannel.- Returns:
- this
-
update
public WorkerChannel update(TwilioRestClient client)
Make the request to the Twilio API to perform the update.- Specified by:
update
in classUpdater<WorkerChannel>
- Parameters:
client
- TwilioRestClient with which to make the request- Returns:
- Updated WorkerChannel
-
-