|
51 | 51 | "MembersPagePagination", |
52 | 52 | "SyncMembersPage", |
53 | 53 | "AsyncMembersPage", |
| 54 | + "OutputsPagePagination", |
| 55 | + "SyncOutputsPage", |
| 56 | + "AsyncOutputsPage", |
54 | 57 | "PersonalAccessTokensPagePagination", |
55 | 58 | "SyncPersonalAccessTokensPage", |
56 | 59 | "AsyncPersonalAccessTokensPage", |
|
102 | 105 | "WarmPoolsPagePagination", |
103 | 106 | "SyncWarmPoolsPage", |
104 | 107 | "AsyncWarmPoolsPage", |
| 108 | + "WorkflowExecutionActionsPagePagination", |
| 109 | + "SyncWorkflowExecutionActionsPage", |
| 110 | + "AsyncWorkflowExecutionActionsPage", |
| 111 | + "WorkflowExecutionsPagePagination", |
| 112 | + "SyncWorkflowExecutionsPage", |
| 113 | + "AsyncWorkflowExecutionsPage", |
| 114 | + "WorkflowsPagePagination", |
| 115 | + "SyncWorkflowsPage", |
| 116 | + "AsyncWorkflowsPage", |
105 | 117 | ] |
106 | 118 |
|
107 | 119 | _T = TypeVar("_T") |
@@ -807,6 +819,56 @@ def next_page_info(self) -> Optional[PageInfo]: |
807 | 819 | return PageInfo(params={"token": next_token}) |
808 | 820 |
|
809 | 821 |
|
| 822 | +class OutputsPagePagination(BaseModel): |
| 823 | + next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) |
| 824 | + |
| 825 | + |
| 826 | +class SyncOutputsPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): |
| 827 | + outputs: List[_T] |
| 828 | + pagination: Optional[OutputsPagePagination] = None |
| 829 | + |
| 830 | + @override |
| 831 | + def _get_page_items(self) -> List[_T]: |
| 832 | + outputs = self.outputs |
| 833 | + if not outputs: |
| 834 | + return [] |
| 835 | + return outputs |
| 836 | + |
| 837 | + @override |
| 838 | + def next_page_info(self) -> Optional[PageInfo]: |
| 839 | + next_token = None |
| 840 | + if self.pagination is not None: |
| 841 | + if self.pagination.next_token is not None: |
| 842 | + next_token = self.pagination.next_token |
| 843 | + if not next_token: |
| 844 | + return None |
| 845 | + |
| 846 | + return PageInfo(params={"token": next_token}) |
| 847 | + |
| 848 | + |
| 849 | +class AsyncOutputsPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): |
| 850 | + outputs: List[_T] |
| 851 | + pagination: Optional[OutputsPagePagination] = None |
| 852 | + |
| 853 | + @override |
| 854 | + def _get_page_items(self) -> List[_T]: |
| 855 | + outputs = self.outputs |
| 856 | + if not outputs: |
| 857 | + return [] |
| 858 | + return outputs |
| 859 | + |
| 860 | + @override |
| 861 | + def next_page_info(self) -> Optional[PageInfo]: |
| 862 | + next_token = None |
| 863 | + if self.pagination is not None: |
| 864 | + if self.pagination.next_token is not None: |
| 865 | + next_token = self.pagination.next_token |
| 866 | + if not next_token: |
| 867 | + return None |
| 868 | + |
| 869 | + return PageInfo(params={"token": next_token}) |
| 870 | + |
| 871 | + |
810 | 872 | class PersonalAccessTokensPagePagination(BaseModel): |
811 | 873 | next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) |
812 | 874 |
|
@@ -1655,3 +1717,153 @@ def next_page_info(self) -> Optional[PageInfo]: |
1655 | 1717 | return None |
1656 | 1718 |
|
1657 | 1719 | return PageInfo(params={"token": next_token}) |
| 1720 | + |
| 1721 | + |
| 1722 | +class WorkflowExecutionActionsPagePagination(BaseModel): |
| 1723 | + next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) |
| 1724 | + |
| 1725 | + |
| 1726 | +class SyncWorkflowExecutionActionsPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): |
| 1727 | + pagination: Optional[WorkflowExecutionActionsPagePagination] = None |
| 1728 | + workflow_execution_actions: List[_T] = FieldInfo(alias="workflowExecutionActions") |
| 1729 | + |
| 1730 | + @override |
| 1731 | + def _get_page_items(self) -> List[_T]: |
| 1732 | + workflow_execution_actions = self.workflow_execution_actions |
| 1733 | + if not workflow_execution_actions: |
| 1734 | + return [] |
| 1735 | + return workflow_execution_actions |
| 1736 | + |
| 1737 | + @override |
| 1738 | + def next_page_info(self) -> Optional[PageInfo]: |
| 1739 | + next_token = None |
| 1740 | + if self.pagination is not None: |
| 1741 | + if self.pagination.next_token is not None: |
| 1742 | + next_token = self.pagination.next_token |
| 1743 | + if not next_token: |
| 1744 | + return None |
| 1745 | + |
| 1746 | + return PageInfo(params={"token": next_token}) |
| 1747 | + |
| 1748 | + |
| 1749 | +class AsyncWorkflowExecutionActionsPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): |
| 1750 | + pagination: Optional[WorkflowExecutionActionsPagePagination] = None |
| 1751 | + workflow_execution_actions: List[_T] = FieldInfo(alias="workflowExecutionActions") |
| 1752 | + |
| 1753 | + @override |
| 1754 | + def _get_page_items(self) -> List[_T]: |
| 1755 | + workflow_execution_actions = self.workflow_execution_actions |
| 1756 | + if not workflow_execution_actions: |
| 1757 | + return [] |
| 1758 | + return workflow_execution_actions |
| 1759 | + |
| 1760 | + @override |
| 1761 | + def next_page_info(self) -> Optional[PageInfo]: |
| 1762 | + next_token = None |
| 1763 | + if self.pagination is not None: |
| 1764 | + if self.pagination.next_token is not None: |
| 1765 | + next_token = self.pagination.next_token |
| 1766 | + if not next_token: |
| 1767 | + return None |
| 1768 | + |
| 1769 | + return PageInfo(params={"token": next_token}) |
| 1770 | + |
| 1771 | + |
| 1772 | +class WorkflowExecutionsPagePagination(BaseModel): |
| 1773 | + next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) |
| 1774 | + |
| 1775 | + |
| 1776 | +class SyncWorkflowExecutionsPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): |
| 1777 | + pagination: Optional[WorkflowExecutionsPagePagination] = None |
| 1778 | + workflow_executions: List[_T] = FieldInfo(alias="workflowExecutions") |
| 1779 | + |
| 1780 | + @override |
| 1781 | + def _get_page_items(self) -> List[_T]: |
| 1782 | + workflow_executions = self.workflow_executions |
| 1783 | + if not workflow_executions: |
| 1784 | + return [] |
| 1785 | + return workflow_executions |
| 1786 | + |
| 1787 | + @override |
| 1788 | + def next_page_info(self) -> Optional[PageInfo]: |
| 1789 | + next_token = None |
| 1790 | + if self.pagination is not None: |
| 1791 | + if self.pagination.next_token is not None: |
| 1792 | + next_token = self.pagination.next_token |
| 1793 | + if not next_token: |
| 1794 | + return None |
| 1795 | + |
| 1796 | + return PageInfo(params={"token": next_token}) |
| 1797 | + |
| 1798 | + |
| 1799 | +class AsyncWorkflowExecutionsPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): |
| 1800 | + pagination: Optional[WorkflowExecutionsPagePagination] = None |
| 1801 | + workflow_executions: List[_T] = FieldInfo(alias="workflowExecutions") |
| 1802 | + |
| 1803 | + @override |
| 1804 | + def _get_page_items(self) -> List[_T]: |
| 1805 | + workflow_executions = self.workflow_executions |
| 1806 | + if not workflow_executions: |
| 1807 | + return [] |
| 1808 | + return workflow_executions |
| 1809 | + |
| 1810 | + @override |
| 1811 | + def next_page_info(self) -> Optional[PageInfo]: |
| 1812 | + next_token = None |
| 1813 | + if self.pagination is not None: |
| 1814 | + if self.pagination.next_token is not None: |
| 1815 | + next_token = self.pagination.next_token |
| 1816 | + if not next_token: |
| 1817 | + return None |
| 1818 | + |
| 1819 | + return PageInfo(params={"token": next_token}) |
| 1820 | + |
| 1821 | + |
| 1822 | +class WorkflowsPagePagination(BaseModel): |
| 1823 | + next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) |
| 1824 | + |
| 1825 | + |
| 1826 | +class SyncWorkflowsPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): |
| 1827 | + pagination: Optional[WorkflowsPagePagination] = None |
| 1828 | + workflows: List[_T] |
| 1829 | + |
| 1830 | + @override |
| 1831 | + def _get_page_items(self) -> List[_T]: |
| 1832 | + workflows = self.workflows |
| 1833 | + if not workflows: |
| 1834 | + return [] |
| 1835 | + return workflows |
| 1836 | + |
| 1837 | + @override |
| 1838 | + def next_page_info(self) -> Optional[PageInfo]: |
| 1839 | + next_token = None |
| 1840 | + if self.pagination is not None: |
| 1841 | + if self.pagination.next_token is not None: |
| 1842 | + next_token = self.pagination.next_token |
| 1843 | + if not next_token: |
| 1844 | + return None |
| 1845 | + |
| 1846 | + return PageInfo(params={"token": next_token}) |
| 1847 | + |
| 1848 | + |
| 1849 | +class AsyncWorkflowsPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): |
| 1850 | + pagination: Optional[WorkflowsPagePagination] = None |
| 1851 | + workflows: List[_T] |
| 1852 | + |
| 1853 | + @override |
| 1854 | + def _get_page_items(self) -> List[_T]: |
| 1855 | + workflows = self.workflows |
| 1856 | + if not workflows: |
| 1857 | + return [] |
| 1858 | + return workflows |
| 1859 | + |
| 1860 | + @override |
| 1861 | + def next_page_info(self) -> Optional[PageInfo]: |
| 1862 | + next_token = None |
| 1863 | + if self.pagination is not None: |
| 1864 | + if self.pagination.next_token is not None: |
| 1865 | + next_token = self.pagination.next_token |
| 1866 | + if not next_token: |
| 1867 | + return None |
| 1868 | + |
| 1869 | + return PageInfo(params={"token": next_token}) |
0 commit comments