windmill-api 1.559.0__py3-none-any.whl → 1.561.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.

@@ -0,0 +1,187 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.load_git_repo_file_metadata_response_200 import LoadGitRepoFileMetadataResponse200
9
+ from ...types import UNSET, Response, Unset
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ *,
15
+ file_key: str,
16
+ storage: Union[Unset, None, str] = UNSET,
17
+ ) -> Dict[str, Any]:
18
+ pass
19
+
20
+ params: Dict[str, Any] = {}
21
+ params["file_key"] = file_key
22
+
23
+ params["storage"] = storage
24
+
25
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
26
+
27
+ return {
28
+ "method": "get",
29
+ "url": "/w/{workspace}/job_helpers/load_git_repo_file_metadata".format(
30
+ workspace=workspace,
31
+ ),
32
+ "params": params,
33
+ }
34
+
35
+
36
+ def _parse_response(
37
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
38
+ ) -> Optional[LoadGitRepoFileMetadataResponse200]:
39
+ if response.status_code == HTTPStatus.OK:
40
+ response_200 = LoadGitRepoFileMetadataResponse200.from_dict(response.json())
41
+
42
+ return response_200
43
+ if client.raise_on_unexpected_status:
44
+ raise errors.UnexpectedStatus(response.status_code, response.content)
45
+ else:
46
+ return None
47
+
48
+
49
+ def _build_response(
50
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
51
+ ) -> Response[LoadGitRepoFileMetadataResponse200]:
52
+ return Response(
53
+ status_code=HTTPStatus(response.status_code),
54
+ content=response.content,
55
+ headers=response.headers,
56
+ parsed=_parse_response(client=client, response=response),
57
+ )
58
+
59
+
60
+ def sync_detailed(
61
+ workspace: str,
62
+ *,
63
+ client: Union[AuthenticatedClient, Client],
64
+ file_key: str,
65
+ storage: Union[Unset, None, str] = UNSET,
66
+ ) -> Response[LoadGitRepoFileMetadataResponse200]:
67
+ """Load file metadata from instance storage with resource-based access control
68
+
69
+ Args:
70
+ workspace (str):
71
+ file_key (str): Must follow format gitrepos/{workspace_id}/{resource_path}/...
72
+ storage (Union[Unset, None, str]):
73
+
74
+ Raises:
75
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
76
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
77
+
78
+ Returns:
79
+ Response[LoadGitRepoFileMetadataResponse200]
80
+ """
81
+
82
+ kwargs = _get_kwargs(
83
+ workspace=workspace,
84
+ file_key=file_key,
85
+ storage=storage,
86
+ )
87
+
88
+ response = client.get_httpx_client().request(
89
+ **kwargs,
90
+ )
91
+
92
+ return _build_response(client=client, response=response)
93
+
94
+
95
+ def sync(
96
+ workspace: str,
97
+ *,
98
+ client: Union[AuthenticatedClient, Client],
99
+ file_key: str,
100
+ storage: Union[Unset, None, str] = UNSET,
101
+ ) -> Optional[LoadGitRepoFileMetadataResponse200]:
102
+ """Load file metadata from instance storage with resource-based access control
103
+
104
+ Args:
105
+ workspace (str):
106
+ file_key (str): Must follow format gitrepos/{workspace_id}/{resource_path}/...
107
+ storage (Union[Unset, None, str]):
108
+
109
+ Raises:
110
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
111
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
112
+
113
+ Returns:
114
+ LoadGitRepoFileMetadataResponse200
115
+ """
116
+
117
+ return sync_detailed(
118
+ workspace=workspace,
119
+ client=client,
120
+ file_key=file_key,
121
+ storage=storage,
122
+ ).parsed
123
+
124
+
125
+ async def asyncio_detailed(
126
+ workspace: str,
127
+ *,
128
+ client: Union[AuthenticatedClient, Client],
129
+ file_key: str,
130
+ storage: Union[Unset, None, str] = UNSET,
131
+ ) -> Response[LoadGitRepoFileMetadataResponse200]:
132
+ """Load file metadata from instance storage with resource-based access control
133
+
134
+ Args:
135
+ workspace (str):
136
+ file_key (str): Must follow format gitrepos/{workspace_id}/{resource_path}/...
137
+ storage (Union[Unset, None, str]):
138
+
139
+ Raises:
140
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
141
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
142
+
143
+ Returns:
144
+ Response[LoadGitRepoFileMetadataResponse200]
145
+ """
146
+
147
+ kwargs = _get_kwargs(
148
+ workspace=workspace,
149
+ file_key=file_key,
150
+ storage=storage,
151
+ )
152
+
153
+ response = await client.get_async_httpx_client().request(**kwargs)
154
+
155
+ return _build_response(client=client, response=response)
156
+
157
+
158
+ async def asyncio(
159
+ workspace: str,
160
+ *,
161
+ client: Union[AuthenticatedClient, Client],
162
+ file_key: str,
163
+ storage: Union[Unset, None, str] = UNSET,
164
+ ) -> Optional[LoadGitRepoFileMetadataResponse200]:
165
+ """Load file metadata from instance storage with resource-based access control
166
+
167
+ Args:
168
+ workspace (str):
169
+ file_key (str): Must follow format gitrepos/{workspace_id}/{resource_path}/...
170
+ storage (Union[Unset, None, str]):
171
+
172
+ Raises:
173
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
174
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
175
+
176
+ Returns:
177
+ LoadGitRepoFileMetadataResponse200
178
+ """
179
+
180
+ return (
181
+ await asyncio_detailed(
182
+ workspace=workspace,
183
+ client=client,
184
+ file_key=file_key,
185
+ storage=storage,
186
+ )
187
+ ).parsed
@@ -0,0 +1,277 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.load_git_repo_file_preview_response_200 import LoadGitRepoFilePreviewResponse200
9
+ from ...types import UNSET, Response, Unset
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ *,
15
+ file_key: str,
16
+ file_size_in_bytes: Union[Unset, None, int] = UNSET,
17
+ file_mime_type: Union[Unset, None, str] = UNSET,
18
+ csv_separator: Union[Unset, None, str] = UNSET,
19
+ csv_has_header: Union[Unset, None, bool] = UNSET,
20
+ read_bytes_from: Union[Unset, None, int] = UNSET,
21
+ read_bytes_length: Union[Unset, None, int] = UNSET,
22
+ storage: Union[Unset, None, str] = UNSET,
23
+ ) -> Dict[str, Any]:
24
+ pass
25
+
26
+ params: Dict[str, Any] = {}
27
+ params["file_key"] = file_key
28
+
29
+ params["file_size_in_bytes"] = file_size_in_bytes
30
+
31
+ params["file_mime_type"] = file_mime_type
32
+
33
+ params["csv_separator"] = csv_separator
34
+
35
+ params["csv_has_header"] = csv_has_header
36
+
37
+ params["read_bytes_from"] = read_bytes_from
38
+
39
+ params["read_bytes_length"] = read_bytes_length
40
+
41
+ params["storage"] = storage
42
+
43
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
44
+
45
+ return {
46
+ "method": "get",
47
+ "url": "/w/{workspace}/job_helpers/load_git_repo_file_preview".format(
48
+ workspace=workspace,
49
+ ),
50
+ "params": params,
51
+ }
52
+
53
+
54
+ def _parse_response(
55
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
56
+ ) -> Optional[LoadGitRepoFilePreviewResponse200]:
57
+ if response.status_code == HTTPStatus.OK:
58
+ response_200 = LoadGitRepoFilePreviewResponse200.from_dict(response.json())
59
+
60
+ return response_200
61
+ if client.raise_on_unexpected_status:
62
+ raise errors.UnexpectedStatus(response.status_code, response.content)
63
+ else:
64
+ return None
65
+
66
+
67
+ def _build_response(
68
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
69
+ ) -> Response[LoadGitRepoFilePreviewResponse200]:
70
+ return Response(
71
+ status_code=HTTPStatus(response.status_code),
72
+ content=response.content,
73
+ headers=response.headers,
74
+ parsed=_parse_response(client=client, response=response),
75
+ )
76
+
77
+
78
+ def sync_detailed(
79
+ workspace: str,
80
+ *,
81
+ client: Union[AuthenticatedClient, Client],
82
+ file_key: str,
83
+ file_size_in_bytes: Union[Unset, None, int] = UNSET,
84
+ file_mime_type: Union[Unset, None, str] = UNSET,
85
+ csv_separator: Union[Unset, None, str] = UNSET,
86
+ csv_has_header: Union[Unset, None, bool] = UNSET,
87
+ read_bytes_from: Union[Unset, None, int] = UNSET,
88
+ read_bytes_length: Union[Unset, None, int] = UNSET,
89
+ storage: Union[Unset, None, str] = UNSET,
90
+ ) -> Response[LoadGitRepoFilePreviewResponse200]:
91
+ """Load a preview of a file from instance storage with resource-based access control
92
+
93
+ Args:
94
+ workspace (str):
95
+ file_key (str): Must follow format gitrepos/{workspace_id}/{resource_path}/...
96
+ file_size_in_bytes (Union[Unset, None, int]):
97
+ file_mime_type (Union[Unset, None, str]):
98
+ csv_separator (Union[Unset, None, str]):
99
+ csv_has_header (Union[Unset, None, bool]):
100
+ read_bytes_from (Union[Unset, None, int]):
101
+ read_bytes_length (Union[Unset, None, int]):
102
+ storage (Union[Unset, None, str]):
103
+
104
+ Raises:
105
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
106
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
107
+
108
+ Returns:
109
+ Response[LoadGitRepoFilePreviewResponse200]
110
+ """
111
+
112
+ kwargs = _get_kwargs(
113
+ workspace=workspace,
114
+ file_key=file_key,
115
+ file_size_in_bytes=file_size_in_bytes,
116
+ file_mime_type=file_mime_type,
117
+ csv_separator=csv_separator,
118
+ csv_has_header=csv_has_header,
119
+ read_bytes_from=read_bytes_from,
120
+ read_bytes_length=read_bytes_length,
121
+ storage=storage,
122
+ )
123
+
124
+ response = client.get_httpx_client().request(
125
+ **kwargs,
126
+ )
127
+
128
+ return _build_response(client=client, response=response)
129
+
130
+
131
+ def sync(
132
+ workspace: str,
133
+ *,
134
+ client: Union[AuthenticatedClient, Client],
135
+ file_key: str,
136
+ file_size_in_bytes: Union[Unset, None, int] = UNSET,
137
+ file_mime_type: Union[Unset, None, str] = UNSET,
138
+ csv_separator: Union[Unset, None, str] = UNSET,
139
+ csv_has_header: Union[Unset, None, bool] = UNSET,
140
+ read_bytes_from: Union[Unset, None, int] = UNSET,
141
+ read_bytes_length: Union[Unset, None, int] = UNSET,
142
+ storage: Union[Unset, None, str] = UNSET,
143
+ ) -> Optional[LoadGitRepoFilePreviewResponse200]:
144
+ """Load a preview of a file from instance storage with resource-based access control
145
+
146
+ Args:
147
+ workspace (str):
148
+ file_key (str): Must follow format gitrepos/{workspace_id}/{resource_path}/...
149
+ file_size_in_bytes (Union[Unset, None, int]):
150
+ file_mime_type (Union[Unset, None, str]):
151
+ csv_separator (Union[Unset, None, str]):
152
+ csv_has_header (Union[Unset, None, bool]):
153
+ read_bytes_from (Union[Unset, None, int]):
154
+ read_bytes_length (Union[Unset, None, int]):
155
+ storage (Union[Unset, None, str]):
156
+
157
+ Raises:
158
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
159
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
160
+
161
+ Returns:
162
+ LoadGitRepoFilePreviewResponse200
163
+ """
164
+
165
+ return sync_detailed(
166
+ workspace=workspace,
167
+ client=client,
168
+ file_key=file_key,
169
+ file_size_in_bytes=file_size_in_bytes,
170
+ file_mime_type=file_mime_type,
171
+ csv_separator=csv_separator,
172
+ csv_has_header=csv_has_header,
173
+ read_bytes_from=read_bytes_from,
174
+ read_bytes_length=read_bytes_length,
175
+ storage=storage,
176
+ ).parsed
177
+
178
+
179
+ async def asyncio_detailed(
180
+ workspace: str,
181
+ *,
182
+ client: Union[AuthenticatedClient, Client],
183
+ file_key: str,
184
+ file_size_in_bytes: Union[Unset, None, int] = UNSET,
185
+ file_mime_type: Union[Unset, None, str] = UNSET,
186
+ csv_separator: Union[Unset, None, str] = UNSET,
187
+ csv_has_header: Union[Unset, None, bool] = UNSET,
188
+ read_bytes_from: Union[Unset, None, int] = UNSET,
189
+ read_bytes_length: Union[Unset, None, int] = UNSET,
190
+ storage: Union[Unset, None, str] = UNSET,
191
+ ) -> Response[LoadGitRepoFilePreviewResponse200]:
192
+ """Load a preview of a file from instance storage with resource-based access control
193
+
194
+ Args:
195
+ workspace (str):
196
+ file_key (str): Must follow format gitrepos/{workspace_id}/{resource_path}/...
197
+ file_size_in_bytes (Union[Unset, None, int]):
198
+ file_mime_type (Union[Unset, None, str]):
199
+ csv_separator (Union[Unset, None, str]):
200
+ csv_has_header (Union[Unset, None, bool]):
201
+ read_bytes_from (Union[Unset, None, int]):
202
+ read_bytes_length (Union[Unset, None, int]):
203
+ storage (Union[Unset, None, str]):
204
+
205
+ Raises:
206
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
207
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
208
+
209
+ Returns:
210
+ Response[LoadGitRepoFilePreviewResponse200]
211
+ """
212
+
213
+ kwargs = _get_kwargs(
214
+ workspace=workspace,
215
+ file_key=file_key,
216
+ file_size_in_bytes=file_size_in_bytes,
217
+ file_mime_type=file_mime_type,
218
+ csv_separator=csv_separator,
219
+ csv_has_header=csv_has_header,
220
+ read_bytes_from=read_bytes_from,
221
+ read_bytes_length=read_bytes_length,
222
+ storage=storage,
223
+ )
224
+
225
+ response = await client.get_async_httpx_client().request(**kwargs)
226
+
227
+ return _build_response(client=client, response=response)
228
+
229
+
230
+ async def asyncio(
231
+ workspace: str,
232
+ *,
233
+ client: Union[AuthenticatedClient, Client],
234
+ file_key: str,
235
+ file_size_in_bytes: Union[Unset, None, int] = UNSET,
236
+ file_mime_type: Union[Unset, None, str] = UNSET,
237
+ csv_separator: Union[Unset, None, str] = UNSET,
238
+ csv_has_header: Union[Unset, None, bool] = UNSET,
239
+ read_bytes_from: Union[Unset, None, int] = UNSET,
240
+ read_bytes_length: Union[Unset, None, int] = UNSET,
241
+ storage: Union[Unset, None, str] = UNSET,
242
+ ) -> Optional[LoadGitRepoFilePreviewResponse200]:
243
+ """Load a preview of a file from instance storage with resource-based access control
244
+
245
+ Args:
246
+ workspace (str):
247
+ file_key (str): Must follow format gitrepos/{workspace_id}/{resource_path}/...
248
+ file_size_in_bytes (Union[Unset, None, int]):
249
+ file_mime_type (Union[Unset, None, str]):
250
+ csv_separator (Union[Unset, None, str]):
251
+ csv_has_header (Union[Unset, None, bool]):
252
+ read_bytes_from (Union[Unset, None, int]):
253
+ read_bytes_length (Union[Unset, None, int]):
254
+ storage (Union[Unset, None, str]):
255
+
256
+ Raises:
257
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
258
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
259
+
260
+ Returns:
261
+ LoadGitRepoFilePreviewResponse200
262
+ """
263
+
264
+ return (
265
+ await asyncio_detailed(
266
+ workspace=workspace,
267
+ client=client,
268
+ file_key=file_key,
269
+ file_size_in_bytes=file_size_in_bytes,
270
+ file_mime_type=file_mime_type,
271
+ csv_separator=csv_separator,
272
+ csv_has_header=csv_has_header,
273
+ read_bytes_from=read_bytes_from,
274
+ read_bytes_length=read_bytes_length,
275
+ storage=storage,
276
+ )
277
+ ).parsed
@@ -0,0 +1,166 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Dict, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.get_git_commit_hash_response_200 import GetGitCommitHashResponse200
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ workspace: str,
14
+ path: str,
15
+ ) -> Dict[str, Any]:
16
+ pass
17
+
18
+ return {
19
+ "method": "get",
20
+ "url": "/w/{workspace}/resources/git_commit_hash/{path}".format(
21
+ workspace=workspace,
22
+ path=path,
23
+ ),
24
+ }
25
+
26
+
27
+ def _parse_response(
28
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
29
+ ) -> Optional[GetGitCommitHashResponse200]:
30
+ if response.status_code == HTTPStatus.OK:
31
+ response_200 = GetGitCommitHashResponse200.from_dict(response.json())
32
+
33
+ return response_200
34
+ if client.raise_on_unexpected_status:
35
+ raise errors.UnexpectedStatus(response.status_code, response.content)
36
+ else:
37
+ return None
38
+
39
+
40
+ def _build_response(
41
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
42
+ ) -> Response[GetGitCommitHashResponse200]:
43
+ return Response(
44
+ status_code=HTTPStatus(response.status_code),
45
+ content=response.content,
46
+ headers=response.headers,
47
+ parsed=_parse_response(client=client, response=response),
48
+ )
49
+
50
+
51
+ def sync_detailed(
52
+ workspace: str,
53
+ path: str,
54
+ *,
55
+ client: Union[AuthenticatedClient, Client],
56
+ ) -> Response[GetGitCommitHashResponse200]:
57
+ """get git repository latest commit hash
58
+
59
+ Args:
60
+ workspace (str):
61
+ path (str):
62
+
63
+ Raises:
64
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
65
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
66
+
67
+ Returns:
68
+ Response[GetGitCommitHashResponse200]
69
+ """
70
+
71
+ kwargs = _get_kwargs(
72
+ workspace=workspace,
73
+ path=path,
74
+ )
75
+
76
+ response = client.get_httpx_client().request(
77
+ **kwargs,
78
+ )
79
+
80
+ return _build_response(client=client, response=response)
81
+
82
+
83
+ def sync(
84
+ workspace: str,
85
+ path: str,
86
+ *,
87
+ client: Union[AuthenticatedClient, Client],
88
+ ) -> Optional[GetGitCommitHashResponse200]:
89
+ """get git repository latest commit hash
90
+
91
+ Args:
92
+ workspace (str):
93
+ path (str):
94
+
95
+ Raises:
96
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
97
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
98
+
99
+ Returns:
100
+ GetGitCommitHashResponse200
101
+ """
102
+
103
+ return sync_detailed(
104
+ workspace=workspace,
105
+ path=path,
106
+ client=client,
107
+ ).parsed
108
+
109
+
110
+ async def asyncio_detailed(
111
+ workspace: str,
112
+ path: str,
113
+ *,
114
+ client: Union[AuthenticatedClient, Client],
115
+ ) -> Response[GetGitCommitHashResponse200]:
116
+ """get git repository latest commit hash
117
+
118
+ Args:
119
+ workspace (str):
120
+ path (str):
121
+
122
+ Raises:
123
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
124
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
125
+
126
+ Returns:
127
+ Response[GetGitCommitHashResponse200]
128
+ """
129
+
130
+ kwargs = _get_kwargs(
131
+ workspace=workspace,
132
+ path=path,
133
+ )
134
+
135
+ response = await client.get_async_httpx_client().request(**kwargs)
136
+
137
+ return _build_response(client=client, response=response)
138
+
139
+
140
+ async def asyncio(
141
+ workspace: str,
142
+ path: str,
143
+ *,
144
+ client: Union[AuthenticatedClient, Client],
145
+ ) -> Optional[GetGitCommitHashResponse200]:
146
+ """get git repository latest commit hash
147
+
148
+ Args:
149
+ workspace (str):
150
+ path (str):
151
+
152
+ Raises:
153
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
154
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
155
+
156
+ Returns:
157
+ GetGitCommitHashResponse200
158
+ """
159
+
160
+ return (
161
+ await asyncio_detailed(
162
+ workspace=workspace,
163
+ path=path,
164
+ client=client,
165
+ )
166
+ ).parsed
@@ -0,0 +1,65 @@
1
+ from typing import Any, Dict, List, Type, TypeVar
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ T = TypeVar("T", bound="CheckS3FolderExistsResponse200")
7
+
8
+
9
+ @_attrs_define
10
+ class CheckS3FolderExistsResponse200:
11
+ """
12
+ Attributes:
13
+ exists (bool): Whether the path exists
14
+ is_folder (bool): Whether the path is a folder (true) or file (false)
15
+ """
16
+
17
+ exists: bool
18
+ is_folder: bool
19
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ exists = self.exists
23
+ is_folder = self.is_folder
24
+
25
+ field_dict: Dict[str, Any] = {}
26
+ field_dict.update(self.additional_properties)
27
+ field_dict.update(
28
+ {
29
+ "exists": exists,
30
+ "is_folder": is_folder,
31
+ }
32
+ )
33
+
34
+ return field_dict
35
+
36
+ @classmethod
37
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
38
+ d = src_dict.copy()
39
+ exists = d.pop("exists")
40
+
41
+ is_folder = d.pop("is_folder")
42
+
43
+ check_s3_folder_exists_response_200 = cls(
44
+ exists=exists,
45
+ is_folder=is_folder,
46
+ )
47
+
48
+ check_s3_folder_exists_response_200.additional_properties = d
49
+ return check_s3_folder_exists_response_200
50
+
51
+ @property
52
+ def additional_keys(self) -> List[str]:
53
+ return list(self.additional_properties.keys())
54
+
55
+ def __getitem__(self, key: str) -> Any:
56
+ return self.additional_properties[key]
57
+
58
+ def __setitem__(self, key: str, value: Any) -> None:
59
+ self.additional_properties[key] = value
60
+
61
+ def __delitem__(self, key: str) -> None:
62
+ del self.additional_properties[key]
63
+
64
+ def __contains__(self, key: str) -> bool:
65
+ return key in self.additional_properties