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
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
|
|
@@ -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_source_source import UserSourceSource
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="UserSource")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class UserSource:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
source (UserSourceSource): 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: UserSourceSource
|
|
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 = UserSourceSource(d.pop("source"))
|
|
50
|
+
|
|
51
|
+
domain = d.pop("domain", UNSET)
|
|
52
|
+
|
|
53
|
+
group = d.pop("group", UNSET)
|
|
54
|
+
|
|
55
|
+
user_source = cls(
|
|
56
|
+
source=source,
|
|
57
|
+
domain=domain,
|
|
58
|
+
group=group,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
user_source.additional_properties = d
|
|
62
|
+
return user_source
|
|
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
|
|
@@ -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.whoami_response_200_added_via import WhoamiResponse200AddedVia
|
|
12
|
+
|
|
13
|
+
|
|
10
14
|
T = TypeVar("T", bound="WhoamiResponse200")
|
|
11
15
|
|
|
12
16
|
|
|
@@ -25,6 +29,7 @@ class WhoamiResponse200:
|
|
|
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, WhoamiResponse200AddedVia]):
|
|
28
33
|
"""
|
|
29
34
|
|
|
30
35
|
email: str
|
|
@@ -38,6 +43,7 @@ class WhoamiResponse200:
|
|
|
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, "WhoamiResponse200AddedVia"] = 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 WhoamiResponse200:
|
|
|
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 WhoamiResponse200:
|
|
|
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.whoami_response_200_added_via import WhoamiResponse200AddedVia
|
|
98
|
+
|
|
85
99
|
d = src_dict.copy()
|
|
86
100
|
email = d.pop("email")
|
|
87
101
|
|
|
@@ -105,6 +119,15 @@ class WhoamiResponse200:
|
|
|
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, WhoamiResponse200AddedVia]
|
|
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 = WhoamiResponse200AddedVia.from_dict(_added_via)
|
|
130
|
+
|
|
108
131
|
whoami_response_200 = cls(
|
|
109
132
|
email=email,
|
|
110
133
|
username=username,
|
|
@@ -117,6 +140,7 @@ class WhoamiResponse200:
|
|
|
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
|
whoami_response_200.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.whoami_response_200_added_via_source import WhoamiResponse200AddedViaSource
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="WhoamiResponse200AddedVia")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class WhoamiResponse200AddedVia:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
source (WhoamiResponse200AddedViaSource): 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: WhoamiResponse200AddedViaSource
|
|
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 = WhoamiResponse200AddedViaSource(d.pop("source"))
|
|
50
|
+
|
|
51
|
+
domain = d.pop("domain", UNSET)
|
|
52
|
+
|
|
53
|
+
group = d.pop("group", UNSET)
|
|
54
|
+
|
|
55
|
+
whoami_response_200_added_via = cls(
|
|
56
|
+
source=source,
|
|
57
|
+
domain=domain,
|
|
58
|
+
group=group,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
whoami_response_200_added_via.additional_properties = d
|
|
62
|
+
return whoami_response_200_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
|
|
@@ -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.whois_response_200_added_via import WhoisResponse200AddedVia
|
|
12
|
+
|
|
13
|
+
|
|
10
14
|
T = TypeVar("T", bound="WhoisResponse200")
|
|
11
15
|
|
|
12
16
|
|
|
@@ -25,6 +29,7 @@ class WhoisResponse200:
|
|
|
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, WhoisResponse200AddedVia]):
|
|
28
33
|
"""
|
|
29
34
|
|
|
30
35
|
email: str
|
|
@@ -38,6 +43,7 @@ class WhoisResponse200:
|
|
|
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, "WhoisResponse200AddedVia"] = 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 WhoisResponse200:
|
|
|
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 WhoisResponse200:
|
|
|
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.whois_response_200_added_via import WhoisResponse200AddedVia
|
|
98
|
+
|
|
85
99
|
d = src_dict.copy()
|
|
86
100
|
email = d.pop("email")
|
|
87
101
|
|
|
@@ -105,6 +119,15 @@ class WhoisResponse200:
|
|
|
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, WhoisResponse200AddedVia]
|
|
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 = WhoisResponse200AddedVia.from_dict(_added_via)
|
|
130
|
+
|
|
108
131
|
whois_response_200 = cls(
|
|
109
132
|
email=email,
|
|
110
133
|
username=username,
|
|
@@ -117,6 +140,7 @@ class WhoisResponse200:
|
|
|
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
|
whois_response_200.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.whois_response_200_added_via_source import WhoisResponse200AddedViaSource
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="WhoisResponse200AddedVia")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class WhoisResponse200AddedVia:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
source (WhoisResponse200AddedViaSource): 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: WhoisResponse200AddedViaSource
|
|
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 = WhoisResponse200AddedViaSource(d.pop("source"))
|
|
50
|
+
|
|
51
|
+
domain = d.pop("domain", UNSET)
|
|
52
|
+
|
|
53
|
+
group = d.pop("group", UNSET)
|
|
54
|
+
|
|
55
|
+
whois_response_200_added_via = cls(
|
|
56
|
+
source=source,
|
|
57
|
+
domain=domain,
|
|
58
|
+
group=group,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
whois_response_200_added_via.additional_properties = d
|
|
62
|
+
return whois_response_200_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
|
|
@@ -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="WorkspaceInfo")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class WorkspaceInfo:
|
|
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
|
+
workspace_info = cls(
|
|
52
|
+
workspace_id=workspace_id,
|
|
53
|
+
workspace_name=workspace_name,
|
|
54
|
+
role=role,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
workspace_info.additional_properties = d
|
|
58
|
+
return workspace_info
|
|
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
|