perceptic-core-client 0.26.0__py3-none-any.whl → 0.27.1__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 perceptic-core-client might be problematic. Click here for more details.
- perceptic_core_client/__init__.py +4 -0
- perceptic_core_client/api/tag_resource_api.py +493 -0
- perceptic_core_client/api/uri_resource_api.py +568 -0
- perceptic_core_client/models/__init__.py +2 -0
- perceptic_core_client/models/add_tag_to_file_request.py +87 -0
- perceptic_core_client/models/remove_tag_from_file_request.py +87 -0
- perceptic_core_client/models/resource_metadata_dto.py +4 -2
- perceptic_core_client/test/test_add_tag_to_file_request.py +51 -0
- perceptic_core_client/test/test_get_metadata_response.py +4 -1
- perceptic_core_client/test/test_list_file_system_response.py +4 -1
- perceptic_core_client/test/test_paged_list_file_system_response.py +4 -1
- perceptic_core_client/test/test_remove_tag_from_file_request.py +51 -0
- perceptic_core_client/test/test_resource_entry_dto.py +4 -1
- perceptic_core_client/test/test_resource_metadata_dto.py +4 -1
- perceptic_core_client/test/test_tag_resource_api.py +14 -0
- perceptic_core_client/test/test_uri_resource_api.py +14 -0
- {perceptic_core_client-0.26.0.dist-info → perceptic_core_client-0.27.1.dist-info}/METADATA +1 -1
- {perceptic_core_client-0.26.0.dist-info → perceptic_core_client-0.27.1.dist-info}/RECORD +20 -16
- {perceptic_core_client-0.26.0.dist-info → perceptic_core_client-0.27.1.dist-info}/WHEEL +0 -0
- {perceptic_core_client-0.26.0.dist-info → perceptic_core_client-0.27.1.dist-info}/top_level.txt +0 -0
|
@@ -19,6 +19,7 @@ from typing_extensions import Annotated
|
|
|
19
19
|
from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator
|
|
20
20
|
from typing import Optional, Tuple, Union
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
|
+
from perceptic_core_client.models.add_tag_to_file_request import AddTagToFileRequest
|
|
22
23
|
from perceptic_core_client.models.create_folder_request import CreateFolderRequest
|
|
23
24
|
from perceptic_core_client.models.create_folder_response import CreateFolderResponse
|
|
24
25
|
from perceptic_core_client.models.get_metadata_response import GetMetadataResponse
|
|
@@ -26,6 +27,7 @@ from perceptic_core_client.models.get_parent_uri_response import GetParentUriRes
|
|
|
26
27
|
from perceptic_core_client.models.get_signed_url_response import GetSignedUrlResponse
|
|
27
28
|
from perceptic_core_client.models.list_file_system_response import ListFileSystemResponse
|
|
28
29
|
from perceptic_core_client.models.paged_list_file_system_response import PagedListFileSystemResponse
|
|
30
|
+
from perceptic_core_client.models.remove_tag_from_file_request import RemoveTagFromFileRequest
|
|
29
31
|
from perceptic_core_client.models.upload_file_to_managed_file_system_response import UploadFileToManagedFileSystemResponse
|
|
30
32
|
|
|
31
33
|
from perceptic_core_client.api_client import ApiClient, RequestSerialized
|
|
@@ -46,6 +48,289 @@ class UriResourceApi:
|
|
|
46
48
|
self.api_client = api_client
|
|
47
49
|
|
|
48
50
|
|
|
51
|
+
@validate_call
|
|
52
|
+
def add_tag_to_file(
|
|
53
|
+
self,
|
|
54
|
+
add_tag_to_file_request: AddTagToFileRequest,
|
|
55
|
+
uri: Optional[StrictStr] = None,
|
|
56
|
+
_request_timeout: Union[
|
|
57
|
+
None,
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
59
|
+
Tuple[
|
|
60
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
61
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
62
|
+
]
|
|
63
|
+
] = None,
|
|
64
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
65
|
+
_content_type: Optional[StrictStr] = None,
|
|
66
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
67
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
68
|
+
) -> None:
|
|
69
|
+
"""Add Tag To File
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
:param add_tag_to_file_request: (required)
|
|
73
|
+
:type add_tag_to_file_request: AddTagToFileRequest
|
|
74
|
+
:param uri:
|
|
75
|
+
:type uri: str
|
|
76
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
77
|
+
number provided, it will be total request
|
|
78
|
+
timeout. It can also be a pair (tuple) of
|
|
79
|
+
(connection, read) timeouts.
|
|
80
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
81
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
82
|
+
request; this effectively ignores the
|
|
83
|
+
authentication in the spec for a single request.
|
|
84
|
+
:type _request_auth: dict, optional
|
|
85
|
+
:param _content_type: force content-type for the request.
|
|
86
|
+
:type _content_type: str, Optional
|
|
87
|
+
:param _headers: set to override the headers for a single
|
|
88
|
+
request; this effectively ignores the headers
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _headers: dict, optional
|
|
91
|
+
:param _host_index: set to override the host_index for a single
|
|
92
|
+
request; this effectively ignores the host_index
|
|
93
|
+
in the spec for a single request.
|
|
94
|
+
:type _host_index: int, optional
|
|
95
|
+
:return: Returns the result object.
|
|
96
|
+
""" # noqa: E501
|
|
97
|
+
|
|
98
|
+
_param = self._add_tag_to_file_serialize(
|
|
99
|
+
add_tag_to_file_request=add_tag_to_file_request,
|
|
100
|
+
uri=uri,
|
|
101
|
+
_request_auth=_request_auth,
|
|
102
|
+
_content_type=_content_type,
|
|
103
|
+
_headers=_headers,
|
|
104
|
+
_host_index=_host_index
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
108
|
+
'201': None,
|
|
109
|
+
'400': None,
|
|
110
|
+
}
|
|
111
|
+
response_data = self.api_client.call_api(
|
|
112
|
+
*_param,
|
|
113
|
+
_request_timeout=_request_timeout
|
|
114
|
+
)
|
|
115
|
+
response_data.read()
|
|
116
|
+
return self.api_client.response_deserialize(
|
|
117
|
+
response_data=response_data,
|
|
118
|
+
response_types_map=_response_types_map,
|
|
119
|
+
).data
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
@validate_call
|
|
123
|
+
def add_tag_to_file_with_http_info(
|
|
124
|
+
self,
|
|
125
|
+
add_tag_to_file_request: AddTagToFileRequest,
|
|
126
|
+
uri: Optional[StrictStr] = None,
|
|
127
|
+
_request_timeout: Union[
|
|
128
|
+
None,
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
130
|
+
Tuple[
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
132
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
133
|
+
]
|
|
134
|
+
] = None,
|
|
135
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
136
|
+
_content_type: Optional[StrictStr] = None,
|
|
137
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
138
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
139
|
+
) -> ApiResponse[None]:
|
|
140
|
+
"""Add Tag To File
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
:param add_tag_to_file_request: (required)
|
|
144
|
+
:type add_tag_to_file_request: AddTagToFileRequest
|
|
145
|
+
:param uri:
|
|
146
|
+
:type uri: str
|
|
147
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
148
|
+
number provided, it will be total request
|
|
149
|
+
timeout. It can also be a pair (tuple) of
|
|
150
|
+
(connection, read) timeouts.
|
|
151
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
152
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
153
|
+
request; this effectively ignores the
|
|
154
|
+
authentication in the spec for a single request.
|
|
155
|
+
:type _request_auth: dict, optional
|
|
156
|
+
:param _content_type: force content-type for the request.
|
|
157
|
+
:type _content_type: str, Optional
|
|
158
|
+
:param _headers: set to override the headers for a single
|
|
159
|
+
request; this effectively ignores the headers
|
|
160
|
+
in the spec for a single request.
|
|
161
|
+
:type _headers: dict, optional
|
|
162
|
+
:param _host_index: set to override the host_index for a single
|
|
163
|
+
request; this effectively ignores the host_index
|
|
164
|
+
in the spec for a single request.
|
|
165
|
+
:type _host_index: int, optional
|
|
166
|
+
:return: Returns the result object.
|
|
167
|
+
""" # noqa: E501
|
|
168
|
+
|
|
169
|
+
_param = self._add_tag_to_file_serialize(
|
|
170
|
+
add_tag_to_file_request=add_tag_to_file_request,
|
|
171
|
+
uri=uri,
|
|
172
|
+
_request_auth=_request_auth,
|
|
173
|
+
_content_type=_content_type,
|
|
174
|
+
_headers=_headers,
|
|
175
|
+
_host_index=_host_index
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
179
|
+
'201': None,
|
|
180
|
+
'400': None,
|
|
181
|
+
}
|
|
182
|
+
response_data = self.api_client.call_api(
|
|
183
|
+
*_param,
|
|
184
|
+
_request_timeout=_request_timeout
|
|
185
|
+
)
|
|
186
|
+
response_data.read()
|
|
187
|
+
return self.api_client.response_deserialize(
|
|
188
|
+
response_data=response_data,
|
|
189
|
+
response_types_map=_response_types_map,
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
@validate_call
|
|
194
|
+
def add_tag_to_file_without_preload_content(
|
|
195
|
+
self,
|
|
196
|
+
add_tag_to_file_request: AddTagToFileRequest,
|
|
197
|
+
uri: Optional[StrictStr] = None,
|
|
198
|
+
_request_timeout: Union[
|
|
199
|
+
None,
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
201
|
+
Tuple[
|
|
202
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
203
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
204
|
+
]
|
|
205
|
+
] = None,
|
|
206
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
207
|
+
_content_type: Optional[StrictStr] = None,
|
|
208
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
209
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
210
|
+
) -> RESTResponseType:
|
|
211
|
+
"""Add Tag To File
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
:param add_tag_to_file_request: (required)
|
|
215
|
+
:type add_tag_to_file_request: AddTagToFileRequest
|
|
216
|
+
:param uri:
|
|
217
|
+
:type uri: str
|
|
218
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
219
|
+
number provided, it will be total request
|
|
220
|
+
timeout. It can also be a pair (tuple) of
|
|
221
|
+
(connection, read) timeouts.
|
|
222
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
223
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
224
|
+
request; this effectively ignores the
|
|
225
|
+
authentication in the spec for a single request.
|
|
226
|
+
:type _request_auth: dict, optional
|
|
227
|
+
:param _content_type: force content-type for the request.
|
|
228
|
+
:type _content_type: str, Optional
|
|
229
|
+
:param _headers: set to override the headers for a single
|
|
230
|
+
request; this effectively ignores the headers
|
|
231
|
+
in the spec for a single request.
|
|
232
|
+
:type _headers: dict, optional
|
|
233
|
+
:param _host_index: set to override the host_index for a single
|
|
234
|
+
request; this effectively ignores the host_index
|
|
235
|
+
in the spec for a single request.
|
|
236
|
+
:type _host_index: int, optional
|
|
237
|
+
:return: Returns the result object.
|
|
238
|
+
""" # noqa: E501
|
|
239
|
+
|
|
240
|
+
_param = self._add_tag_to_file_serialize(
|
|
241
|
+
add_tag_to_file_request=add_tag_to_file_request,
|
|
242
|
+
uri=uri,
|
|
243
|
+
_request_auth=_request_auth,
|
|
244
|
+
_content_type=_content_type,
|
|
245
|
+
_headers=_headers,
|
|
246
|
+
_host_index=_host_index
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
250
|
+
'201': None,
|
|
251
|
+
'400': None,
|
|
252
|
+
}
|
|
253
|
+
response_data = self.api_client.call_api(
|
|
254
|
+
*_param,
|
|
255
|
+
_request_timeout=_request_timeout
|
|
256
|
+
)
|
|
257
|
+
return response_data.response
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
def _add_tag_to_file_serialize(
|
|
261
|
+
self,
|
|
262
|
+
add_tag_to_file_request,
|
|
263
|
+
uri,
|
|
264
|
+
_request_auth,
|
|
265
|
+
_content_type,
|
|
266
|
+
_headers,
|
|
267
|
+
_host_index,
|
|
268
|
+
) -> RequestSerialized:
|
|
269
|
+
|
|
270
|
+
_host = None
|
|
271
|
+
|
|
272
|
+
_collection_formats: Dict[str, str] = {
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
_path_params: Dict[str, str] = {}
|
|
276
|
+
_query_params: List[Tuple[str, str]] = []
|
|
277
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
278
|
+
_form_params: List[Tuple[str, str]] = []
|
|
279
|
+
_files: Dict[
|
|
280
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
281
|
+
] = {}
|
|
282
|
+
_body_params: Optional[bytes] = None
|
|
283
|
+
|
|
284
|
+
# process the path parameters
|
|
285
|
+
# process the query parameters
|
|
286
|
+
if uri is not None:
|
|
287
|
+
|
|
288
|
+
_query_params.append(('uri', uri))
|
|
289
|
+
|
|
290
|
+
# process the header parameters
|
|
291
|
+
# process the form parameters
|
|
292
|
+
# process the body parameter
|
|
293
|
+
if add_tag_to_file_request is not None:
|
|
294
|
+
_body_params = add_tag_to_file_request
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
# set the HTTP header `Content-Type`
|
|
299
|
+
if _content_type:
|
|
300
|
+
_header_params['Content-Type'] = _content_type
|
|
301
|
+
else:
|
|
302
|
+
_default_content_type = (
|
|
303
|
+
self.api_client.select_header_content_type(
|
|
304
|
+
[
|
|
305
|
+
'application/json'
|
|
306
|
+
]
|
|
307
|
+
)
|
|
308
|
+
)
|
|
309
|
+
if _default_content_type is not None:
|
|
310
|
+
_header_params['Content-Type'] = _default_content_type
|
|
311
|
+
|
|
312
|
+
# authentication setting
|
|
313
|
+
_auth_settings: List[str] = [
|
|
314
|
+
]
|
|
315
|
+
|
|
316
|
+
return self.api_client.param_serialize(
|
|
317
|
+
method='POST',
|
|
318
|
+
resource_path='/api/v1/resources/tag',
|
|
319
|
+
path_params=_path_params,
|
|
320
|
+
query_params=_query_params,
|
|
321
|
+
header_params=_header_params,
|
|
322
|
+
body=_body_params,
|
|
323
|
+
post_params=_form_params,
|
|
324
|
+
files=_files,
|
|
325
|
+
auth_settings=_auth_settings,
|
|
326
|
+
collection_formats=_collection_formats,
|
|
327
|
+
_host=_host,
|
|
328
|
+
_request_auth=_request_auth
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
49
334
|
@validate_call
|
|
50
335
|
def create_uri_folder(
|
|
51
336
|
self,
|
|
@@ -2176,6 +2461,289 @@ class UriResourceApi:
|
|
|
2176
2461
|
|
|
2177
2462
|
|
|
2178
2463
|
|
|
2464
|
+
@validate_call
|
|
2465
|
+
def remove_tag_from_file(
|
|
2466
|
+
self,
|
|
2467
|
+
remove_tag_from_file_request: RemoveTagFromFileRequest,
|
|
2468
|
+
uri: Optional[StrictStr] = None,
|
|
2469
|
+
_request_timeout: Union[
|
|
2470
|
+
None,
|
|
2471
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2472
|
+
Tuple[
|
|
2473
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2474
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2475
|
+
]
|
|
2476
|
+
] = None,
|
|
2477
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2478
|
+
_content_type: Optional[StrictStr] = None,
|
|
2479
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2480
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2481
|
+
) -> None:
|
|
2482
|
+
"""Remove Tag From File
|
|
2483
|
+
|
|
2484
|
+
|
|
2485
|
+
:param remove_tag_from_file_request: (required)
|
|
2486
|
+
:type remove_tag_from_file_request: RemoveTagFromFileRequest
|
|
2487
|
+
:param uri:
|
|
2488
|
+
:type uri: str
|
|
2489
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2490
|
+
number provided, it will be total request
|
|
2491
|
+
timeout. It can also be a pair (tuple) of
|
|
2492
|
+
(connection, read) timeouts.
|
|
2493
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2494
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2495
|
+
request; this effectively ignores the
|
|
2496
|
+
authentication in the spec for a single request.
|
|
2497
|
+
:type _request_auth: dict, optional
|
|
2498
|
+
:param _content_type: force content-type for the request.
|
|
2499
|
+
:type _content_type: str, Optional
|
|
2500
|
+
:param _headers: set to override the headers for a single
|
|
2501
|
+
request; this effectively ignores the headers
|
|
2502
|
+
in the spec for a single request.
|
|
2503
|
+
:type _headers: dict, optional
|
|
2504
|
+
:param _host_index: set to override the host_index for a single
|
|
2505
|
+
request; this effectively ignores the host_index
|
|
2506
|
+
in the spec for a single request.
|
|
2507
|
+
:type _host_index: int, optional
|
|
2508
|
+
:return: Returns the result object.
|
|
2509
|
+
""" # noqa: E501
|
|
2510
|
+
|
|
2511
|
+
_param = self._remove_tag_from_file_serialize(
|
|
2512
|
+
remove_tag_from_file_request=remove_tag_from_file_request,
|
|
2513
|
+
uri=uri,
|
|
2514
|
+
_request_auth=_request_auth,
|
|
2515
|
+
_content_type=_content_type,
|
|
2516
|
+
_headers=_headers,
|
|
2517
|
+
_host_index=_host_index
|
|
2518
|
+
)
|
|
2519
|
+
|
|
2520
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2521
|
+
'201': None,
|
|
2522
|
+
'400': None,
|
|
2523
|
+
}
|
|
2524
|
+
response_data = self.api_client.call_api(
|
|
2525
|
+
*_param,
|
|
2526
|
+
_request_timeout=_request_timeout
|
|
2527
|
+
)
|
|
2528
|
+
response_data.read()
|
|
2529
|
+
return self.api_client.response_deserialize(
|
|
2530
|
+
response_data=response_data,
|
|
2531
|
+
response_types_map=_response_types_map,
|
|
2532
|
+
).data
|
|
2533
|
+
|
|
2534
|
+
|
|
2535
|
+
@validate_call
|
|
2536
|
+
def remove_tag_from_file_with_http_info(
|
|
2537
|
+
self,
|
|
2538
|
+
remove_tag_from_file_request: RemoveTagFromFileRequest,
|
|
2539
|
+
uri: Optional[StrictStr] = None,
|
|
2540
|
+
_request_timeout: Union[
|
|
2541
|
+
None,
|
|
2542
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2543
|
+
Tuple[
|
|
2544
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2545
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2546
|
+
]
|
|
2547
|
+
] = None,
|
|
2548
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2549
|
+
_content_type: Optional[StrictStr] = None,
|
|
2550
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2551
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2552
|
+
) -> ApiResponse[None]:
|
|
2553
|
+
"""Remove Tag From File
|
|
2554
|
+
|
|
2555
|
+
|
|
2556
|
+
:param remove_tag_from_file_request: (required)
|
|
2557
|
+
:type remove_tag_from_file_request: RemoveTagFromFileRequest
|
|
2558
|
+
:param uri:
|
|
2559
|
+
:type uri: str
|
|
2560
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2561
|
+
number provided, it will be total request
|
|
2562
|
+
timeout. It can also be a pair (tuple) of
|
|
2563
|
+
(connection, read) timeouts.
|
|
2564
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2565
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2566
|
+
request; this effectively ignores the
|
|
2567
|
+
authentication in the spec for a single request.
|
|
2568
|
+
:type _request_auth: dict, optional
|
|
2569
|
+
:param _content_type: force content-type for the request.
|
|
2570
|
+
:type _content_type: str, Optional
|
|
2571
|
+
:param _headers: set to override the headers for a single
|
|
2572
|
+
request; this effectively ignores the headers
|
|
2573
|
+
in the spec for a single request.
|
|
2574
|
+
:type _headers: dict, optional
|
|
2575
|
+
:param _host_index: set to override the host_index for a single
|
|
2576
|
+
request; this effectively ignores the host_index
|
|
2577
|
+
in the spec for a single request.
|
|
2578
|
+
:type _host_index: int, optional
|
|
2579
|
+
:return: Returns the result object.
|
|
2580
|
+
""" # noqa: E501
|
|
2581
|
+
|
|
2582
|
+
_param = self._remove_tag_from_file_serialize(
|
|
2583
|
+
remove_tag_from_file_request=remove_tag_from_file_request,
|
|
2584
|
+
uri=uri,
|
|
2585
|
+
_request_auth=_request_auth,
|
|
2586
|
+
_content_type=_content_type,
|
|
2587
|
+
_headers=_headers,
|
|
2588
|
+
_host_index=_host_index
|
|
2589
|
+
)
|
|
2590
|
+
|
|
2591
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2592
|
+
'201': None,
|
|
2593
|
+
'400': None,
|
|
2594
|
+
}
|
|
2595
|
+
response_data = self.api_client.call_api(
|
|
2596
|
+
*_param,
|
|
2597
|
+
_request_timeout=_request_timeout
|
|
2598
|
+
)
|
|
2599
|
+
response_data.read()
|
|
2600
|
+
return self.api_client.response_deserialize(
|
|
2601
|
+
response_data=response_data,
|
|
2602
|
+
response_types_map=_response_types_map,
|
|
2603
|
+
)
|
|
2604
|
+
|
|
2605
|
+
|
|
2606
|
+
@validate_call
|
|
2607
|
+
def remove_tag_from_file_without_preload_content(
|
|
2608
|
+
self,
|
|
2609
|
+
remove_tag_from_file_request: RemoveTagFromFileRequest,
|
|
2610
|
+
uri: Optional[StrictStr] = None,
|
|
2611
|
+
_request_timeout: Union[
|
|
2612
|
+
None,
|
|
2613
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2614
|
+
Tuple[
|
|
2615
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2616
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2617
|
+
]
|
|
2618
|
+
] = None,
|
|
2619
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2620
|
+
_content_type: Optional[StrictStr] = None,
|
|
2621
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2622
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2623
|
+
) -> RESTResponseType:
|
|
2624
|
+
"""Remove Tag From File
|
|
2625
|
+
|
|
2626
|
+
|
|
2627
|
+
:param remove_tag_from_file_request: (required)
|
|
2628
|
+
:type remove_tag_from_file_request: RemoveTagFromFileRequest
|
|
2629
|
+
:param uri:
|
|
2630
|
+
:type uri: str
|
|
2631
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2632
|
+
number provided, it will be total request
|
|
2633
|
+
timeout. It can also be a pair (tuple) of
|
|
2634
|
+
(connection, read) timeouts.
|
|
2635
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2636
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2637
|
+
request; this effectively ignores the
|
|
2638
|
+
authentication in the spec for a single request.
|
|
2639
|
+
:type _request_auth: dict, optional
|
|
2640
|
+
:param _content_type: force content-type for the request.
|
|
2641
|
+
:type _content_type: str, Optional
|
|
2642
|
+
:param _headers: set to override the headers for a single
|
|
2643
|
+
request; this effectively ignores the headers
|
|
2644
|
+
in the spec for a single request.
|
|
2645
|
+
:type _headers: dict, optional
|
|
2646
|
+
:param _host_index: set to override the host_index for a single
|
|
2647
|
+
request; this effectively ignores the host_index
|
|
2648
|
+
in the spec for a single request.
|
|
2649
|
+
:type _host_index: int, optional
|
|
2650
|
+
:return: Returns the result object.
|
|
2651
|
+
""" # noqa: E501
|
|
2652
|
+
|
|
2653
|
+
_param = self._remove_tag_from_file_serialize(
|
|
2654
|
+
remove_tag_from_file_request=remove_tag_from_file_request,
|
|
2655
|
+
uri=uri,
|
|
2656
|
+
_request_auth=_request_auth,
|
|
2657
|
+
_content_type=_content_type,
|
|
2658
|
+
_headers=_headers,
|
|
2659
|
+
_host_index=_host_index
|
|
2660
|
+
)
|
|
2661
|
+
|
|
2662
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2663
|
+
'201': None,
|
|
2664
|
+
'400': None,
|
|
2665
|
+
}
|
|
2666
|
+
response_data = self.api_client.call_api(
|
|
2667
|
+
*_param,
|
|
2668
|
+
_request_timeout=_request_timeout
|
|
2669
|
+
)
|
|
2670
|
+
return response_data.response
|
|
2671
|
+
|
|
2672
|
+
|
|
2673
|
+
def _remove_tag_from_file_serialize(
|
|
2674
|
+
self,
|
|
2675
|
+
remove_tag_from_file_request,
|
|
2676
|
+
uri,
|
|
2677
|
+
_request_auth,
|
|
2678
|
+
_content_type,
|
|
2679
|
+
_headers,
|
|
2680
|
+
_host_index,
|
|
2681
|
+
) -> RequestSerialized:
|
|
2682
|
+
|
|
2683
|
+
_host = None
|
|
2684
|
+
|
|
2685
|
+
_collection_formats: Dict[str, str] = {
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
_path_params: Dict[str, str] = {}
|
|
2689
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2690
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2691
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2692
|
+
_files: Dict[
|
|
2693
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2694
|
+
] = {}
|
|
2695
|
+
_body_params: Optional[bytes] = None
|
|
2696
|
+
|
|
2697
|
+
# process the path parameters
|
|
2698
|
+
# process the query parameters
|
|
2699
|
+
if uri is not None:
|
|
2700
|
+
|
|
2701
|
+
_query_params.append(('uri', uri))
|
|
2702
|
+
|
|
2703
|
+
# process the header parameters
|
|
2704
|
+
# process the form parameters
|
|
2705
|
+
# process the body parameter
|
|
2706
|
+
if remove_tag_from_file_request is not None:
|
|
2707
|
+
_body_params = remove_tag_from_file_request
|
|
2708
|
+
|
|
2709
|
+
|
|
2710
|
+
|
|
2711
|
+
# set the HTTP header `Content-Type`
|
|
2712
|
+
if _content_type:
|
|
2713
|
+
_header_params['Content-Type'] = _content_type
|
|
2714
|
+
else:
|
|
2715
|
+
_default_content_type = (
|
|
2716
|
+
self.api_client.select_header_content_type(
|
|
2717
|
+
[
|
|
2718
|
+
'application/json'
|
|
2719
|
+
]
|
|
2720
|
+
)
|
|
2721
|
+
)
|
|
2722
|
+
if _default_content_type is not None:
|
|
2723
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2724
|
+
|
|
2725
|
+
# authentication setting
|
|
2726
|
+
_auth_settings: List[str] = [
|
|
2727
|
+
]
|
|
2728
|
+
|
|
2729
|
+
return self.api_client.param_serialize(
|
|
2730
|
+
method='POST',
|
|
2731
|
+
resource_path='/api/v1/resources/untag',
|
|
2732
|
+
path_params=_path_params,
|
|
2733
|
+
query_params=_query_params,
|
|
2734
|
+
header_params=_header_params,
|
|
2735
|
+
body=_body_params,
|
|
2736
|
+
post_params=_form_params,
|
|
2737
|
+
files=_files,
|
|
2738
|
+
auth_settings=_auth_settings,
|
|
2739
|
+
collection_formats=_collection_formats,
|
|
2740
|
+
_host=_host,
|
|
2741
|
+
_request_auth=_request_auth
|
|
2742
|
+
)
|
|
2743
|
+
|
|
2744
|
+
|
|
2745
|
+
|
|
2746
|
+
|
|
2179
2747
|
@validate_call
|
|
2180
2748
|
def upload_resource(
|
|
2181
2749
|
self,
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
# import models into model package
|
|
17
17
|
from perceptic_core_client.models.action_type import ActionType
|
|
18
|
+
from perceptic_core_client.models.add_tag_to_file_request import AddTagToFileRequest
|
|
18
19
|
from perceptic_core_client.models.azure_blob_connection_settings_api_dto import AzureBlobConnectionSettingsApiDto
|
|
19
20
|
from perceptic_core_client.models.azure_blob_file_system_root_metadata_api_dto import AzureBlobFileSystemRootMetadataApiDto
|
|
20
21
|
from perceptic_core_client.models.connection_api_dto import ConnectionApiDto
|
|
@@ -74,6 +75,7 @@ from perceptic_core_client.models.post_worker_run_request import PostWorkerRunRe
|
|
|
74
75
|
from perceptic_core_client.models.post_worker_run_response import PostWorkerRunResponse
|
|
75
76
|
from perceptic_core_client.models.progress_event import ProgressEvent
|
|
76
77
|
from perceptic_core_client.models.remote_file_system_api_dto import RemoteFileSystemApiDto
|
|
78
|
+
from perceptic_core_client.models.remove_tag_from_file_request import RemoveTagFromFileRequest
|
|
77
79
|
from perceptic_core_client.models.request_for_input_event import RequestForInputEvent
|
|
78
80
|
from perceptic_core_client.models.resource_entry_dto import ResourceEntryDto
|
|
79
81
|
from perceptic_core_client.models.resource_identifier import ResourceIdentifier
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
perceptic-core-server API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class AddTagToFileRequest(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AddTagToFileRequest
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
tag_rid: Optional[StrictStr] = Field(default=None, alias="tagRid")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["tagRid"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of AddTagToFileRequest from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of AddTagToFileRequest from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"tagRid": obj.get("tagRid")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|