beamlit 0.1.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. beamlit/__init__.py +8 -0
  2. beamlit/api/__init__.py +1 -0
  3. beamlit/api/agents/__init__.py +0 -0
  4. beamlit/api/agents/create_agent.py +155 -0
  5. beamlit/api/agents/create_agent_release.py +146 -0
  6. beamlit/api/agents/delete_agent.py +146 -0
  7. beamlit/api/agents/delete_agent_deployment.py +163 -0
  8. beamlit/api/agents/delete_agent_deployment_history.py +172 -0
  9. beamlit/api/agents/get_agent.py +146 -0
  10. beamlit/api/agents/get_agent_deployment.py +163 -0
  11. beamlit/api/agents/get_agent_deployment_history.py +172 -0
  12. beamlit/api/agents/get_agent_deployment_logs.py +164 -0
  13. beamlit/api/agents/get_agent_deployment_metrics.py +159 -0
  14. beamlit/api/agents/get_agent_metrics.py +150 -0
  15. beamlit/api/agents/list_agent_deployment_history.py +164 -0
  16. beamlit/api/agents/list_agent_deployments.py +155 -0
  17. beamlit/api/agents/list_agents.py +127 -0
  18. beamlit/api/agents/put_agent_deployment.py +185 -0
  19. beamlit/api/agents/put_agent_deployment_history.py +198 -0
  20. beamlit/api/agents/update_agent.py +168 -0
  21. beamlit/api/authentication_providers/__init__.py +0 -0
  22. beamlit/api/authentication_providers/get_model_with_repo_for_authentication_provider.py +184 -0
  23. beamlit/api/authentication_providers/list_models_for_authentication_provider.py +163 -0
  24. beamlit/api/authentication_providers/list_organizations_for_authentication_provider.py +163 -0
  25. beamlit/api/configurations/__init__.py +0 -0
  26. beamlit/api/configurations/get_configuration.py +122 -0
  27. beamlit/api/environments/__init__.py +0 -0
  28. beamlit/api/environments/create_environment.py +167 -0
  29. beamlit/api/environments/delete_environment.py +154 -0
  30. beamlit/api/environments/get_environment.py +154 -0
  31. beamlit/api/environments/get_environment_metrics.py +158 -0
  32. beamlit/api/environments/list_environments.py +139 -0
  33. beamlit/api/environments/update_environment.py +180 -0
  34. beamlit/api/functions/__init__.py +0 -0
  35. beamlit/api/functions/create_function.py +155 -0
  36. beamlit/api/functions/create_function_release.py +150 -0
  37. beamlit/api/functions/delete_function.py +146 -0
  38. beamlit/api/functions/delete_function_deployment.py +163 -0
  39. beamlit/api/functions/get_function.py +146 -0
  40. beamlit/api/functions/get_function_deployment.py +163 -0
  41. beamlit/api/functions/get_function_deployment_logs.py +164 -0
  42. beamlit/api/functions/get_function_deployment_metrics.py +159 -0
  43. beamlit/api/functions/get_function_metrics.py +150 -0
  44. beamlit/api/functions/list_function_deployments.py +155 -0
  45. beamlit/api/functions/list_functions.py +131 -0
  46. beamlit/api/functions/put_function_deployment.py +185 -0
  47. beamlit/api/functions/update_function.py +168 -0
  48. beamlit/api/history/__init__.py +0 -0
  49. beamlit/api/history/get_agents_history.py +155 -0
  50. beamlit/api/history/list_agents_history.py +131 -0
  51. beamlit/api/invitations/__init__.py +0 -0
  52. beamlit/api/invitations/list_all_pending_invitations.py +142 -0
  53. beamlit/api/locations/__init__.py +0 -0
  54. beamlit/api/locations/list_locations.py +139 -0
  55. beamlit/api/metrics/__init__.py +0 -0
  56. beamlit/api/metrics/get_metrics.py +130 -0
  57. beamlit/api/model_providers/__init__.py +0 -0
  58. beamlit/api/model_providers/create_model_provider.py +163 -0
  59. beamlit/api/model_providers/delete_model_provider.py +154 -0
  60. beamlit/api/model_providers/get_model_provider.py +154 -0
  61. beamlit/api/model_providers/list_model_providers.py +139 -0
  62. beamlit/api/model_providers/update_model_provider.py +176 -0
  63. beamlit/api/models/__init__.py +0 -0
  64. beamlit/api/models/create_model.py +168 -0
  65. beamlit/api/models/delete_model.py +154 -0
  66. beamlit/api/models/delete_model_deployment.py +171 -0
  67. beamlit/api/models/get_model.py +154 -0
  68. beamlit/api/models/get_model_deployment.py +171 -0
  69. beamlit/api/models/get_model_deployment_logs.py +168 -0
  70. beamlit/api/models/get_model_deployment_metrics.py +163 -0
  71. beamlit/api/models/get_model_metrics.py +154 -0
  72. beamlit/api/models/list_model_deployments.py +163 -0
  73. beamlit/api/models/list_models.py +135 -0
  74. beamlit/api/models/put_model_deployment.py +193 -0
  75. beamlit/api/models/release_model.py +154 -0
  76. beamlit/api/models/update_model.py +181 -0
  77. beamlit/api/policies/__init__.py +0 -0
  78. beamlit/api/policies/create_policy.py +167 -0
  79. beamlit/api/policies/delete_policy.py +154 -0
  80. beamlit/api/policies/get_policy.py +154 -0
  81. beamlit/api/policies/list_policies.py +139 -0
  82. beamlit/api/policies/update_policy.py +180 -0
  83. beamlit/api/service_accounts/__init__.py +0 -0
  84. beamlit/api/service_accounts/create_api_key_for_service_account.py +177 -0
  85. beamlit/api/service_accounts/create_workspace_service_account.py +168 -0
  86. beamlit/api/service_accounts/delete_api_key_for_service_account.py +104 -0
  87. beamlit/api/service_accounts/delete_workspace_service_account.py +158 -0
  88. beamlit/api/service_accounts/get_workspace_service_accounts.py +139 -0
  89. beamlit/api/service_accounts/list_api_keys_for_service_account.py +163 -0
  90. beamlit/api/service_accounts/update_workspace_service_account.py +181 -0
  91. beamlit/api/store/__init__.py +0 -0
  92. beamlit/api/store/get_store_agent.py +146 -0
  93. beamlit/api/store/get_store_function.py +146 -0
  94. beamlit/api/store/list_store_agents.py +131 -0
  95. beamlit/api/store/list_store_functions.py +131 -0
  96. beamlit/api/workspaces/__init__.py +0 -0
  97. beamlit/api/workspaces/accept_workspace_invitation.py +161 -0
  98. beamlit/api/workspaces/create_worspace.py +163 -0
  99. beamlit/api/workspaces/decline_workspace_invitation.py +158 -0
  100. beamlit/api/workspaces/delete_workspace.py +154 -0
  101. beamlit/api/workspaces/get_workspace.py +154 -0
  102. beamlit/api/workspaces/invite_workspace_user.py +174 -0
  103. beamlit/api/workspaces/leave_workspace.py +161 -0
  104. beamlit/api/workspaces/list_workspace_users.py +139 -0
  105. beamlit/api/workspaces/list_workspaces.py +139 -0
  106. beamlit/api/workspaces/remove_workspace_user.py +101 -0
  107. beamlit/api/workspaces/update_workspace.py +176 -0
  108. beamlit/api/workspaces/update_workspace_user_role.py +187 -0
  109. beamlit/authentication/__init__.py +24 -0
  110. beamlit/authentication/apikey.py +14 -0
  111. beamlit/authentication/authentication.py +35 -0
  112. beamlit/authentication/credentials.py +165 -0
  113. beamlit/authentication/device_mode.py +115 -0
  114. beamlit/client.py +270 -0
  115. beamlit/errors.py +16 -0
  116. beamlit/models/__init__.py +189 -0
  117. beamlit/models/acl.py +149 -0
  118. beamlit/models/agent.py +151 -0
  119. beamlit/models/agent_chain.py +77 -0
  120. beamlit/models/agent_configuration.py +68 -0
  121. beamlit/models/agent_deployment.py +327 -0
  122. beamlit/models/agent_deployment_configuration.py +43 -0
  123. beamlit/models/agent_deployment_history.py +183 -0
  124. beamlit/models/agent_deployment_history_event.py +131 -0
  125. beamlit/models/agent_deployment_pod_template.py +43 -0
  126. beamlit/models/agent_release.py +68 -0
  127. beamlit/models/api_key.py +140 -0
  128. beamlit/models/authentication_provider_model.py +142 -0
  129. beamlit/models/authentication_provider_organization.py +86 -0
  130. beamlit/models/configuration.py +72 -0
  131. beamlit/models/continent.py +68 -0
  132. beamlit/models/country.py +68 -0
  133. beamlit/models/create_api_key_for_service_account_body.py +67 -0
  134. beamlit/models/create_workspace_service_account_body.py +69 -0
  135. beamlit/models/create_workspace_service_account_response_200.py +103 -0
  136. beamlit/models/delete_workspace_service_account_response_200.py +94 -0
  137. beamlit/models/deployment_configuration.py +68 -0
  138. beamlit/models/deployment_configurations.py +43 -0
  139. beamlit/models/deployment_serverless_config.py +129 -0
  140. beamlit/models/environment.py +162 -0
  141. beamlit/models/environment_metrics.py +75 -0
  142. beamlit/models/flavor.py +68 -0
  143. beamlit/models/function.py +151 -0
  144. beamlit/models/function_configuration.py +68 -0
  145. beamlit/models/function_deployment.py +327 -0
  146. beamlit/models/function_deployment_configuration.py +43 -0
  147. beamlit/models/function_deployment_pod_template.py +43 -0
  148. beamlit/models/function_kit.py +95 -0
  149. beamlit/models/function_provider_ref.py +68 -0
  150. beamlit/models/function_release.py +68 -0
  151. beamlit/models/get_workspace_service_accounts_response_200_item.py +94 -0
  152. beamlit/models/invite_workspace_user_body.py +58 -0
  153. beamlit/models/labels.py +43 -0
  154. beamlit/models/labels_type_0.py +43 -0
  155. beamlit/models/location.py +120 -0
  156. beamlit/models/location_response.py +111 -0
  157. beamlit/models/metric.py +68 -0
  158. beamlit/models/metrics.py +111 -0
  159. beamlit/models/model.py +151 -0
  160. beamlit/models/model_deployment.py +283 -0
  161. beamlit/models/model_deployment_log.py +68 -0
  162. beamlit/models/model_deployment_metrics.py +170 -0
  163. beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +75 -0
  164. beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +73 -0
  165. beamlit/models/model_deployment_pod_template.py +43 -0
  166. beamlit/models/model_metrics.py +94 -0
  167. beamlit/models/model_provider.py +187 -0
  168. beamlit/models/model_provider_ref.py +68 -0
  169. beamlit/models/model_release.py +68 -0
  170. beamlit/models/model_with_deployments.py +174 -0
  171. beamlit/models/pending_invitation.py +122 -0
  172. beamlit/models/pending_invitation_accept.py +81 -0
  173. beamlit/models/pending_invitation_render.py +135 -0
  174. beamlit/models/pending_invitation_render_invited_by.py +86 -0
  175. beamlit/models/pending_invitation_render_workspace.py +68 -0
  176. beamlit/models/pending_invitation_workspace_details.py +70 -0
  177. beamlit/models/policy.py +216 -0
  178. beamlit/models/policy_location.py +68 -0
  179. beamlit/models/provider_config.py +101 -0
  180. beamlit/models/qps.py +59 -0
  181. beamlit/models/resource_deployment_log.py +68 -0
  182. beamlit/models/resource_deployment_metrics.py +172 -0
  183. beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +75 -0
  184. beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +73 -0
  185. beamlit/models/resource_metrics.py +94 -0
  186. beamlit/models/runtime.py +152 -0
  187. beamlit/models/runtime_readiness_probe.py +43 -0
  188. beamlit/models/runtime_resources.py +43 -0
  189. beamlit/models/serverless_config.py +122 -0
  190. beamlit/models/standard_fields_dynamo_db.py +86 -0
  191. beamlit/models/store_agent.py +165 -0
  192. beamlit/models/store_agent_configuration.py +95 -0
  193. beamlit/models/store_agent_labels.py +43 -0
  194. beamlit/models/store_configuration.py +149 -0
  195. beamlit/models/store_configuration_option.py +77 -0
  196. beamlit/models/store_function.py +207 -0
  197. beamlit/models/store_function_configuration.py +95 -0
  198. beamlit/models/store_function_kit.py +95 -0
  199. beamlit/models/store_function_labels.py +43 -0
  200. beamlit/models/store_function_parameter.py +86 -0
  201. beamlit/models/update_workspace_service_account_body.py +67 -0
  202. beamlit/models/update_workspace_service_account_response_200.py +94 -0
  203. beamlit/models/update_workspace_user_role_body.py +58 -0
  204. beamlit/models/workspace.py +126 -0
  205. beamlit/models/workspace_labels.py +43 -0
  206. beamlit/models/workspace_user.py +113 -0
  207. beamlit/py.typed +1 -0
  208. beamlit/types.py +46 -0
  209. beamlit-0.1.0.dist-info/METADATA +59 -0
  210. beamlit-0.1.0.dist-info/RECORD +211 -0
  211. beamlit-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,174 @@
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.labels_type_0 import LabelsType0
10
+ from ..models.model_deployment import ModelDeployment
11
+
12
+
13
+ T = TypeVar("T", bound="ModelWithDeployments")
14
+
15
+
16
+ @_attrs_define
17
+ class ModelWithDeployments:
18
+ """Logical object representing a model but with deployment definition inside
19
+
20
+ Attributes:
21
+ created_at (Union[Unset, str]): The date and time when the resource was created
22
+ created_by (Union[Unset, str]): The user or service account who created the resource
23
+ updated_at (Union[Unset, str]): The date and time when the resource was updated
24
+ updated_by (Union[Unset, str]): The user or service account who updated the resource
25
+ display_name (Union[Unset, str]): Model display name
26
+ labels (Union['LabelsType0', None, Unset]): Labels
27
+ name (Union[Unset, str]): Model name
28
+ workspace (Union[Unset, str]): The workspace the model belongs to
29
+ deployments (Union[Unset, List['ModelDeployment']]):
30
+ """
31
+
32
+ created_at: Union[Unset, str] = UNSET
33
+ created_by: Union[Unset, str] = UNSET
34
+ updated_at: Union[Unset, str] = UNSET
35
+ updated_by: Union[Unset, str] = UNSET
36
+ display_name: Union[Unset, str] = UNSET
37
+ labels: Union["LabelsType0", None, Unset] = UNSET
38
+ name: Union[Unset, str] = UNSET
39
+ workspace: Union[Unset, str] = UNSET
40
+ deployments: Union[Unset, List["ModelDeployment"]] = UNSET
41
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
42
+
43
+ def to_dict(self) -> dict[str, Any]:
44
+ from ..models.labels_type_0 import LabelsType0
45
+
46
+ created_at = self.created_at
47
+
48
+ created_by = self.created_by
49
+
50
+ updated_at = self.updated_at
51
+
52
+ updated_by = self.updated_by
53
+
54
+ display_name = self.display_name
55
+
56
+ labels: Union[Dict[str, Any], None, Unset]
57
+ if isinstance(self.labels, Unset):
58
+ labels = UNSET
59
+ elif isinstance(self.labels, LabelsType0):
60
+ labels = self.labels.to_dict()
61
+ else:
62
+ labels = self.labels
63
+
64
+ name = self.name
65
+
66
+ workspace = self.workspace
67
+
68
+ deployments: Union[Unset, List[Dict[str, Any]]] = UNSET
69
+ if not isinstance(self.deployments, Unset):
70
+ deployments = []
71
+ for componentsschemas_model_deployments_item_data in self.deployments:
72
+ componentsschemas_model_deployments_item = componentsschemas_model_deployments_item_data.to_dict()
73
+ deployments.append(componentsschemas_model_deployments_item)
74
+
75
+ field_dict: dict[str, Any] = {}
76
+ field_dict.update(self.additional_properties)
77
+ field_dict.update({})
78
+ if created_at is not UNSET:
79
+ field_dict["created_at"] = created_at
80
+ if created_by is not UNSET:
81
+ field_dict["created_by"] = created_by
82
+ if updated_at is not UNSET:
83
+ field_dict["updated_at"] = updated_at
84
+ if updated_by is not UNSET:
85
+ field_dict["updated_by"] = updated_by
86
+ if display_name is not UNSET:
87
+ field_dict["display_name"] = display_name
88
+ if labels is not UNSET:
89
+ field_dict["labels"] = labels
90
+ if name is not UNSET:
91
+ field_dict["name"] = name
92
+ if workspace is not UNSET:
93
+ field_dict["workspace"] = workspace
94
+ if deployments is not UNSET:
95
+ field_dict["deployments"] = deployments
96
+
97
+ return field_dict
98
+
99
+ @classmethod
100
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
101
+ from ..models.labels_type_0 import LabelsType0
102
+ from ..models.model_deployment import ModelDeployment
103
+
104
+ d = src_dict.copy()
105
+ created_at = d.pop("created_at", UNSET)
106
+
107
+ created_by = d.pop("created_by", UNSET)
108
+
109
+ updated_at = d.pop("updated_at", UNSET)
110
+
111
+ updated_by = d.pop("updated_by", UNSET)
112
+
113
+ display_name = d.pop("display_name", UNSET)
114
+
115
+ def _parse_labels(data: object) -> Union["LabelsType0", None, Unset]:
116
+ if data is None:
117
+ return data
118
+ if isinstance(data, Unset):
119
+ return data
120
+ try:
121
+ if not isinstance(data, dict):
122
+ raise TypeError()
123
+ componentsschemas_labels_type_0 = LabelsType0.from_dict(data)
124
+
125
+ return componentsschemas_labels_type_0
126
+ except: # noqa: E722
127
+ pass
128
+ return cast(Union["LabelsType0", None, Unset], data)
129
+
130
+ labels = _parse_labels(d.pop("labels", UNSET))
131
+
132
+ name = d.pop("name", UNSET)
133
+
134
+ workspace = d.pop("workspace", UNSET)
135
+
136
+ deployments = []
137
+ _deployments = d.pop("deployments", UNSET)
138
+ for componentsschemas_model_deployments_item_data in _deployments or []:
139
+ componentsschemas_model_deployments_item = ModelDeployment.from_dict(
140
+ componentsschemas_model_deployments_item_data
141
+ )
142
+
143
+ deployments.append(componentsschemas_model_deployments_item)
144
+
145
+ model_with_deployments = cls(
146
+ created_at=created_at,
147
+ created_by=created_by,
148
+ updated_at=updated_at,
149
+ updated_by=updated_by,
150
+ display_name=display_name,
151
+ labels=labels,
152
+ name=name,
153
+ workspace=workspace,
154
+ deployments=deployments,
155
+ )
156
+
157
+ model_with_deployments.additional_properties = d
158
+ return model_with_deployments
159
+
160
+ @property
161
+ def additional_keys(self) -> list[str]:
162
+ return list(self.additional_properties.keys())
163
+
164
+ def __getitem__(self, key: str) -> Any:
165
+ return self.additional_properties[key]
166
+
167
+ def __setitem__(self, key: str, value: Any) -> None:
168
+ self.additional_properties[key] = value
169
+
170
+ def __delitem__(self, key: str) -> None:
171
+ del self.additional_properties[key]
172
+
173
+ def __contains__(self, key: str) -> bool:
174
+ return key in self.additional_properties
@@ -0,0 +1,122 @@
1
+ from typing import Any, 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="PendingInvitation")
9
+
10
+
11
+ @_attrs_define
12
+ class PendingInvitation:
13
+ """Pending invitation in workspace
14
+
15
+ Attributes:
16
+ created_at (Union[Unset, str]): The date and time when the resource was created
17
+ created_by (Union[Unset, str]): The user or service account who created the resource
18
+ updated_at (Union[Unset, str]): The date and time when the resource was updated
19
+ updated_by (Union[Unset, str]): The user or service account who updated the resource
20
+ email (Union[Unset, str]): User email
21
+ invited_by (Union[Unset, str]): User sub
22
+ role (Union[Unset, str]): ACL role
23
+ workspace (Union[Unset, str]): Workspace name
24
+ """
25
+
26
+ created_at: Union[Unset, str] = UNSET
27
+ created_by: Union[Unset, str] = UNSET
28
+ updated_at: Union[Unset, str] = UNSET
29
+ updated_by: Union[Unset, str] = UNSET
30
+ email: Union[Unset, str] = UNSET
31
+ invited_by: Union[Unset, str] = UNSET
32
+ role: Union[Unset, str] = UNSET
33
+ workspace: Union[Unset, str] = UNSET
34
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
35
+
36
+ def to_dict(self) -> dict[str, Any]:
37
+ created_at = self.created_at
38
+
39
+ created_by = self.created_by
40
+
41
+ updated_at = self.updated_at
42
+
43
+ updated_by = self.updated_by
44
+
45
+ email = self.email
46
+
47
+ invited_by = self.invited_by
48
+
49
+ role = self.role
50
+
51
+ workspace = self.workspace
52
+
53
+ field_dict: dict[str, Any] = {}
54
+ field_dict.update(self.additional_properties)
55
+ field_dict.update({})
56
+ if created_at is not UNSET:
57
+ field_dict["created_at"] = created_at
58
+ if created_by is not UNSET:
59
+ field_dict["created_by"] = created_by
60
+ if updated_at is not UNSET:
61
+ field_dict["updated_at"] = updated_at
62
+ if updated_by is not UNSET:
63
+ field_dict["updated_by"] = updated_by
64
+ if email is not UNSET:
65
+ field_dict["email"] = email
66
+ if invited_by is not UNSET:
67
+ field_dict["invited_by"] = invited_by
68
+ if role is not UNSET:
69
+ field_dict["role"] = role
70
+ if workspace is not UNSET:
71
+ field_dict["workspace"] = workspace
72
+
73
+ return field_dict
74
+
75
+ @classmethod
76
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
77
+ d = src_dict.copy()
78
+ created_at = d.pop("created_at", UNSET)
79
+
80
+ created_by = d.pop("created_by", UNSET)
81
+
82
+ updated_at = d.pop("updated_at", UNSET)
83
+
84
+ updated_by = d.pop("updated_by", UNSET)
85
+
86
+ email = d.pop("email", UNSET)
87
+
88
+ invited_by = d.pop("invited_by", UNSET)
89
+
90
+ role = d.pop("role", UNSET)
91
+
92
+ workspace = d.pop("workspace", UNSET)
93
+
94
+ pending_invitation = cls(
95
+ created_at=created_at,
96
+ created_by=created_by,
97
+ updated_at=updated_at,
98
+ updated_by=updated_by,
99
+ email=email,
100
+ invited_by=invited_by,
101
+ role=role,
102
+ workspace=workspace,
103
+ )
104
+
105
+ pending_invitation.additional_properties = d
106
+ return pending_invitation
107
+
108
+ @property
109
+ def additional_keys(self) -> list[str]:
110
+ return list(self.additional_properties.keys())
111
+
112
+ def __getitem__(self, key: str) -> Any:
113
+ return self.additional_properties[key]
114
+
115
+ def __setitem__(self, key: str, value: Any) -> None:
116
+ self.additional_properties[key] = value
117
+
118
+ def __delitem__(self, key: str) -> None:
119
+ del self.additional_properties[key]
120
+
121
+ def __contains__(self, key: str) -> bool:
122
+ return key in self.additional_properties
@@ -0,0 +1,81 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, 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
+ if TYPE_CHECKING:
9
+ from ..models.workspace import Workspace
10
+
11
+
12
+ T = TypeVar("T", bound="PendingInvitationAccept")
13
+
14
+
15
+ @_attrs_define
16
+ class PendingInvitationAccept:
17
+ """Pending invitation accept
18
+
19
+ Attributes:
20
+ email (Union[Unset, str]): User email
21
+ workspace (Union[Unset, Workspace]): Workspace
22
+ """
23
+
24
+ email: Union[Unset, str] = UNSET
25
+ workspace: Union[Unset, "Workspace"] = UNSET
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ email = self.email
30
+
31
+ workspace: Union[Unset, Dict[str, Any]] = UNSET
32
+ if not isinstance(self.workspace, Unset):
33
+ workspace = self.workspace.to_dict()
34
+
35
+ field_dict: dict[str, Any] = {}
36
+ field_dict.update(self.additional_properties)
37
+ field_dict.update({})
38
+ if email is not UNSET:
39
+ field_dict["email"] = email
40
+ if workspace is not UNSET:
41
+ field_dict["workspace"] = workspace
42
+
43
+ return field_dict
44
+
45
+ @classmethod
46
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
47
+ from ..models.workspace import Workspace
48
+
49
+ d = src_dict.copy()
50
+ email = d.pop("email", UNSET)
51
+
52
+ _workspace = d.pop("workspace", UNSET)
53
+ workspace: Union[Unset, Workspace]
54
+ if isinstance(_workspace, Unset):
55
+ workspace = UNSET
56
+ else:
57
+ workspace = Workspace.from_dict(_workspace)
58
+
59
+ pending_invitation_accept = cls(
60
+ email=email,
61
+ workspace=workspace,
62
+ )
63
+
64
+ pending_invitation_accept.additional_properties = d
65
+ return pending_invitation_accept
66
+
67
+ @property
68
+ def additional_keys(self) -> list[str]:
69
+ return list(self.additional_properties.keys())
70
+
71
+ def __getitem__(self, key: str) -> Any:
72
+ return self.additional_properties[key]
73
+
74
+ def __setitem__(self, key: str, value: Any) -> None:
75
+ self.additional_properties[key] = value
76
+
77
+ def __delitem__(self, key: str) -> None:
78
+ del self.additional_properties[key]
79
+
80
+ def __contains__(self, key: str) -> bool:
81
+ return key in self.additional_properties
@@ -0,0 +1,135 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, 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
+ if TYPE_CHECKING:
9
+ from ..models.pending_invitation_render_invited_by import PendingInvitationRenderInvitedBy
10
+ from ..models.pending_invitation_render_workspace import PendingInvitationRenderWorkspace
11
+ from ..models.pending_invitation_workspace_details import PendingInvitationWorkspaceDetails
12
+
13
+
14
+ T = TypeVar("T", bound="PendingInvitationRender")
15
+
16
+
17
+ @_attrs_define
18
+ class PendingInvitationRender:
19
+ """Pending invitation in workspace
20
+
21
+ Attributes:
22
+ email (Union[Unset, str]): User email
23
+ invited_at (Union[Unset, str]): Invitation date
24
+ invited_by (Union[Unset, PendingInvitationRenderInvitedBy]): Invited by
25
+ role (Union[Unset, str]): ACL role
26
+ workspace (Union[Unset, PendingInvitationRenderWorkspace]): Workspace
27
+ workspace_details (Union[Unset, PendingInvitationWorkspaceDetails]): Workspace details
28
+ """
29
+
30
+ email: Union[Unset, str] = UNSET
31
+ invited_at: Union[Unset, str] = UNSET
32
+ invited_by: Union[Unset, "PendingInvitationRenderInvitedBy"] = UNSET
33
+ role: Union[Unset, str] = UNSET
34
+ workspace: Union[Unset, "PendingInvitationRenderWorkspace"] = UNSET
35
+ workspace_details: Union[Unset, "PendingInvitationWorkspaceDetails"] = UNSET
36
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
37
+
38
+ def to_dict(self) -> dict[str, Any]:
39
+ email = self.email
40
+
41
+ invited_at = self.invited_at
42
+
43
+ invited_by: Union[Unset, Dict[str, Any]] = UNSET
44
+ if not isinstance(self.invited_by, Unset):
45
+ invited_by = self.invited_by.to_dict()
46
+
47
+ role = self.role
48
+
49
+ workspace: Union[Unset, Dict[str, Any]] = UNSET
50
+ if not isinstance(self.workspace, Unset):
51
+ workspace = self.workspace.to_dict()
52
+
53
+ workspace_details: Union[Unset, Dict[str, Any]] = UNSET
54
+ if not isinstance(self.workspace_details, Unset):
55
+ workspace_details = self.workspace_details.to_dict()
56
+
57
+ field_dict: dict[str, Any] = {}
58
+ field_dict.update(self.additional_properties)
59
+ field_dict.update({})
60
+ if email is not UNSET:
61
+ field_dict["email"] = email
62
+ if invited_at is not UNSET:
63
+ field_dict["invited_at"] = invited_at
64
+ if invited_by is not UNSET:
65
+ field_dict["invited_by"] = invited_by
66
+ if role is not UNSET:
67
+ field_dict["role"] = role
68
+ if workspace is not UNSET:
69
+ field_dict["workspace"] = workspace
70
+ if workspace_details is not UNSET:
71
+ field_dict["workspace_details"] = workspace_details
72
+
73
+ return field_dict
74
+
75
+ @classmethod
76
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
77
+ from ..models.pending_invitation_render_invited_by import PendingInvitationRenderInvitedBy
78
+ from ..models.pending_invitation_render_workspace import PendingInvitationRenderWorkspace
79
+ from ..models.pending_invitation_workspace_details import PendingInvitationWorkspaceDetails
80
+
81
+ d = src_dict.copy()
82
+ email = d.pop("email", UNSET)
83
+
84
+ invited_at = d.pop("invited_at", UNSET)
85
+
86
+ _invited_by = d.pop("invited_by", UNSET)
87
+ invited_by: Union[Unset, PendingInvitationRenderInvitedBy]
88
+ if isinstance(_invited_by, Unset):
89
+ invited_by = UNSET
90
+ else:
91
+ invited_by = PendingInvitationRenderInvitedBy.from_dict(_invited_by)
92
+
93
+ role = d.pop("role", UNSET)
94
+
95
+ _workspace = d.pop("workspace", UNSET)
96
+ workspace: Union[Unset, PendingInvitationRenderWorkspace]
97
+ if isinstance(_workspace, Unset):
98
+ workspace = UNSET
99
+ else:
100
+ workspace = PendingInvitationRenderWorkspace.from_dict(_workspace)
101
+
102
+ _workspace_details = d.pop("workspace_details", UNSET)
103
+ workspace_details: Union[Unset, PendingInvitationWorkspaceDetails]
104
+ if isinstance(_workspace_details, Unset):
105
+ workspace_details = UNSET
106
+ else:
107
+ workspace_details = PendingInvitationWorkspaceDetails.from_dict(_workspace_details)
108
+
109
+ pending_invitation_render = cls(
110
+ email=email,
111
+ invited_at=invited_at,
112
+ invited_by=invited_by,
113
+ role=role,
114
+ workspace=workspace,
115
+ workspace_details=workspace_details,
116
+ )
117
+
118
+ pending_invitation_render.additional_properties = d
119
+ return pending_invitation_render
120
+
121
+ @property
122
+ def additional_keys(self) -> list[str]:
123
+ return list(self.additional_properties.keys())
124
+
125
+ def __getitem__(self, key: str) -> Any:
126
+ return self.additional_properties[key]
127
+
128
+ def __setitem__(self, key: str, value: Any) -> None:
129
+ self.additional_properties[key] = value
130
+
131
+ def __delitem__(self, key: str) -> None:
132
+ del self.additional_properties[key]
133
+
134
+ def __contains__(self, key: str) -> bool:
135
+ return key in self.additional_properties
@@ -0,0 +1,86 @@
1
+ from typing import Any, 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="PendingInvitationRenderInvitedBy")
9
+
10
+
11
+ @_attrs_define
12
+ class PendingInvitationRenderInvitedBy:
13
+ """Invited by
14
+
15
+ Attributes:
16
+ email (Union[Unset, str]): User email
17
+ family_name (Union[Unset, str]): User family name
18
+ given_name (Union[Unset, str]): User given name
19
+ sub (Union[Unset, str]): User sub
20
+ """
21
+
22
+ email: Union[Unset, str] = UNSET
23
+ family_name: Union[Unset, str] = UNSET
24
+ given_name: Union[Unset, str] = UNSET
25
+ sub: Union[Unset, str] = UNSET
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ email = self.email
30
+
31
+ family_name = self.family_name
32
+
33
+ given_name = self.given_name
34
+
35
+ sub = self.sub
36
+
37
+ field_dict: dict[str, Any] = {}
38
+ field_dict.update(self.additional_properties)
39
+ field_dict.update({})
40
+ if email is not UNSET:
41
+ field_dict["email"] = email
42
+ if family_name is not UNSET:
43
+ field_dict["family_name"] = family_name
44
+ if given_name is not UNSET:
45
+ field_dict["given_name"] = given_name
46
+ if sub is not UNSET:
47
+ field_dict["sub"] = sub
48
+
49
+ return field_dict
50
+
51
+ @classmethod
52
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
53
+ d = src_dict.copy()
54
+ email = d.pop("email", UNSET)
55
+
56
+ family_name = d.pop("family_name", UNSET)
57
+
58
+ given_name = d.pop("given_name", UNSET)
59
+
60
+ sub = d.pop("sub", UNSET)
61
+
62
+ pending_invitation_render_invited_by = cls(
63
+ email=email,
64
+ family_name=family_name,
65
+ given_name=given_name,
66
+ sub=sub,
67
+ )
68
+
69
+ pending_invitation_render_invited_by.additional_properties = d
70
+ return pending_invitation_render_invited_by
71
+
72
+ @property
73
+ def additional_keys(self) -> list[str]:
74
+ return list(self.additional_properties.keys())
75
+
76
+ def __getitem__(self, key: str) -> Any:
77
+ return self.additional_properties[key]
78
+
79
+ def __setitem__(self, key: str, value: Any) -> None:
80
+ self.additional_properties[key] = value
81
+
82
+ def __delitem__(self, key: str) -> None:
83
+ del self.additional_properties[key]
84
+
85
+ def __contains__(self, key: str) -> bool:
86
+ return key in self.additional_properties
@@ -0,0 +1,68 @@
1
+ from typing import Any, 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="PendingInvitationRenderWorkspace")
9
+
10
+
11
+ @_attrs_define
12
+ class PendingInvitationRenderWorkspace:
13
+ """Workspace
14
+
15
+ Attributes:
16
+ display_name (Union[Unset, str]): Workspace display name
17
+ name (Union[Unset, str]): Workspace name
18
+ """
19
+
20
+ display_name: Union[Unset, str] = UNSET
21
+ name: Union[Unset, str] = UNSET
22
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
23
+
24
+ def to_dict(self) -> dict[str, Any]:
25
+ display_name = self.display_name
26
+
27
+ name = self.name
28
+
29
+ field_dict: dict[str, Any] = {}
30
+ field_dict.update(self.additional_properties)
31
+ field_dict.update({})
32
+ if display_name is not UNSET:
33
+ field_dict["display_name"] = display_name
34
+ if name is not UNSET:
35
+ field_dict["name"] = name
36
+
37
+ return field_dict
38
+
39
+ @classmethod
40
+ def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
41
+ d = src_dict.copy()
42
+ display_name = d.pop("display_name", UNSET)
43
+
44
+ name = d.pop("name", UNSET)
45
+
46
+ pending_invitation_render_workspace = cls(
47
+ display_name=display_name,
48
+ name=name,
49
+ )
50
+
51
+ pending_invitation_render_workspace.additional_properties = d
52
+ return pending_invitation_render_workspace
53
+
54
+ @property
55
+ def additional_keys(self) -> list[str]:
56
+ return list(self.additional_properties.keys())
57
+
58
+ def __getitem__(self, key: str) -> Any:
59
+ return self.additional_properties[key]
60
+
61
+ def __setitem__(self, key: str, value: Any) -> None:
62
+ self.additional_properties[key] = value
63
+
64
+ def __delitem__(self, key: str) -> None:
65
+ del self.additional_properties[key]
66
+
67
+ def __contains__(self, key: str) -> bool:
68
+ return key in self.additional_properties