windmill-api 1.524.0__py3-none-any.whl → 1.526.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of windmill-api might be problematic. Click here for more details.
- windmill_api/api/group/list_instance_groups_with_workspaces.py +133 -0
- windmill_api/api/job/get_completed_job_logs_tail.py +101 -0
- windmill_api/api/job/get_job_logs.py +15 -1
- windmill_api/api/workspace/edit_instance_groups.py +105 -0
- windmill_api/models/edit_instance_groups_json_body.py +82 -0
- windmill_api/models/edit_instance_groups_json_body_roles.py +44 -0
- windmill_api/models/get_settings_response_200.py +36 -1
- windmill_api/models/get_settings_response_200_auto_add_instance_groups_roles.py +44 -0
- windmill_api/models/get_user_response_200.py +25 -1
- windmill_api/models/get_user_response_200_added_via.py +78 -0
- windmill_api/models/get_user_response_200_added_via_source.py +10 -0
- windmill_api/models/instance_group_with_workspaces.py +104 -0
- windmill_api/models/instance_group_with_workspaces_workspaces_item.py +74 -0
- windmill_api/models/list_instance_groups_with_workspaces_response_200_item.py +110 -0
- windmill_api/models/list_instance_groups_with_workspaces_response_200_item_workspaces_item.py +74 -0
- windmill_api/models/list_users_response_200_item.py +25 -1
- windmill_api/models/list_users_response_200_item_added_via.py +78 -0
- windmill_api/models/list_users_response_200_item_added_via_source.py +10 -0
- windmill_api/models/user.py +25 -1
- windmill_api/models/user_added_via.py +78 -0
- windmill_api/models/user_added_via_source.py +10 -0
- windmill_api/models/user_source.py +78 -0
- windmill_api/models/user_source_source.py +10 -0
- windmill_api/models/whoami_response_200.py +25 -1
- windmill_api/models/whoami_response_200_added_via.py +78 -0
- windmill_api/models/whoami_response_200_added_via_source.py +10 -0
- windmill_api/models/whois_response_200.py +25 -1
- windmill_api/models/whois_response_200_added_via.py +78 -0
- windmill_api/models/whois_response_200_added_via_source.py +10 -0
- windmill_api/models/workspace_info.py +74 -0
- {windmill_api-1.524.0.dist-info → windmill_api-1.526.0.dist-info}/METADATA +1 -1
- {windmill_api-1.524.0.dist-info → windmill_api-1.526.0.dist-info}/RECORD +34 -11
- {windmill_api-1.524.0.dist-info → windmill_api-1.526.0.dist-info}/LICENSE +0 -0
- {windmill_api-1.524.0.dist-info → windmill_api-1.526.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, List, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.list_instance_groups_with_workspaces_response_200_item import (
|
|
9
|
+
ListInstanceGroupsWithWorkspacesResponse200Item,
|
|
10
|
+
)
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs() -> Dict[str, Any]:
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
"method": "get",
|
|
19
|
+
"url": "/groups/list_with_workspaces",
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _parse_response(
|
|
24
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
25
|
+
) -> Optional[List["ListInstanceGroupsWithWorkspacesResponse200Item"]]:
|
|
26
|
+
if response.status_code == HTTPStatus.OK:
|
|
27
|
+
response_200 = []
|
|
28
|
+
_response_200 = response.json()
|
|
29
|
+
for response_200_item_data in _response_200:
|
|
30
|
+
response_200_item = ListInstanceGroupsWithWorkspacesResponse200Item.from_dict(response_200_item_data)
|
|
31
|
+
|
|
32
|
+
response_200.append(response_200_item)
|
|
33
|
+
|
|
34
|
+
return response_200
|
|
35
|
+
if client.raise_on_unexpected_status:
|
|
36
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
37
|
+
else:
|
|
38
|
+
return None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _build_response(
|
|
42
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
43
|
+
) -> Response[List["ListInstanceGroupsWithWorkspacesResponse200Item"]]:
|
|
44
|
+
return Response(
|
|
45
|
+
status_code=HTTPStatus(response.status_code),
|
|
46
|
+
content=response.content,
|
|
47
|
+
headers=response.headers,
|
|
48
|
+
parsed=_parse_response(client=client, response=response),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def sync_detailed(
|
|
53
|
+
*,
|
|
54
|
+
client: Union[AuthenticatedClient, Client],
|
|
55
|
+
) -> Response[List["ListInstanceGroupsWithWorkspacesResponse200Item"]]:
|
|
56
|
+
"""list instance groups with workspace information
|
|
57
|
+
|
|
58
|
+
Raises:
|
|
59
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
60
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
Response[List['ListInstanceGroupsWithWorkspacesResponse200Item']]
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
kwargs = _get_kwargs()
|
|
67
|
+
|
|
68
|
+
response = client.get_httpx_client().request(
|
|
69
|
+
**kwargs,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
return _build_response(client=client, response=response)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def sync(
|
|
76
|
+
*,
|
|
77
|
+
client: Union[AuthenticatedClient, Client],
|
|
78
|
+
) -> Optional[List["ListInstanceGroupsWithWorkspacesResponse200Item"]]:
|
|
79
|
+
"""list instance groups with workspace information
|
|
80
|
+
|
|
81
|
+
Raises:
|
|
82
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
83
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
List['ListInstanceGroupsWithWorkspacesResponse200Item']
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
return sync_detailed(
|
|
90
|
+
client=client,
|
|
91
|
+
).parsed
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
async def asyncio_detailed(
|
|
95
|
+
*,
|
|
96
|
+
client: Union[AuthenticatedClient, Client],
|
|
97
|
+
) -> Response[List["ListInstanceGroupsWithWorkspacesResponse200Item"]]:
|
|
98
|
+
"""list instance groups with workspace information
|
|
99
|
+
|
|
100
|
+
Raises:
|
|
101
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
102
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
103
|
+
|
|
104
|
+
Returns:
|
|
105
|
+
Response[List['ListInstanceGroupsWithWorkspacesResponse200Item']]
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
kwargs = _get_kwargs()
|
|
109
|
+
|
|
110
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
111
|
+
|
|
112
|
+
return _build_response(client=client, response=response)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
async def asyncio(
|
|
116
|
+
*,
|
|
117
|
+
client: Union[AuthenticatedClient, Client],
|
|
118
|
+
) -> Optional[List["ListInstanceGroupsWithWorkspacesResponse200Item"]]:
|
|
119
|
+
"""list instance groups with workspace information
|
|
120
|
+
|
|
121
|
+
Raises:
|
|
122
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
123
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
124
|
+
|
|
125
|
+
Returns:
|
|
126
|
+
List['ListInstanceGroupsWithWorkspacesResponse200Item']
|
|
127
|
+
"""
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
await asyncio_detailed(
|
|
131
|
+
client=client,
|
|
132
|
+
)
|
|
133
|
+
).parsed
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...types import Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
workspace: str,
|
|
13
|
+
id: str,
|
|
14
|
+
) -> Dict[str, Any]:
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
"method": "get",
|
|
19
|
+
"url": "/w/{workspace}/jobs_u/get_completed_logs_tail/{id}".format(
|
|
20
|
+
workspace=workspace,
|
|
21
|
+
id=id,
|
|
22
|
+
),
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
27
|
+
if client.raise_on_unexpected_status:
|
|
28
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
29
|
+
else:
|
|
30
|
+
return None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
34
|
+
return Response(
|
|
35
|
+
status_code=HTTPStatus(response.status_code),
|
|
36
|
+
content=response.content,
|
|
37
|
+
headers=response.headers,
|
|
38
|
+
parsed=_parse_response(client=client, response=response),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def sync_detailed(
|
|
43
|
+
workspace: str,
|
|
44
|
+
id: str,
|
|
45
|
+
*,
|
|
46
|
+
client: Union[AuthenticatedClient, Client],
|
|
47
|
+
) -> Response[Any]:
|
|
48
|
+
"""get completed job logs tail
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
workspace (str):
|
|
52
|
+
id (str):
|
|
53
|
+
|
|
54
|
+
Raises:
|
|
55
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
56
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
Response[Any]
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
kwargs = _get_kwargs(
|
|
63
|
+
workspace=workspace,
|
|
64
|
+
id=id,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
response = client.get_httpx_client().request(
|
|
68
|
+
**kwargs,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
return _build_response(client=client, response=response)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
async def asyncio_detailed(
|
|
75
|
+
workspace: str,
|
|
76
|
+
id: str,
|
|
77
|
+
*,
|
|
78
|
+
client: Union[AuthenticatedClient, Client],
|
|
79
|
+
) -> Response[Any]:
|
|
80
|
+
"""get completed job logs tail
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
workspace (str):
|
|
84
|
+
id (str):
|
|
85
|
+
|
|
86
|
+
Raises:
|
|
87
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
88
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
Response[Any]
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
kwargs = _get_kwargs(
|
|
95
|
+
workspace=workspace,
|
|
96
|
+
id=id,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
100
|
+
|
|
101
|
+
return _build_response(client=client, response=response)
|
|
@@ -5,21 +5,29 @@ import httpx
|
|
|
5
5
|
|
|
6
6
|
from ... import errors
|
|
7
7
|
from ...client import AuthenticatedClient, Client
|
|
8
|
-
from ...types import Response
|
|
8
|
+
from ...types import UNSET, Response, Unset
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def _get_kwargs(
|
|
12
12
|
workspace: str,
|
|
13
13
|
id: str,
|
|
14
|
+
*,
|
|
15
|
+
remove_ansi_warnings: Union[Unset, None, bool] = UNSET,
|
|
14
16
|
) -> Dict[str, Any]:
|
|
15
17
|
pass
|
|
16
18
|
|
|
19
|
+
params: Dict[str, Any] = {}
|
|
20
|
+
params["remove_ansi_warnings"] = remove_ansi_warnings
|
|
21
|
+
|
|
22
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
23
|
+
|
|
17
24
|
return {
|
|
18
25
|
"method": "get",
|
|
19
26
|
"url": "/w/{workspace}/jobs_u/get_logs/{id}".format(
|
|
20
27
|
workspace=workspace,
|
|
21
28
|
id=id,
|
|
22
29
|
),
|
|
30
|
+
"params": params,
|
|
23
31
|
}
|
|
24
32
|
|
|
25
33
|
|
|
@@ -44,12 +52,14 @@ def sync_detailed(
|
|
|
44
52
|
id: str,
|
|
45
53
|
*,
|
|
46
54
|
client: Union[AuthenticatedClient, Client],
|
|
55
|
+
remove_ansi_warnings: Union[Unset, None, bool] = UNSET,
|
|
47
56
|
) -> Response[Any]:
|
|
48
57
|
"""get job logs
|
|
49
58
|
|
|
50
59
|
Args:
|
|
51
60
|
workspace (str):
|
|
52
61
|
id (str):
|
|
62
|
+
remove_ansi_warnings (Union[Unset, None, bool]):
|
|
53
63
|
|
|
54
64
|
Raises:
|
|
55
65
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -62,6 +72,7 @@ def sync_detailed(
|
|
|
62
72
|
kwargs = _get_kwargs(
|
|
63
73
|
workspace=workspace,
|
|
64
74
|
id=id,
|
|
75
|
+
remove_ansi_warnings=remove_ansi_warnings,
|
|
65
76
|
)
|
|
66
77
|
|
|
67
78
|
response = client.get_httpx_client().request(
|
|
@@ -76,12 +87,14 @@ async def asyncio_detailed(
|
|
|
76
87
|
id: str,
|
|
77
88
|
*,
|
|
78
89
|
client: Union[AuthenticatedClient, Client],
|
|
90
|
+
remove_ansi_warnings: Union[Unset, None, bool] = UNSET,
|
|
79
91
|
) -> Response[Any]:
|
|
80
92
|
"""get job logs
|
|
81
93
|
|
|
82
94
|
Args:
|
|
83
95
|
workspace (str):
|
|
84
96
|
id (str):
|
|
97
|
+
remove_ansi_warnings (Union[Unset, None, bool]):
|
|
85
98
|
|
|
86
99
|
Raises:
|
|
87
100
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
@@ -94,6 +107,7 @@ async def asyncio_detailed(
|
|
|
94
107
|
kwargs = _get_kwargs(
|
|
95
108
|
workspace=workspace,
|
|
96
109
|
id=id,
|
|
110
|
+
remove_ansi_warnings=remove_ansi_warnings,
|
|
97
111
|
)
|
|
98
112
|
|
|
99
113
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.edit_instance_groups_json_body import EditInstanceGroupsJsonBody
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
workspace: str,
|
|
14
|
+
*,
|
|
15
|
+
json_body: EditInstanceGroupsJsonBody,
|
|
16
|
+
) -> Dict[str, Any]:
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
json_json_body = json_body.to_dict()
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
"method": "post",
|
|
23
|
+
"url": "/w/{workspace}/workspaces/edit_instance_groups".format(
|
|
24
|
+
workspace=workspace,
|
|
25
|
+
),
|
|
26
|
+
"json": json_json_body,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
31
|
+
if client.raise_on_unexpected_status:
|
|
32
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
33
|
+
else:
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
38
|
+
return Response(
|
|
39
|
+
status_code=HTTPStatus(response.status_code),
|
|
40
|
+
content=response.content,
|
|
41
|
+
headers=response.headers,
|
|
42
|
+
parsed=_parse_response(client=client, response=response),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def sync_detailed(
|
|
47
|
+
workspace: str,
|
|
48
|
+
*,
|
|
49
|
+
client: Union[AuthenticatedClient, Client],
|
|
50
|
+
json_body: EditInstanceGroupsJsonBody,
|
|
51
|
+
) -> Response[Any]:
|
|
52
|
+
"""edit instance groups
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
workspace (str):
|
|
56
|
+
json_body (EditInstanceGroupsJsonBody):
|
|
57
|
+
|
|
58
|
+
Raises:
|
|
59
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
60
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
61
|
+
|
|
62
|
+
Returns:
|
|
63
|
+
Response[Any]
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
kwargs = _get_kwargs(
|
|
67
|
+
workspace=workspace,
|
|
68
|
+
json_body=json_body,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
response = client.get_httpx_client().request(
|
|
72
|
+
**kwargs,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
return _build_response(client=client, response=response)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
async def asyncio_detailed(
|
|
79
|
+
workspace: str,
|
|
80
|
+
*,
|
|
81
|
+
client: Union[AuthenticatedClient, Client],
|
|
82
|
+
json_body: EditInstanceGroupsJsonBody,
|
|
83
|
+
) -> Response[Any]:
|
|
84
|
+
"""edit instance groups
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
workspace (str):
|
|
88
|
+
json_body (EditInstanceGroupsJsonBody):
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
92
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
Response[Any]
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
kwargs = _get_kwargs(
|
|
99
|
+
workspace=workspace,
|
|
100
|
+
json_body=json_body,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
104
|
+
|
|
105
|
+
return _build_response(client=client, response=response)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from ..models.edit_instance_groups_json_body_roles import EditInstanceGroupsJsonBodyRoles
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="EditInstanceGroupsJsonBody")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class EditInstanceGroupsJsonBody:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
groups (Union[Unset, List[str]]):
|
|
20
|
+
roles (Union[Unset, EditInstanceGroupsJsonBodyRoles]):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
groups: Union[Unset, List[str]] = UNSET
|
|
24
|
+
roles: Union[Unset, "EditInstanceGroupsJsonBodyRoles"] = UNSET
|
|
25
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
26
|
+
|
|
27
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
28
|
+
groups: Union[Unset, List[str]] = UNSET
|
|
29
|
+
if not isinstance(self.groups, Unset):
|
|
30
|
+
groups = self.groups
|
|
31
|
+
|
|
32
|
+
roles: Union[Unset, Dict[str, Any]] = UNSET
|
|
33
|
+
if not isinstance(self.roles, Unset):
|
|
34
|
+
roles = self.roles.to_dict()
|
|
35
|
+
|
|
36
|
+
field_dict: Dict[str, Any] = {}
|
|
37
|
+
field_dict.update(self.additional_properties)
|
|
38
|
+
field_dict.update({})
|
|
39
|
+
if groups is not UNSET:
|
|
40
|
+
field_dict["groups"] = groups
|
|
41
|
+
if roles is not UNSET:
|
|
42
|
+
field_dict["roles"] = roles
|
|
43
|
+
|
|
44
|
+
return field_dict
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
48
|
+
from ..models.edit_instance_groups_json_body_roles import EditInstanceGroupsJsonBodyRoles
|
|
49
|
+
|
|
50
|
+
d = src_dict.copy()
|
|
51
|
+
groups = cast(List[str], d.pop("groups", UNSET))
|
|
52
|
+
|
|
53
|
+
_roles = d.pop("roles", UNSET)
|
|
54
|
+
roles: Union[Unset, EditInstanceGroupsJsonBodyRoles]
|
|
55
|
+
if isinstance(_roles, Unset):
|
|
56
|
+
roles = UNSET
|
|
57
|
+
else:
|
|
58
|
+
roles = EditInstanceGroupsJsonBodyRoles.from_dict(_roles)
|
|
59
|
+
|
|
60
|
+
edit_instance_groups_json_body = cls(
|
|
61
|
+
groups=groups,
|
|
62
|
+
roles=roles,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
edit_instance_groups_json_body.additional_properties = d
|
|
66
|
+
return edit_instance_groups_json_body
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def additional_keys(self) -> List[str]:
|
|
70
|
+
return list(self.additional_properties.keys())
|
|
71
|
+
|
|
72
|
+
def __getitem__(self, key: str) -> Any:
|
|
73
|
+
return self.additional_properties[key]
|
|
74
|
+
|
|
75
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
76
|
+
self.additional_properties[key] = value
|
|
77
|
+
|
|
78
|
+
def __delitem__(self, key: str) -> None:
|
|
79
|
+
del self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __contains__(self, key: str) -> bool:
|
|
82
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
T = TypeVar("T", bound="EditInstanceGroupsJsonBodyRoles")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class EditInstanceGroupsJsonBodyRoles:
|
|
11
|
+
""" """
|
|
12
|
+
|
|
13
|
+
additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict)
|
|
14
|
+
|
|
15
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
16
|
+
field_dict: Dict[str, Any] = {}
|
|
17
|
+
field_dict.update(self.additional_properties)
|
|
18
|
+
field_dict.update({})
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
24
|
+
d = src_dict.copy()
|
|
25
|
+
edit_instance_groups_json_body_roles = cls()
|
|
26
|
+
|
|
27
|
+
edit_instance_groups_json_body_roles.additional_properties = d
|
|
28
|
+
return edit_instance_groups_json_body_roles
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> List[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> str:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: str) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
|
|
2
2
|
|
|
3
3
|
from attrs import define as _attrs_define
|
|
4
4
|
from attrs import field as _attrs_field
|
|
@@ -7,6 +7,9 @@ from ..types import UNSET, Unset
|
|
|
7
7
|
|
|
8
8
|
if TYPE_CHECKING:
|
|
9
9
|
from ..models.get_settings_response_200_ai_config import GetSettingsResponse200AiConfig
|
|
10
|
+
from ..models.get_settings_response_200_auto_add_instance_groups_roles import (
|
|
11
|
+
GetSettingsResponse200AutoAddInstanceGroupsRoles,
|
|
12
|
+
)
|
|
10
13
|
from ..models.get_settings_response_200_default_scripts import GetSettingsResponse200DefaultScripts
|
|
11
14
|
from ..models.get_settings_response_200_deploy_ui import GetSettingsResponse200DeployUi
|
|
12
15
|
from ..models.get_settings_response_200_ducklake import GetSettingsResponse200Ducklake
|
|
@@ -34,6 +37,8 @@ class GetSettingsResponse200:
|
|
|
34
37
|
auto_invite_domain (Union[Unset, str]):
|
|
35
38
|
auto_invite_operator (Union[Unset, bool]):
|
|
36
39
|
auto_add (Union[Unset, bool]):
|
|
40
|
+
auto_add_instance_groups (Union[Unset, List[str]]):
|
|
41
|
+
auto_add_instance_groups_roles (Union[Unset, GetSettingsResponse200AutoAddInstanceGroupsRoles]):
|
|
37
42
|
plan (Union[Unset, str]):
|
|
38
43
|
customer_id (Union[Unset, str]):
|
|
39
44
|
webhook (Union[Unset, str]):
|
|
@@ -64,6 +69,8 @@ class GetSettingsResponse200:
|
|
|
64
69
|
auto_invite_domain: Union[Unset, str] = UNSET
|
|
65
70
|
auto_invite_operator: Union[Unset, bool] = UNSET
|
|
66
71
|
auto_add: Union[Unset, bool] = UNSET
|
|
72
|
+
auto_add_instance_groups: Union[Unset, List[str]] = UNSET
|
|
73
|
+
auto_add_instance_groups_roles: Union[Unset, "GetSettingsResponse200AutoAddInstanceGroupsRoles"] = UNSET
|
|
67
74
|
plan: Union[Unset, str] = UNSET
|
|
68
75
|
customer_id: Union[Unset, str] = UNSET
|
|
69
76
|
webhook: Union[Unset, str] = UNSET
|
|
@@ -94,6 +101,14 @@ class GetSettingsResponse200:
|
|
|
94
101
|
auto_invite_domain = self.auto_invite_domain
|
|
95
102
|
auto_invite_operator = self.auto_invite_operator
|
|
96
103
|
auto_add = self.auto_add
|
|
104
|
+
auto_add_instance_groups: Union[Unset, List[str]] = UNSET
|
|
105
|
+
if not isinstance(self.auto_add_instance_groups, Unset):
|
|
106
|
+
auto_add_instance_groups = self.auto_add_instance_groups
|
|
107
|
+
|
|
108
|
+
auto_add_instance_groups_roles: Union[Unset, Dict[str, Any]] = UNSET
|
|
109
|
+
if not isinstance(self.auto_add_instance_groups_roles, Unset):
|
|
110
|
+
auto_add_instance_groups_roles = self.auto_add_instance_groups_roles.to_dict()
|
|
111
|
+
|
|
97
112
|
plan = self.plan
|
|
98
113
|
customer_id = self.customer_id
|
|
99
114
|
webhook = self.webhook
|
|
@@ -161,6 +176,10 @@ class GetSettingsResponse200:
|
|
|
161
176
|
field_dict["auto_invite_operator"] = auto_invite_operator
|
|
162
177
|
if auto_add is not UNSET:
|
|
163
178
|
field_dict["auto_add"] = auto_add
|
|
179
|
+
if auto_add_instance_groups is not UNSET:
|
|
180
|
+
field_dict["auto_add_instance_groups"] = auto_add_instance_groups
|
|
181
|
+
if auto_add_instance_groups_roles is not UNSET:
|
|
182
|
+
field_dict["auto_add_instance_groups_roles"] = auto_add_instance_groups_roles
|
|
164
183
|
if plan is not UNSET:
|
|
165
184
|
field_dict["plan"] = plan
|
|
166
185
|
if customer_id is not UNSET:
|
|
@@ -199,6 +218,9 @@ class GetSettingsResponse200:
|
|
|
199
218
|
@classmethod
|
|
200
219
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
201
220
|
from ..models.get_settings_response_200_ai_config import GetSettingsResponse200AiConfig
|
|
221
|
+
from ..models.get_settings_response_200_auto_add_instance_groups_roles import (
|
|
222
|
+
GetSettingsResponse200AutoAddInstanceGroupsRoles,
|
|
223
|
+
)
|
|
202
224
|
from ..models.get_settings_response_200_default_scripts import GetSettingsResponse200DefaultScripts
|
|
203
225
|
from ..models.get_settings_response_200_deploy_ui import GetSettingsResponse200DeployUi
|
|
204
226
|
from ..models.get_settings_response_200_ducklake import GetSettingsResponse200Ducklake
|
|
@@ -232,6 +254,17 @@ class GetSettingsResponse200:
|
|
|
232
254
|
|
|
233
255
|
auto_add = d.pop("auto_add", UNSET)
|
|
234
256
|
|
|
257
|
+
auto_add_instance_groups = cast(List[str], d.pop("auto_add_instance_groups", UNSET))
|
|
258
|
+
|
|
259
|
+
_auto_add_instance_groups_roles = d.pop("auto_add_instance_groups_roles", UNSET)
|
|
260
|
+
auto_add_instance_groups_roles: Union[Unset, GetSettingsResponse200AutoAddInstanceGroupsRoles]
|
|
261
|
+
if isinstance(_auto_add_instance_groups_roles, Unset):
|
|
262
|
+
auto_add_instance_groups_roles = UNSET
|
|
263
|
+
else:
|
|
264
|
+
auto_add_instance_groups_roles = GetSettingsResponse200AutoAddInstanceGroupsRoles.from_dict(
|
|
265
|
+
_auto_add_instance_groups_roles
|
|
266
|
+
)
|
|
267
|
+
|
|
235
268
|
plan = d.pop("plan", UNSET)
|
|
236
269
|
|
|
237
270
|
customer_id = d.pop("customer_id", UNSET)
|
|
@@ -318,6 +351,8 @@ class GetSettingsResponse200:
|
|
|
318
351
|
auto_invite_domain=auto_invite_domain,
|
|
319
352
|
auto_invite_operator=auto_invite_operator,
|
|
320
353
|
auto_add=auto_add,
|
|
354
|
+
auto_add_instance_groups=auto_add_instance_groups,
|
|
355
|
+
auto_add_instance_groups_roles=auto_add_instance_groups_roles,
|
|
321
356
|
plan=plan,
|
|
322
357
|
customer_id=customer_id,
|
|
323
358
|
webhook=webhook,
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
T = TypeVar("T", bound="GetSettingsResponse200AutoAddInstanceGroupsRoles")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class GetSettingsResponse200AutoAddInstanceGroupsRoles:
|
|
11
|
+
""" """
|
|
12
|
+
|
|
13
|
+
additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict)
|
|
14
|
+
|
|
15
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
16
|
+
field_dict: Dict[str, Any] = {}
|
|
17
|
+
field_dict.update(self.additional_properties)
|
|
18
|
+
field_dict.update({})
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
24
|
+
d = src_dict.copy()
|
|
25
|
+
get_settings_response_200_auto_add_instance_groups_roles = cls()
|
|
26
|
+
|
|
27
|
+
get_settings_response_200_auto_add_instance_groups_roles.additional_properties = d
|
|
28
|
+
return get_settings_response_200_auto_add_instance_groups_roles
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> List[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> str:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: str) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|