3
3
4
4
"""Implementation of DataFrameClient."""
5
5
6
- from typing import Optional
6
+ from typing import List , Optional
7
7
8
8
from nisystemlink .clients import core
9
9
from nisystemlink .clients .core ._uplink ._base_client import BaseClient
10
- from uplink import get , returns
10
+ from uplink import Body , delete , get , json , post , Query , returns
11
11
12
12
from . import models
13
13
@@ -28,8 +28,77 @@ def __init__(self, configuration: Optional[core.HttpConfiguration] = None):
28
28
29
29
super ().__init__ (configuration )
30
30
31
- @returns .json ()
32
31
@get (_BASE_PATH )
33
32
def api_info (self ) -> models .ApiInfo :
34
33
"""Returns information about available API operations."""
35
- pass
34
+ ...
35
+
36
+ @get (
37
+ _BASE_PATH + "/tables" ,
38
+ args = (
39
+ Query ("take" ),
40
+ Query ("id" ),
41
+ Query ("orderBy" ),
42
+ Query ("orderByDescending" ),
43
+ Query ("continuationToken" ),
44
+ Query ("workspace" ),
45
+ ),
46
+ )
47
+ def list_tables (
48
+ self ,
49
+ take : Optional [int ] = None ,
50
+ id : Optional [List [str ]] = None ,
51
+ order_by : Optional [models .OrderBy ] = None ,
52
+ order_by_descending : Optional [bool ] = None ,
53
+ continuation_token : Optional [str ] = None ,
54
+ workspace : Optional [List [str ]] = None ,
55
+ ) -> models .PagedTables :
56
+ """Lists available tables on the SystemLink DataFrame service.
57
+
58
+ Args:
59
+ take: Limits the returned list to the specified number of results. Defaults to 1000.
60
+ id: List of table IDs to filter by.
61
+ order_by: The sort order of the returned list of tables.
62
+ order_by_descending: Whether to sort descending instead of ascending. Defaults to false.
63
+ continuation_token: The token used to paginate results.
64
+ workspace: List of workspace IDs to filter by.
65
+
66
+ Returns:
67
+ models.PagedTables: The list of tables with a continuation token.
68
+ """
69
+ ...
70
+
71
+ @json
72
+ @returns .json (key = "id" )
73
+ @post (_BASE_PATH + "/tables" , args = (Body ,))
74
+ def create_table (self , table : models .CreateTableRequest ) -> str :
75
+ """Create a new table with the provided metadata and column definitions.
76
+
77
+ Args:
78
+ table: The request create the table.
79
+
80
+ Returns:
81
+ The ID of the newly created table.
82
+ """
83
+ ...
84
+
85
+ @get (_BASE_PATH + "/tables/{id}" )
86
+ def get_table_metadata (self , id : str ) -> models .TableMetadata :
87
+ """Retrieves the metadata and column information for a single table identified by its ID.
88
+
89
+ Args:
90
+ id (str): Unique ID of a DataFrame table.
91
+
92
+ Returns:
93
+ models.TableMetadata: The metadata for the table.
94
+ """
95
+ ...
96
+
97
+ @delete (_BASE_PATH + "/tables/{id}" )
98
+ def delete_table (self , id : str ) -> None :
99
+ """Deletes a table.
100
+
101
+ Args:
102
+ id (str): Unique ID of a DataFrame table.
103
+ """
104
+ ...
0 commit comments