|
43 | 43 | from ..models import AssistantQueueListing |
44 | 44 | from ..models import AssistantQueueUsersBulkAddRequest |
45 | 45 | from ..models import AssistantQueueUsersBulkRemoveRequest |
| 46 | +from ..models import AssistantQueueUsersJobsRequest |
| 47 | +from ..models import AssistantQueueUsersJobsResponse |
46 | 48 | from ..models import AssistantQueueUsersQueryRequest |
47 | 49 | from ..models import AssistantQueueUsersQueryResponse |
48 | 50 | from ..models import BulkResponse |
@@ -554,6 +556,96 @@ def get_assistant_queue(self, assistant_id: str, queue_id: str, **kwargs) -> 'As |
554 | 556 | callback=params.get('callback')) |
555 | 557 | return response |
556 | 558 |
|
| 559 | + def get_assistant_queue_users_job(self, assistant_id: str, queue_id: str, job_id: str, **kwargs) -> 'AssistantQueueUsersJobsResponse': |
| 560 | + """ |
| 561 | + Get job details. |
| 562 | + |
| 563 | +
|
| 564 | + This method makes a synchronous HTTP request by default. To make an |
| 565 | + asynchronous HTTP request, please define a `callback` function |
| 566 | + to be invoked when receiving the response. |
| 567 | + >>> def callback_function(response): |
| 568 | + >>> pprint(response) |
| 569 | + >>> |
| 570 | + >>> thread = api.get_assistant_queue_users_job(assistant_id, queue_id, job_id, callback=callback_function) |
| 571 | +
|
| 572 | + :param callback function: The callback function |
| 573 | + for asynchronous request. (optional) |
| 574 | + :param str assistant_id: Assistant ID (required) |
| 575 | + :param str queue_id: Queue ID (required) |
| 576 | + :param str job_id: Job ID (required) |
| 577 | + :return: AssistantQueueUsersJobsResponse |
| 578 | + If the method is called asynchronously, |
| 579 | + returns the request thread. |
| 580 | + """ |
| 581 | + |
| 582 | + all_params = ['assistant_id', 'queue_id', 'job_id'] |
| 583 | + all_params.append('callback') |
| 584 | + |
| 585 | + params = locals() |
| 586 | + for key, val in params['kwargs'].items(): |
| 587 | + if key not in all_params: |
| 588 | + raise TypeError( |
| 589 | + "Got an unexpected keyword argument '%s'" |
| 590 | + " to method get_assistant_queue_users_job" % key |
| 591 | + ) |
| 592 | + params[key] = val |
| 593 | + del params['kwargs'] |
| 594 | + |
| 595 | + # verify the required parameter 'assistant_id' is set |
| 596 | + if ('assistant_id' not in params) or (params['assistant_id'] is None): |
| 597 | + raise ValueError("Missing the required parameter `assistant_id` when calling `get_assistant_queue_users_job`") |
| 598 | + # verify the required parameter 'queue_id' is set |
| 599 | + if ('queue_id' not in params) or (params['queue_id'] is None): |
| 600 | + raise ValueError("Missing the required parameter `queue_id` when calling `get_assistant_queue_users_job`") |
| 601 | + # verify the required parameter 'job_id' is set |
| 602 | + if ('job_id' not in params) or (params['job_id'] is None): |
| 603 | + raise ValueError("Missing the required parameter `job_id` when calling `get_assistant_queue_users_job`") |
| 604 | + |
| 605 | + |
| 606 | + resource_path = '/api/v2/assistants/{assistantId}/queues/{queueId}/users/jobs/{jobId}'.replace('{format}', 'json') |
| 607 | + path_params = {} |
| 608 | + if 'assistant_id' in params: |
| 609 | + path_params['assistantId'] = params['assistant_id'] |
| 610 | + if 'queue_id' in params: |
| 611 | + path_params['queueId'] = params['queue_id'] |
| 612 | + if 'job_id' in params: |
| 613 | + path_params['jobId'] = params['job_id'] |
| 614 | + |
| 615 | + query_params = {} |
| 616 | + |
| 617 | + header_params = {} |
| 618 | + |
| 619 | + form_params = [] |
| 620 | + local_var_files = {} |
| 621 | + |
| 622 | + body_params = None |
| 623 | + |
| 624 | + # HTTP header `Accept` |
| 625 | + header_params['Accept'] = self.api_client.\ |
| 626 | + select_header_accept(['application/json']) |
| 627 | + if not header_params['Accept']: |
| 628 | + del header_params['Accept'] |
| 629 | + |
| 630 | + # HTTP header `Content-Type` |
| 631 | + header_params['Content-Type'] = self.api_client.\ |
| 632 | + select_header_content_type(['application/json']) |
| 633 | + |
| 634 | + # Authentication setting |
| 635 | + auth_settings = ['PureCloud OAuth'] |
| 636 | + |
| 637 | + response = self.api_client.call_api(resource_path, 'GET', |
| 638 | + path_params, |
| 639 | + query_params, |
| 640 | + header_params, |
| 641 | + body=body_params, |
| 642 | + post_params=form_params, |
| 643 | + files=local_var_files, |
| 644 | + response_type='AssistantQueueUsersJobsResponse', |
| 645 | + auth_settings=auth_settings, |
| 646 | + callback=params.get('callback')) |
| 647 | + return response |
| 648 | + |
557 | 649 | def get_assistant_queues(self, assistant_id: str, **kwargs) -> 'AssistantQueueListing': |
558 | 650 | """ |
559 | 651 | Get all the queues associated with an assistant. |
@@ -1416,6 +1508,96 @@ def post_assistant_queue_users_bulk_remove(self, assistant_id: str, queue_id: st |
1416 | 1508 | callback=params.get('callback')) |
1417 | 1509 | return response |
1418 | 1510 |
|
| 1511 | + def post_assistant_queue_users_jobs(self, assistant_id: str, queue_id: str, body: 'AssistantQueueUsersJobsRequest', **kwargs) -> 'AssistantQueueUsersJobsResponse': |
| 1512 | + """ |
| 1513 | + Start a new job to assistant-queue. |
| 1514 | + |
| 1515 | +
|
| 1516 | + This method makes a synchronous HTTP request by default. To make an |
| 1517 | + asynchronous HTTP request, please define a `callback` function |
| 1518 | + to be invoked when receiving the response. |
| 1519 | + >>> def callback_function(response): |
| 1520 | + >>> pprint(response) |
| 1521 | + >>> |
| 1522 | + >>> thread = api.post_assistant_queue_users_jobs(assistant_id, queue_id, body, callback=callback_function) |
| 1523 | +
|
| 1524 | + :param callback function: The callback function |
| 1525 | + for asynchronous request. (optional) |
| 1526 | + :param str assistant_id: Assistant ID (required) |
| 1527 | + :param str queue_id: Queue ID (required) |
| 1528 | + :param AssistantQueueUsersJobsRequest body: (required) |
| 1529 | + :return: AssistantQueueUsersJobsResponse |
| 1530 | + If the method is called asynchronously, |
| 1531 | + returns the request thread. |
| 1532 | + """ |
| 1533 | + |
| 1534 | + all_params = ['assistant_id', 'queue_id', 'body'] |
| 1535 | + all_params.append('callback') |
| 1536 | + |
| 1537 | + params = locals() |
| 1538 | + for key, val in params['kwargs'].items(): |
| 1539 | + if key not in all_params: |
| 1540 | + raise TypeError( |
| 1541 | + "Got an unexpected keyword argument '%s'" |
| 1542 | + " to method post_assistant_queue_users_jobs" % key |
| 1543 | + ) |
| 1544 | + params[key] = val |
| 1545 | + del params['kwargs'] |
| 1546 | + |
| 1547 | + # verify the required parameter 'assistant_id' is set |
| 1548 | + if ('assistant_id' not in params) or (params['assistant_id'] is None): |
| 1549 | + raise ValueError("Missing the required parameter `assistant_id` when calling `post_assistant_queue_users_jobs`") |
| 1550 | + # verify the required parameter 'queue_id' is set |
| 1551 | + if ('queue_id' not in params) or (params['queue_id'] is None): |
| 1552 | + raise ValueError("Missing the required parameter `queue_id` when calling `post_assistant_queue_users_jobs`") |
| 1553 | + # verify the required parameter 'body' is set |
| 1554 | + if ('body' not in params) or (params['body'] is None): |
| 1555 | + raise ValueError("Missing the required parameter `body` when calling `post_assistant_queue_users_jobs`") |
| 1556 | + |
| 1557 | + |
| 1558 | + resource_path = '/api/v2/assistants/{assistantId}/queues/{queueId}/users/jobs'.replace('{format}', 'json') |
| 1559 | + path_params = {} |
| 1560 | + if 'assistant_id' in params: |
| 1561 | + path_params['assistantId'] = params['assistant_id'] |
| 1562 | + if 'queue_id' in params: |
| 1563 | + path_params['queueId'] = params['queue_id'] |
| 1564 | + |
| 1565 | + query_params = {} |
| 1566 | + |
| 1567 | + header_params = {} |
| 1568 | + |
| 1569 | + form_params = [] |
| 1570 | + local_var_files = {} |
| 1571 | + |
| 1572 | + body_params = None |
| 1573 | + if 'body' in params: |
| 1574 | + body_params = params['body'] |
| 1575 | + |
| 1576 | + # HTTP header `Accept` |
| 1577 | + header_params['Accept'] = self.api_client.\ |
| 1578 | + select_header_accept(['application/json']) |
| 1579 | + if not header_params['Accept']: |
| 1580 | + del header_params['Accept'] |
| 1581 | + |
| 1582 | + # HTTP header `Content-Type` |
| 1583 | + header_params['Content-Type'] = self.api_client.\ |
| 1584 | + select_header_content_type(['application/json']) |
| 1585 | + |
| 1586 | + # Authentication setting |
| 1587 | + auth_settings = ['PureCloud OAuth'] |
| 1588 | + |
| 1589 | + response = self.api_client.call_api(resource_path, 'POST', |
| 1590 | + path_params, |
| 1591 | + query_params, |
| 1592 | + header_params, |
| 1593 | + body=body_params, |
| 1594 | + post_params=form_params, |
| 1595 | + files=local_var_files, |
| 1596 | + response_type='AssistantQueueUsersJobsResponse', |
| 1597 | + auth_settings=auth_settings, |
| 1598 | + callback=params.get('callback')) |
| 1599 | + return response |
| 1600 | + |
1419 | 1601 | def post_assistant_queue_users_query(self, assistant_id: str, queue_id: str, body: 'AssistantQueueUsersQueryRequest', **kwargs) -> 'AssistantQueueUsersQueryResponse': |
1420 | 1602 | """ |
1421 | 1603 | Query for users in the assistant-queue (requires manual assignment mode). |
|
0 commit comments