Class TaskQueueCreator

    • Constructor Detail

      • TaskQueueCreator

        public TaskQueueCreator​(String pathWorkspaceSid,
                                String friendlyName)
        Construct a new TaskQueueCreator.
        Parameters:
        pathWorkspaceSid - The workspace_sid
        friendlyName - Human readable description of this TaskQueue
    • Method Detail

      • setTargetWorkers

        public TaskQueueCreator setTargetWorkers​(String targetWorkers)
        A string describing the Worker selection criteria for any Tasks that enter this TaskQueue. For example `'"language" == "spanish"'` If no TargetWorkers parameter is provided, Tasks will wait in this TaskQueue until they are either deleted or moved to another TaskQueue. Additional examples on how to describing Worker selection criteria below. Defaults to 1==1..
        Parameters:
        targetWorkers - A string describing the Worker selection criteria for any Tasks that enter this TaskQueue.
        Returns:
        this
      • setMaxReservedWorkers

        public TaskQueueCreator setMaxReservedWorkers​(Integer maxReservedWorkers)
        The maximum amount of workers to create reservations for the assignment of a task while in this queue. Defaults to 1, with a Maximum of 50..
        Parameters:
        maxReservedWorkers - The maximum amount of workers to create reservations for the assignment of a task while in this queue.
        Returns:
        this
      • setTaskOrder

        public TaskQueueCreator setTaskOrder​(TaskQueue.TaskOrder taskOrder)
        TaskOrder will determine which order the Tasks will be assigned to Workers. Set this parameter to LIFO to assign most recently created Task first or FIFO to assign the oldest Task. Default is FIFO. [Click here](https://www.twilio.com/docs/api/taskrouter/last-first-out-lifo) to learn more..
        Parameters:
        taskOrder - TaskOrder will determine which order the Tasks will be assigned to Workers.
        Returns:
        this
      • setReservationActivitySid

        public TaskQueueCreator setReservationActivitySid​(String reservationActivitySid)
        ActivitySID to assign workers once a task is reserved for them.
        Parameters:
        reservationActivitySid - ActivitySID to assign workers once a task is reserved for them
        Returns:
        this
      • setAssignmentActivitySid

        public TaskQueueCreator setAssignmentActivitySid​(String assignmentActivitySid)
        ActivitySID to assign workers once a task is assigned for them.
        Parameters:
        assignmentActivitySid - ActivitySID to assign workers once a task is assigned for them
        Returns:
        this
      • create

        public TaskQueue create​(TwilioRestClient client)
        Make the request to the Twilio API to perform the create.
        Specified by:
        create in class Creator<TaskQueue>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Created TaskQueue