windmill-api 1.525.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/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.525.0.dist-info → windmill_api-1.526.0.dist-info}/METADATA +1 -1
- {windmill_api-1.525.0.dist-info → windmill_api-1.526.0.dist-info}/RECORD +32 -10
- {windmill_api-1.525.0.dist-info → windmill_api-1.526.0.dist-info}/LICENSE +0 -0
- {windmill_api-1.525.0.dist-info → windmill_api-1.526.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
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.instance_group_with_workspaces_workspaces_item import InstanceGroupWithWorkspacesWorkspacesItem
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="InstanceGroupWithWorkspaces")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class InstanceGroupWithWorkspaces:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
name (str):
|
|
20
|
+
summary (Union[Unset, str]):
|
|
21
|
+
emails (Union[Unset, List[str]]):
|
|
22
|
+
workspaces (Union[Unset, List['InstanceGroupWithWorkspacesWorkspacesItem']]):
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
name: str
|
|
26
|
+
summary: Union[Unset, str] = UNSET
|
|
27
|
+
emails: Union[Unset, List[str]] = UNSET
|
|
28
|
+
workspaces: Union[Unset, List["InstanceGroupWithWorkspacesWorkspacesItem"]] = UNSET
|
|
29
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
|
+
|
|
31
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
32
|
+
name = self.name
|
|
33
|
+
summary = self.summary
|
|
34
|
+
emails: Union[Unset, List[str]] = UNSET
|
|
35
|
+
if not isinstance(self.emails, Unset):
|
|
36
|
+
emails = self.emails
|
|
37
|
+
|
|
38
|
+
workspaces: Union[Unset, List[Dict[str, Any]]] = UNSET
|
|
39
|
+
if not isinstance(self.workspaces, Unset):
|
|
40
|
+
workspaces = []
|
|
41
|
+
for workspaces_item_data in self.workspaces:
|
|
42
|
+
workspaces_item = workspaces_item_data.to_dict()
|
|
43
|
+
|
|
44
|
+
workspaces.append(workspaces_item)
|
|
45
|
+
|
|
46
|
+
field_dict: Dict[str, Any] = {}
|
|
47
|
+
field_dict.update(self.additional_properties)
|
|
48
|
+
field_dict.update(
|
|
49
|
+
{
|
|
50
|
+
"name": name,
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
if summary is not UNSET:
|
|
54
|
+
field_dict["summary"] = summary
|
|
55
|
+
if emails is not UNSET:
|
|
56
|
+
field_dict["emails"] = emails
|
|
57
|
+
if workspaces is not UNSET:
|
|
58
|
+
field_dict["workspaces"] = workspaces
|
|
59
|
+
|
|
60
|
+
return field_dict
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
64
|
+
from ..models.instance_group_with_workspaces_workspaces_item import InstanceGroupWithWorkspacesWorkspacesItem
|
|
65
|
+
|
|
66
|
+
d = src_dict.copy()
|
|
67
|
+
name = d.pop("name")
|
|
68
|
+
|
|
69
|
+
summary = d.pop("summary", UNSET)
|
|
70
|
+
|
|
71
|
+
emails = cast(List[str], d.pop("emails", UNSET))
|
|
72
|
+
|
|
73
|
+
workspaces = []
|
|
74
|
+
_workspaces = d.pop("workspaces", UNSET)
|
|
75
|
+
for workspaces_item_data in _workspaces or []:
|
|
76
|
+
workspaces_item = InstanceGroupWithWorkspacesWorkspacesItem.from_dict(workspaces_item_data)
|
|
77
|
+
|
|
78
|
+
workspaces.append(workspaces_item)
|
|
79
|
+
|
|
80
|
+
instance_group_with_workspaces = cls(
|
|
81
|
+
name=name,
|
|
82
|
+
summary=summary,
|
|
83
|
+
emails=emails,
|
|
84
|
+
workspaces=workspaces,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
instance_group_with_workspaces.additional_properties = d
|
|
88
|
+
return instance_group_with_workspaces
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def additional_keys(self) -> List[str]:
|
|
92
|
+
return list(self.additional_properties.keys())
|
|
93
|
+
|
|
94
|
+
def __getitem__(self, key: str) -> Any:
|
|
95
|
+
return self.additional_properties[key]
|
|
96
|
+
|
|
97
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
98
|
+
self.additional_properties[key] = value
|
|
99
|
+
|
|
100
|
+
def __delitem__(self, key: str) -> None:
|
|
101
|
+
del self.additional_properties[key]
|
|
102
|
+
|
|
103
|
+
def __contains__(self, key: str) -> bool:
|
|
104
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar, Union
|
|
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
|
+
T = TypeVar("T", bound="InstanceGroupWithWorkspacesWorkspacesItem")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class InstanceGroupWithWorkspacesWorkspacesItem:
|
|
13
|
+
"""
|
|
14
|
+
Attributes:
|
|
15
|
+
workspace_id (Union[Unset, str]):
|
|
16
|
+
workspace_name (Union[Unset, str]):
|
|
17
|
+
role (Union[Unset, str]):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
workspace_id: Union[Unset, str] = UNSET
|
|
21
|
+
workspace_name: Union[Unset, str] = UNSET
|
|
22
|
+
role: Union[Unset, str] = UNSET
|
|
23
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
26
|
+
workspace_id = self.workspace_id
|
|
27
|
+
workspace_name = self.workspace_name
|
|
28
|
+
role = self.role
|
|
29
|
+
|
|
30
|
+
field_dict: Dict[str, Any] = {}
|
|
31
|
+
field_dict.update(self.additional_properties)
|
|
32
|
+
field_dict.update({})
|
|
33
|
+
if workspace_id is not UNSET:
|
|
34
|
+
field_dict["workspace_id"] = workspace_id
|
|
35
|
+
if workspace_name is not UNSET:
|
|
36
|
+
field_dict["workspace_name"] = workspace_name
|
|
37
|
+
if role is not UNSET:
|
|
38
|
+
field_dict["role"] = role
|
|
39
|
+
|
|
40
|
+
return field_dict
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
44
|
+
d = src_dict.copy()
|
|
45
|
+
workspace_id = d.pop("workspace_id", UNSET)
|
|
46
|
+
|
|
47
|
+
workspace_name = d.pop("workspace_name", UNSET)
|
|
48
|
+
|
|
49
|
+
role = d.pop("role", UNSET)
|
|
50
|
+
|
|
51
|
+
instance_group_with_workspaces_workspaces_item = cls(
|
|
52
|
+
workspace_id=workspace_id,
|
|
53
|
+
workspace_name=workspace_name,
|
|
54
|
+
role=role,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
instance_group_with_workspaces_workspaces_item.additional_properties = d
|
|
58
|
+
return instance_group_with_workspaces_workspaces_item
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def additional_keys(self) -> List[str]:
|
|
62
|
+
return list(self.additional_properties.keys())
|
|
63
|
+
|
|
64
|
+
def __getitem__(self, key: str) -> Any:
|
|
65
|
+
return self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
68
|
+
self.additional_properties[key] = value
|
|
69
|
+
|
|
70
|
+
def __delitem__(self, key: str) -> None:
|
|
71
|
+
del self.additional_properties[key]
|
|
72
|
+
|
|
73
|
+
def __contains__(self, key: str) -> bool:
|
|
74
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,110 @@
|
|
|
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.list_instance_groups_with_workspaces_response_200_item_workspaces_item import (
|
|
10
|
+
ListInstanceGroupsWithWorkspacesResponse200ItemWorkspacesItem,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="ListInstanceGroupsWithWorkspacesResponse200Item")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class ListInstanceGroupsWithWorkspacesResponse200Item:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
name (str):
|
|
22
|
+
summary (Union[Unset, str]):
|
|
23
|
+
emails (Union[Unset, List[str]]):
|
|
24
|
+
workspaces (Union[Unset, List['ListInstanceGroupsWithWorkspacesResponse200ItemWorkspacesItem']]):
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
name: str
|
|
28
|
+
summary: Union[Unset, str] = UNSET
|
|
29
|
+
emails: Union[Unset, List[str]] = UNSET
|
|
30
|
+
workspaces: Union[Unset, List["ListInstanceGroupsWithWorkspacesResponse200ItemWorkspacesItem"]] = UNSET
|
|
31
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
|
+
|
|
33
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
34
|
+
name = self.name
|
|
35
|
+
summary = self.summary
|
|
36
|
+
emails: Union[Unset, List[str]] = UNSET
|
|
37
|
+
if not isinstance(self.emails, Unset):
|
|
38
|
+
emails = self.emails
|
|
39
|
+
|
|
40
|
+
workspaces: Union[Unset, List[Dict[str, Any]]] = UNSET
|
|
41
|
+
if not isinstance(self.workspaces, Unset):
|
|
42
|
+
workspaces = []
|
|
43
|
+
for workspaces_item_data in self.workspaces:
|
|
44
|
+
workspaces_item = workspaces_item_data.to_dict()
|
|
45
|
+
|
|
46
|
+
workspaces.append(workspaces_item)
|
|
47
|
+
|
|
48
|
+
field_dict: Dict[str, Any] = {}
|
|
49
|
+
field_dict.update(self.additional_properties)
|
|
50
|
+
field_dict.update(
|
|
51
|
+
{
|
|
52
|
+
"name": name,
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
if summary is not UNSET:
|
|
56
|
+
field_dict["summary"] = summary
|
|
57
|
+
if emails is not UNSET:
|
|
58
|
+
field_dict["emails"] = emails
|
|
59
|
+
if workspaces is not UNSET:
|
|
60
|
+
field_dict["workspaces"] = workspaces
|
|
61
|
+
|
|
62
|
+
return field_dict
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
66
|
+
from ..models.list_instance_groups_with_workspaces_response_200_item_workspaces_item import (
|
|
67
|
+
ListInstanceGroupsWithWorkspacesResponse200ItemWorkspacesItem,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
d = src_dict.copy()
|
|
71
|
+
name = d.pop("name")
|
|
72
|
+
|
|
73
|
+
summary = d.pop("summary", UNSET)
|
|
74
|
+
|
|
75
|
+
emails = cast(List[str], d.pop("emails", UNSET))
|
|
76
|
+
|
|
77
|
+
workspaces = []
|
|
78
|
+
_workspaces = d.pop("workspaces", UNSET)
|
|
79
|
+
for workspaces_item_data in _workspaces or []:
|
|
80
|
+
workspaces_item = ListInstanceGroupsWithWorkspacesResponse200ItemWorkspacesItem.from_dict(
|
|
81
|
+
workspaces_item_data
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
workspaces.append(workspaces_item)
|
|
85
|
+
|
|
86
|
+
list_instance_groups_with_workspaces_response_200_item = cls(
|
|
87
|
+
name=name,
|
|
88
|
+
summary=summary,
|
|
89
|
+
emails=emails,
|
|
90
|
+
workspaces=workspaces,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
list_instance_groups_with_workspaces_response_200_item.additional_properties = d
|
|
94
|
+
return list_instance_groups_with_workspaces_response_200_item
|
|
95
|
+
|
|
96
|
+
@property
|
|
97
|
+
def additional_keys(self) -> List[str]:
|
|
98
|
+
return list(self.additional_properties.keys())
|
|
99
|
+
|
|
100
|
+
def __getitem__(self, key: str) -> Any:
|
|
101
|
+
return self.additional_properties[key]
|
|
102
|
+
|
|
103
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
104
|
+
self.additional_properties[key] = value
|
|
105
|
+
|
|
106
|
+
def __delitem__(self, key: str) -> None:
|
|
107
|
+
del self.additional_properties[key]
|
|
108
|
+
|
|
109
|
+
def __contains__(self, key: str) -> bool:
|
|
110
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar, Union
|
|
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
|
+
T = TypeVar("T", bound="ListInstanceGroupsWithWorkspacesResponse200ItemWorkspacesItem")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class ListInstanceGroupsWithWorkspacesResponse200ItemWorkspacesItem:
|
|
13
|
+
"""
|
|
14
|
+
Attributes:
|
|
15
|
+
workspace_id (Union[Unset, str]):
|
|
16
|
+
workspace_name (Union[Unset, str]):
|
|
17
|
+
role (Union[Unset, str]):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
workspace_id: Union[Unset, str] = UNSET
|
|
21
|
+
workspace_name: Union[Unset, str] = UNSET
|
|
22
|
+
role: Union[Unset, str] = UNSET
|
|
23
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
26
|
+
workspace_id = self.workspace_id
|
|
27
|
+
workspace_name = self.workspace_name
|
|
28
|
+
role = self.role
|
|
29
|
+
|
|
30
|
+
field_dict: Dict[str, Any] = {}
|
|
31
|
+
field_dict.update(self.additional_properties)
|
|
32
|
+
field_dict.update({})
|
|
33
|
+
if workspace_id is not UNSET:
|
|
34
|
+
field_dict["workspace_id"] = workspace_id
|
|
35
|
+
if workspace_name is not UNSET:
|
|
36
|
+
field_dict["workspace_name"] = workspace_name
|
|
37
|
+
if role is not UNSET:
|
|
38
|
+
field_dict["role"] = role
|
|
39
|
+
|
|
40
|
+
return field_dict
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
44
|
+
d = src_dict.copy()
|
|
45
|
+
workspace_id = d.pop("workspace_id", UNSET)
|
|
46
|
+
|
|
47
|
+
workspace_name = d.pop("workspace_name", UNSET)
|
|
48
|
+
|
|
49
|
+
role = d.pop("role", UNSET)
|
|
50
|
+
|
|
51
|
+
list_instance_groups_with_workspaces_response_200_item_workspaces_item = cls(
|
|
52
|
+
workspace_id=workspace_id,
|
|
53
|
+
workspace_name=workspace_name,
|
|
54
|
+
role=role,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
list_instance_groups_with_workspaces_response_200_item_workspaces_item.additional_properties = d
|
|
58
|
+
return list_instance_groups_with_workspaces_response_200_item_workspaces_item
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def additional_keys(self) -> List[str]:
|
|
62
|
+
return list(self.additional_properties.keys())
|
|
63
|
+
|
|
64
|
+
def __getitem__(self, key: str) -> Any:
|
|
65
|
+
return self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
68
|
+
self.additional_properties[key] = value
|
|
69
|
+
|
|
70
|
+
def __delitem__(self, key: str) -> None:
|
|
71
|
+
del self.additional_properties[key]
|
|
72
|
+
|
|
73
|
+
def __contains__(self, key: str) -> bool:
|
|
74
|
+
return key in self.additional_properties
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import datetime
|
|
2
|
-
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
|
2
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
@@ -7,6 +7,10 @@ from dateutil.parser import isoparse
|
|
|
7
7
|
|
|
8
8
|
from ..types import UNSET, Unset
|
|
9
9
|
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ..models.list_users_response_200_item_added_via import ListUsersResponse200ItemAddedVia
|
|
12
|
+
|
|
13
|
+
|
|
10
14
|
T = TypeVar("T", bound="ListUsersResponse200Item")
|
|
11
15
|
|
|
12
16
|
|
|
@@ -25,6 +29,7 @@ class ListUsersResponse200Item:
|
|
|
25
29
|
folders_owners (List[str]):
|
|
26
30
|
name (Union[Unset, str]):
|
|
27
31
|
groups (Union[Unset, List[str]]):
|
|
32
|
+
added_via (Union[Unset, None, ListUsersResponse200ItemAddedVia]):
|
|
28
33
|
"""
|
|
29
34
|
|
|
30
35
|
email: str
|
|
@@ -38,6 +43,7 @@ class ListUsersResponse200Item:
|
|
|
38
43
|
folders_owners: List[str]
|
|
39
44
|
name: Union[Unset, str] = UNSET
|
|
40
45
|
groups: Union[Unset, List[str]] = UNSET
|
|
46
|
+
added_via: Union[Unset, None, "ListUsersResponse200ItemAddedVia"] = UNSET
|
|
41
47
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
42
48
|
|
|
43
49
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -58,6 +64,10 @@ class ListUsersResponse200Item:
|
|
|
58
64
|
if not isinstance(self.groups, Unset):
|
|
59
65
|
groups = self.groups
|
|
60
66
|
|
|
67
|
+
added_via: Union[Unset, None, Dict[str, Any]] = UNSET
|
|
68
|
+
if not isinstance(self.added_via, Unset):
|
|
69
|
+
added_via = self.added_via.to_dict() if self.added_via else None
|
|
70
|
+
|
|
61
71
|
field_dict: Dict[str, Any] = {}
|
|
62
72
|
field_dict.update(self.additional_properties)
|
|
63
73
|
field_dict.update(
|
|
@@ -77,11 +87,15 @@ class ListUsersResponse200Item:
|
|
|
77
87
|
field_dict["name"] = name
|
|
78
88
|
if groups is not UNSET:
|
|
79
89
|
field_dict["groups"] = groups
|
|
90
|
+
if added_via is not UNSET:
|
|
91
|
+
field_dict["added_via"] = added_via
|
|
80
92
|
|
|
81
93
|
return field_dict
|
|
82
94
|
|
|
83
95
|
@classmethod
|
|
84
96
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
97
|
+
from ..models.list_users_response_200_item_added_via import ListUsersResponse200ItemAddedVia
|
|
98
|
+
|
|
85
99
|
d = src_dict.copy()
|
|
86
100
|
email = d.pop("email")
|
|
87
101
|
|
|
@@ -105,6 +119,15 @@ class ListUsersResponse200Item:
|
|
|
105
119
|
|
|
106
120
|
groups = cast(List[str], d.pop("groups", UNSET))
|
|
107
121
|
|
|
122
|
+
_added_via = d.pop("added_via", UNSET)
|
|
123
|
+
added_via: Union[Unset, None, ListUsersResponse200ItemAddedVia]
|
|
124
|
+
if _added_via is None:
|
|
125
|
+
added_via = None
|
|
126
|
+
elif isinstance(_added_via, Unset):
|
|
127
|
+
added_via = UNSET
|
|
128
|
+
else:
|
|
129
|
+
added_via = ListUsersResponse200ItemAddedVia.from_dict(_added_via)
|
|
130
|
+
|
|
108
131
|
list_users_response_200_item = cls(
|
|
109
132
|
email=email,
|
|
110
133
|
username=username,
|
|
@@ -117,6 +140,7 @@ class ListUsersResponse200Item:
|
|
|
117
140
|
folders_owners=folders_owners,
|
|
118
141
|
name=name,
|
|
119
142
|
groups=groups,
|
|
143
|
+
added_via=added_via,
|
|
120
144
|
)
|
|
121
145
|
|
|
122
146
|
list_users_response_200_item.additional_properties = d
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar, Union
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..models.list_users_response_200_item_added_via_source import ListUsersResponse200ItemAddedViaSource
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="ListUsersResponse200ItemAddedVia")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ListUsersResponse200ItemAddedVia:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
source (ListUsersResponse200ItemAddedViaSource): How the user was added to the workspace
|
|
17
|
+
domain (Union[Unset, str]): The domain used for auto-invite (when source is 'domain')
|
|
18
|
+
group (Union[Unset, str]): The instance group name (when source is 'instance_group')
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
source: ListUsersResponse200ItemAddedViaSource
|
|
22
|
+
domain: Union[Unset, str] = UNSET
|
|
23
|
+
group: Union[Unset, str] = UNSET
|
|
24
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
27
|
+
source = self.source.value
|
|
28
|
+
|
|
29
|
+
domain = self.domain
|
|
30
|
+
group = self.group
|
|
31
|
+
|
|
32
|
+
field_dict: Dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
field_dict.update(
|
|
35
|
+
{
|
|
36
|
+
"source": source,
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
if domain is not UNSET:
|
|
40
|
+
field_dict["domain"] = domain
|
|
41
|
+
if group is not UNSET:
|
|
42
|
+
field_dict["group"] = group
|
|
43
|
+
|
|
44
|
+
return field_dict
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
48
|
+
d = src_dict.copy()
|
|
49
|
+
source = ListUsersResponse200ItemAddedViaSource(d.pop("source"))
|
|
50
|
+
|
|
51
|
+
domain = d.pop("domain", UNSET)
|
|
52
|
+
|
|
53
|
+
group = d.pop("group", UNSET)
|
|
54
|
+
|
|
55
|
+
list_users_response_200_item_added_via = cls(
|
|
56
|
+
source=source,
|
|
57
|
+
domain=domain,
|
|
58
|
+
group=group,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
list_users_response_200_item_added_via.additional_properties = d
|
|
62
|
+
return list_users_response_200_item_added_via
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def additional_keys(self) -> List[str]:
|
|
66
|
+
return list(self.additional_properties.keys())
|
|
67
|
+
|
|
68
|
+
def __getitem__(self, key: str) -> Any:
|
|
69
|
+
return self.additional_properties[key]
|
|
70
|
+
|
|
71
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
72
|
+
self.additional_properties[key] = value
|
|
73
|
+
|
|
74
|
+
def __delitem__(self, key: str) -> None:
|
|
75
|
+
del self.additional_properties[key]
|
|
76
|
+
|
|
77
|
+
def __contains__(self, key: str) -> bool:
|
|
78
|
+
return key in self.additional_properties
|
windmill_api/models/user.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import datetime
|
|
2
|
-
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
|
2
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
@@ -7,6 +7,10 @@ from dateutil.parser import isoparse
|
|
|
7
7
|
|
|
8
8
|
from ..types import UNSET, Unset
|
|
9
9
|
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ..models.user_added_via import UserAddedVia
|
|
12
|
+
|
|
13
|
+
|
|
10
14
|
T = TypeVar("T", bound="User")
|
|
11
15
|
|
|
12
16
|
|
|
@@ -25,6 +29,7 @@ class User:
|
|
|
25
29
|
folders_owners (List[str]):
|
|
26
30
|
name (Union[Unset, str]):
|
|
27
31
|
groups (Union[Unset, List[str]]):
|
|
32
|
+
added_via (Union[Unset, None, UserAddedVia]):
|
|
28
33
|
"""
|
|
29
34
|
|
|
30
35
|
email: str
|
|
@@ -38,6 +43,7 @@ class User:
|
|
|
38
43
|
folders_owners: List[str]
|
|
39
44
|
name: Union[Unset, str] = UNSET
|
|
40
45
|
groups: Union[Unset, List[str]] = UNSET
|
|
46
|
+
added_via: Union[Unset, None, "UserAddedVia"] = UNSET
|
|
41
47
|
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
42
48
|
|
|
43
49
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -58,6 +64,10 @@ class User:
|
|
|
58
64
|
if not isinstance(self.groups, Unset):
|
|
59
65
|
groups = self.groups
|
|
60
66
|
|
|
67
|
+
added_via: Union[Unset, None, Dict[str, Any]] = UNSET
|
|
68
|
+
if not isinstance(self.added_via, Unset):
|
|
69
|
+
added_via = self.added_via.to_dict() if self.added_via else None
|
|
70
|
+
|
|
61
71
|
field_dict: Dict[str, Any] = {}
|
|
62
72
|
field_dict.update(self.additional_properties)
|
|
63
73
|
field_dict.update(
|
|
@@ -77,11 +87,15 @@ class User:
|
|
|
77
87
|
field_dict["name"] = name
|
|
78
88
|
if groups is not UNSET:
|
|
79
89
|
field_dict["groups"] = groups
|
|
90
|
+
if added_via is not UNSET:
|
|
91
|
+
field_dict["added_via"] = added_via
|
|
80
92
|
|
|
81
93
|
return field_dict
|
|
82
94
|
|
|
83
95
|
@classmethod
|
|
84
96
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
97
|
+
from ..models.user_added_via import UserAddedVia
|
|
98
|
+
|
|
85
99
|
d = src_dict.copy()
|
|
86
100
|
email = d.pop("email")
|
|
87
101
|
|
|
@@ -105,6 +119,15 @@ class User:
|
|
|
105
119
|
|
|
106
120
|
groups = cast(List[str], d.pop("groups", UNSET))
|
|
107
121
|
|
|
122
|
+
_added_via = d.pop("added_via", UNSET)
|
|
123
|
+
added_via: Union[Unset, None, UserAddedVia]
|
|
124
|
+
if _added_via is None:
|
|
125
|
+
added_via = None
|
|
126
|
+
elif isinstance(_added_via, Unset):
|
|
127
|
+
added_via = UNSET
|
|
128
|
+
else:
|
|
129
|
+
added_via = UserAddedVia.from_dict(_added_via)
|
|
130
|
+
|
|
108
131
|
user = cls(
|
|
109
132
|
email=email,
|
|
110
133
|
username=username,
|
|
@@ -117,6 +140,7 @@ class User:
|
|
|
117
140
|
folders_owners=folders_owners,
|
|
118
141
|
name=name,
|
|
119
142
|
groups=groups,
|
|
143
|
+
added_via=added_via,
|
|
120
144
|
)
|
|
121
145
|
|
|
122
146
|
user.additional_properties = d
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar, Union
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..models.user_added_via_source import UserAddedViaSource
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="UserAddedVia")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class UserAddedVia:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
source (UserAddedViaSource): How the user was added to the workspace
|
|
17
|
+
domain (Union[Unset, str]): The domain used for auto-invite (when source is 'domain')
|
|
18
|
+
group (Union[Unset, str]): The instance group name (when source is 'instance_group')
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
source: UserAddedViaSource
|
|
22
|
+
domain: Union[Unset, str] = UNSET
|
|
23
|
+
group: Union[Unset, str] = UNSET
|
|
24
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
27
|
+
source = self.source.value
|
|
28
|
+
|
|
29
|
+
domain = self.domain
|
|
30
|
+
group = self.group
|
|
31
|
+
|
|
32
|
+
field_dict: Dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
field_dict.update(
|
|
35
|
+
{
|
|
36
|
+
"source": source,
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
if domain is not UNSET:
|
|
40
|
+
field_dict["domain"] = domain
|
|
41
|
+
if group is not UNSET:
|
|
42
|
+
field_dict["group"] = group
|
|
43
|
+
|
|
44
|
+
return field_dict
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
48
|
+
d = src_dict.copy()
|
|
49
|
+
source = UserAddedViaSource(d.pop("source"))
|
|
50
|
+
|
|
51
|
+
domain = d.pop("domain", UNSET)
|
|
52
|
+
|
|
53
|
+
group = d.pop("group", UNSET)
|
|
54
|
+
|
|
55
|
+
user_added_via = cls(
|
|
56
|
+
source=source,
|
|
57
|
+
domain=domain,
|
|
58
|
+
group=group,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
user_added_via.additional_properties = d
|
|
62
|
+
return user_added_via
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def additional_keys(self) -> List[str]:
|
|
66
|
+
return list(self.additional_properties.keys())
|
|
67
|
+
|
|
68
|
+
def __getitem__(self, key: str) -> Any:
|
|
69
|
+
return self.additional_properties[key]
|
|
70
|
+
|
|
71
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
72
|
+
self.additional_properties[key] = value
|
|
73
|
+
|
|
74
|
+
def __delitem__(self, key: str) -> None:
|
|
75
|
+
del self.additional_properties[key]
|
|
76
|
+
|
|
77
|
+
def __contains__(self, key: str) -> bool:
|
|
78
|
+
return key in self.additional_properties
|