blaxel 0.1.9rc36__py3-none-any.whl → 0.1.10__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.
Files changed (83) hide show
  1. blaxel/agents/__init__.py +52 -15
  2. blaxel/authentication/__init__.py +11 -2
  3. blaxel/client/api/compute/create_sandbox_preview.py +179 -0
  4. blaxel/client/api/compute/create_sandbox_preview_token.py +192 -0
  5. blaxel/client/api/compute/delete_sandbox_preview.py +167 -0
  6. blaxel/client/api/compute/delete_sandbox_preview_token.py +180 -0
  7. blaxel/client/api/compute/get_sandbox_preview.py +167 -0
  8. blaxel/client/api/compute/list_sandbox_preview_tokens.py +172 -0
  9. blaxel/client/api/compute/list_sandbox_previews.py +159 -0
  10. blaxel/client/api/compute/update_sandbox_preview.py +192 -0
  11. blaxel/client/api/integrations/get_integration.py +64 -7
  12. blaxel/client/api/workspaces/check_workspace_availability.py +165 -0
  13. blaxel/client/models/__init__.py +32 -2
  14. blaxel/client/models/check_workspace_availability_body.py +60 -0
  15. blaxel/client/models/delete_sandbox_preview_token_response_200.py +60 -0
  16. blaxel/client/models/integration.py +197 -0
  17. blaxel/client/models/integration_additional_infos.py +45 -0
  18. blaxel/client/models/integration_endpoint.py +143 -0
  19. blaxel/client/models/integration_endpoint_token.py +79 -0
  20. blaxel/client/models/integration_endpoints.py +61 -0
  21. blaxel/client/models/integration_headers.py +45 -0
  22. blaxel/client/models/integration_organization.py +88 -0
  23. blaxel/client/models/integration_query_params.py +45 -0
  24. blaxel/client/models/metrics.py +9 -0
  25. blaxel/client/models/preview.py +96 -0
  26. blaxel/client/models/preview_metadata.py +133 -0
  27. blaxel/client/models/preview_spec.py +79 -0
  28. blaxel/client/models/preview_token.py +96 -0
  29. blaxel/client/models/preview_token_metadata.py +97 -0
  30. blaxel/client/models/preview_token_spec.py +88 -0
  31. blaxel/common/autoload.py +0 -2
  32. blaxel/common/internal.py +75 -0
  33. blaxel/common/settings.py +6 -1
  34. blaxel/mcp/server.py +2 -1
  35. blaxel/sandbox/base.py +68 -0
  36. blaxel/sandbox/client/__init__.py +8 -0
  37. blaxel/sandbox/client/api/__init__.py +1 -0
  38. blaxel/sandbox/client/api/filesystem/__init__.py +0 -0
  39. blaxel/sandbox/client/api/filesystem/delete_filesystem_path.py +184 -0
  40. blaxel/sandbox/client/api/filesystem/get_filesystem_path.py +184 -0
  41. blaxel/sandbox/client/api/filesystem/put_filesystem_path.py +189 -0
  42. blaxel/sandbox/client/api/network/__init__.py +0 -0
  43. blaxel/sandbox/client/api/network/delete_network_process_pid_monitor.py +169 -0
  44. blaxel/sandbox/client/api/network/get_network_process_pid_ports.py +169 -0
  45. blaxel/sandbox/client/api/network/post_network_process_pid_monitor.py +195 -0
  46. blaxel/sandbox/client/api/process/__init__.py +0 -0
  47. blaxel/sandbox/client/api/process/delete_process_identifier.py +163 -0
  48. blaxel/sandbox/client/api/process/delete_process_identifier_kill.py +189 -0
  49. blaxel/sandbox/client/api/process/get_process.py +135 -0
  50. blaxel/sandbox/client/api/process/get_process_identifier.py +159 -0
  51. blaxel/sandbox/client/api/process/get_process_identifier_logs.py +188 -0
  52. blaxel/sandbox/client/api/process/get_process_identifier_logs_stream.py +190 -0
  53. blaxel/sandbox/client/api/process/post_process.py +176 -0
  54. blaxel/sandbox/client/client.py +162 -0
  55. blaxel/sandbox/client/errors.py +16 -0
  56. blaxel/sandbox/client/models/__init__.py +41 -0
  57. blaxel/sandbox/client/models/delete_network_process_pid_monitor_response_200.py +45 -0
  58. blaxel/sandbox/client/models/directory.py +112 -0
  59. blaxel/sandbox/client/models/error_response.py +60 -0
  60. blaxel/sandbox/client/models/file.py +105 -0
  61. blaxel/sandbox/client/models/file_request.py +78 -0
  62. blaxel/sandbox/client/models/file_with_content.py +114 -0
  63. blaxel/sandbox/client/models/get_network_process_pid_ports_response_200.py +45 -0
  64. blaxel/sandbox/client/models/get_process_identifier_logs_response_200.py +45 -0
  65. blaxel/sandbox/client/models/get_process_identifier_logs_stream_response_200.py +45 -0
  66. blaxel/sandbox/client/models/port_monitor_request.py +60 -0
  67. blaxel/sandbox/client/models/post_network_process_pid_monitor_response_200.py +45 -0
  68. blaxel/sandbox/client/models/process_kill_request.py +60 -0
  69. blaxel/sandbox/client/models/process_request.py +118 -0
  70. blaxel/sandbox/client/models/process_response.py +123 -0
  71. blaxel/sandbox/client/models/subdirectory.py +60 -0
  72. blaxel/sandbox/client/models/success_response.py +69 -0
  73. blaxel/sandbox/client/py.typed +1 -0
  74. blaxel/sandbox/client/types.py +46 -0
  75. blaxel/sandbox/filesystem.py +104 -0
  76. blaxel/sandbox/process.py +57 -0
  77. blaxel/sandbox/sandbox.py +92 -0
  78. blaxel/tools/__init__.py +62 -21
  79. {blaxel-0.1.9rc36.dist-info → blaxel-0.1.10.dist-info}/METADATA +1 -1
  80. {blaxel-0.1.9rc36.dist-info → blaxel-0.1.10.dist-info}/RECORD +82 -14
  81. blaxel/client/models/sandboxes.py +0 -129
  82. {blaxel-0.1.9rc36.dist-info → blaxel-0.1.10.dist-info}/WHEEL +0 -0
  83. {blaxel-0.1.9rc36.dist-info → blaxel-0.1.10.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,197 @@
1
+ from typing import TYPE_CHECKING, Any, 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.integration_additional_infos import IntegrationAdditionalInfos
10
+ from ..models.integration_endpoints import IntegrationEndpoints
11
+ from ..models.integration_headers import IntegrationHeaders
12
+ from ..models.integration_organization import IntegrationOrganization
13
+ from ..models.integration_query_params import IntegrationQueryParams
14
+ from ..models.integration_repository import IntegrationRepository
15
+
16
+
17
+ T = TypeVar("T", bound="Integration")
18
+
19
+
20
+ @_attrs_define
21
+ class Integration:
22
+ """Integration
23
+
24
+ Attributes:
25
+ additional_infos (Union[Unset, IntegrationAdditionalInfos]): Integration additional infos
26
+ endpoints (Union[Unset, IntegrationEndpoints]): Integration endpoints
27
+ headers (Union[Unset, IntegrationHeaders]): Integration headers
28
+ name (Union[Unset, str]): Integration name
29
+ organizations (Union[Unset, list['IntegrationOrganization']]): Integration organizations
30
+ params (Union[Unset, IntegrationQueryParams]): Integration query params
31
+ repositories (Union[Unset, list['IntegrationRepository']]): Integration repositories
32
+ """
33
+
34
+ additional_infos: Union[Unset, "IntegrationAdditionalInfos"] = UNSET
35
+ endpoints: Union[Unset, "IntegrationEndpoints"] = UNSET
36
+ headers: Union[Unset, "IntegrationHeaders"] = UNSET
37
+ name: Union[Unset, str] = UNSET
38
+ organizations: Union[Unset, list["IntegrationOrganization"]] = UNSET
39
+ params: Union[Unset, "IntegrationQueryParams"] = UNSET
40
+ repositories: Union[Unset, list["IntegrationRepository"]] = UNSET
41
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
42
+
43
+ def to_dict(self) -> dict[str, Any]:
44
+ additional_infos: Union[Unset, dict[str, Any]] = UNSET
45
+ if (
46
+ self.additional_infos
47
+ and not isinstance(self.additional_infos, Unset)
48
+ and not isinstance(self.additional_infos, dict)
49
+ ):
50
+ additional_infos = self.additional_infos.to_dict()
51
+ elif self.additional_infos and isinstance(self.additional_infos, dict):
52
+ additional_infos = self.additional_infos
53
+
54
+ endpoints: Union[Unset, dict[str, Any]] = UNSET
55
+ if self.endpoints and not isinstance(self.endpoints, Unset) and not isinstance(self.endpoints, dict):
56
+ endpoints = self.endpoints.to_dict()
57
+ elif self.endpoints and isinstance(self.endpoints, dict):
58
+ endpoints = self.endpoints
59
+
60
+ headers: Union[Unset, dict[str, Any]] = UNSET
61
+ if self.headers and not isinstance(self.headers, Unset) and not isinstance(self.headers, dict):
62
+ headers = self.headers.to_dict()
63
+ elif self.headers and isinstance(self.headers, dict):
64
+ headers = self.headers
65
+
66
+ name = self.name
67
+
68
+ organizations: Union[Unset, list[dict[str, Any]]] = UNSET
69
+ if not isinstance(self.organizations, Unset):
70
+ organizations = []
71
+ for organizations_item_data in self.organizations:
72
+ if type(organizations_item_data) == dict:
73
+ organizations_item = organizations_item_data
74
+ else:
75
+ organizations_item = organizations_item_data.to_dict()
76
+ organizations.append(organizations_item)
77
+
78
+ params: Union[Unset, dict[str, Any]] = UNSET
79
+ if self.params and not isinstance(self.params, Unset) and not isinstance(self.params, dict):
80
+ params = self.params.to_dict()
81
+ elif self.params and isinstance(self.params, dict):
82
+ params = self.params
83
+
84
+ repositories: Union[Unset, list[dict[str, Any]]] = UNSET
85
+ if not isinstance(self.repositories, Unset):
86
+ repositories = []
87
+ for repositories_item_data in self.repositories:
88
+ if type(repositories_item_data) == dict:
89
+ repositories_item = repositories_item_data
90
+ else:
91
+ repositories_item = repositories_item_data.to_dict()
92
+ repositories.append(repositories_item)
93
+
94
+ field_dict: dict[str, Any] = {}
95
+ field_dict.update(self.additional_properties)
96
+ field_dict.update({})
97
+ if additional_infos is not UNSET:
98
+ field_dict["additionalInfos"] = additional_infos
99
+ if endpoints is not UNSET:
100
+ field_dict["endpoints"] = endpoints
101
+ if headers is not UNSET:
102
+ field_dict["headers"] = headers
103
+ if name is not UNSET:
104
+ field_dict["name"] = name
105
+ if organizations is not UNSET:
106
+ field_dict["organizations"] = organizations
107
+ if params is not UNSET:
108
+ field_dict["params"] = params
109
+ if repositories is not UNSET:
110
+ field_dict["repositories"] = repositories
111
+
112
+ return field_dict
113
+
114
+ @classmethod
115
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
116
+ from ..models.integration_additional_infos import IntegrationAdditionalInfos
117
+ from ..models.integration_endpoints import IntegrationEndpoints
118
+ from ..models.integration_headers import IntegrationHeaders
119
+ from ..models.integration_organization import IntegrationOrganization
120
+ from ..models.integration_query_params import IntegrationQueryParams
121
+ from ..models.integration_repository import IntegrationRepository
122
+
123
+ if not src_dict:
124
+ return None
125
+ d = src_dict.copy()
126
+ _additional_infos = d.pop("additionalInfos", UNSET)
127
+ additional_infos: Union[Unset, IntegrationAdditionalInfos]
128
+ if isinstance(_additional_infos, Unset):
129
+ additional_infos = UNSET
130
+ else:
131
+ additional_infos = IntegrationAdditionalInfos.from_dict(_additional_infos)
132
+
133
+ _endpoints = d.pop("endpoints", UNSET)
134
+ endpoints: Union[Unset, IntegrationEndpoints]
135
+ if isinstance(_endpoints, Unset):
136
+ endpoints = UNSET
137
+ else:
138
+ endpoints = IntegrationEndpoints.from_dict(_endpoints)
139
+
140
+ _headers = d.pop("headers", UNSET)
141
+ headers: Union[Unset, IntegrationHeaders]
142
+ if isinstance(_headers, Unset):
143
+ headers = UNSET
144
+ else:
145
+ headers = IntegrationHeaders.from_dict(_headers)
146
+
147
+ name = d.pop("name", UNSET)
148
+
149
+ organizations = []
150
+ _organizations = d.pop("organizations", UNSET)
151
+ for organizations_item_data in _organizations or []:
152
+ organizations_item = IntegrationOrganization.from_dict(organizations_item_data)
153
+
154
+ organizations.append(organizations_item)
155
+
156
+ _params = d.pop("params", UNSET)
157
+ params: Union[Unset, IntegrationQueryParams]
158
+ if isinstance(_params, Unset):
159
+ params = UNSET
160
+ else:
161
+ params = IntegrationQueryParams.from_dict(_params)
162
+
163
+ repositories = []
164
+ _repositories = d.pop("repositories", UNSET)
165
+ for repositories_item_data in _repositories or []:
166
+ repositories_item = IntegrationRepository.from_dict(repositories_item_data)
167
+
168
+ repositories.append(repositories_item)
169
+
170
+ integration = cls(
171
+ additional_infos=additional_infos,
172
+ endpoints=endpoints,
173
+ headers=headers,
174
+ name=name,
175
+ organizations=organizations,
176
+ params=params,
177
+ repositories=repositories,
178
+ )
179
+
180
+ integration.additional_properties = d
181
+ return integration
182
+
183
+ @property
184
+ def additional_keys(self) -> list[str]:
185
+ return list(self.additional_properties.keys())
186
+
187
+ def __getitem__(self, key: str) -> Any:
188
+ return self.additional_properties[key]
189
+
190
+ def __setitem__(self, key: str, value: Any) -> None:
191
+ self.additional_properties[key] = value
192
+
193
+ def __delitem__(self, key: str) -> None:
194
+ del self.additional_properties[key]
195
+
196
+ def __contains__(self, key: str) -> bool:
197
+ return key in self.additional_properties
@@ -0,0 +1,45 @@
1
+ from typing import Any, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="IntegrationAdditionalInfos")
7
+
8
+
9
+ @_attrs_define
10
+ class IntegrationAdditionalInfos:
11
+ """Integration additional infos"""
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
+
19
+ return field_dict
20
+
21
+ @classmethod
22
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
23
+ if not src_dict:
24
+ return None
25
+ d = src_dict.copy()
26
+ integration_additional_infos = cls()
27
+
28
+ integration_additional_infos.additional_properties = d
29
+ return integration_additional_infos
30
+
31
+ @property
32
+ def additional_keys(self) -> list[str]:
33
+ return list(self.additional_properties.keys())
34
+
35
+ def __getitem__(self, key: str) -> str:
36
+ return self.additional_properties[key]
37
+
38
+ def __setitem__(self, key: str, value: str) -> None:
39
+ self.additional_properties[key] = value
40
+
41
+ def __delitem__(self, key: str) -> None:
42
+ del self.additional_properties[key]
43
+
44
+ def __contains__(self, key: str) -> bool:
45
+ return key in self.additional_properties
@@ -0,0 +1,143 @@
1
+ from typing import TYPE_CHECKING, Any, 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.integration_endpoint_token import IntegrationEndpointToken
10
+
11
+
12
+ T = TypeVar("T", bound="IntegrationEndpoint")
13
+
14
+
15
+ @_attrs_define
16
+ class IntegrationEndpoint:
17
+ """Integration endpoint
18
+
19
+ Attributes:
20
+ body (Union[Unset, str]): Integration endpoint body
21
+ ignore_models (Union[Unset, list[Any]]): Integration endpoint ignore models
22
+ method (Union[Unset, str]): Integration endpoint method
23
+ models (Union[Unset, list[Any]]): Integration endpoint models
24
+ stream_key (Union[Unset, str]): Integration endpoint stream key
25
+ stream_token (Union[Unset, IntegrationEndpointToken]): Integration endpoint token
26
+ token (Union[Unset, IntegrationEndpointToken]): Integration endpoint token
27
+ """
28
+
29
+ body: Union[Unset, str] = UNSET
30
+ ignore_models: Union[Unset, list[Any]] = UNSET
31
+ method: Union[Unset, str] = UNSET
32
+ models: Union[Unset, list[Any]] = UNSET
33
+ stream_key: Union[Unset, str] = UNSET
34
+ stream_token: Union[Unset, "IntegrationEndpointToken"] = UNSET
35
+ token: Union[Unset, "IntegrationEndpointToken"] = UNSET
36
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
37
+
38
+ def to_dict(self) -> dict[str, Any]:
39
+ body = self.body
40
+
41
+ ignore_models: Union[Unset, list[Any]] = UNSET
42
+ if not isinstance(self.ignore_models, Unset):
43
+ ignore_models = self.ignore_models
44
+
45
+ method = self.method
46
+
47
+ models: Union[Unset, list[Any]] = UNSET
48
+ if not isinstance(self.models, Unset):
49
+ models = self.models
50
+
51
+ stream_key = self.stream_key
52
+
53
+ stream_token: Union[Unset, dict[str, Any]] = UNSET
54
+ if self.stream_token and not isinstance(self.stream_token, Unset) and not isinstance(self.stream_token, dict):
55
+ stream_token = self.stream_token.to_dict()
56
+ elif self.stream_token and isinstance(self.stream_token, dict):
57
+ stream_token = self.stream_token
58
+
59
+ token: Union[Unset, dict[str, Any]] = UNSET
60
+ if self.token and not isinstance(self.token, Unset) and not isinstance(self.token, dict):
61
+ token = self.token.to_dict()
62
+ elif self.token and isinstance(self.token, dict):
63
+ token = self.token
64
+
65
+ field_dict: dict[str, Any] = {}
66
+ field_dict.update(self.additional_properties)
67
+ field_dict.update({})
68
+ if body is not UNSET:
69
+ field_dict["body"] = body
70
+ if ignore_models is not UNSET:
71
+ field_dict["ignoreModels"] = ignore_models
72
+ if method is not UNSET:
73
+ field_dict["method"] = method
74
+ if models is not UNSET:
75
+ field_dict["models"] = models
76
+ if stream_key is not UNSET:
77
+ field_dict["streamKey"] = stream_key
78
+ if stream_token is not UNSET:
79
+ field_dict["streamToken"] = stream_token
80
+ if token is not UNSET:
81
+ field_dict["token"] = token
82
+
83
+ return field_dict
84
+
85
+ @classmethod
86
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
87
+ from ..models.integration_endpoint_token import IntegrationEndpointToken
88
+
89
+ if not src_dict:
90
+ return None
91
+ d = src_dict.copy()
92
+ body = d.pop("body", UNSET)
93
+
94
+ ignore_models = cast(list[Any], d.pop("ignoreModels", UNSET))
95
+
96
+ method = d.pop("method", UNSET)
97
+
98
+ models = cast(list[Any], d.pop("models", UNSET))
99
+
100
+ stream_key = d.pop("streamKey", UNSET)
101
+
102
+ _stream_token = d.pop("streamToken", UNSET)
103
+ stream_token: Union[Unset, IntegrationEndpointToken]
104
+ if isinstance(_stream_token, Unset):
105
+ stream_token = UNSET
106
+ else:
107
+ stream_token = IntegrationEndpointToken.from_dict(_stream_token)
108
+
109
+ _token = d.pop("token", UNSET)
110
+ token: Union[Unset, IntegrationEndpointToken]
111
+ if isinstance(_token, Unset):
112
+ token = UNSET
113
+ else:
114
+ token = IntegrationEndpointToken.from_dict(_token)
115
+
116
+ integration_endpoint = cls(
117
+ body=body,
118
+ ignore_models=ignore_models,
119
+ method=method,
120
+ models=models,
121
+ stream_key=stream_key,
122
+ stream_token=stream_token,
123
+ token=token,
124
+ )
125
+
126
+ integration_endpoint.additional_properties = d
127
+ return integration_endpoint
128
+
129
+ @property
130
+ def additional_keys(self) -> list[str]:
131
+ return list(self.additional_properties.keys())
132
+
133
+ def __getitem__(self, key: str) -> Any:
134
+ return self.additional_properties[key]
135
+
136
+ def __setitem__(self, key: str, value: Any) -> None:
137
+ self.additional_properties[key] = value
138
+
139
+ def __delitem__(self, key: str) -> None:
140
+ del self.additional_properties[key]
141
+
142
+ def __contains__(self, key: str) -> bool:
143
+ return key in self.additional_properties
@@ -0,0 +1,79 @@
1
+ from typing import Any, 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="IntegrationEndpointToken")
9
+
10
+
11
+ @_attrs_define
12
+ class IntegrationEndpointToken:
13
+ """Integration endpoint token
14
+
15
+ Attributes:
16
+ received (Union[Unset, str]): Integration endpoint token received
17
+ sent (Union[Unset, str]): Integration endpoint token sent
18
+ total (Union[Unset, str]): Integration endpoint token total
19
+ """
20
+
21
+ received: Union[Unset, str] = UNSET
22
+ sent: Union[Unset, str] = UNSET
23
+ total: 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
+ received = self.received
28
+
29
+ sent = self.sent
30
+
31
+ total = self.total
32
+
33
+ field_dict: dict[str, Any] = {}
34
+ field_dict.update(self.additional_properties)
35
+ field_dict.update({})
36
+ if received is not UNSET:
37
+ field_dict["received"] = received
38
+ if sent is not UNSET:
39
+ field_dict["sent"] = sent
40
+ if total is not UNSET:
41
+ field_dict["total"] = total
42
+
43
+ return field_dict
44
+
45
+ @classmethod
46
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
47
+ if not src_dict:
48
+ return None
49
+ d = src_dict.copy()
50
+ received = d.pop("received", UNSET)
51
+
52
+ sent = d.pop("sent", UNSET)
53
+
54
+ total = d.pop("total", UNSET)
55
+
56
+ integration_endpoint_token = cls(
57
+ received=received,
58
+ sent=sent,
59
+ total=total,
60
+ )
61
+
62
+ integration_endpoint_token.additional_properties = d
63
+ return integration_endpoint_token
64
+
65
+ @property
66
+ def additional_keys(self) -> list[str]:
67
+ return list(self.additional_properties.keys())
68
+
69
+ def __getitem__(self, key: str) -> Any:
70
+ return self.additional_properties[key]
71
+
72
+ def __setitem__(self, key: str, value: Any) -> None:
73
+ self.additional_properties[key] = value
74
+
75
+ def __delitem__(self, key: str) -> None:
76
+ del self.additional_properties[key]
77
+
78
+ def __contains__(self, key: str) -> bool:
79
+ return key in self.additional_properties
@@ -0,0 +1,61 @@
1
+ from typing import TYPE_CHECKING, Any, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ if TYPE_CHECKING:
7
+ from ..models.integration_endpoint import IntegrationEndpoint
8
+
9
+
10
+ T = TypeVar("T", bound="IntegrationEndpoints")
11
+
12
+
13
+ @_attrs_define
14
+ class IntegrationEndpoints:
15
+ """Integration endpoints"""
16
+
17
+ additional_properties: dict[str, "IntegrationEndpoint"] = _attrs_field(init=False, factory=dict)
18
+
19
+ def to_dict(self) -> dict[str, Any]:
20
+ field_dict: dict[str, Any] = {}
21
+ for prop_name, prop in self.additional_properties.items():
22
+ if type(prop) == dict:
23
+ field_dict[prop_name] = prop
24
+ else:
25
+ field_dict[prop_name] = prop.to_dict()
26
+
27
+ return field_dict
28
+
29
+ @classmethod
30
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
31
+ from ..models.integration_endpoint import IntegrationEndpoint
32
+
33
+ if not src_dict:
34
+ return None
35
+ d = src_dict.copy()
36
+ integration_endpoints = cls()
37
+
38
+ additional_properties = {}
39
+ for prop_name, prop_dict in d.items():
40
+ additional_property = IntegrationEndpoint.from_dict(prop_dict)
41
+
42
+ additional_properties[prop_name] = additional_property
43
+
44
+ integration_endpoints.additional_properties = additional_properties
45
+ return integration_endpoints
46
+
47
+ @property
48
+ def additional_keys(self) -> list[str]:
49
+ return list(self.additional_properties.keys())
50
+
51
+ def __getitem__(self, key: str) -> "IntegrationEndpoint":
52
+ return self.additional_properties[key]
53
+
54
+ def __setitem__(self, key: str, value: "IntegrationEndpoint") -> None:
55
+ self.additional_properties[key] = value
56
+
57
+ def __delitem__(self, key: str) -> None:
58
+ del self.additional_properties[key]
59
+
60
+ def __contains__(self, key: str) -> bool:
61
+ return key in self.additional_properties
@@ -0,0 +1,45 @@
1
+ from typing import Any, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="IntegrationHeaders")
7
+
8
+
9
+ @_attrs_define
10
+ class IntegrationHeaders:
11
+ """Integration headers"""
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
+
19
+ return field_dict
20
+
21
+ @classmethod
22
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
23
+ if not src_dict:
24
+ return None
25
+ d = src_dict.copy()
26
+ integration_headers = cls()
27
+
28
+ integration_headers.additional_properties = d
29
+ return integration_headers
30
+
31
+ @property
32
+ def additional_keys(self) -> list[str]:
33
+ return list(self.additional_properties.keys())
34
+
35
+ def __getitem__(self, key: str) -> str:
36
+ return self.additional_properties[key]
37
+
38
+ def __setitem__(self, key: str, value: str) -> None:
39
+ self.additional_properties[key] = value
40
+
41
+ def __delitem__(self, key: str) -> None:
42
+ del self.additional_properties[key]
43
+
44
+ def __contains__(self, key: str) -> bool:
45
+ return key in self.additional_properties
@@ -0,0 +1,88 @@
1
+ from typing import Any, 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="IntegrationOrganization")
9
+
10
+
11
+ @_attrs_define
12
+ class IntegrationOrganization:
13
+ """Integration organization
14
+
15
+ Attributes:
16
+ avatar_url (Union[Unset, str]): Provider organization avatar URL
17
+ display_name (Union[Unset, str]): Provider organization display name
18
+ id (Union[Unset, str]): Provider organization ID
19
+ name (Union[Unset, str]): Provider organization name
20
+ """
21
+
22
+ avatar_url: Union[Unset, str] = UNSET
23
+ display_name: Union[Unset, str] = UNSET
24
+ id: Union[Unset, str] = UNSET
25
+ name: 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
+ avatar_url = self.avatar_url
30
+
31
+ display_name = self.display_name
32
+
33
+ id = self.id
34
+
35
+ name = self.name
36
+
37
+ field_dict: dict[str, Any] = {}
38
+ field_dict.update(self.additional_properties)
39
+ field_dict.update({})
40
+ if avatar_url is not UNSET:
41
+ field_dict["avatar_url"] = avatar_url
42
+ if display_name is not UNSET:
43
+ field_dict["displayName"] = display_name
44
+ if id is not UNSET:
45
+ field_dict["id"] = id
46
+ if name is not UNSET:
47
+ field_dict["name"] = name
48
+
49
+ return field_dict
50
+
51
+ @classmethod
52
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
53
+ if not src_dict:
54
+ return None
55
+ d = src_dict.copy()
56
+ avatar_url = d.pop("avatar_url", UNSET)
57
+
58
+ display_name = d.pop("displayName", UNSET)
59
+
60
+ id = d.pop("id", UNSET)
61
+
62
+ name = d.pop("name", UNSET)
63
+
64
+ integration_organization = cls(
65
+ avatar_url=avatar_url,
66
+ display_name=display_name,
67
+ id=id,
68
+ name=name,
69
+ )
70
+
71
+ integration_organization.additional_properties = d
72
+ return integration_organization
73
+
74
+ @property
75
+ def additional_keys(self) -> list[str]:
76
+ return list(self.additional_properties.keys())
77
+
78
+ def __getitem__(self, key: str) -> Any:
79
+ return self.additional_properties[key]
80
+
81
+ def __setitem__(self, key: str, value: Any) -> None:
82
+ self.additional_properties[key] = value
83
+
84
+ def __delitem__(self, key: str) -> None:
85
+ del self.additional_properties[key]
86
+
87
+ def __contains__(self, key: str) -> bool:
88
+ return key in self.additional_properties