crc-pulp-file-client 20251209.2__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 crc-pulp-file-client might be problematic. Click here for more details.

Files changed (62) hide show
  1. crc_pulp_file_client-20251209.2.dist-info/METADATA +8160 -0
  2. crc_pulp_file_client-20251209.2.dist-info/RECORD +62 -0
  3. crc_pulp_file_client-20251209.2.dist-info/WHEEL +5 -0
  4. crc_pulp_file_client-20251209.2.dist-info/top_level.txt +1 -0
  5. pulpcore/__init__.py +2 -0
  6. pulpcore/client/__init__.py +2 -0
  7. pulpcore/client/pulp_file/__init__.py +80 -0
  8. pulpcore/client/pulp_file/api/__init__.py +11 -0
  9. pulpcore/client/pulp_file/api/acs_file_api.py +3695 -0
  10. pulpcore/client/pulp_file/api/content_files_api.py +2472 -0
  11. pulpcore/client/pulp_file/api/distributions_file_api.py +4192 -0
  12. pulpcore/client/pulp_file/api/publications_file_api.py +2881 -0
  13. pulpcore/client/pulp_file/api/remotes_file_api.py +4220 -0
  14. pulpcore/client/pulp_file/api/repositories_file_api.py +4862 -0
  15. pulpcore/client/pulp_file/api/repositories_file_versions_api.py +1670 -0
  16. pulpcore/client/pulp_file/api_client.py +798 -0
  17. pulpcore/client/pulp_file/api_response.py +21 -0
  18. pulpcore/client/pulp_file/configuration.py +628 -0
  19. pulpcore/client/pulp_file/exceptions.py +200 -0
  20. pulpcore/client/pulp_file/models/__init__.py +57 -0
  21. pulpcore/client/pulp_file/models/async_operation_response.py +88 -0
  22. pulpcore/client/pulp_file/models/content_summary_response.py +92 -0
  23. pulpcore/client/pulp_file/models/file_content_upload_response.py +137 -0
  24. pulpcore/client/pulp_file/models/file_file_alternate_content_source.py +101 -0
  25. pulpcore/client/pulp_file/models/file_file_alternate_content_source_response.py +116 -0
  26. pulpcore/client/pulp_file/models/file_file_content_response.py +137 -0
  27. pulpcore/client/pulp_file/models/file_file_distribution.py +118 -0
  28. pulpcore/client/pulp_file/models/file_file_distribution_response.py +142 -0
  29. pulpcore/client/pulp_file/models/file_file_publication.py +100 -0
  30. pulpcore/client/pulp_file/models/file_file_publication_response.py +120 -0
  31. pulpcore/client/pulp_file/models/file_file_remote.py +205 -0
  32. pulpcore/client/pulp_file/models/file_file_remote_response.py +199 -0
  33. pulpcore/client/pulp_file/models/file_file_remote_response_hidden_fields_inner.py +90 -0
  34. pulpcore/client/pulp_file/models/file_file_repository.py +121 -0
  35. pulpcore/client/pulp_file/models/file_file_repository_response.py +146 -0
  36. pulpcore/client/pulp_file/models/my_permissions_response.py +88 -0
  37. pulpcore/client/pulp_file/models/nested_role.py +93 -0
  38. pulpcore/client/pulp_file/models/nested_role_response.py +92 -0
  39. pulpcore/client/pulp_file/models/object_roles_response.py +96 -0
  40. pulpcore/client/pulp_file/models/paginated_repository_version_response_list.py +112 -0
  41. pulpcore/client/pulp_file/models/paginatedfile_file_alternate_content_source_response_list.py +112 -0
  42. pulpcore/client/pulp_file/models/paginatedfile_file_content_response_list.py +112 -0
  43. pulpcore/client/pulp_file/models/paginatedfile_file_distribution_response_list.py +112 -0
  44. pulpcore/client/pulp_file/models/paginatedfile_file_publication_response_list.py +112 -0
  45. pulpcore/client/pulp_file/models/paginatedfile_file_remote_response_list.py +112 -0
  46. pulpcore/client/pulp_file/models/paginatedfile_file_repository_response_list.py +112 -0
  47. pulpcore/client/pulp_file/models/patchedfile_file_alternate_content_source.py +101 -0
  48. pulpcore/client/pulp_file/models/patchedfile_file_distribution.py +118 -0
  49. pulpcore/client/pulp_file/models/patchedfile_file_remote.py +205 -0
  50. pulpcore/client/pulp_file/models/patchedfile_file_repository.py +121 -0
  51. pulpcore/client/pulp_file/models/policy_enum.py +39 -0
  52. pulpcore/client/pulp_file/models/repair.py +88 -0
  53. pulpcore/client/pulp_file/models/repository_add_remove_content.py +93 -0
  54. pulpcore/client/pulp_file/models/repository_sync_url.py +90 -0
  55. pulpcore/client/pulp_file/models/repository_version_response.py +125 -0
  56. pulpcore/client/pulp_file/models/set_label.py +103 -0
  57. pulpcore/client/pulp_file/models/set_label_response.py +103 -0
  58. pulpcore/client/pulp_file/models/task_group_operation_response.py +88 -0
  59. pulpcore/client/pulp_file/models/unset_label.py +96 -0
  60. pulpcore/client/pulp_file/models/unset_label_response.py +100 -0
  61. pulpcore/client/pulp_file/py.typed +0 -0
  62. pulpcore/client/pulp_file/rest.py +258 -0
@@ -0,0 +1,4862 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pulp 3 API
5
+
6
+ Fetch, Upload, Organize, and Distribute Software Packages
7
+
8
+ The version of the OpenAPI document: v3
9
+ Contact: pulp-list@redhat.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
21
+ from typing import List, Optional
22
+ from typing_extensions import Annotated
23
+ from pulpcore.client.pulp_file.models.async_operation_response import AsyncOperationResponse
24
+ from pulpcore.client.pulp_file.models.file_file_repository import FileFileRepository
25
+ from pulpcore.client.pulp_file.models.file_file_repository_response import FileFileRepositoryResponse
26
+ from pulpcore.client.pulp_file.models.my_permissions_response import MyPermissionsResponse
27
+ from pulpcore.client.pulp_file.models.nested_role import NestedRole
28
+ from pulpcore.client.pulp_file.models.nested_role_response import NestedRoleResponse
29
+ from pulpcore.client.pulp_file.models.object_roles_response import ObjectRolesResponse
30
+ from pulpcore.client.pulp_file.models.paginatedfile_file_repository_response_list import PaginatedfileFileRepositoryResponseList
31
+ from pulpcore.client.pulp_file.models.patchedfile_file_repository import PatchedfileFileRepository
32
+ from pulpcore.client.pulp_file.models.repository_add_remove_content import RepositoryAddRemoveContent
33
+ from pulpcore.client.pulp_file.models.repository_sync_url import RepositorySyncURL
34
+ from pulpcore.client.pulp_file.models.set_label import SetLabel
35
+ from pulpcore.client.pulp_file.models.set_label_response import SetLabelResponse
36
+ from pulpcore.client.pulp_file.models.unset_label import UnsetLabel
37
+ from pulpcore.client.pulp_file.models.unset_label_response import UnsetLabelResponse
38
+
39
+ from pulpcore.client.pulp_file.api_client import ApiClient, RequestSerialized
40
+ from pulpcore.client.pulp_file.api_response import ApiResponse
41
+ from pulpcore.client.pulp_file.rest import RESTResponseType
42
+
43
+
44
+ class RepositoriesFileApi:
45
+ """NOTE: This class is auto generated by OpenAPI Generator
46
+ Ref: https://openapi-generator.tech
47
+
48
+ Do not edit the class manually.
49
+ """
50
+
51
+ def __init__(self, api_client=None) -> None:
52
+ if api_client is None:
53
+ api_client = ApiClient.get_default()
54
+ self.api_client = api_client
55
+
56
+
57
+ @validate_call
58
+ def add_role(
59
+ self,
60
+ file_file_repository_href: StrictStr,
61
+ nested_role: NestedRole,
62
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
63
+ _request_timeout: Union[
64
+ None,
65
+ Annotated[StrictFloat, Field(gt=0)],
66
+ Tuple[
67
+ Annotated[StrictFloat, Field(gt=0)],
68
+ Annotated[StrictFloat, Field(gt=0)]
69
+ ]
70
+ ] = None,
71
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
72
+ _content_type: Optional[StrictStr] = None,
73
+ _headers: Optional[Dict[StrictStr, Any]] = None,
74
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
75
+ ) -> NestedRoleResponse:
76
+ """Add a role
77
+
78
+ Add a role for this object to users/groups.
79
+
80
+ :param file_file_repository_href: (required)
81
+ :type file_file_repository_href: str
82
+ :param nested_role: (required)
83
+ :type nested_role: NestedRole
84
+ :param x_task_diagnostics: List of profilers to use on tasks.
85
+ :type x_task_diagnostics: List[str]
86
+ :param _request_timeout: timeout setting for this request. If one
87
+ number provided, it will be total request
88
+ timeout. It can also be a pair (tuple) of
89
+ (connection, read) timeouts.
90
+ :type _request_timeout: int, tuple(int, int), optional
91
+ :param _request_auth: set to override the auth_settings for an a single
92
+ request; this effectively ignores the
93
+ authentication in the spec for a single request.
94
+ :type _request_auth: dict, optional
95
+ :param _content_type: force content-type for the request.
96
+ :type _content_type: str, Optional
97
+ :param _headers: set to override the headers for a single
98
+ request; this effectively ignores the headers
99
+ in the spec for a single request.
100
+ :type _headers: dict, optional
101
+ :param _host_index: set to override the host_index for a single
102
+ request; this effectively ignores the host_index
103
+ in the spec for a single request.
104
+ :type _host_index: int, optional
105
+ :return: Returns the result object.
106
+ """ # noqa: E501
107
+
108
+ _param = self._add_role_serialize(
109
+ file_file_repository_href=file_file_repository_href,
110
+ nested_role=nested_role,
111
+ x_task_diagnostics=x_task_diagnostics,
112
+ _request_auth=_request_auth,
113
+ _content_type=_content_type,
114
+ _headers=_headers,
115
+ _host_index=_host_index
116
+ )
117
+
118
+ _response_types_map: Dict[str, Optional[str]] = {
119
+ '201': "NestedRoleResponse",
120
+ }
121
+ response_data = self.api_client.call_api(
122
+ *_param,
123
+ _request_timeout=_request_timeout
124
+ )
125
+ response_data.read()
126
+ return self.api_client.response_deserialize(
127
+ response_data=response_data,
128
+ response_types_map=_response_types_map,
129
+ ).data
130
+
131
+
132
+ @validate_call
133
+ def add_role_with_http_info(
134
+ self,
135
+ file_file_repository_href: StrictStr,
136
+ nested_role: NestedRole,
137
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
138
+ _request_timeout: Union[
139
+ None,
140
+ Annotated[StrictFloat, Field(gt=0)],
141
+ Tuple[
142
+ Annotated[StrictFloat, Field(gt=0)],
143
+ Annotated[StrictFloat, Field(gt=0)]
144
+ ]
145
+ ] = None,
146
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
147
+ _content_type: Optional[StrictStr] = None,
148
+ _headers: Optional[Dict[StrictStr, Any]] = None,
149
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
150
+ ) -> ApiResponse[NestedRoleResponse]:
151
+ """Add a role
152
+
153
+ Add a role for this object to users/groups.
154
+
155
+ :param file_file_repository_href: (required)
156
+ :type file_file_repository_href: str
157
+ :param nested_role: (required)
158
+ :type nested_role: NestedRole
159
+ :param x_task_diagnostics: List of profilers to use on tasks.
160
+ :type x_task_diagnostics: List[str]
161
+ :param _request_timeout: timeout setting for this request. If one
162
+ number provided, it will be total request
163
+ timeout. It can also be a pair (tuple) of
164
+ (connection, read) timeouts.
165
+ :type _request_timeout: int, tuple(int, int), optional
166
+ :param _request_auth: set to override the auth_settings for an a single
167
+ request; this effectively ignores the
168
+ authentication in the spec for a single request.
169
+ :type _request_auth: dict, optional
170
+ :param _content_type: force content-type for the request.
171
+ :type _content_type: str, Optional
172
+ :param _headers: set to override the headers for a single
173
+ request; this effectively ignores the headers
174
+ in the spec for a single request.
175
+ :type _headers: dict, optional
176
+ :param _host_index: set to override the host_index for a single
177
+ request; this effectively ignores the host_index
178
+ in the spec for a single request.
179
+ :type _host_index: int, optional
180
+ :return: Returns the result object.
181
+ """ # noqa: E501
182
+
183
+ _param = self._add_role_serialize(
184
+ file_file_repository_href=file_file_repository_href,
185
+ nested_role=nested_role,
186
+ x_task_diagnostics=x_task_diagnostics,
187
+ _request_auth=_request_auth,
188
+ _content_type=_content_type,
189
+ _headers=_headers,
190
+ _host_index=_host_index
191
+ )
192
+
193
+ _response_types_map: Dict[str, Optional[str]] = {
194
+ '201': "NestedRoleResponse",
195
+ }
196
+ response_data = self.api_client.call_api(
197
+ *_param,
198
+ _request_timeout=_request_timeout
199
+ )
200
+ response_data.read()
201
+ return self.api_client.response_deserialize(
202
+ response_data=response_data,
203
+ response_types_map=_response_types_map,
204
+ )
205
+
206
+
207
+ @validate_call
208
+ def add_role_without_preload_content(
209
+ self,
210
+ file_file_repository_href: StrictStr,
211
+ nested_role: NestedRole,
212
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
213
+ _request_timeout: Union[
214
+ None,
215
+ Annotated[StrictFloat, Field(gt=0)],
216
+ Tuple[
217
+ Annotated[StrictFloat, Field(gt=0)],
218
+ Annotated[StrictFloat, Field(gt=0)]
219
+ ]
220
+ ] = None,
221
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
222
+ _content_type: Optional[StrictStr] = None,
223
+ _headers: Optional[Dict[StrictStr, Any]] = None,
224
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
225
+ ) -> RESTResponseType:
226
+ """Add a role
227
+
228
+ Add a role for this object to users/groups.
229
+
230
+ :param file_file_repository_href: (required)
231
+ :type file_file_repository_href: str
232
+ :param nested_role: (required)
233
+ :type nested_role: NestedRole
234
+ :param x_task_diagnostics: List of profilers to use on tasks.
235
+ :type x_task_diagnostics: List[str]
236
+ :param _request_timeout: timeout setting for this request. If one
237
+ number provided, it will be total request
238
+ timeout. It can also be a pair (tuple) of
239
+ (connection, read) timeouts.
240
+ :type _request_timeout: int, tuple(int, int), optional
241
+ :param _request_auth: set to override the auth_settings for an a single
242
+ request; this effectively ignores the
243
+ authentication in the spec for a single request.
244
+ :type _request_auth: dict, optional
245
+ :param _content_type: force content-type for the request.
246
+ :type _content_type: str, Optional
247
+ :param _headers: set to override the headers for a single
248
+ request; this effectively ignores the headers
249
+ in the spec for a single request.
250
+ :type _headers: dict, optional
251
+ :param _host_index: set to override the host_index for a single
252
+ request; this effectively ignores the host_index
253
+ in the spec for a single request.
254
+ :type _host_index: int, optional
255
+ :return: Returns the result object.
256
+ """ # noqa: E501
257
+
258
+ _param = self._add_role_serialize(
259
+ file_file_repository_href=file_file_repository_href,
260
+ nested_role=nested_role,
261
+ x_task_diagnostics=x_task_diagnostics,
262
+ _request_auth=_request_auth,
263
+ _content_type=_content_type,
264
+ _headers=_headers,
265
+ _host_index=_host_index
266
+ )
267
+
268
+ _response_types_map: Dict[str, Optional[str]] = {
269
+ '201': "NestedRoleResponse",
270
+ }
271
+ response_data = self.api_client.call_api(
272
+ *_param,
273
+ _request_timeout=_request_timeout
274
+ )
275
+ return response_data.response
276
+
277
+
278
+ def _add_role_serialize(
279
+ self,
280
+ file_file_repository_href,
281
+ nested_role,
282
+ x_task_diagnostics,
283
+ _request_auth,
284
+ _content_type,
285
+ _headers,
286
+ _host_index,
287
+ ) -> RequestSerialized:
288
+
289
+ _host = None
290
+
291
+ _collection_formats: Dict[str, str] = {
292
+ 'X-Task-Diagnostics': 'csv',
293
+ }
294
+
295
+ _path_params: Dict[str, str] = {}
296
+ _query_params: List[Tuple[str, str]] = []
297
+ _header_params: Dict[str, Optional[str]] = _headers or {}
298
+ _form_params: List[Tuple[str, str]] = []
299
+ _files: Dict[
300
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
301
+ ] = {}
302
+ _body_params: Optional[bytes] = None
303
+
304
+ # process the path parameters
305
+ if file_file_repository_href is not None:
306
+ _path_params['file_file_repository_href'] = file_file_repository_href
307
+ # process the query parameters
308
+ # process the header parameters
309
+ if x_task_diagnostics is not None:
310
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
311
+ # process the form parameters
312
+ # process the body parameter
313
+ if nested_role is not None:
314
+ _body_params = nested_role
315
+
316
+
317
+ # set the HTTP header `Accept`
318
+ if 'Accept' not in _header_params:
319
+ _header_params['Accept'] = self.api_client.select_header_accept(
320
+ [
321
+ 'application/json'
322
+ ]
323
+ )
324
+
325
+ # set the HTTP header `Content-Type`
326
+ if _content_type:
327
+ _header_params['Content-Type'] = _content_type
328
+ else:
329
+ _default_content_type = (
330
+ self.api_client.select_header_content_type(
331
+ [
332
+ 'application/json',
333
+ 'application/x-www-form-urlencoded',
334
+ 'multipart/form-data'
335
+ ]
336
+ )
337
+ )
338
+ if _default_content_type is not None:
339
+ _header_params['Content-Type'] = _default_content_type
340
+
341
+ # authentication setting
342
+ _auth_settings: List[str] = [
343
+ 'json_header_remote_authentication',
344
+ 'basicAuth',
345
+ 'cookieAuth'
346
+ ]
347
+
348
+ return self.api_client.param_serialize(
349
+ method='POST',
350
+ resource_path='{file_file_repository_href}add_role/',
351
+ path_params=_path_params,
352
+ query_params=_query_params,
353
+ header_params=_header_params,
354
+ body=_body_params,
355
+ post_params=_form_params,
356
+ files=_files,
357
+ auth_settings=_auth_settings,
358
+ collection_formats=_collection_formats,
359
+ _host=_host,
360
+ _request_auth=_request_auth
361
+ )
362
+
363
+
364
+
365
+
366
+ @validate_call
367
+ def create(
368
+ self,
369
+ file_file_repository: FileFileRepository,
370
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
371
+ pulp_domain: StrictStr = "default",
372
+ _request_timeout: Union[
373
+ None,
374
+ Annotated[StrictFloat, Field(gt=0)],
375
+ Tuple[
376
+ Annotated[StrictFloat, Field(gt=0)],
377
+ Annotated[StrictFloat, Field(gt=0)]
378
+ ]
379
+ ] = None,
380
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
381
+ _content_type: Optional[StrictStr] = None,
382
+ _headers: Optional[Dict[StrictStr, Any]] = None,
383
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
384
+ ) -> FileFileRepositoryResponse:
385
+ """Create a file repository
386
+
387
+ FileRepository represents a single file repository, to which content can be synced, added, or removed.
388
+
389
+ :param pulp_domain: (required)
390
+ :type pulp_domain: str
391
+ :param file_file_repository: (required)
392
+ :type file_file_repository: FileFileRepository
393
+ :param x_task_diagnostics: List of profilers to use on tasks.
394
+ :type x_task_diagnostics: List[str]
395
+ :param _request_timeout: timeout setting for this request. If one
396
+ number provided, it will be total request
397
+ timeout. It can also be a pair (tuple) of
398
+ (connection, read) timeouts.
399
+ :type _request_timeout: int, tuple(int, int), optional
400
+ :param _request_auth: set to override the auth_settings for an a single
401
+ request; this effectively ignores the
402
+ authentication in the spec for a single request.
403
+ :type _request_auth: dict, optional
404
+ :param _content_type: force content-type for the request.
405
+ :type _content_type: str, Optional
406
+ :param _headers: set to override the headers for a single
407
+ request; this effectively ignores the headers
408
+ in the spec for a single request.
409
+ :type _headers: dict, optional
410
+ :param _host_index: set to override the host_index for a single
411
+ request; this effectively ignores the host_index
412
+ in the spec for a single request.
413
+ :type _host_index: int, optional
414
+ :return: Returns the result object.
415
+ """ # noqa: E501
416
+
417
+ _param = self._create_serialize(
418
+ pulp_domain=pulp_domain,
419
+ file_file_repository=file_file_repository,
420
+ x_task_diagnostics=x_task_diagnostics,
421
+ _request_auth=_request_auth,
422
+ _content_type=_content_type,
423
+ _headers=_headers,
424
+ _host_index=_host_index
425
+ )
426
+
427
+ _response_types_map: Dict[str, Optional[str]] = {
428
+ '201': "FileFileRepositoryResponse",
429
+ }
430
+ response_data = self.api_client.call_api(
431
+ *_param,
432
+ _request_timeout=_request_timeout
433
+ )
434
+ response_data.read()
435
+ return self.api_client.response_deserialize(
436
+ response_data=response_data,
437
+ response_types_map=_response_types_map,
438
+ ).data
439
+
440
+
441
+ @validate_call
442
+ def create_with_http_info(
443
+ self,
444
+ file_file_repository: FileFileRepository,
445
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
446
+ pulp_domain: StrictStr = "default",
447
+ _request_timeout: Union[
448
+ None,
449
+ Annotated[StrictFloat, Field(gt=0)],
450
+ Tuple[
451
+ Annotated[StrictFloat, Field(gt=0)],
452
+ Annotated[StrictFloat, Field(gt=0)]
453
+ ]
454
+ ] = None,
455
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
456
+ _content_type: Optional[StrictStr] = None,
457
+ _headers: Optional[Dict[StrictStr, Any]] = None,
458
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
459
+ ) -> ApiResponse[FileFileRepositoryResponse]:
460
+ """Create a file repository
461
+
462
+ FileRepository represents a single file repository, to which content can be synced, added, or removed.
463
+
464
+ :param pulp_domain: (required)
465
+ :type pulp_domain: str
466
+ :param file_file_repository: (required)
467
+ :type file_file_repository: FileFileRepository
468
+ :param x_task_diagnostics: List of profilers to use on tasks.
469
+ :type x_task_diagnostics: List[str]
470
+ :param _request_timeout: timeout setting for this request. If one
471
+ number provided, it will be total request
472
+ timeout. It can also be a pair (tuple) of
473
+ (connection, read) timeouts.
474
+ :type _request_timeout: int, tuple(int, int), optional
475
+ :param _request_auth: set to override the auth_settings for an a single
476
+ request; this effectively ignores the
477
+ authentication in the spec for a single request.
478
+ :type _request_auth: dict, optional
479
+ :param _content_type: force content-type for the request.
480
+ :type _content_type: str, Optional
481
+ :param _headers: set to override the headers for a single
482
+ request; this effectively ignores the headers
483
+ in the spec for a single request.
484
+ :type _headers: dict, optional
485
+ :param _host_index: set to override the host_index for a single
486
+ request; this effectively ignores the host_index
487
+ in the spec for a single request.
488
+ :type _host_index: int, optional
489
+ :return: Returns the result object.
490
+ """ # noqa: E501
491
+
492
+ _param = self._create_serialize(
493
+ pulp_domain=pulp_domain,
494
+ file_file_repository=file_file_repository,
495
+ x_task_diagnostics=x_task_diagnostics,
496
+ _request_auth=_request_auth,
497
+ _content_type=_content_type,
498
+ _headers=_headers,
499
+ _host_index=_host_index
500
+ )
501
+
502
+ _response_types_map: Dict[str, Optional[str]] = {
503
+ '201': "FileFileRepositoryResponse",
504
+ }
505
+ response_data = self.api_client.call_api(
506
+ *_param,
507
+ _request_timeout=_request_timeout
508
+ )
509
+ response_data.read()
510
+ return self.api_client.response_deserialize(
511
+ response_data=response_data,
512
+ response_types_map=_response_types_map,
513
+ )
514
+
515
+
516
+ @validate_call
517
+ def create_without_preload_content(
518
+ self,
519
+ file_file_repository: FileFileRepository,
520
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
521
+ pulp_domain: StrictStr = "default",
522
+ _request_timeout: Union[
523
+ None,
524
+ Annotated[StrictFloat, Field(gt=0)],
525
+ Tuple[
526
+ Annotated[StrictFloat, Field(gt=0)],
527
+ Annotated[StrictFloat, Field(gt=0)]
528
+ ]
529
+ ] = None,
530
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
531
+ _content_type: Optional[StrictStr] = None,
532
+ _headers: Optional[Dict[StrictStr, Any]] = None,
533
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
534
+ ) -> RESTResponseType:
535
+ """Create a file repository
536
+
537
+ FileRepository represents a single file repository, to which content can be synced, added, or removed.
538
+
539
+ :param pulp_domain: (required)
540
+ :type pulp_domain: str
541
+ :param file_file_repository: (required)
542
+ :type file_file_repository: FileFileRepository
543
+ :param x_task_diagnostics: List of profilers to use on tasks.
544
+ :type x_task_diagnostics: List[str]
545
+ :param _request_timeout: timeout setting for this request. If one
546
+ number provided, it will be total request
547
+ timeout. It can also be a pair (tuple) of
548
+ (connection, read) timeouts.
549
+ :type _request_timeout: int, tuple(int, int), optional
550
+ :param _request_auth: set to override the auth_settings for an a single
551
+ request; this effectively ignores the
552
+ authentication in the spec for a single request.
553
+ :type _request_auth: dict, optional
554
+ :param _content_type: force content-type for the request.
555
+ :type _content_type: str, Optional
556
+ :param _headers: set to override the headers for a single
557
+ request; this effectively ignores the headers
558
+ in the spec for a single request.
559
+ :type _headers: dict, optional
560
+ :param _host_index: set to override the host_index for a single
561
+ request; this effectively ignores the host_index
562
+ in the spec for a single request.
563
+ :type _host_index: int, optional
564
+ :return: Returns the result object.
565
+ """ # noqa: E501
566
+
567
+ _param = self._create_serialize(
568
+ pulp_domain=pulp_domain,
569
+ file_file_repository=file_file_repository,
570
+ x_task_diagnostics=x_task_diagnostics,
571
+ _request_auth=_request_auth,
572
+ _content_type=_content_type,
573
+ _headers=_headers,
574
+ _host_index=_host_index
575
+ )
576
+
577
+ _response_types_map: Dict[str, Optional[str]] = {
578
+ '201': "FileFileRepositoryResponse",
579
+ }
580
+ response_data = self.api_client.call_api(
581
+ *_param,
582
+ _request_timeout=_request_timeout
583
+ )
584
+ return response_data.response
585
+
586
+
587
+ def _create_serialize(
588
+ self,
589
+ pulp_domain,
590
+ file_file_repository,
591
+ x_task_diagnostics,
592
+ _request_auth,
593
+ _content_type,
594
+ _headers,
595
+ _host_index,
596
+ ) -> RequestSerialized:
597
+
598
+ _host = None
599
+
600
+ _collection_formats: Dict[str, str] = {
601
+ 'X-Task-Diagnostics': 'csv',
602
+ }
603
+
604
+ _path_params: Dict[str, str] = {}
605
+ _query_params: List[Tuple[str, str]] = []
606
+ _header_params: Dict[str, Optional[str]] = _headers or {}
607
+ _form_params: List[Tuple[str, str]] = []
608
+ _files: Dict[
609
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
610
+ ] = {}
611
+ _body_params: Optional[bytes] = None
612
+
613
+ # process the path parameters
614
+ if pulp_domain is not None:
615
+ _path_params['pulp_domain'] = pulp_domain
616
+ # process the query parameters
617
+ # process the header parameters
618
+ if x_task_diagnostics is not None:
619
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
620
+ # process the form parameters
621
+ # process the body parameter
622
+ if file_file_repository is not None:
623
+ _body_params = file_file_repository
624
+
625
+
626
+ # set the HTTP header `Accept`
627
+ if 'Accept' not in _header_params:
628
+ _header_params['Accept'] = self.api_client.select_header_accept(
629
+ [
630
+ 'application/json'
631
+ ]
632
+ )
633
+
634
+ # set the HTTP header `Content-Type`
635
+ if _content_type:
636
+ _header_params['Content-Type'] = _content_type
637
+ else:
638
+ _default_content_type = (
639
+ self.api_client.select_header_content_type(
640
+ [
641
+ 'application/json',
642
+ 'application/x-www-form-urlencoded',
643
+ 'multipart/form-data'
644
+ ]
645
+ )
646
+ )
647
+ if _default_content_type is not None:
648
+ _header_params['Content-Type'] = _default_content_type
649
+
650
+ # authentication setting
651
+ _auth_settings: List[str] = [
652
+ 'json_header_remote_authentication',
653
+ 'basicAuth',
654
+ 'cookieAuth'
655
+ ]
656
+
657
+ return self.api_client.param_serialize(
658
+ method='POST',
659
+ resource_path='/api/pulp/{pulp_domain}/api/v3/repositories/file/file/',
660
+ path_params=_path_params,
661
+ query_params=_query_params,
662
+ header_params=_header_params,
663
+ body=_body_params,
664
+ post_params=_form_params,
665
+ files=_files,
666
+ auth_settings=_auth_settings,
667
+ collection_formats=_collection_formats,
668
+ _host=_host,
669
+ _request_auth=_request_auth
670
+ )
671
+
672
+
673
+
674
+
675
+ @validate_call
676
+ def delete(
677
+ self,
678
+ file_file_repository_href: StrictStr,
679
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
680
+ _request_timeout: Union[
681
+ None,
682
+ Annotated[StrictFloat, Field(gt=0)],
683
+ Tuple[
684
+ Annotated[StrictFloat, Field(gt=0)],
685
+ Annotated[StrictFloat, Field(gt=0)]
686
+ ]
687
+ ] = None,
688
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
689
+ _content_type: Optional[StrictStr] = None,
690
+ _headers: Optional[Dict[StrictStr, Any]] = None,
691
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
692
+ ) -> AsyncOperationResponse:
693
+ """Delete a file repository
694
+
695
+ Trigger an asynchronous delete task
696
+
697
+ :param file_file_repository_href: (required)
698
+ :type file_file_repository_href: str
699
+ :param x_task_diagnostics: List of profilers to use on tasks.
700
+ :type x_task_diagnostics: List[str]
701
+ :param _request_timeout: timeout setting for this request. If one
702
+ number provided, it will be total request
703
+ timeout. It can also be a pair (tuple) of
704
+ (connection, read) timeouts.
705
+ :type _request_timeout: int, tuple(int, int), optional
706
+ :param _request_auth: set to override the auth_settings for an a single
707
+ request; this effectively ignores the
708
+ authentication in the spec for a single request.
709
+ :type _request_auth: dict, optional
710
+ :param _content_type: force content-type for the request.
711
+ :type _content_type: str, Optional
712
+ :param _headers: set to override the headers for a single
713
+ request; this effectively ignores the headers
714
+ in the spec for a single request.
715
+ :type _headers: dict, optional
716
+ :param _host_index: set to override the host_index for a single
717
+ request; this effectively ignores the host_index
718
+ in the spec for a single request.
719
+ :type _host_index: int, optional
720
+ :return: Returns the result object.
721
+ """ # noqa: E501
722
+
723
+ _param = self._delete_serialize(
724
+ file_file_repository_href=file_file_repository_href,
725
+ x_task_diagnostics=x_task_diagnostics,
726
+ _request_auth=_request_auth,
727
+ _content_type=_content_type,
728
+ _headers=_headers,
729
+ _host_index=_host_index
730
+ )
731
+
732
+ _response_types_map: Dict[str, Optional[str]] = {
733
+ '202': "AsyncOperationResponse",
734
+ }
735
+ response_data = self.api_client.call_api(
736
+ *_param,
737
+ _request_timeout=_request_timeout
738
+ )
739
+ response_data.read()
740
+ return self.api_client.response_deserialize(
741
+ response_data=response_data,
742
+ response_types_map=_response_types_map,
743
+ ).data
744
+
745
+
746
+ @validate_call
747
+ def delete_with_http_info(
748
+ self,
749
+ file_file_repository_href: StrictStr,
750
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
751
+ _request_timeout: Union[
752
+ None,
753
+ Annotated[StrictFloat, Field(gt=0)],
754
+ Tuple[
755
+ Annotated[StrictFloat, Field(gt=0)],
756
+ Annotated[StrictFloat, Field(gt=0)]
757
+ ]
758
+ ] = None,
759
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
760
+ _content_type: Optional[StrictStr] = None,
761
+ _headers: Optional[Dict[StrictStr, Any]] = None,
762
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
763
+ ) -> ApiResponse[AsyncOperationResponse]:
764
+ """Delete a file repository
765
+
766
+ Trigger an asynchronous delete task
767
+
768
+ :param file_file_repository_href: (required)
769
+ :type file_file_repository_href: str
770
+ :param x_task_diagnostics: List of profilers to use on tasks.
771
+ :type x_task_diagnostics: List[str]
772
+ :param _request_timeout: timeout setting for this request. If one
773
+ number provided, it will be total request
774
+ timeout. It can also be a pair (tuple) of
775
+ (connection, read) timeouts.
776
+ :type _request_timeout: int, tuple(int, int), optional
777
+ :param _request_auth: set to override the auth_settings for an a single
778
+ request; this effectively ignores the
779
+ authentication in the spec for a single request.
780
+ :type _request_auth: dict, optional
781
+ :param _content_type: force content-type for the request.
782
+ :type _content_type: str, Optional
783
+ :param _headers: set to override the headers for a single
784
+ request; this effectively ignores the headers
785
+ in the spec for a single request.
786
+ :type _headers: dict, optional
787
+ :param _host_index: set to override the host_index for a single
788
+ request; this effectively ignores the host_index
789
+ in the spec for a single request.
790
+ :type _host_index: int, optional
791
+ :return: Returns the result object.
792
+ """ # noqa: E501
793
+
794
+ _param = self._delete_serialize(
795
+ file_file_repository_href=file_file_repository_href,
796
+ x_task_diagnostics=x_task_diagnostics,
797
+ _request_auth=_request_auth,
798
+ _content_type=_content_type,
799
+ _headers=_headers,
800
+ _host_index=_host_index
801
+ )
802
+
803
+ _response_types_map: Dict[str, Optional[str]] = {
804
+ '202': "AsyncOperationResponse",
805
+ }
806
+ response_data = self.api_client.call_api(
807
+ *_param,
808
+ _request_timeout=_request_timeout
809
+ )
810
+ response_data.read()
811
+ return self.api_client.response_deserialize(
812
+ response_data=response_data,
813
+ response_types_map=_response_types_map,
814
+ )
815
+
816
+
817
+ @validate_call
818
+ def delete_without_preload_content(
819
+ self,
820
+ file_file_repository_href: StrictStr,
821
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
822
+ _request_timeout: Union[
823
+ None,
824
+ Annotated[StrictFloat, Field(gt=0)],
825
+ Tuple[
826
+ Annotated[StrictFloat, Field(gt=0)],
827
+ Annotated[StrictFloat, Field(gt=0)]
828
+ ]
829
+ ] = None,
830
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
831
+ _content_type: Optional[StrictStr] = None,
832
+ _headers: Optional[Dict[StrictStr, Any]] = None,
833
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
834
+ ) -> RESTResponseType:
835
+ """Delete a file repository
836
+
837
+ Trigger an asynchronous delete task
838
+
839
+ :param file_file_repository_href: (required)
840
+ :type file_file_repository_href: str
841
+ :param x_task_diagnostics: List of profilers to use on tasks.
842
+ :type x_task_diagnostics: List[str]
843
+ :param _request_timeout: timeout setting for this request. If one
844
+ number provided, it will be total request
845
+ timeout. It can also be a pair (tuple) of
846
+ (connection, read) timeouts.
847
+ :type _request_timeout: int, tuple(int, int), optional
848
+ :param _request_auth: set to override the auth_settings for an a single
849
+ request; this effectively ignores the
850
+ authentication in the spec for a single request.
851
+ :type _request_auth: dict, optional
852
+ :param _content_type: force content-type for the request.
853
+ :type _content_type: str, Optional
854
+ :param _headers: set to override the headers for a single
855
+ request; this effectively ignores the headers
856
+ in the spec for a single request.
857
+ :type _headers: dict, optional
858
+ :param _host_index: set to override the host_index for a single
859
+ request; this effectively ignores the host_index
860
+ in the spec for a single request.
861
+ :type _host_index: int, optional
862
+ :return: Returns the result object.
863
+ """ # noqa: E501
864
+
865
+ _param = self._delete_serialize(
866
+ file_file_repository_href=file_file_repository_href,
867
+ x_task_diagnostics=x_task_diagnostics,
868
+ _request_auth=_request_auth,
869
+ _content_type=_content_type,
870
+ _headers=_headers,
871
+ _host_index=_host_index
872
+ )
873
+
874
+ _response_types_map: Dict[str, Optional[str]] = {
875
+ '202': "AsyncOperationResponse",
876
+ }
877
+ response_data = self.api_client.call_api(
878
+ *_param,
879
+ _request_timeout=_request_timeout
880
+ )
881
+ return response_data.response
882
+
883
+
884
+ def _delete_serialize(
885
+ self,
886
+ file_file_repository_href,
887
+ x_task_diagnostics,
888
+ _request_auth,
889
+ _content_type,
890
+ _headers,
891
+ _host_index,
892
+ ) -> RequestSerialized:
893
+
894
+ _host = None
895
+
896
+ _collection_formats: Dict[str, str] = {
897
+ 'X-Task-Diagnostics': 'csv',
898
+ }
899
+
900
+ _path_params: Dict[str, str] = {}
901
+ _query_params: List[Tuple[str, str]] = []
902
+ _header_params: Dict[str, Optional[str]] = _headers or {}
903
+ _form_params: List[Tuple[str, str]] = []
904
+ _files: Dict[
905
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
906
+ ] = {}
907
+ _body_params: Optional[bytes] = None
908
+
909
+ # process the path parameters
910
+ if file_file_repository_href is not None:
911
+ _path_params['file_file_repository_href'] = file_file_repository_href
912
+ # process the query parameters
913
+ # process the header parameters
914
+ if x_task_diagnostics is not None:
915
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
916
+ # process the form parameters
917
+ # process the body parameter
918
+
919
+
920
+ # set the HTTP header `Accept`
921
+ if 'Accept' not in _header_params:
922
+ _header_params['Accept'] = self.api_client.select_header_accept(
923
+ [
924
+ 'application/json'
925
+ ]
926
+ )
927
+
928
+
929
+ # authentication setting
930
+ _auth_settings: List[str] = [
931
+ 'json_header_remote_authentication',
932
+ 'basicAuth',
933
+ 'cookieAuth'
934
+ ]
935
+
936
+ return self.api_client.param_serialize(
937
+ method='DELETE',
938
+ resource_path='{file_file_repository_href}',
939
+ path_params=_path_params,
940
+ query_params=_query_params,
941
+ header_params=_header_params,
942
+ body=_body_params,
943
+ post_params=_form_params,
944
+ files=_files,
945
+ auth_settings=_auth_settings,
946
+ collection_formats=_collection_formats,
947
+ _host=_host,
948
+ _request_auth=_request_auth
949
+ )
950
+
951
+
952
+
953
+
954
+ @validate_call
955
+ def list(
956
+ self,
957
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
958
+ latest_with_content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
959
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
960
+ name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
961
+ name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
962
+ name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
963
+ name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
964
+ name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
965
+ name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
966
+ name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
967
+ name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
968
+ name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
969
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
970
+ ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
971
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
972
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
973
+ pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
974
+ pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
975
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
976
+ remote: Annotated[Optional[StrictStr], Field(description="Foreign Key referenced by HREF")] = None,
977
+ retain_repo_versions: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions matches value")] = None,
978
+ retain_repo_versions__gt: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is greater than value")] = None,
979
+ retain_repo_versions__gte: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is greater than or equal to value")] = None,
980
+ retain_repo_versions__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where retain_repo_versions has a null value")] = None,
981
+ retain_repo_versions__lt: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is less than value")] = None,
982
+ retain_repo_versions__lte: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is less than or equal to value")] = None,
983
+ retain_repo_versions__ne: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions not equal to value")] = None,
984
+ retain_repo_versions__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where retain_repo_versions is between two comma separated values")] = None,
985
+ with_content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
986
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
987
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
988
+ pulp_domain: StrictStr = "default",
989
+ _request_timeout: Union[
990
+ None,
991
+ Annotated[StrictFloat, Field(gt=0)],
992
+ Tuple[
993
+ Annotated[StrictFloat, Field(gt=0)],
994
+ Annotated[StrictFloat, Field(gt=0)]
995
+ ]
996
+ ] = None,
997
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
998
+ _content_type: Optional[StrictStr] = None,
999
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1000
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1001
+ ) -> PaginatedfileFileRepositoryResponseList:
1002
+ """List file repositorys
1003
+
1004
+ FileRepository represents a single file repository, to which content can be synced, added, or removed.
1005
+
1006
+ :param pulp_domain: (required)
1007
+ :type pulp_domain: str
1008
+ :param x_task_diagnostics: List of profilers to use on tasks.
1009
+ :type x_task_diagnostics: List[str]
1010
+ :param latest_with_content: Content Unit referenced by HREF/PRN
1011
+ :type latest_with_content: str
1012
+ :param limit: Number of results to return per page.
1013
+ :type limit: int
1014
+ :param name: Filter results where name matches value
1015
+ :type name: str
1016
+ :param name__contains: Filter results where name contains value
1017
+ :type name__contains: str
1018
+ :param name__icontains: Filter results where name contains value
1019
+ :type name__icontains: str
1020
+ :param name__iexact: Filter results where name matches value
1021
+ :type name__iexact: str
1022
+ :param name__in: Filter results where name is in a comma-separated list of values
1023
+ :type name__in: List[str]
1024
+ :param name__iregex: Filter results where name matches regex value
1025
+ :type name__iregex: str
1026
+ :param name__istartswith: Filter results where name starts with value
1027
+ :type name__istartswith: str
1028
+ :param name__regex: Filter results where name matches regex value
1029
+ :type name__regex: str
1030
+ :param name__startswith: Filter results where name starts with value
1031
+ :type name__startswith: str
1032
+ :param offset: The initial index from which to return the results.
1033
+ :type offset: int
1034
+ :param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
1035
+ :type ordering: List[str]
1036
+ :param prn__in: Multiple values may be separated by commas.
1037
+ :type prn__in: List[str]
1038
+ :param pulp_href__in: Multiple values may be separated by commas.
1039
+ :type pulp_href__in: List[str]
1040
+ :param pulp_id__in: Multiple values may be separated by commas.
1041
+ :type pulp_id__in: List[str]
1042
+ :param pulp_label_select: Filter labels by search string
1043
+ :type pulp_label_select: str
1044
+ :param q: Filter results by using NOT, AND and OR operations on other filters
1045
+ :type q: str
1046
+ :param remote: Foreign Key referenced by HREF
1047
+ :type remote: str
1048
+ :param retain_repo_versions: Filter results where retain_repo_versions matches value
1049
+ :type retain_repo_versions: int
1050
+ :param retain_repo_versions__gt: Filter results where retain_repo_versions is greater than value
1051
+ :type retain_repo_versions__gt: int
1052
+ :param retain_repo_versions__gte: Filter results where retain_repo_versions is greater than or equal to value
1053
+ :type retain_repo_versions__gte: int
1054
+ :param retain_repo_versions__isnull: Filter results where retain_repo_versions has a null value
1055
+ :type retain_repo_versions__isnull: bool
1056
+ :param retain_repo_versions__lt: Filter results where retain_repo_versions is less than value
1057
+ :type retain_repo_versions__lt: int
1058
+ :param retain_repo_versions__lte: Filter results where retain_repo_versions is less than or equal to value
1059
+ :type retain_repo_versions__lte: int
1060
+ :param retain_repo_versions__ne: Filter results where retain_repo_versions not equal to value
1061
+ :type retain_repo_versions__ne: int
1062
+ :param retain_repo_versions__range: Filter results where retain_repo_versions is between two comma separated values
1063
+ :type retain_repo_versions__range: List[int]
1064
+ :param with_content: Content Unit referenced by HREF/PRN
1065
+ :type with_content: str
1066
+ :param fields: A list of fields to include in the response.
1067
+ :type fields: List[str]
1068
+ :param exclude_fields: A list of fields to exclude from the response.
1069
+ :type exclude_fields: List[str]
1070
+ :param _request_timeout: timeout setting for this request. If one
1071
+ number provided, it will be total request
1072
+ timeout. It can also be a pair (tuple) of
1073
+ (connection, read) timeouts.
1074
+ :type _request_timeout: int, tuple(int, int), optional
1075
+ :param _request_auth: set to override the auth_settings for an a single
1076
+ request; this effectively ignores the
1077
+ authentication in the spec for a single request.
1078
+ :type _request_auth: dict, optional
1079
+ :param _content_type: force content-type for the request.
1080
+ :type _content_type: str, Optional
1081
+ :param _headers: set to override the headers for a single
1082
+ request; this effectively ignores the headers
1083
+ in the spec for a single request.
1084
+ :type _headers: dict, optional
1085
+ :param _host_index: set to override the host_index for a single
1086
+ request; this effectively ignores the host_index
1087
+ in the spec for a single request.
1088
+ :type _host_index: int, optional
1089
+ :return: Returns the result object.
1090
+ """ # noqa: E501
1091
+
1092
+ _param = self._list_serialize(
1093
+ pulp_domain=pulp_domain,
1094
+ x_task_diagnostics=x_task_diagnostics,
1095
+ latest_with_content=latest_with_content,
1096
+ limit=limit,
1097
+ name=name,
1098
+ name__contains=name__contains,
1099
+ name__icontains=name__icontains,
1100
+ name__iexact=name__iexact,
1101
+ name__in=name__in,
1102
+ name__iregex=name__iregex,
1103
+ name__istartswith=name__istartswith,
1104
+ name__regex=name__regex,
1105
+ name__startswith=name__startswith,
1106
+ offset=offset,
1107
+ ordering=ordering,
1108
+ prn__in=prn__in,
1109
+ pulp_href__in=pulp_href__in,
1110
+ pulp_id__in=pulp_id__in,
1111
+ pulp_label_select=pulp_label_select,
1112
+ q=q,
1113
+ remote=remote,
1114
+ retain_repo_versions=retain_repo_versions,
1115
+ retain_repo_versions__gt=retain_repo_versions__gt,
1116
+ retain_repo_versions__gte=retain_repo_versions__gte,
1117
+ retain_repo_versions__isnull=retain_repo_versions__isnull,
1118
+ retain_repo_versions__lt=retain_repo_versions__lt,
1119
+ retain_repo_versions__lte=retain_repo_versions__lte,
1120
+ retain_repo_versions__ne=retain_repo_versions__ne,
1121
+ retain_repo_versions__range=retain_repo_versions__range,
1122
+ with_content=with_content,
1123
+ fields=fields,
1124
+ exclude_fields=exclude_fields,
1125
+ _request_auth=_request_auth,
1126
+ _content_type=_content_type,
1127
+ _headers=_headers,
1128
+ _host_index=_host_index
1129
+ )
1130
+
1131
+ _response_types_map: Dict[str, Optional[str]] = {
1132
+ '200': "PaginatedfileFileRepositoryResponseList",
1133
+ }
1134
+ response_data = self.api_client.call_api(
1135
+ *_param,
1136
+ _request_timeout=_request_timeout
1137
+ )
1138
+ response_data.read()
1139
+ return self.api_client.response_deserialize(
1140
+ response_data=response_data,
1141
+ response_types_map=_response_types_map,
1142
+ ).data
1143
+
1144
+
1145
+ @validate_call
1146
+ def list_with_http_info(
1147
+ self,
1148
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1149
+ latest_with_content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
1150
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1151
+ name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
1152
+ name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
1153
+ name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
1154
+ name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
1155
+ name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
1156
+ name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
1157
+ name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
1158
+ name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
1159
+ name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
1160
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
1161
+ ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
1162
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1163
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1164
+ pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1165
+ pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
1166
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
1167
+ remote: Annotated[Optional[StrictStr], Field(description="Foreign Key referenced by HREF")] = None,
1168
+ retain_repo_versions: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions matches value")] = None,
1169
+ retain_repo_versions__gt: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is greater than value")] = None,
1170
+ retain_repo_versions__gte: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is greater than or equal to value")] = None,
1171
+ retain_repo_versions__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where retain_repo_versions has a null value")] = None,
1172
+ retain_repo_versions__lt: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is less than value")] = None,
1173
+ retain_repo_versions__lte: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is less than or equal to value")] = None,
1174
+ retain_repo_versions__ne: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions not equal to value")] = None,
1175
+ retain_repo_versions__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where retain_repo_versions is between two comma separated values")] = None,
1176
+ with_content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
1177
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1178
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1179
+ pulp_domain: StrictStr = "default",
1180
+ _request_timeout: Union[
1181
+ None,
1182
+ Annotated[StrictFloat, Field(gt=0)],
1183
+ Tuple[
1184
+ Annotated[StrictFloat, Field(gt=0)],
1185
+ Annotated[StrictFloat, Field(gt=0)]
1186
+ ]
1187
+ ] = None,
1188
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1189
+ _content_type: Optional[StrictStr] = None,
1190
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1191
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1192
+ ) -> ApiResponse[PaginatedfileFileRepositoryResponseList]:
1193
+ """List file repositorys
1194
+
1195
+ FileRepository represents a single file repository, to which content can be synced, added, or removed.
1196
+
1197
+ :param pulp_domain: (required)
1198
+ :type pulp_domain: str
1199
+ :param x_task_diagnostics: List of profilers to use on tasks.
1200
+ :type x_task_diagnostics: List[str]
1201
+ :param latest_with_content: Content Unit referenced by HREF/PRN
1202
+ :type latest_with_content: str
1203
+ :param limit: Number of results to return per page.
1204
+ :type limit: int
1205
+ :param name: Filter results where name matches value
1206
+ :type name: str
1207
+ :param name__contains: Filter results where name contains value
1208
+ :type name__contains: str
1209
+ :param name__icontains: Filter results where name contains value
1210
+ :type name__icontains: str
1211
+ :param name__iexact: Filter results where name matches value
1212
+ :type name__iexact: str
1213
+ :param name__in: Filter results where name is in a comma-separated list of values
1214
+ :type name__in: List[str]
1215
+ :param name__iregex: Filter results where name matches regex value
1216
+ :type name__iregex: str
1217
+ :param name__istartswith: Filter results where name starts with value
1218
+ :type name__istartswith: str
1219
+ :param name__regex: Filter results where name matches regex value
1220
+ :type name__regex: str
1221
+ :param name__startswith: Filter results where name starts with value
1222
+ :type name__startswith: str
1223
+ :param offset: The initial index from which to return the results.
1224
+ :type offset: int
1225
+ :param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
1226
+ :type ordering: List[str]
1227
+ :param prn__in: Multiple values may be separated by commas.
1228
+ :type prn__in: List[str]
1229
+ :param pulp_href__in: Multiple values may be separated by commas.
1230
+ :type pulp_href__in: List[str]
1231
+ :param pulp_id__in: Multiple values may be separated by commas.
1232
+ :type pulp_id__in: List[str]
1233
+ :param pulp_label_select: Filter labels by search string
1234
+ :type pulp_label_select: str
1235
+ :param q: Filter results by using NOT, AND and OR operations on other filters
1236
+ :type q: str
1237
+ :param remote: Foreign Key referenced by HREF
1238
+ :type remote: str
1239
+ :param retain_repo_versions: Filter results where retain_repo_versions matches value
1240
+ :type retain_repo_versions: int
1241
+ :param retain_repo_versions__gt: Filter results where retain_repo_versions is greater than value
1242
+ :type retain_repo_versions__gt: int
1243
+ :param retain_repo_versions__gte: Filter results where retain_repo_versions is greater than or equal to value
1244
+ :type retain_repo_versions__gte: int
1245
+ :param retain_repo_versions__isnull: Filter results where retain_repo_versions has a null value
1246
+ :type retain_repo_versions__isnull: bool
1247
+ :param retain_repo_versions__lt: Filter results where retain_repo_versions is less than value
1248
+ :type retain_repo_versions__lt: int
1249
+ :param retain_repo_versions__lte: Filter results where retain_repo_versions is less than or equal to value
1250
+ :type retain_repo_versions__lte: int
1251
+ :param retain_repo_versions__ne: Filter results where retain_repo_versions not equal to value
1252
+ :type retain_repo_versions__ne: int
1253
+ :param retain_repo_versions__range: Filter results where retain_repo_versions is between two comma separated values
1254
+ :type retain_repo_versions__range: List[int]
1255
+ :param with_content: Content Unit referenced by HREF/PRN
1256
+ :type with_content: str
1257
+ :param fields: A list of fields to include in the response.
1258
+ :type fields: List[str]
1259
+ :param exclude_fields: A list of fields to exclude from the response.
1260
+ :type exclude_fields: List[str]
1261
+ :param _request_timeout: timeout setting for this request. If one
1262
+ number provided, it will be total request
1263
+ timeout. It can also be a pair (tuple) of
1264
+ (connection, read) timeouts.
1265
+ :type _request_timeout: int, tuple(int, int), optional
1266
+ :param _request_auth: set to override the auth_settings for an a single
1267
+ request; this effectively ignores the
1268
+ authentication in the spec for a single request.
1269
+ :type _request_auth: dict, optional
1270
+ :param _content_type: force content-type for the request.
1271
+ :type _content_type: str, Optional
1272
+ :param _headers: set to override the headers for a single
1273
+ request; this effectively ignores the headers
1274
+ in the spec for a single request.
1275
+ :type _headers: dict, optional
1276
+ :param _host_index: set to override the host_index for a single
1277
+ request; this effectively ignores the host_index
1278
+ in the spec for a single request.
1279
+ :type _host_index: int, optional
1280
+ :return: Returns the result object.
1281
+ """ # noqa: E501
1282
+
1283
+ _param = self._list_serialize(
1284
+ pulp_domain=pulp_domain,
1285
+ x_task_diagnostics=x_task_diagnostics,
1286
+ latest_with_content=latest_with_content,
1287
+ limit=limit,
1288
+ name=name,
1289
+ name__contains=name__contains,
1290
+ name__icontains=name__icontains,
1291
+ name__iexact=name__iexact,
1292
+ name__in=name__in,
1293
+ name__iregex=name__iregex,
1294
+ name__istartswith=name__istartswith,
1295
+ name__regex=name__regex,
1296
+ name__startswith=name__startswith,
1297
+ offset=offset,
1298
+ ordering=ordering,
1299
+ prn__in=prn__in,
1300
+ pulp_href__in=pulp_href__in,
1301
+ pulp_id__in=pulp_id__in,
1302
+ pulp_label_select=pulp_label_select,
1303
+ q=q,
1304
+ remote=remote,
1305
+ retain_repo_versions=retain_repo_versions,
1306
+ retain_repo_versions__gt=retain_repo_versions__gt,
1307
+ retain_repo_versions__gte=retain_repo_versions__gte,
1308
+ retain_repo_versions__isnull=retain_repo_versions__isnull,
1309
+ retain_repo_versions__lt=retain_repo_versions__lt,
1310
+ retain_repo_versions__lte=retain_repo_versions__lte,
1311
+ retain_repo_versions__ne=retain_repo_versions__ne,
1312
+ retain_repo_versions__range=retain_repo_versions__range,
1313
+ with_content=with_content,
1314
+ fields=fields,
1315
+ exclude_fields=exclude_fields,
1316
+ _request_auth=_request_auth,
1317
+ _content_type=_content_type,
1318
+ _headers=_headers,
1319
+ _host_index=_host_index
1320
+ )
1321
+
1322
+ _response_types_map: Dict[str, Optional[str]] = {
1323
+ '200': "PaginatedfileFileRepositoryResponseList",
1324
+ }
1325
+ response_data = self.api_client.call_api(
1326
+ *_param,
1327
+ _request_timeout=_request_timeout
1328
+ )
1329
+ response_data.read()
1330
+ return self.api_client.response_deserialize(
1331
+ response_data=response_data,
1332
+ response_types_map=_response_types_map,
1333
+ )
1334
+
1335
+
1336
+ @validate_call
1337
+ def list_without_preload_content(
1338
+ self,
1339
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1340
+ latest_with_content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
1341
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1342
+ name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
1343
+ name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
1344
+ name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
1345
+ name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
1346
+ name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
1347
+ name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
1348
+ name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
1349
+ name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
1350
+ name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
1351
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
1352
+ ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
1353
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1354
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1355
+ pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1356
+ pulp_label_select: Annotated[Optional[StrictStr], Field(description="Filter labels by search string")] = None,
1357
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
1358
+ remote: Annotated[Optional[StrictStr], Field(description="Foreign Key referenced by HREF")] = None,
1359
+ retain_repo_versions: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions matches value")] = None,
1360
+ retain_repo_versions__gt: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is greater than value")] = None,
1361
+ retain_repo_versions__gte: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is greater than or equal to value")] = None,
1362
+ retain_repo_versions__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where retain_repo_versions has a null value")] = None,
1363
+ retain_repo_versions__lt: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is less than value")] = None,
1364
+ retain_repo_versions__lte: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions is less than or equal to value")] = None,
1365
+ retain_repo_versions__ne: Annotated[Optional[StrictInt], Field(description="Filter results where retain_repo_versions not equal to value")] = None,
1366
+ retain_repo_versions__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where retain_repo_versions is between two comma separated values")] = None,
1367
+ with_content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
1368
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1369
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1370
+ pulp_domain: StrictStr = "default",
1371
+ _request_timeout: Union[
1372
+ None,
1373
+ Annotated[StrictFloat, Field(gt=0)],
1374
+ Tuple[
1375
+ Annotated[StrictFloat, Field(gt=0)],
1376
+ Annotated[StrictFloat, Field(gt=0)]
1377
+ ]
1378
+ ] = None,
1379
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1380
+ _content_type: Optional[StrictStr] = None,
1381
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1382
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1383
+ ) -> RESTResponseType:
1384
+ """List file repositorys
1385
+
1386
+ FileRepository represents a single file repository, to which content can be synced, added, or removed.
1387
+
1388
+ :param pulp_domain: (required)
1389
+ :type pulp_domain: str
1390
+ :param x_task_diagnostics: List of profilers to use on tasks.
1391
+ :type x_task_diagnostics: List[str]
1392
+ :param latest_with_content: Content Unit referenced by HREF/PRN
1393
+ :type latest_with_content: str
1394
+ :param limit: Number of results to return per page.
1395
+ :type limit: int
1396
+ :param name: Filter results where name matches value
1397
+ :type name: str
1398
+ :param name__contains: Filter results where name contains value
1399
+ :type name__contains: str
1400
+ :param name__icontains: Filter results where name contains value
1401
+ :type name__icontains: str
1402
+ :param name__iexact: Filter results where name matches value
1403
+ :type name__iexact: str
1404
+ :param name__in: Filter results where name is in a comma-separated list of values
1405
+ :type name__in: List[str]
1406
+ :param name__iregex: Filter results where name matches regex value
1407
+ :type name__iregex: str
1408
+ :param name__istartswith: Filter results where name starts with value
1409
+ :type name__istartswith: str
1410
+ :param name__regex: Filter results where name matches regex value
1411
+ :type name__regex: str
1412
+ :param name__startswith: Filter results where name starts with value
1413
+ :type name__startswith: str
1414
+ :param offset: The initial index from which to return the results.
1415
+ :type offset: int
1416
+ :param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
1417
+ :type ordering: List[str]
1418
+ :param prn__in: Multiple values may be separated by commas.
1419
+ :type prn__in: List[str]
1420
+ :param pulp_href__in: Multiple values may be separated by commas.
1421
+ :type pulp_href__in: List[str]
1422
+ :param pulp_id__in: Multiple values may be separated by commas.
1423
+ :type pulp_id__in: List[str]
1424
+ :param pulp_label_select: Filter labels by search string
1425
+ :type pulp_label_select: str
1426
+ :param q: Filter results by using NOT, AND and OR operations on other filters
1427
+ :type q: str
1428
+ :param remote: Foreign Key referenced by HREF
1429
+ :type remote: str
1430
+ :param retain_repo_versions: Filter results where retain_repo_versions matches value
1431
+ :type retain_repo_versions: int
1432
+ :param retain_repo_versions__gt: Filter results where retain_repo_versions is greater than value
1433
+ :type retain_repo_versions__gt: int
1434
+ :param retain_repo_versions__gte: Filter results where retain_repo_versions is greater than or equal to value
1435
+ :type retain_repo_versions__gte: int
1436
+ :param retain_repo_versions__isnull: Filter results where retain_repo_versions has a null value
1437
+ :type retain_repo_versions__isnull: bool
1438
+ :param retain_repo_versions__lt: Filter results where retain_repo_versions is less than value
1439
+ :type retain_repo_versions__lt: int
1440
+ :param retain_repo_versions__lte: Filter results where retain_repo_versions is less than or equal to value
1441
+ :type retain_repo_versions__lte: int
1442
+ :param retain_repo_versions__ne: Filter results where retain_repo_versions not equal to value
1443
+ :type retain_repo_versions__ne: int
1444
+ :param retain_repo_versions__range: Filter results where retain_repo_versions is between two comma separated values
1445
+ :type retain_repo_versions__range: List[int]
1446
+ :param with_content: Content Unit referenced by HREF/PRN
1447
+ :type with_content: str
1448
+ :param fields: A list of fields to include in the response.
1449
+ :type fields: List[str]
1450
+ :param exclude_fields: A list of fields to exclude from the response.
1451
+ :type exclude_fields: List[str]
1452
+ :param _request_timeout: timeout setting for this request. If one
1453
+ number provided, it will be total request
1454
+ timeout. It can also be a pair (tuple) of
1455
+ (connection, read) timeouts.
1456
+ :type _request_timeout: int, tuple(int, int), optional
1457
+ :param _request_auth: set to override the auth_settings for an a single
1458
+ request; this effectively ignores the
1459
+ authentication in the spec for a single request.
1460
+ :type _request_auth: dict, optional
1461
+ :param _content_type: force content-type for the request.
1462
+ :type _content_type: str, Optional
1463
+ :param _headers: set to override the headers for a single
1464
+ request; this effectively ignores the headers
1465
+ in the spec for a single request.
1466
+ :type _headers: dict, optional
1467
+ :param _host_index: set to override the host_index for a single
1468
+ request; this effectively ignores the host_index
1469
+ in the spec for a single request.
1470
+ :type _host_index: int, optional
1471
+ :return: Returns the result object.
1472
+ """ # noqa: E501
1473
+
1474
+ _param = self._list_serialize(
1475
+ pulp_domain=pulp_domain,
1476
+ x_task_diagnostics=x_task_diagnostics,
1477
+ latest_with_content=latest_with_content,
1478
+ limit=limit,
1479
+ name=name,
1480
+ name__contains=name__contains,
1481
+ name__icontains=name__icontains,
1482
+ name__iexact=name__iexact,
1483
+ name__in=name__in,
1484
+ name__iregex=name__iregex,
1485
+ name__istartswith=name__istartswith,
1486
+ name__regex=name__regex,
1487
+ name__startswith=name__startswith,
1488
+ offset=offset,
1489
+ ordering=ordering,
1490
+ prn__in=prn__in,
1491
+ pulp_href__in=pulp_href__in,
1492
+ pulp_id__in=pulp_id__in,
1493
+ pulp_label_select=pulp_label_select,
1494
+ q=q,
1495
+ remote=remote,
1496
+ retain_repo_versions=retain_repo_versions,
1497
+ retain_repo_versions__gt=retain_repo_versions__gt,
1498
+ retain_repo_versions__gte=retain_repo_versions__gte,
1499
+ retain_repo_versions__isnull=retain_repo_versions__isnull,
1500
+ retain_repo_versions__lt=retain_repo_versions__lt,
1501
+ retain_repo_versions__lte=retain_repo_versions__lte,
1502
+ retain_repo_versions__ne=retain_repo_versions__ne,
1503
+ retain_repo_versions__range=retain_repo_versions__range,
1504
+ with_content=with_content,
1505
+ fields=fields,
1506
+ exclude_fields=exclude_fields,
1507
+ _request_auth=_request_auth,
1508
+ _content_type=_content_type,
1509
+ _headers=_headers,
1510
+ _host_index=_host_index
1511
+ )
1512
+
1513
+ _response_types_map: Dict[str, Optional[str]] = {
1514
+ '200': "PaginatedfileFileRepositoryResponseList",
1515
+ }
1516
+ response_data = self.api_client.call_api(
1517
+ *_param,
1518
+ _request_timeout=_request_timeout
1519
+ )
1520
+ return response_data.response
1521
+
1522
+
1523
+ def _list_serialize(
1524
+ self,
1525
+ pulp_domain,
1526
+ x_task_diagnostics,
1527
+ latest_with_content,
1528
+ limit,
1529
+ name,
1530
+ name__contains,
1531
+ name__icontains,
1532
+ name__iexact,
1533
+ name__in,
1534
+ name__iregex,
1535
+ name__istartswith,
1536
+ name__regex,
1537
+ name__startswith,
1538
+ offset,
1539
+ ordering,
1540
+ prn__in,
1541
+ pulp_href__in,
1542
+ pulp_id__in,
1543
+ pulp_label_select,
1544
+ q,
1545
+ remote,
1546
+ retain_repo_versions,
1547
+ retain_repo_versions__gt,
1548
+ retain_repo_versions__gte,
1549
+ retain_repo_versions__isnull,
1550
+ retain_repo_versions__lt,
1551
+ retain_repo_versions__lte,
1552
+ retain_repo_versions__ne,
1553
+ retain_repo_versions__range,
1554
+ with_content,
1555
+ fields,
1556
+ exclude_fields,
1557
+ _request_auth,
1558
+ _content_type,
1559
+ _headers,
1560
+ _host_index,
1561
+ ) -> RequestSerialized:
1562
+
1563
+ _host = None
1564
+
1565
+ _collection_formats: Dict[str, str] = {
1566
+ 'X-Task-Diagnostics': 'csv',
1567
+ 'name__in': 'csv',
1568
+ 'ordering': 'csv',
1569
+ 'prn__in': 'csv',
1570
+ 'pulp_href__in': 'csv',
1571
+ 'pulp_id__in': 'csv',
1572
+ 'retain_repo_versions__range': 'csv',
1573
+ 'fields': 'multi',
1574
+ 'exclude_fields': 'multi',
1575
+ }
1576
+
1577
+ _path_params: Dict[str, str] = {}
1578
+ _query_params: List[Tuple[str, str]] = []
1579
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1580
+ _form_params: List[Tuple[str, str]] = []
1581
+ _files: Dict[
1582
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1583
+ ] = {}
1584
+ _body_params: Optional[bytes] = None
1585
+
1586
+ # process the path parameters
1587
+ if pulp_domain is not None:
1588
+ _path_params['pulp_domain'] = pulp_domain
1589
+ # process the query parameters
1590
+ if latest_with_content is not None:
1591
+
1592
+ _query_params.append(('latest_with_content', latest_with_content))
1593
+
1594
+ if limit is not None:
1595
+
1596
+ _query_params.append(('limit', limit))
1597
+
1598
+ if name is not None:
1599
+
1600
+ _query_params.append(('name', name))
1601
+
1602
+ if name__contains is not None:
1603
+
1604
+ _query_params.append(('name__contains', name__contains))
1605
+
1606
+ if name__icontains is not None:
1607
+
1608
+ _query_params.append(('name__icontains', name__icontains))
1609
+
1610
+ if name__iexact is not None:
1611
+
1612
+ _query_params.append(('name__iexact', name__iexact))
1613
+
1614
+ if name__in is not None:
1615
+
1616
+ _query_params.append(('name__in', name__in))
1617
+
1618
+ if name__iregex is not None:
1619
+
1620
+ _query_params.append(('name__iregex', name__iregex))
1621
+
1622
+ if name__istartswith is not None:
1623
+
1624
+ _query_params.append(('name__istartswith', name__istartswith))
1625
+
1626
+ if name__regex is not None:
1627
+
1628
+ _query_params.append(('name__regex', name__regex))
1629
+
1630
+ if name__startswith is not None:
1631
+
1632
+ _query_params.append(('name__startswith', name__startswith))
1633
+
1634
+ if offset is not None:
1635
+
1636
+ _query_params.append(('offset', offset))
1637
+
1638
+ if ordering is not None:
1639
+
1640
+ _query_params.append(('ordering', ordering))
1641
+
1642
+ if prn__in is not None:
1643
+
1644
+ _query_params.append(('prn__in', prn__in))
1645
+
1646
+ if pulp_href__in is not None:
1647
+
1648
+ _query_params.append(('pulp_href__in', pulp_href__in))
1649
+
1650
+ if pulp_id__in is not None:
1651
+
1652
+ _query_params.append(('pulp_id__in', pulp_id__in))
1653
+
1654
+ if pulp_label_select is not None:
1655
+
1656
+ _query_params.append(('pulp_label_select', pulp_label_select))
1657
+
1658
+ if q is not None:
1659
+
1660
+ _query_params.append(('q', q))
1661
+
1662
+ if remote is not None:
1663
+
1664
+ _query_params.append(('remote', remote))
1665
+
1666
+ if retain_repo_versions is not None:
1667
+
1668
+ _query_params.append(('retain_repo_versions', retain_repo_versions))
1669
+
1670
+ if retain_repo_versions__gt is not None:
1671
+
1672
+ _query_params.append(('retain_repo_versions__gt', retain_repo_versions__gt))
1673
+
1674
+ if retain_repo_versions__gte is not None:
1675
+
1676
+ _query_params.append(('retain_repo_versions__gte', retain_repo_versions__gte))
1677
+
1678
+ if retain_repo_versions__isnull is not None:
1679
+
1680
+ _query_params.append(('retain_repo_versions__isnull', retain_repo_versions__isnull))
1681
+
1682
+ if retain_repo_versions__lt is not None:
1683
+
1684
+ _query_params.append(('retain_repo_versions__lt', retain_repo_versions__lt))
1685
+
1686
+ if retain_repo_versions__lte is not None:
1687
+
1688
+ _query_params.append(('retain_repo_versions__lte', retain_repo_versions__lte))
1689
+
1690
+ if retain_repo_versions__ne is not None:
1691
+
1692
+ _query_params.append(('retain_repo_versions__ne', retain_repo_versions__ne))
1693
+
1694
+ if retain_repo_versions__range is not None:
1695
+
1696
+ _query_params.append(('retain_repo_versions__range', retain_repo_versions__range))
1697
+
1698
+ if with_content is not None:
1699
+
1700
+ _query_params.append(('with_content', with_content))
1701
+
1702
+ if fields is not None:
1703
+
1704
+ _query_params.append(('fields', fields))
1705
+
1706
+ if exclude_fields is not None:
1707
+
1708
+ _query_params.append(('exclude_fields', exclude_fields))
1709
+
1710
+ # process the header parameters
1711
+ if x_task_diagnostics is not None:
1712
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1713
+ # process the form parameters
1714
+ # process the body parameter
1715
+
1716
+
1717
+ # set the HTTP header `Accept`
1718
+ if 'Accept' not in _header_params:
1719
+ _header_params['Accept'] = self.api_client.select_header_accept(
1720
+ [
1721
+ 'application/json'
1722
+ ]
1723
+ )
1724
+
1725
+
1726
+ # authentication setting
1727
+ _auth_settings: List[str] = [
1728
+ 'json_header_remote_authentication',
1729
+ 'basicAuth',
1730
+ 'cookieAuth'
1731
+ ]
1732
+
1733
+ return self.api_client.param_serialize(
1734
+ method='GET',
1735
+ resource_path='/api/pulp/{pulp_domain}/api/v3/repositories/file/file/',
1736
+ path_params=_path_params,
1737
+ query_params=_query_params,
1738
+ header_params=_header_params,
1739
+ body=_body_params,
1740
+ post_params=_form_params,
1741
+ files=_files,
1742
+ auth_settings=_auth_settings,
1743
+ collection_formats=_collection_formats,
1744
+ _host=_host,
1745
+ _request_auth=_request_auth
1746
+ )
1747
+
1748
+
1749
+
1750
+
1751
+ @validate_call
1752
+ def list_roles(
1753
+ self,
1754
+ file_file_repository_href: StrictStr,
1755
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1756
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1757
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1758
+ _request_timeout: Union[
1759
+ None,
1760
+ Annotated[StrictFloat, Field(gt=0)],
1761
+ Tuple[
1762
+ Annotated[StrictFloat, Field(gt=0)],
1763
+ Annotated[StrictFloat, Field(gt=0)]
1764
+ ]
1765
+ ] = None,
1766
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1767
+ _content_type: Optional[StrictStr] = None,
1768
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1769
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1770
+ ) -> ObjectRolesResponse:
1771
+ """List roles
1772
+
1773
+ List roles assigned to this object.
1774
+
1775
+ :param file_file_repository_href: (required)
1776
+ :type file_file_repository_href: str
1777
+ :param x_task_diagnostics: List of profilers to use on tasks.
1778
+ :type x_task_diagnostics: List[str]
1779
+ :param fields: A list of fields to include in the response.
1780
+ :type fields: List[str]
1781
+ :param exclude_fields: A list of fields to exclude from the response.
1782
+ :type exclude_fields: List[str]
1783
+ :param _request_timeout: timeout setting for this request. If one
1784
+ number provided, it will be total request
1785
+ timeout. It can also be a pair (tuple) of
1786
+ (connection, read) timeouts.
1787
+ :type _request_timeout: int, tuple(int, int), optional
1788
+ :param _request_auth: set to override the auth_settings for an a single
1789
+ request; this effectively ignores the
1790
+ authentication in the spec for a single request.
1791
+ :type _request_auth: dict, optional
1792
+ :param _content_type: force content-type for the request.
1793
+ :type _content_type: str, Optional
1794
+ :param _headers: set to override the headers for a single
1795
+ request; this effectively ignores the headers
1796
+ in the spec for a single request.
1797
+ :type _headers: dict, optional
1798
+ :param _host_index: set to override the host_index for a single
1799
+ request; this effectively ignores the host_index
1800
+ in the spec for a single request.
1801
+ :type _host_index: int, optional
1802
+ :return: Returns the result object.
1803
+ """ # noqa: E501
1804
+
1805
+ _param = self._list_roles_serialize(
1806
+ file_file_repository_href=file_file_repository_href,
1807
+ x_task_diagnostics=x_task_diagnostics,
1808
+ fields=fields,
1809
+ exclude_fields=exclude_fields,
1810
+ _request_auth=_request_auth,
1811
+ _content_type=_content_type,
1812
+ _headers=_headers,
1813
+ _host_index=_host_index
1814
+ )
1815
+
1816
+ _response_types_map: Dict[str, Optional[str]] = {
1817
+ '200': "ObjectRolesResponse",
1818
+ }
1819
+ response_data = self.api_client.call_api(
1820
+ *_param,
1821
+ _request_timeout=_request_timeout
1822
+ )
1823
+ response_data.read()
1824
+ return self.api_client.response_deserialize(
1825
+ response_data=response_data,
1826
+ response_types_map=_response_types_map,
1827
+ ).data
1828
+
1829
+
1830
+ @validate_call
1831
+ def list_roles_with_http_info(
1832
+ self,
1833
+ file_file_repository_href: StrictStr,
1834
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1835
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1836
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1837
+ _request_timeout: Union[
1838
+ None,
1839
+ Annotated[StrictFloat, Field(gt=0)],
1840
+ Tuple[
1841
+ Annotated[StrictFloat, Field(gt=0)],
1842
+ Annotated[StrictFloat, Field(gt=0)]
1843
+ ]
1844
+ ] = None,
1845
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1846
+ _content_type: Optional[StrictStr] = None,
1847
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1848
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1849
+ ) -> ApiResponse[ObjectRolesResponse]:
1850
+ """List roles
1851
+
1852
+ List roles assigned to this object.
1853
+
1854
+ :param file_file_repository_href: (required)
1855
+ :type file_file_repository_href: str
1856
+ :param x_task_diagnostics: List of profilers to use on tasks.
1857
+ :type x_task_diagnostics: List[str]
1858
+ :param fields: A list of fields to include in the response.
1859
+ :type fields: List[str]
1860
+ :param exclude_fields: A list of fields to exclude from the response.
1861
+ :type exclude_fields: List[str]
1862
+ :param _request_timeout: timeout setting for this request. If one
1863
+ number provided, it will be total request
1864
+ timeout. It can also be a pair (tuple) of
1865
+ (connection, read) timeouts.
1866
+ :type _request_timeout: int, tuple(int, int), optional
1867
+ :param _request_auth: set to override the auth_settings for an a single
1868
+ request; this effectively ignores the
1869
+ authentication in the spec for a single request.
1870
+ :type _request_auth: dict, optional
1871
+ :param _content_type: force content-type for the request.
1872
+ :type _content_type: str, Optional
1873
+ :param _headers: set to override the headers for a single
1874
+ request; this effectively ignores the headers
1875
+ in the spec for a single request.
1876
+ :type _headers: dict, optional
1877
+ :param _host_index: set to override the host_index for a single
1878
+ request; this effectively ignores the host_index
1879
+ in the spec for a single request.
1880
+ :type _host_index: int, optional
1881
+ :return: Returns the result object.
1882
+ """ # noqa: E501
1883
+
1884
+ _param = self._list_roles_serialize(
1885
+ file_file_repository_href=file_file_repository_href,
1886
+ x_task_diagnostics=x_task_diagnostics,
1887
+ fields=fields,
1888
+ exclude_fields=exclude_fields,
1889
+ _request_auth=_request_auth,
1890
+ _content_type=_content_type,
1891
+ _headers=_headers,
1892
+ _host_index=_host_index
1893
+ )
1894
+
1895
+ _response_types_map: Dict[str, Optional[str]] = {
1896
+ '200': "ObjectRolesResponse",
1897
+ }
1898
+ response_data = self.api_client.call_api(
1899
+ *_param,
1900
+ _request_timeout=_request_timeout
1901
+ )
1902
+ response_data.read()
1903
+ return self.api_client.response_deserialize(
1904
+ response_data=response_data,
1905
+ response_types_map=_response_types_map,
1906
+ )
1907
+
1908
+
1909
+ @validate_call
1910
+ def list_roles_without_preload_content(
1911
+ self,
1912
+ file_file_repository_href: StrictStr,
1913
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1914
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1915
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1916
+ _request_timeout: Union[
1917
+ None,
1918
+ Annotated[StrictFloat, Field(gt=0)],
1919
+ Tuple[
1920
+ Annotated[StrictFloat, Field(gt=0)],
1921
+ Annotated[StrictFloat, Field(gt=0)]
1922
+ ]
1923
+ ] = None,
1924
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1925
+ _content_type: Optional[StrictStr] = None,
1926
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1927
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1928
+ ) -> RESTResponseType:
1929
+ """List roles
1930
+
1931
+ List roles assigned to this object.
1932
+
1933
+ :param file_file_repository_href: (required)
1934
+ :type file_file_repository_href: str
1935
+ :param x_task_diagnostics: List of profilers to use on tasks.
1936
+ :type x_task_diagnostics: List[str]
1937
+ :param fields: A list of fields to include in the response.
1938
+ :type fields: List[str]
1939
+ :param exclude_fields: A list of fields to exclude from the response.
1940
+ :type exclude_fields: List[str]
1941
+ :param _request_timeout: timeout setting for this request. If one
1942
+ number provided, it will be total request
1943
+ timeout. It can also be a pair (tuple) of
1944
+ (connection, read) timeouts.
1945
+ :type _request_timeout: int, tuple(int, int), optional
1946
+ :param _request_auth: set to override the auth_settings for an a single
1947
+ request; this effectively ignores the
1948
+ authentication in the spec for a single request.
1949
+ :type _request_auth: dict, optional
1950
+ :param _content_type: force content-type for the request.
1951
+ :type _content_type: str, Optional
1952
+ :param _headers: set to override the headers for a single
1953
+ request; this effectively ignores the headers
1954
+ in the spec for a single request.
1955
+ :type _headers: dict, optional
1956
+ :param _host_index: set to override the host_index for a single
1957
+ request; this effectively ignores the host_index
1958
+ in the spec for a single request.
1959
+ :type _host_index: int, optional
1960
+ :return: Returns the result object.
1961
+ """ # noqa: E501
1962
+
1963
+ _param = self._list_roles_serialize(
1964
+ file_file_repository_href=file_file_repository_href,
1965
+ x_task_diagnostics=x_task_diagnostics,
1966
+ fields=fields,
1967
+ exclude_fields=exclude_fields,
1968
+ _request_auth=_request_auth,
1969
+ _content_type=_content_type,
1970
+ _headers=_headers,
1971
+ _host_index=_host_index
1972
+ )
1973
+
1974
+ _response_types_map: Dict[str, Optional[str]] = {
1975
+ '200': "ObjectRolesResponse",
1976
+ }
1977
+ response_data = self.api_client.call_api(
1978
+ *_param,
1979
+ _request_timeout=_request_timeout
1980
+ )
1981
+ return response_data.response
1982
+
1983
+
1984
+ def _list_roles_serialize(
1985
+ self,
1986
+ file_file_repository_href,
1987
+ x_task_diagnostics,
1988
+ fields,
1989
+ exclude_fields,
1990
+ _request_auth,
1991
+ _content_type,
1992
+ _headers,
1993
+ _host_index,
1994
+ ) -> RequestSerialized:
1995
+
1996
+ _host = None
1997
+
1998
+ _collection_formats: Dict[str, str] = {
1999
+ 'X-Task-Diagnostics': 'csv',
2000
+ 'fields': 'multi',
2001
+ 'exclude_fields': 'multi',
2002
+ }
2003
+
2004
+ _path_params: Dict[str, str] = {}
2005
+ _query_params: List[Tuple[str, str]] = []
2006
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2007
+ _form_params: List[Tuple[str, str]] = []
2008
+ _files: Dict[
2009
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2010
+ ] = {}
2011
+ _body_params: Optional[bytes] = None
2012
+
2013
+ # process the path parameters
2014
+ if file_file_repository_href is not None:
2015
+ _path_params['file_file_repository_href'] = file_file_repository_href
2016
+ # process the query parameters
2017
+ if fields is not None:
2018
+
2019
+ _query_params.append(('fields', fields))
2020
+
2021
+ if exclude_fields is not None:
2022
+
2023
+ _query_params.append(('exclude_fields', exclude_fields))
2024
+
2025
+ # process the header parameters
2026
+ if x_task_diagnostics is not None:
2027
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2028
+ # process the form parameters
2029
+ # process the body parameter
2030
+
2031
+
2032
+ # set the HTTP header `Accept`
2033
+ if 'Accept' not in _header_params:
2034
+ _header_params['Accept'] = self.api_client.select_header_accept(
2035
+ [
2036
+ 'application/json'
2037
+ ]
2038
+ )
2039
+
2040
+
2041
+ # authentication setting
2042
+ _auth_settings: List[str] = [
2043
+ 'json_header_remote_authentication',
2044
+ 'basicAuth',
2045
+ 'cookieAuth'
2046
+ ]
2047
+
2048
+ return self.api_client.param_serialize(
2049
+ method='GET',
2050
+ resource_path='{file_file_repository_href}list_roles/',
2051
+ path_params=_path_params,
2052
+ query_params=_query_params,
2053
+ header_params=_header_params,
2054
+ body=_body_params,
2055
+ post_params=_form_params,
2056
+ files=_files,
2057
+ auth_settings=_auth_settings,
2058
+ collection_formats=_collection_formats,
2059
+ _host=_host,
2060
+ _request_auth=_request_auth
2061
+ )
2062
+
2063
+
2064
+
2065
+
2066
+ @validate_call
2067
+ def modify(
2068
+ self,
2069
+ file_file_repository_href: StrictStr,
2070
+ repository_add_remove_content: RepositoryAddRemoveContent,
2071
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2072
+ _request_timeout: Union[
2073
+ None,
2074
+ Annotated[StrictFloat, Field(gt=0)],
2075
+ Tuple[
2076
+ Annotated[StrictFloat, Field(gt=0)],
2077
+ Annotated[StrictFloat, Field(gt=0)]
2078
+ ]
2079
+ ] = None,
2080
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2081
+ _content_type: Optional[StrictStr] = None,
2082
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2083
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2084
+ ) -> AsyncOperationResponse:
2085
+ """Modify Repository Content
2086
+
2087
+ Trigger an asynchronous task to create a new repository version.
2088
+
2089
+ :param file_file_repository_href: (required)
2090
+ :type file_file_repository_href: str
2091
+ :param repository_add_remove_content: (required)
2092
+ :type repository_add_remove_content: RepositoryAddRemoveContent
2093
+ :param x_task_diagnostics: List of profilers to use on tasks.
2094
+ :type x_task_diagnostics: List[str]
2095
+ :param _request_timeout: timeout setting for this request. If one
2096
+ number provided, it will be total request
2097
+ timeout. It can also be a pair (tuple) of
2098
+ (connection, read) timeouts.
2099
+ :type _request_timeout: int, tuple(int, int), optional
2100
+ :param _request_auth: set to override the auth_settings for an a single
2101
+ request; this effectively ignores the
2102
+ authentication in the spec for a single request.
2103
+ :type _request_auth: dict, optional
2104
+ :param _content_type: force content-type for the request.
2105
+ :type _content_type: str, Optional
2106
+ :param _headers: set to override the headers for a single
2107
+ request; this effectively ignores the headers
2108
+ in the spec for a single request.
2109
+ :type _headers: dict, optional
2110
+ :param _host_index: set to override the host_index for a single
2111
+ request; this effectively ignores the host_index
2112
+ in the spec for a single request.
2113
+ :type _host_index: int, optional
2114
+ :return: Returns the result object.
2115
+ """ # noqa: E501
2116
+
2117
+ _param = self._modify_serialize(
2118
+ file_file_repository_href=file_file_repository_href,
2119
+ repository_add_remove_content=repository_add_remove_content,
2120
+ x_task_diagnostics=x_task_diagnostics,
2121
+ _request_auth=_request_auth,
2122
+ _content_type=_content_type,
2123
+ _headers=_headers,
2124
+ _host_index=_host_index
2125
+ )
2126
+
2127
+ _response_types_map: Dict[str, Optional[str]] = {
2128
+ '202': "AsyncOperationResponse",
2129
+ }
2130
+ response_data = self.api_client.call_api(
2131
+ *_param,
2132
+ _request_timeout=_request_timeout
2133
+ )
2134
+ response_data.read()
2135
+ return self.api_client.response_deserialize(
2136
+ response_data=response_data,
2137
+ response_types_map=_response_types_map,
2138
+ ).data
2139
+
2140
+
2141
+ @validate_call
2142
+ def modify_with_http_info(
2143
+ self,
2144
+ file_file_repository_href: StrictStr,
2145
+ repository_add_remove_content: RepositoryAddRemoveContent,
2146
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2147
+ _request_timeout: Union[
2148
+ None,
2149
+ Annotated[StrictFloat, Field(gt=0)],
2150
+ Tuple[
2151
+ Annotated[StrictFloat, Field(gt=0)],
2152
+ Annotated[StrictFloat, Field(gt=0)]
2153
+ ]
2154
+ ] = None,
2155
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2156
+ _content_type: Optional[StrictStr] = None,
2157
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2158
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2159
+ ) -> ApiResponse[AsyncOperationResponse]:
2160
+ """Modify Repository Content
2161
+
2162
+ Trigger an asynchronous task to create a new repository version.
2163
+
2164
+ :param file_file_repository_href: (required)
2165
+ :type file_file_repository_href: str
2166
+ :param repository_add_remove_content: (required)
2167
+ :type repository_add_remove_content: RepositoryAddRemoveContent
2168
+ :param x_task_diagnostics: List of profilers to use on tasks.
2169
+ :type x_task_diagnostics: List[str]
2170
+ :param _request_timeout: timeout setting for this request. If one
2171
+ number provided, it will be total request
2172
+ timeout. It can also be a pair (tuple) of
2173
+ (connection, read) timeouts.
2174
+ :type _request_timeout: int, tuple(int, int), optional
2175
+ :param _request_auth: set to override the auth_settings for an a single
2176
+ request; this effectively ignores the
2177
+ authentication in the spec for a single request.
2178
+ :type _request_auth: dict, optional
2179
+ :param _content_type: force content-type for the request.
2180
+ :type _content_type: str, Optional
2181
+ :param _headers: set to override the headers for a single
2182
+ request; this effectively ignores the headers
2183
+ in the spec for a single request.
2184
+ :type _headers: dict, optional
2185
+ :param _host_index: set to override the host_index for a single
2186
+ request; this effectively ignores the host_index
2187
+ in the spec for a single request.
2188
+ :type _host_index: int, optional
2189
+ :return: Returns the result object.
2190
+ """ # noqa: E501
2191
+
2192
+ _param = self._modify_serialize(
2193
+ file_file_repository_href=file_file_repository_href,
2194
+ repository_add_remove_content=repository_add_remove_content,
2195
+ x_task_diagnostics=x_task_diagnostics,
2196
+ _request_auth=_request_auth,
2197
+ _content_type=_content_type,
2198
+ _headers=_headers,
2199
+ _host_index=_host_index
2200
+ )
2201
+
2202
+ _response_types_map: Dict[str, Optional[str]] = {
2203
+ '202': "AsyncOperationResponse",
2204
+ }
2205
+ response_data = self.api_client.call_api(
2206
+ *_param,
2207
+ _request_timeout=_request_timeout
2208
+ )
2209
+ response_data.read()
2210
+ return self.api_client.response_deserialize(
2211
+ response_data=response_data,
2212
+ response_types_map=_response_types_map,
2213
+ )
2214
+
2215
+
2216
+ @validate_call
2217
+ def modify_without_preload_content(
2218
+ self,
2219
+ file_file_repository_href: StrictStr,
2220
+ repository_add_remove_content: RepositoryAddRemoveContent,
2221
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2222
+ _request_timeout: Union[
2223
+ None,
2224
+ Annotated[StrictFloat, Field(gt=0)],
2225
+ Tuple[
2226
+ Annotated[StrictFloat, Field(gt=0)],
2227
+ Annotated[StrictFloat, Field(gt=0)]
2228
+ ]
2229
+ ] = None,
2230
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2231
+ _content_type: Optional[StrictStr] = None,
2232
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2233
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2234
+ ) -> RESTResponseType:
2235
+ """Modify Repository Content
2236
+
2237
+ Trigger an asynchronous task to create a new repository version.
2238
+
2239
+ :param file_file_repository_href: (required)
2240
+ :type file_file_repository_href: str
2241
+ :param repository_add_remove_content: (required)
2242
+ :type repository_add_remove_content: RepositoryAddRemoveContent
2243
+ :param x_task_diagnostics: List of profilers to use on tasks.
2244
+ :type x_task_diagnostics: List[str]
2245
+ :param _request_timeout: timeout setting for this request. If one
2246
+ number provided, it will be total request
2247
+ timeout. It can also be a pair (tuple) of
2248
+ (connection, read) timeouts.
2249
+ :type _request_timeout: int, tuple(int, int), optional
2250
+ :param _request_auth: set to override the auth_settings for an a single
2251
+ request; this effectively ignores the
2252
+ authentication in the spec for a single request.
2253
+ :type _request_auth: dict, optional
2254
+ :param _content_type: force content-type for the request.
2255
+ :type _content_type: str, Optional
2256
+ :param _headers: set to override the headers for a single
2257
+ request; this effectively ignores the headers
2258
+ in the spec for a single request.
2259
+ :type _headers: dict, optional
2260
+ :param _host_index: set to override the host_index for a single
2261
+ request; this effectively ignores the host_index
2262
+ in the spec for a single request.
2263
+ :type _host_index: int, optional
2264
+ :return: Returns the result object.
2265
+ """ # noqa: E501
2266
+
2267
+ _param = self._modify_serialize(
2268
+ file_file_repository_href=file_file_repository_href,
2269
+ repository_add_remove_content=repository_add_remove_content,
2270
+ x_task_diagnostics=x_task_diagnostics,
2271
+ _request_auth=_request_auth,
2272
+ _content_type=_content_type,
2273
+ _headers=_headers,
2274
+ _host_index=_host_index
2275
+ )
2276
+
2277
+ _response_types_map: Dict[str, Optional[str]] = {
2278
+ '202': "AsyncOperationResponse",
2279
+ }
2280
+ response_data = self.api_client.call_api(
2281
+ *_param,
2282
+ _request_timeout=_request_timeout
2283
+ )
2284
+ return response_data.response
2285
+
2286
+
2287
+ def _modify_serialize(
2288
+ self,
2289
+ file_file_repository_href,
2290
+ repository_add_remove_content,
2291
+ x_task_diagnostics,
2292
+ _request_auth,
2293
+ _content_type,
2294
+ _headers,
2295
+ _host_index,
2296
+ ) -> RequestSerialized:
2297
+
2298
+ _host = None
2299
+
2300
+ _collection_formats: Dict[str, str] = {
2301
+ 'X-Task-Diagnostics': 'csv',
2302
+ }
2303
+
2304
+ _path_params: Dict[str, str] = {}
2305
+ _query_params: List[Tuple[str, str]] = []
2306
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2307
+ _form_params: List[Tuple[str, str]] = []
2308
+ _files: Dict[
2309
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2310
+ ] = {}
2311
+ _body_params: Optional[bytes] = None
2312
+
2313
+ # process the path parameters
2314
+ if file_file_repository_href is not None:
2315
+ _path_params['file_file_repository_href'] = file_file_repository_href
2316
+ # process the query parameters
2317
+ # process the header parameters
2318
+ if x_task_diagnostics is not None:
2319
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2320
+ # process the form parameters
2321
+ # process the body parameter
2322
+ if repository_add_remove_content is not None:
2323
+ _body_params = repository_add_remove_content
2324
+
2325
+
2326
+ # set the HTTP header `Accept`
2327
+ if 'Accept' not in _header_params:
2328
+ _header_params['Accept'] = self.api_client.select_header_accept(
2329
+ [
2330
+ 'application/json'
2331
+ ]
2332
+ )
2333
+
2334
+ # set the HTTP header `Content-Type`
2335
+ if _content_type:
2336
+ _header_params['Content-Type'] = _content_type
2337
+ else:
2338
+ _default_content_type = (
2339
+ self.api_client.select_header_content_type(
2340
+ [
2341
+ 'application/json',
2342
+ 'application/x-www-form-urlencoded',
2343
+ 'multipart/form-data'
2344
+ ]
2345
+ )
2346
+ )
2347
+ if _default_content_type is not None:
2348
+ _header_params['Content-Type'] = _default_content_type
2349
+
2350
+ # authentication setting
2351
+ _auth_settings: List[str] = [
2352
+ 'json_header_remote_authentication',
2353
+ 'basicAuth',
2354
+ 'cookieAuth'
2355
+ ]
2356
+
2357
+ return self.api_client.param_serialize(
2358
+ method='POST',
2359
+ resource_path='{file_file_repository_href}modify/',
2360
+ path_params=_path_params,
2361
+ query_params=_query_params,
2362
+ header_params=_header_params,
2363
+ body=_body_params,
2364
+ post_params=_form_params,
2365
+ files=_files,
2366
+ auth_settings=_auth_settings,
2367
+ collection_formats=_collection_formats,
2368
+ _host=_host,
2369
+ _request_auth=_request_auth
2370
+ )
2371
+
2372
+
2373
+
2374
+
2375
+ @validate_call
2376
+ def my_permissions(
2377
+ self,
2378
+ file_file_repository_href: StrictStr,
2379
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2380
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2381
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2382
+ _request_timeout: Union[
2383
+ None,
2384
+ Annotated[StrictFloat, Field(gt=0)],
2385
+ Tuple[
2386
+ Annotated[StrictFloat, Field(gt=0)],
2387
+ Annotated[StrictFloat, Field(gt=0)]
2388
+ ]
2389
+ ] = None,
2390
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2391
+ _content_type: Optional[StrictStr] = None,
2392
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2393
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2394
+ ) -> MyPermissionsResponse:
2395
+ """List user permissions
2396
+
2397
+ List permissions available to the current user on this object.
2398
+
2399
+ :param file_file_repository_href: (required)
2400
+ :type file_file_repository_href: str
2401
+ :param x_task_diagnostics: List of profilers to use on tasks.
2402
+ :type x_task_diagnostics: List[str]
2403
+ :param fields: A list of fields to include in the response.
2404
+ :type fields: List[str]
2405
+ :param exclude_fields: A list of fields to exclude from the response.
2406
+ :type exclude_fields: List[str]
2407
+ :param _request_timeout: timeout setting for this request. If one
2408
+ number provided, it will be total request
2409
+ timeout. It can also be a pair (tuple) of
2410
+ (connection, read) timeouts.
2411
+ :type _request_timeout: int, tuple(int, int), optional
2412
+ :param _request_auth: set to override the auth_settings for an a single
2413
+ request; this effectively ignores the
2414
+ authentication in the spec for a single request.
2415
+ :type _request_auth: dict, optional
2416
+ :param _content_type: force content-type for the request.
2417
+ :type _content_type: str, Optional
2418
+ :param _headers: set to override the headers for a single
2419
+ request; this effectively ignores the headers
2420
+ in the spec for a single request.
2421
+ :type _headers: dict, optional
2422
+ :param _host_index: set to override the host_index for a single
2423
+ request; this effectively ignores the host_index
2424
+ in the spec for a single request.
2425
+ :type _host_index: int, optional
2426
+ :return: Returns the result object.
2427
+ """ # noqa: E501
2428
+
2429
+ _param = self._my_permissions_serialize(
2430
+ file_file_repository_href=file_file_repository_href,
2431
+ x_task_diagnostics=x_task_diagnostics,
2432
+ fields=fields,
2433
+ exclude_fields=exclude_fields,
2434
+ _request_auth=_request_auth,
2435
+ _content_type=_content_type,
2436
+ _headers=_headers,
2437
+ _host_index=_host_index
2438
+ )
2439
+
2440
+ _response_types_map: Dict[str, Optional[str]] = {
2441
+ '200': "MyPermissionsResponse",
2442
+ }
2443
+ response_data = self.api_client.call_api(
2444
+ *_param,
2445
+ _request_timeout=_request_timeout
2446
+ )
2447
+ response_data.read()
2448
+ return self.api_client.response_deserialize(
2449
+ response_data=response_data,
2450
+ response_types_map=_response_types_map,
2451
+ ).data
2452
+
2453
+
2454
+ @validate_call
2455
+ def my_permissions_with_http_info(
2456
+ self,
2457
+ file_file_repository_href: StrictStr,
2458
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2459
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2460
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2461
+ _request_timeout: Union[
2462
+ None,
2463
+ Annotated[StrictFloat, Field(gt=0)],
2464
+ Tuple[
2465
+ Annotated[StrictFloat, Field(gt=0)],
2466
+ Annotated[StrictFloat, Field(gt=0)]
2467
+ ]
2468
+ ] = None,
2469
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2470
+ _content_type: Optional[StrictStr] = None,
2471
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2472
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2473
+ ) -> ApiResponse[MyPermissionsResponse]:
2474
+ """List user permissions
2475
+
2476
+ List permissions available to the current user on this object.
2477
+
2478
+ :param file_file_repository_href: (required)
2479
+ :type file_file_repository_href: str
2480
+ :param x_task_diagnostics: List of profilers to use on tasks.
2481
+ :type x_task_diagnostics: List[str]
2482
+ :param fields: A list of fields to include in the response.
2483
+ :type fields: List[str]
2484
+ :param exclude_fields: A list of fields to exclude from the response.
2485
+ :type exclude_fields: List[str]
2486
+ :param _request_timeout: timeout setting for this request. If one
2487
+ number provided, it will be total request
2488
+ timeout. It can also be a pair (tuple) of
2489
+ (connection, read) timeouts.
2490
+ :type _request_timeout: int, tuple(int, int), optional
2491
+ :param _request_auth: set to override the auth_settings for an a single
2492
+ request; this effectively ignores the
2493
+ authentication in the spec for a single request.
2494
+ :type _request_auth: dict, optional
2495
+ :param _content_type: force content-type for the request.
2496
+ :type _content_type: str, Optional
2497
+ :param _headers: set to override the headers for a single
2498
+ request; this effectively ignores the headers
2499
+ in the spec for a single request.
2500
+ :type _headers: dict, optional
2501
+ :param _host_index: set to override the host_index for a single
2502
+ request; this effectively ignores the host_index
2503
+ in the spec for a single request.
2504
+ :type _host_index: int, optional
2505
+ :return: Returns the result object.
2506
+ """ # noqa: E501
2507
+
2508
+ _param = self._my_permissions_serialize(
2509
+ file_file_repository_href=file_file_repository_href,
2510
+ x_task_diagnostics=x_task_diagnostics,
2511
+ fields=fields,
2512
+ exclude_fields=exclude_fields,
2513
+ _request_auth=_request_auth,
2514
+ _content_type=_content_type,
2515
+ _headers=_headers,
2516
+ _host_index=_host_index
2517
+ )
2518
+
2519
+ _response_types_map: Dict[str, Optional[str]] = {
2520
+ '200': "MyPermissionsResponse",
2521
+ }
2522
+ response_data = self.api_client.call_api(
2523
+ *_param,
2524
+ _request_timeout=_request_timeout
2525
+ )
2526
+ response_data.read()
2527
+ return self.api_client.response_deserialize(
2528
+ response_data=response_data,
2529
+ response_types_map=_response_types_map,
2530
+ )
2531
+
2532
+
2533
+ @validate_call
2534
+ def my_permissions_without_preload_content(
2535
+ self,
2536
+ file_file_repository_href: StrictStr,
2537
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2538
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2539
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = 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
+ ) -> RESTResponseType:
2553
+ """List user permissions
2554
+
2555
+ List permissions available to the current user on this object.
2556
+
2557
+ :param file_file_repository_href: (required)
2558
+ :type file_file_repository_href: str
2559
+ :param x_task_diagnostics: List of profilers to use on tasks.
2560
+ :type x_task_diagnostics: List[str]
2561
+ :param fields: A list of fields to include in the response.
2562
+ :type fields: List[str]
2563
+ :param exclude_fields: A list of fields to exclude from the response.
2564
+ :type exclude_fields: List[str]
2565
+ :param _request_timeout: timeout setting for this request. If one
2566
+ number provided, it will be total request
2567
+ timeout. It can also be a pair (tuple) of
2568
+ (connection, read) timeouts.
2569
+ :type _request_timeout: int, tuple(int, int), optional
2570
+ :param _request_auth: set to override the auth_settings for an a single
2571
+ request; this effectively ignores the
2572
+ authentication in the spec for a single request.
2573
+ :type _request_auth: dict, optional
2574
+ :param _content_type: force content-type for the request.
2575
+ :type _content_type: str, Optional
2576
+ :param _headers: set to override the headers for a single
2577
+ request; this effectively ignores the headers
2578
+ in the spec for a single request.
2579
+ :type _headers: dict, optional
2580
+ :param _host_index: set to override the host_index for a single
2581
+ request; this effectively ignores the host_index
2582
+ in the spec for a single request.
2583
+ :type _host_index: int, optional
2584
+ :return: Returns the result object.
2585
+ """ # noqa: E501
2586
+
2587
+ _param = self._my_permissions_serialize(
2588
+ file_file_repository_href=file_file_repository_href,
2589
+ x_task_diagnostics=x_task_diagnostics,
2590
+ fields=fields,
2591
+ exclude_fields=exclude_fields,
2592
+ _request_auth=_request_auth,
2593
+ _content_type=_content_type,
2594
+ _headers=_headers,
2595
+ _host_index=_host_index
2596
+ )
2597
+
2598
+ _response_types_map: Dict[str, Optional[str]] = {
2599
+ '200': "MyPermissionsResponse",
2600
+ }
2601
+ response_data = self.api_client.call_api(
2602
+ *_param,
2603
+ _request_timeout=_request_timeout
2604
+ )
2605
+ return response_data.response
2606
+
2607
+
2608
+ def _my_permissions_serialize(
2609
+ self,
2610
+ file_file_repository_href,
2611
+ x_task_diagnostics,
2612
+ fields,
2613
+ exclude_fields,
2614
+ _request_auth,
2615
+ _content_type,
2616
+ _headers,
2617
+ _host_index,
2618
+ ) -> RequestSerialized:
2619
+
2620
+ _host = None
2621
+
2622
+ _collection_formats: Dict[str, str] = {
2623
+ 'X-Task-Diagnostics': 'csv',
2624
+ 'fields': 'multi',
2625
+ 'exclude_fields': 'multi',
2626
+ }
2627
+
2628
+ _path_params: Dict[str, str] = {}
2629
+ _query_params: List[Tuple[str, str]] = []
2630
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2631
+ _form_params: List[Tuple[str, str]] = []
2632
+ _files: Dict[
2633
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2634
+ ] = {}
2635
+ _body_params: Optional[bytes] = None
2636
+
2637
+ # process the path parameters
2638
+ if file_file_repository_href is not None:
2639
+ _path_params['file_file_repository_href'] = file_file_repository_href
2640
+ # process the query parameters
2641
+ if fields is not None:
2642
+
2643
+ _query_params.append(('fields', fields))
2644
+
2645
+ if exclude_fields is not None:
2646
+
2647
+ _query_params.append(('exclude_fields', exclude_fields))
2648
+
2649
+ # process the header parameters
2650
+ if x_task_diagnostics is not None:
2651
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2652
+ # process the form parameters
2653
+ # process the body parameter
2654
+
2655
+
2656
+ # set the HTTP header `Accept`
2657
+ if 'Accept' not in _header_params:
2658
+ _header_params['Accept'] = self.api_client.select_header_accept(
2659
+ [
2660
+ 'application/json'
2661
+ ]
2662
+ )
2663
+
2664
+
2665
+ # authentication setting
2666
+ _auth_settings: List[str] = [
2667
+ 'json_header_remote_authentication',
2668
+ 'basicAuth',
2669
+ 'cookieAuth'
2670
+ ]
2671
+
2672
+ return self.api_client.param_serialize(
2673
+ method='GET',
2674
+ resource_path='{file_file_repository_href}my_permissions/',
2675
+ path_params=_path_params,
2676
+ query_params=_query_params,
2677
+ header_params=_header_params,
2678
+ body=_body_params,
2679
+ post_params=_form_params,
2680
+ files=_files,
2681
+ auth_settings=_auth_settings,
2682
+ collection_formats=_collection_formats,
2683
+ _host=_host,
2684
+ _request_auth=_request_auth
2685
+ )
2686
+
2687
+
2688
+
2689
+
2690
+ @validate_call
2691
+ def partial_update(
2692
+ self,
2693
+ file_file_repository_href: StrictStr,
2694
+ patchedfile_file_repository: PatchedfileFileRepository,
2695
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2696
+ _request_timeout: Union[
2697
+ None,
2698
+ Annotated[StrictFloat, Field(gt=0)],
2699
+ Tuple[
2700
+ Annotated[StrictFloat, Field(gt=0)],
2701
+ Annotated[StrictFloat, Field(gt=0)]
2702
+ ]
2703
+ ] = None,
2704
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2705
+ _content_type: Optional[StrictStr] = None,
2706
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2707
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2708
+ ) -> FileFileRepositoryResponse:
2709
+ """Update a file repository
2710
+
2711
+ Update the entity partially and trigger an asynchronous task if necessary
2712
+
2713
+ :param file_file_repository_href: (required)
2714
+ :type file_file_repository_href: str
2715
+ :param patchedfile_file_repository: (required)
2716
+ :type patchedfile_file_repository: PatchedfileFileRepository
2717
+ :param x_task_diagnostics: List of profilers to use on tasks.
2718
+ :type x_task_diagnostics: List[str]
2719
+ :param _request_timeout: timeout setting for this request. If one
2720
+ number provided, it will be total request
2721
+ timeout. It can also be a pair (tuple) of
2722
+ (connection, read) timeouts.
2723
+ :type _request_timeout: int, tuple(int, int), optional
2724
+ :param _request_auth: set to override the auth_settings for an a single
2725
+ request; this effectively ignores the
2726
+ authentication in the spec for a single request.
2727
+ :type _request_auth: dict, optional
2728
+ :param _content_type: force content-type for the request.
2729
+ :type _content_type: str, Optional
2730
+ :param _headers: set to override the headers for a single
2731
+ request; this effectively ignores the headers
2732
+ in the spec for a single request.
2733
+ :type _headers: dict, optional
2734
+ :param _host_index: set to override the host_index for a single
2735
+ request; this effectively ignores the host_index
2736
+ in the spec for a single request.
2737
+ :type _host_index: int, optional
2738
+ :return: Returns the result object.
2739
+ """ # noqa: E501
2740
+
2741
+ _param = self._partial_update_serialize(
2742
+ file_file_repository_href=file_file_repository_href,
2743
+ patchedfile_file_repository=patchedfile_file_repository,
2744
+ x_task_diagnostics=x_task_diagnostics,
2745
+ _request_auth=_request_auth,
2746
+ _content_type=_content_type,
2747
+ _headers=_headers,
2748
+ _host_index=_host_index
2749
+ )
2750
+
2751
+ _response_types_map: Dict[str, Optional[str]] = {
2752
+ '200': "FileFileRepositoryResponse",
2753
+ '202': "AsyncOperationResponse",
2754
+ }
2755
+ response_data = self.api_client.call_api(
2756
+ *_param,
2757
+ _request_timeout=_request_timeout
2758
+ )
2759
+ response_data.read()
2760
+ return self.api_client.response_deserialize(
2761
+ response_data=response_data,
2762
+ response_types_map=_response_types_map,
2763
+ ).data
2764
+
2765
+
2766
+ @validate_call
2767
+ def partial_update_with_http_info(
2768
+ self,
2769
+ file_file_repository_href: StrictStr,
2770
+ patchedfile_file_repository: PatchedfileFileRepository,
2771
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2772
+ _request_timeout: Union[
2773
+ None,
2774
+ Annotated[StrictFloat, Field(gt=0)],
2775
+ Tuple[
2776
+ Annotated[StrictFloat, Field(gt=0)],
2777
+ Annotated[StrictFloat, Field(gt=0)]
2778
+ ]
2779
+ ] = None,
2780
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2781
+ _content_type: Optional[StrictStr] = None,
2782
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2783
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2784
+ ) -> ApiResponse[FileFileRepositoryResponse]:
2785
+ """Update a file repository
2786
+
2787
+ Update the entity partially and trigger an asynchronous task if necessary
2788
+
2789
+ :param file_file_repository_href: (required)
2790
+ :type file_file_repository_href: str
2791
+ :param patchedfile_file_repository: (required)
2792
+ :type patchedfile_file_repository: PatchedfileFileRepository
2793
+ :param x_task_diagnostics: List of profilers to use on tasks.
2794
+ :type x_task_diagnostics: List[str]
2795
+ :param _request_timeout: timeout setting for this request. If one
2796
+ number provided, it will be total request
2797
+ timeout. It can also be a pair (tuple) of
2798
+ (connection, read) timeouts.
2799
+ :type _request_timeout: int, tuple(int, int), optional
2800
+ :param _request_auth: set to override the auth_settings for an a single
2801
+ request; this effectively ignores the
2802
+ authentication in the spec for a single request.
2803
+ :type _request_auth: dict, optional
2804
+ :param _content_type: force content-type for the request.
2805
+ :type _content_type: str, Optional
2806
+ :param _headers: set to override the headers for a single
2807
+ request; this effectively ignores the headers
2808
+ in the spec for a single request.
2809
+ :type _headers: dict, optional
2810
+ :param _host_index: set to override the host_index for a single
2811
+ request; this effectively ignores the host_index
2812
+ in the spec for a single request.
2813
+ :type _host_index: int, optional
2814
+ :return: Returns the result object.
2815
+ """ # noqa: E501
2816
+
2817
+ _param = self._partial_update_serialize(
2818
+ file_file_repository_href=file_file_repository_href,
2819
+ patchedfile_file_repository=patchedfile_file_repository,
2820
+ x_task_diagnostics=x_task_diagnostics,
2821
+ _request_auth=_request_auth,
2822
+ _content_type=_content_type,
2823
+ _headers=_headers,
2824
+ _host_index=_host_index
2825
+ )
2826
+
2827
+ _response_types_map: Dict[str, Optional[str]] = {
2828
+ '200': "FileFileRepositoryResponse",
2829
+ '202': "AsyncOperationResponse",
2830
+ }
2831
+ response_data = self.api_client.call_api(
2832
+ *_param,
2833
+ _request_timeout=_request_timeout
2834
+ )
2835
+ response_data.read()
2836
+ return self.api_client.response_deserialize(
2837
+ response_data=response_data,
2838
+ response_types_map=_response_types_map,
2839
+ )
2840
+
2841
+
2842
+ @validate_call
2843
+ def partial_update_without_preload_content(
2844
+ self,
2845
+ file_file_repository_href: StrictStr,
2846
+ patchedfile_file_repository: PatchedfileFileRepository,
2847
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2848
+ _request_timeout: Union[
2849
+ None,
2850
+ Annotated[StrictFloat, Field(gt=0)],
2851
+ Tuple[
2852
+ Annotated[StrictFloat, Field(gt=0)],
2853
+ Annotated[StrictFloat, Field(gt=0)]
2854
+ ]
2855
+ ] = None,
2856
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2857
+ _content_type: Optional[StrictStr] = None,
2858
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2859
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2860
+ ) -> RESTResponseType:
2861
+ """Update a file repository
2862
+
2863
+ Update the entity partially and trigger an asynchronous task if necessary
2864
+
2865
+ :param file_file_repository_href: (required)
2866
+ :type file_file_repository_href: str
2867
+ :param patchedfile_file_repository: (required)
2868
+ :type patchedfile_file_repository: PatchedfileFileRepository
2869
+ :param x_task_diagnostics: List of profilers to use on tasks.
2870
+ :type x_task_diagnostics: List[str]
2871
+ :param _request_timeout: timeout setting for this request. If one
2872
+ number provided, it will be total request
2873
+ timeout. It can also be a pair (tuple) of
2874
+ (connection, read) timeouts.
2875
+ :type _request_timeout: int, tuple(int, int), optional
2876
+ :param _request_auth: set to override the auth_settings for an a single
2877
+ request; this effectively ignores the
2878
+ authentication in the spec for a single request.
2879
+ :type _request_auth: dict, optional
2880
+ :param _content_type: force content-type for the request.
2881
+ :type _content_type: str, Optional
2882
+ :param _headers: set to override the headers for a single
2883
+ request; this effectively ignores the headers
2884
+ in the spec for a single request.
2885
+ :type _headers: dict, optional
2886
+ :param _host_index: set to override the host_index for a single
2887
+ request; this effectively ignores the host_index
2888
+ in the spec for a single request.
2889
+ :type _host_index: int, optional
2890
+ :return: Returns the result object.
2891
+ """ # noqa: E501
2892
+
2893
+ _param = self._partial_update_serialize(
2894
+ file_file_repository_href=file_file_repository_href,
2895
+ patchedfile_file_repository=patchedfile_file_repository,
2896
+ x_task_diagnostics=x_task_diagnostics,
2897
+ _request_auth=_request_auth,
2898
+ _content_type=_content_type,
2899
+ _headers=_headers,
2900
+ _host_index=_host_index
2901
+ )
2902
+
2903
+ _response_types_map: Dict[str, Optional[str]] = {
2904
+ '200': "FileFileRepositoryResponse",
2905
+ '202': "AsyncOperationResponse",
2906
+ }
2907
+ response_data = self.api_client.call_api(
2908
+ *_param,
2909
+ _request_timeout=_request_timeout
2910
+ )
2911
+ return response_data.response
2912
+
2913
+
2914
+ def _partial_update_serialize(
2915
+ self,
2916
+ file_file_repository_href,
2917
+ patchedfile_file_repository,
2918
+ x_task_diagnostics,
2919
+ _request_auth,
2920
+ _content_type,
2921
+ _headers,
2922
+ _host_index,
2923
+ ) -> RequestSerialized:
2924
+
2925
+ _host = None
2926
+
2927
+ _collection_formats: Dict[str, str] = {
2928
+ 'X-Task-Diagnostics': 'csv',
2929
+ }
2930
+
2931
+ _path_params: Dict[str, str] = {}
2932
+ _query_params: List[Tuple[str, str]] = []
2933
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2934
+ _form_params: List[Tuple[str, str]] = []
2935
+ _files: Dict[
2936
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2937
+ ] = {}
2938
+ _body_params: Optional[bytes] = None
2939
+
2940
+ # process the path parameters
2941
+ if file_file_repository_href is not None:
2942
+ _path_params['file_file_repository_href'] = file_file_repository_href
2943
+ # process the query parameters
2944
+ # process the header parameters
2945
+ if x_task_diagnostics is not None:
2946
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2947
+ # process the form parameters
2948
+ # process the body parameter
2949
+ if patchedfile_file_repository is not None:
2950
+ _body_params = patchedfile_file_repository
2951
+
2952
+
2953
+ # set the HTTP header `Accept`
2954
+ if 'Accept' not in _header_params:
2955
+ _header_params['Accept'] = self.api_client.select_header_accept(
2956
+ [
2957
+ 'application/json'
2958
+ ]
2959
+ )
2960
+
2961
+ # set the HTTP header `Content-Type`
2962
+ if _content_type:
2963
+ _header_params['Content-Type'] = _content_type
2964
+ else:
2965
+ _default_content_type = (
2966
+ self.api_client.select_header_content_type(
2967
+ [
2968
+ 'application/json',
2969
+ 'application/x-www-form-urlencoded',
2970
+ 'multipart/form-data'
2971
+ ]
2972
+ )
2973
+ )
2974
+ if _default_content_type is not None:
2975
+ _header_params['Content-Type'] = _default_content_type
2976
+
2977
+ # authentication setting
2978
+ _auth_settings: List[str] = [
2979
+ 'json_header_remote_authentication',
2980
+ 'basicAuth',
2981
+ 'cookieAuth'
2982
+ ]
2983
+
2984
+ return self.api_client.param_serialize(
2985
+ method='PATCH',
2986
+ resource_path='{file_file_repository_href}',
2987
+ path_params=_path_params,
2988
+ query_params=_query_params,
2989
+ header_params=_header_params,
2990
+ body=_body_params,
2991
+ post_params=_form_params,
2992
+ files=_files,
2993
+ auth_settings=_auth_settings,
2994
+ collection_formats=_collection_formats,
2995
+ _host=_host,
2996
+ _request_auth=_request_auth
2997
+ )
2998
+
2999
+
3000
+
3001
+
3002
+ @validate_call
3003
+ def read(
3004
+ self,
3005
+ file_file_repository_href: StrictStr,
3006
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3007
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
3008
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
3009
+ _request_timeout: Union[
3010
+ None,
3011
+ Annotated[StrictFloat, Field(gt=0)],
3012
+ Tuple[
3013
+ Annotated[StrictFloat, Field(gt=0)],
3014
+ Annotated[StrictFloat, Field(gt=0)]
3015
+ ]
3016
+ ] = None,
3017
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3018
+ _content_type: Optional[StrictStr] = None,
3019
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3020
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3021
+ ) -> FileFileRepositoryResponse:
3022
+ """Inspect a file repository
3023
+
3024
+ FileRepository represents a single file repository, to which content can be synced, added, or removed.
3025
+
3026
+ :param file_file_repository_href: (required)
3027
+ :type file_file_repository_href: str
3028
+ :param x_task_diagnostics: List of profilers to use on tasks.
3029
+ :type x_task_diagnostics: List[str]
3030
+ :param fields: A list of fields to include in the response.
3031
+ :type fields: List[str]
3032
+ :param exclude_fields: A list of fields to exclude from the response.
3033
+ :type exclude_fields: List[str]
3034
+ :param _request_timeout: timeout setting for this request. If one
3035
+ number provided, it will be total request
3036
+ timeout. It can also be a pair (tuple) of
3037
+ (connection, read) timeouts.
3038
+ :type _request_timeout: int, tuple(int, int), optional
3039
+ :param _request_auth: set to override the auth_settings for an a single
3040
+ request; this effectively ignores the
3041
+ authentication in the spec for a single request.
3042
+ :type _request_auth: dict, optional
3043
+ :param _content_type: force content-type for the request.
3044
+ :type _content_type: str, Optional
3045
+ :param _headers: set to override the headers for a single
3046
+ request; this effectively ignores the headers
3047
+ in the spec for a single request.
3048
+ :type _headers: dict, optional
3049
+ :param _host_index: set to override the host_index for a single
3050
+ request; this effectively ignores the host_index
3051
+ in the spec for a single request.
3052
+ :type _host_index: int, optional
3053
+ :return: Returns the result object.
3054
+ """ # noqa: E501
3055
+
3056
+ _param = self._read_serialize(
3057
+ file_file_repository_href=file_file_repository_href,
3058
+ x_task_diagnostics=x_task_diagnostics,
3059
+ fields=fields,
3060
+ exclude_fields=exclude_fields,
3061
+ _request_auth=_request_auth,
3062
+ _content_type=_content_type,
3063
+ _headers=_headers,
3064
+ _host_index=_host_index
3065
+ )
3066
+
3067
+ _response_types_map: Dict[str, Optional[str]] = {
3068
+ '200': "FileFileRepositoryResponse",
3069
+ }
3070
+ response_data = self.api_client.call_api(
3071
+ *_param,
3072
+ _request_timeout=_request_timeout
3073
+ )
3074
+ response_data.read()
3075
+ return self.api_client.response_deserialize(
3076
+ response_data=response_data,
3077
+ response_types_map=_response_types_map,
3078
+ ).data
3079
+
3080
+
3081
+ @validate_call
3082
+ def read_with_http_info(
3083
+ self,
3084
+ file_file_repository_href: StrictStr,
3085
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3086
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
3087
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
3088
+ _request_timeout: Union[
3089
+ None,
3090
+ Annotated[StrictFloat, Field(gt=0)],
3091
+ Tuple[
3092
+ Annotated[StrictFloat, Field(gt=0)],
3093
+ Annotated[StrictFloat, Field(gt=0)]
3094
+ ]
3095
+ ] = None,
3096
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3097
+ _content_type: Optional[StrictStr] = None,
3098
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3099
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3100
+ ) -> ApiResponse[FileFileRepositoryResponse]:
3101
+ """Inspect a file repository
3102
+
3103
+ FileRepository represents a single file repository, to which content can be synced, added, or removed.
3104
+
3105
+ :param file_file_repository_href: (required)
3106
+ :type file_file_repository_href: str
3107
+ :param x_task_diagnostics: List of profilers to use on tasks.
3108
+ :type x_task_diagnostics: List[str]
3109
+ :param fields: A list of fields to include in the response.
3110
+ :type fields: List[str]
3111
+ :param exclude_fields: A list of fields to exclude from the response.
3112
+ :type exclude_fields: List[str]
3113
+ :param _request_timeout: timeout setting for this request. If one
3114
+ number provided, it will be total request
3115
+ timeout. It can also be a pair (tuple) of
3116
+ (connection, read) timeouts.
3117
+ :type _request_timeout: int, tuple(int, int), optional
3118
+ :param _request_auth: set to override the auth_settings for an a single
3119
+ request; this effectively ignores the
3120
+ authentication in the spec for a single request.
3121
+ :type _request_auth: dict, optional
3122
+ :param _content_type: force content-type for the request.
3123
+ :type _content_type: str, Optional
3124
+ :param _headers: set to override the headers for a single
3125
+ request; this effectively ignores the headers
3126
+ in the spec for a single request.
3127
+ :type _headers: dict, optional
3128
+ :param _host_index: set to override the host_index for a single
3129
+ request; this effectively ignores the host_index
3130
+ in the spec for a single request.
3131
+ :type _host_index: int, optional
3132
+ :return: Returns the result object.
3133
+ """ # noqa: E501
3134
+
3135
+ _param = self._read_serialize(
3136
+ file_file_repository_href=file_file_repository_href,
3137
+ x_task_diagnostics=x_task_diagnostics,
3138
+ fields=fields,
3139
+ exclude_fields=exclude_fields,
3140
+ _request_auth=_request_auth,
3141
+ _content_type=_content_type,
3142
+ _headers=_headers,
3143
+ _host_index=_host_index
3144
+ )
3145
+
3146
+ _response_types_map: Dict[str, Optional[str]] = {
3147
+ '200': "FileFileRepositoryResponse",
3148
+ }
3149
+ response_data = self.api_client.call_api(
3150
+ *_param,
3151
+ _request_timeout=_request_timeout
3152
+ )
3153
+ response_data.read()
3154
+ return self.api_client.response_deserialize(
3155
+ response_data=response_data,
3156
+ response_types_map=_response_types_map,
3157
+ )
3158
+
3159
+
3160
+ @validate_call
3161
+ def read_without_preload_content(
3162
+ self,
3163
+ file_file_repository_href: StrictStr,
3164
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3165
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
3166
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
3167
+ _request_timeout: Union[
3168
+ None,
3169
+ Annotated[StrictFloat, Field(gt=0)],
3170
+ Tuple[
3171
+ Annotated[StrictFloat, Field(gt=0)],
3172
+ Annotated[StrictFloat, Field(gt=0)]
3173
+ ]
3174
+ ] = None,
3175
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3176
+ _content_type: Optional[StrictStr] = None,
3177
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3178
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3179
+ ) -> RESTResponseType:
3180
+ """Inspect a file repository
3181
+
3182
+ FileRepository represents a single file repository, to which content can be synced, added, or removed.
3183
+
3184
+ :param file_file_repository_href: (required)
3185
+ :type file_file_repository_href: str
3186
+ :param x_task_diagnostics: List of profilers to use on tasks.
3187
+ :type x_task_diagnostics: List[str]
3188
+ :param fields: A list of fields to include in the response.
3189
+ :type fields: List[str]
3190
+ :param exclude_fields: A list of fields to exclude from the response.
3191
+ :type exclude_fields: List[str]
3192
+ :param _request_timeout: timeout setting for this request. If one
3193
+ number provided, it will be total request
3194
+ timeout. It can also be a pair (tuple) of
3195
+ (connection, read) timeouts.
3196
+ :type _request_timeout: int, tuple(int, int), optional
3197
+ :param _request_auth: set to override the auth_settings for an a single
3198
+ request; this effectively ignores the
3199
+ authentication in the spec for a single request.
3200
+ :type _request_auth: dict, optional
3201
+ :param _content_type: force content-type for the request.
3202
+ :type _content_type: str, Optional
3203
+ :param _headers: set to override the headers for a single
3204
+ request; this effectively ignores the headers
3205
+ in the spec for a single request.
3206
+ :type _headers: dict, optional
3207
+ :param _host_index: set to override the host_index for a single
3208
+ request; this effectively ignores the host_index
3209
+ in the spec for a single request.
3210
+ :type _host_index: int, optional
3211
+ :return: Returns the result object.
3212
+ """ # noqa: E501
3213
+
3214
+ _param = self._read_serialize(
3215
+ file_file_repository_href=file_file_repository_href,
3216
+ x_task_diagnostics=x_task_diagnostics,
3217
+ fields=fields,
3218
+ exclude_fields=exclude_fields,
3219
+ _request_auth=_request_auth,
3220
+ _content_type=_content_type,
3221
+ _headers=_headers,
3222
+ _host_index=_host_index
3223
+ )
3224
+
3225
+ _response_types_map: Dict[str, Optional[str]] = {
3226
+ '200': "FileFileRepositoryResponse",
3227
+ }
3228
+ response_data = self.api_client.call_api(
3229
+ *_param,
3230
+ _request_timeout=_request_timeout
3231
+ )
3232
+ return response_data.response
3233
+
3234
+
3235
+ def _read_serialize(
3236
+ self,
3237
+ file_file_repository_href,
3238
+ x_task_diagnostics,
3239
+ fields,
3240
+ exclude_fields,
3241
+ _request_auth,
3242
+ _content_type,
3243
+ _headers,
3244
+ _host_index,
3245
+ ) -> RequestSerialized:
3246
+
3247
+ _host = None
3248
+
3249
+ _collection_formats: Dict[str, str] = {
3250
+ 'X-Task-Diagnostics': 'csv',
3251
+ 'fields': 'multi',
3252
+ 'exclude_fields': 'multi',
3253
+ }
3254
+
3255
+ _path_params: Dict[str, str] = {}
3256
+ _query_params: List[Tuple[str, str]] = []
3257
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3258
+ _form_params: List[Tuple[str, str]] = []
3259
+ _files: Dict[
3260
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3261
+ ] = {}
3262
+ _body_params: Optional[bytes] = None
3263
+
3264
+ # process the path parameters
3265
+ if file_file_repository_href is not None:
3266
+ _path_params['file_file_repository_href'] = file_file_repository_href
3267
+ # process the query parameters
3268
+ if fields is not None:
3269
+
3270
+ _query_params.append(('fields', fields))
3271
+
3272
+ if exclude_fields is not None:
3273
+
3274
+ _query_params.append(('exclude_fields', exclude_fields))
3275
+
3276
+ # process the header parameters
3277
+ if x_task_diagnostics is not None:
3278
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
3279
+ # process the form parameters
3280
+ # process the body parameter
3281
+
3282
+
3283
+ # set the HTTP header `Accept`
3284
+ if 'Accept' not in _header_params:
3285
+ _header_params['Accept'] = self.api_client.select_header_accept(
3286
+ [
3287
+ 'application/json'
3288
+ ]
3289
+ )
3290
+
3291
+
3292
+ # authentication setting
3293
+ _auth_settings: List[str] = [
3294
+ 'json_header_remote_authentication',
3295
+ 'basicAuth',
3296
+ 'cookieAuth'
3297
+ ]
3298
+
3299
+ return self.api_client.param_serialize(
3300
+ method='GET',
3301
+ resource_path='{file_file_repository_href}',
3302
+ path_params=_path_params,
3303
+ query_params=_query_params,
3304
+ header_params=_header_params,
3305
+ body=_body_params,
3306
+ post_params=_form_params,
3307
+ files=_files,
3308
+ auth_settings=_auth_settings,
3309
+ collection_formats=_collection_formats,
3310
+ _host=_host,
3311
+ _request_auth=_request_auth
3312
+ )
3313
+
3314
+
3315
+
3316
+
3317
+ @validate_call
3318
+ def remove_role(
3319
+ self,
3320
+ file_file_repository_href: StrictStr,
3321
+ nested_role: NestedRole,
3322
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3323
+ _request_timeout: Union[
3324
+ None,
3325
+ Annotated[StrictFloat, Field(gt=0)],
3326
+ Tuple[
3327
+ Annotated[StrictFloat, Field(gt=0)],
3328
+ Annotated[StrictFloat, Field(gt=0)]
3329
+ ]
3330
+ ] = None,
3331
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3332
+ _content_type: Optional[StrictStr] = None,
3333
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3334
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3335
+ ) -> NestedRoleResponse:
3336
+ """Remove a role
3337
+
3338
+ Remove a role for this object from users/groups.
3339
+
3340
+ :param file_file_repository_href: (required)
3341
+ :type file_file_repository_href: str
3342
+ :param nested_role: (required)
3343
+ :type nested_role: NestedRole
3344
+ :param x_task_diagnostics: List of profilers to use on tasks.
3345
+ :type x_task_diagnostics: List[str]
3346
+ :param _request_timeout: timeout setting for this request. If one
3347
+ number provided, it will be total request
3348
+ timeout. It can also be a pair (tuple) of
3349
+ (connection, read) timeouts.
3350
+ :type _request_timeout: int, tuple(int, int), optional
3351
+ :param _request_auth: set to override the auth_settings for an a single
3352
+ request; this effectively ignores the
3353
+ authentication in the spec for a single request.
3354
+ :type _request_auth: dict, optional
3355
+ :param _content_type: force content-type for the request.
3356
+ :type _content_type: str, Optional
3357
+ :param _headers: set to override the headers for a single
3358
+ request; this effectively ignores the headers
3359
+ in the spec for a single request.
3360
+ :type _headers: dict, optional
3361
+ :param _host_index: set to override the host_index for a single
3362
+ request; this effectively ignores the host_index
3363
+ in the spec for a single request.
3364
+ :type _host_index: int, optional
3365
+ :return: Returns the result object.
3366
+ """ # noqa: E501
3367
+
3368
+ _param = self._remove_role_serialize(
3369
+ file_file_repository_href=file_file_repository_href,
3370
+ nested_role=nested_role,
3371
+ x_task_diagnostics=x_task_diagnostics,
3372
+ _request_auth=_request_auth,
3373
+ _content_type=_content_type,
3374
+ _headers=_headers,
3375
+ _host_index=_host_index
3376
+ )
3377
+
3378
+ _response_types_map: Dict[str, Optional[str]] = {
3379
+ '201': "NestedRoleResponse",
3380
+ }
3381
+ response_data = self.api_client.call_api(
3382
+ *_param,
3383
+ _request_timeout=_request_timeout
3384
+ )
3385
+ response_data.read()
3386
+ return self.api_client.response_deserialize(
3387
+ response_data=response_data,
3388
+ response_types_map=_response_types_map,
3389
+ ).data
3390
+
3391
+
3392
+ @validate_call
3393
+ def remove_role_with_http_info(
3394
+ self,
3395
+ file_file_repository_href: StrictStr,
3396
+ nested_role: NestedRole,
3397
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3398
+ _request_timeout: Union[
3399
+ None,
3400
+ Annotated[StrictFloat, Field(gt=0)],
3401
+ Tuple[
3402
+ Annotated[StrictFloat, Field(gt=0)],
3403
+ Annotated[StrictFloat, Field(gt=0)]
3404
+ ]
3405
+ ] = None,
3406
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3407
+ _content_type: Optional[StrictStr] = None,
3408
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3409
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3410
+ ) -> ApiResponse[NestedRoleResponse]:
3411
+ """Remove a role
3412
+
3413
+ Remove a role for this object from users/groups.
3414
+
3415
+ :param file_file_repository_href: (required)
3416
+ :type file_file_repository_href: str
3417
+ :param nested_role: (required)
3418
+ :type nested_role: NestedRole
3419
+ :param x_task_diagnostics: List of profilers to use on tasks.
3420
+ :type x_task_diagnostics: List[str]
3421
+ :param _request_timeout: timeout setting for this request. If one
3422
+ number provided, it will be total request
3423
+ timeout. It can also be a pair (tuple) of
3424
+ (connection, read) timeouts.
3425
+ :type _request_timeout: int, tuple(int, int), optional
3426
+ :param _request_auth: set to override the auth_settings for an a single
3427
+ request; this effectively ignores the
3428
+ authentication in the spec for a single request.
3429
+ :type _request_auth: dict, optional
3430
+ :param _content_type: force content-type for the request.
3431
+ :type _content_type: str, Optional
3432
+ :param _headers: set to override the headers for a single
3433
+ request; this effectively ignores the headers
3434
+ in the spec for a single request.
3435
+ :type _headers: dict, optional
3436
+ :param _host_index: set to override the host_index for a single
3437
+ request; this effectively ignores the host_index
3438
+ in the spec for a single request.
3439
+ :type _host_index: int, optional
3440
+ :return: Returns the result object.
3441
+ """ # noqa: E501
3442
+
3443
+ _param = self._remove_role_serialize(
3444
+ file_file_repository_href=file_file_repository_href,
3445
+ nested_role=nested_role,
3446
+ x_task_diagnostics=x_task_diagnostics,
3447
+ _request_auth=_request_auth,
3448
+ _content_type=_content_type,
3449
+ _headers=_headers,
3450
+ _host_index=_host_index
3451
+ )
3452
+
3453
+ _response_types_map: Dict[str, Optional[str]] = {
3454
+ '201': "NestedRoleResponse",
3455
+ }
3456
+ response_data = self.api_client.call_api(
3457
+ *_param,
3458
+ _request_timeout=_request_timeout
3459
+ )
3460
+ response_data.read()
3461
+ return self.api_client.response_deserialize(
3462
+ response_data=response_data,
3463
+ response_types_map=_response_types_map,
3464
+ )
3465
+
3466
+
3467
+ @validate_call
3468
+ def remove_role_without_preload_content(
3469
+ self,
3470
+ file_file_repository_href: StrictStr,
3471
+ nested_role: NestedRole,
3472
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3473
+ _request_timeout: Union[
3474
+ None,
3475
+ Annotated[StrictFloat, Field(gt=0)],
3476
+ Tuple[
3477
+ Annotated[StrictFloat, Field(gt=0)],
3478
+ Annotated[StrictFloat, Field(gt=0)]
3479
+ ]
3480
+ ] = None,
3481
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3482
+ _content_type: Optional[StrictStr] = None,
3483
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3484
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3485
+ ) -> RESTResponseType:
3486
+ """Remove a role
3487
+
3488
+ Remove a role for this object from users/groups.
3489
+
3490
+ :param file_file_repository_href: (required)
3491
+ :type file_file_repository_href: str
3492
+ :param nested_role: (required)
3493
+ :type nested_role: NestedRole
3494
+ :param x_task_diagnostics: List of profilers to use on tasks.
3495
+ :type x_task_diagnostics: List[str]
3496
+ :param _request_timeout: timeout setting for this request. If one
3497
+ number provided, it will be total request
3498
+ timeout. It can also be a pair (tuple) of
3499
+ (connection, read) timeouts.
3500
+ :type _request_timeout: int, tuple(int, int), optional
3501
+ :param _request_auth: set to override the auth_settings for an a single
3502
+ request; this effectively ignores the
3503
+ authentication in the spec for a single request.
3504
+ :type _request_auth: dict, optional
3505
+ :param _content_type: force content-type for the request.
3506
+ :type _content_type: str, Optional
3507
+ :param _headers: set to override the headers for a single
3508
+ request; this effectively ignores the headers
3509
+ in the spec for a single request.
3510
+ :type _headers: dict, optional
3511
+ :param _host_index: set to override the host_index for a single
3512
+ request; this effectively ignores the host_index
3513
+ in the spec for a single request.
3514
+ :type _host_index: int, optional
3515
+ :return: Returns the result object.
3516
+ """ # noqa: E501
3517
+
3518
+ _param = self._remove_role_serialize(
3519
+ file_file_repository_href=file_file_repository_href,
3520
+ nested_role=nested_role,
3521
+ x_task_diagnostics=x_task_diagnostics,
3522
+ _request_auth=_request_auth,
3523
+ _content_type=_content_type,
3524
+ _headers=_headers,
3525
+ _host_index=_host_index
3526
+ )
3527
+
3528
+ _response_types_map: Dict[str, Optional[str]] = {
3529
+ '201': "NestedRoleResponse",
3530
+ }
3531
+ response_data = self.api_client.call_api(
3532
+ *_param,
3533
+ _request_timeout=_request_timeout
3534
+ )
3535
+ return response_data.response
3536
+
3537
+
3538
+ def _remove_role_serialize(
3539
+ self,
3540
+ file_file_repository_href,
3541
+ nested_role,
3542
+ x_task_diagnostics,
3543
+ _request_auth,
3544
+ _content_type,
3545
+ _headers,
3546
+ _host_index,
3547
+ ) -> RequestSerialized:
3548
+
3549
+ _host = None
3550
+
3551
+ _collection_formats: Dict[str, str] = {
3552
+ 'X-Task-Diagnostics': 'csv',
3553
+ }
3554
+
3555
+ _path_params: Dict[str, str] = {}
3556
+ _query_params: List[Tuple[str, str]] = []
3557
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3558
+ _form_params: List[Tuple[str, str]] = []
3559
+ _files: Dict[
3560
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3561
+ ] = {}
3562
+ _body_params: Optional[bytes] = None
3563
+
3564
+ # process the path parameters
3565
+ if file_file_repository_href is not None:
3566
+ _path_params['file_file_repository_href'] = file_file_repository_href
3567
+ # process the query parameters
3568
+ # process the header parameters
3569
+ if x_task_diagnostics is not None:
3570
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
3571
+ # process the form parameters
3572
+ # process the body parameter
3573
+ if nested_role is not None:
3574
+ _body_params = nested_role
3575
+
3576
+
3577
+ # set the HTTP header `Accept`
3578
+ if 'Accept' not in _header_params:
3579
+ _header_params['Accept'] = self.api_client.select_header_accept(
3580
+ [
3581
+ 'application/json'
3582
+ ]
3583
+ )
3584
+
3585
+ # set the HTTP header `Content-Type`
3586
+ if _content_type:
3587
+ _header_params['Content-Type'] = _content_type
3588
+ else:
3589
+ _default_content_type = (
3590
+ self.api_client.select_header_content_type(
3591
+ [
3592
+ 'application/json',
3593
+ 'application/x-www-form-urlencoded',
3594
+ 'multipart/form-data'
3595
+ ]
3596
+ )
3597
+ )
3598
+ if _default_content_type is not None:
3599
+ _header_params['Content-Type'] = _default_content_type
3600
+
3601
+ # authentication setting
3602
+ _auth_settings: List[str] = [
3603
+ 'json_header_remote_authentication',
3604
+ 'basicAuth',
3605
+ 'cookieAuth'
3606
+ ]
3607
+
3608
+ return self.api_client.param_serialize(
3609
+ method='POST',
3610
+ resource_path='{file_file_repository_href}remove_role/',
3611
+ path_params=_path_params,
3612
+ query_params=_query_params,
3613
+ header_params=_header_params,
3614
+ body=_body_params,
3615
+ post_params=_form_params,
3616
+ files=_files,
3617
+ auth_settings=_auth_settings,
3618
+ collection_formats=_collection_formats,
3619
+ _host=_host,
3620
+ _request_auth=_request_auth
3621
+ )
3622
+
3623
+
3624
+
3625
+
3626
+ @validate_call
3627
+ def set_label(
3628
+ self,
3629
+ file_file_repository_href: StrictStr,
3630
+ set_label: SetLabel,
3631
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3632
+ _request_timeout: Union[
3633
+ None,
3634
+ Annotated[StrictFloat, Field(gt=0)],
3635
+ Tuple[
3636
+ Annotated[StrictFloat, Field(gt=0)],
3637
+ Annotated[StrictFloat, Field(gt=0)]
3638
+ ]
3639
+ ] = None,
3640
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3641
+ _content_type: Optional[StrictStr] = None,
3642
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3643
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3644
+ ) -> SetLabelResponse:
3645
+ """Set a label
3646
+
3647
+ Set a single pulp_label on the object to a specific value or null.
3648
+
3649
+ :param file_file_repository_href: (required)
3650
+ :type file_file_repository_href: str
3651
+ :param set_label: (required)
3652
+ :type set_label: SetLabel
3653
+ :param x_task_diagnostics: List of profilers to use on tasks.
3654
+ :type x_task_diagnostics: List[str]
3655
+ :param _request_timeout: timeout setting for this request. If one
3656
+ number provided, it will be total request
3657
+ timeout. It can also be a pair (tuple) of
3658
+ (connection, read) timeouts.
3659
+ :type _request_timeout: int, tuple(int, int), optional
3660
+ :param _request_auth: set to override the auth_settings for an a single
3661
+ request; this effectively ignores the
3662
+ authentication in the spec for a single request.
3663
+ :type _request_auth: dict, optional
3664
+ :param _content_type: force content-type for the request.
3665
+ :type _content_type: str, Optional
3666
+ :param _headers: set to override the headers for a single
3667
+ request; this effectively ignores the headers
3668
+ in the spec for a single request.
3669
+ :type _headers: dict, optional
3670
+ :param _host_index: set to override the host_index for a single
3671
+ request; this effectively ignores the host_index
3672
+ in the spec for a single request.
3673
+ :type _host_index: int, optional
3674
+ :return: Returns the result object.
3675
+ """ # noqa: E501
3676
+
3677
+ _param = self._set_label_serialize(
3678
+ file_file_repository_href=file_file_repository_href,
3679
+ set_label=set_label,
3680
+ x_task_diagnostics=x_task_diagnostics,
3681
+ _request_auth=_request_auth,
3682
+ _content_type=_content_type,
3683
+ _headers=_headers,
3684
+ _host_index=_host_index
3685
+ )
3686
+
3687
+ _response_types_map: Dict[str, Optional[str]] = {
3688
+ '201': "SetLabelResponse",
3689
+ }
3690
+ response_data = self.api_client.call_api(
3691
+ *_param,
3692
+ _request_timeout=_request_timeout
3693
+ )
3694
+ response_data.read()
3695
+ return self.api_client.response_deserialize(
3696
+ response_data=response_data,
3697
+ response_types_map=_response_types_map,
3698
+ ).data
3699
+
3700
+
3701
+ @validate_call
3702
+ def set_label_with_http_info(
3703
+ self,
3704
+ file_file_repository_href: StrictStr,
3705
+ set_label: SetLabel,
3706
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3707
+ _request_timeout: Union[
3708
+ None,
3709
+ Annotated[StrictFloat, Field(gt=0)],
3710
+ Tuple[
3711
+ Annotated[StrictFloat, Field(gt=0)],
3712
+ Annotated[StrictFloat, Field(gt=0)]
3713
+ ]
3714
+ ] = None,
3715
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3716
+ _content_type: Optional[StrictStr] = None,
3717
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3718
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3719
+ ) -> ApiResponse[SetLabelResponse]:
3720
+ """Set a label
3721
+
3722
+ Set a single pulp_label on the object to a specific value or null.
3723
+
3724
+ :param file_file_repository_href: (required)
3725
+ :type file_file_repository_href: str
3726
+ :param set_label: (required)
3727
+ :type set_label: SetLabel
3728
+ :param x_task_diagnostics: List of profilers to use on tasks.
3729
+ :type x_task_diagnostics: List[str]
3730
+ :param _request_timeout: timeout setting for this request. If one
3731
+ number provided, it will be total request
3732
+ timeout. It can also be a pair (tuple) of
3733
+ (connection, read) timeouts.
3734
+ :type _request_timeout: int, tuple(int, int), optional
3735
+ :param _request_auth: set to override the auth_settings for an a single
3736
+ request; this effectively ignores the
3737
+ authentication in the spec for a single request.
3738
+ :type _request_auth: dict, optional
3739
+ :param _content_type: force content-type for the request.
3740
+ :type _content_type: str, Optional
3741
+ :param _headers: set to override the headers for a single
3742
+ request; this effectively ignores the headers
3743
+ in the spec for a single request.
3744
+ :type _headers: dict, optional
3745
+ :param _host_index: set to override the host_index for a single
3746
+ request; this effectively ignores the host_index
3747
+ in the spec for a single request.
3748
+ :type _host_index: int, optional
3749
+ :return: Returns the result object.
3750
+ """ # noqa: E501
3751
+
3752
+ _param = self._set_label_serialize(
3753
+ file_file_repository_href=file_file_repository_href,
3754
+ set_label=set_label,
3755
+ x_task_diagnostics=x_task_diagnostics,
3756
+ _request_auth=_request_auth,
3757
+ _content_type=_content_type,
3758
+ _headers=_headers,
3759
+ _host_index=_host_index
3760
+ )
3761
+
3762
+ _response_types_map: Dict[str, Optional[str]] = {
3763
+ '201': "SetLabelResponse",
3764
+ }
3765
+ response_data = self.api_client.call_api(
3766
+ *_param,
3767
+ _request_timeout=_request_timeout
3768
+ )
3769
+ response_data.read()
3770
+ return self.api_client.response_deserialize(
3771
+ response_data=response_data,
3772
+ response_types_map=_response_types_map,
3773
+ )
3774
+
3775
+
3776
+ @validate_call
3777
+ def set_label_without_preload_content(
3778
+ self,
3779
+ file_file_repository_href: StrictStr,
3780
+ set_label: SetLabel,
3781
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3782
+ _request_timeout: Union[
3783
+ None,
3784
+ Annotated[StrictFloat, Field(gt=0)],
3785
+ Tuple[
3786
+ Annotated[StrictFloat, Field(gt=0)],
3787
+ Annotated[StrictFloat, Field(gt=0)]
3788
+ ]
3789
+ ] = None,
3790
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3791
+ _content_type: Optional[StrictStr] = None,
3792
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3793
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3794
+ ) -> RESTResponseType:
3795
+ """Set a label
3796
+
3797
+ Set a single pulp_label on the object to a specific value or null.
3798
+
3799
+ :param file_file_repository_href: (required)
3800
+ :type file_file_repository_href: str
3801
+ :param set_label: (required)
3802
+ :type set_label: SetLabel
3803
+ :param x_task_diagnostics: List of profilers to use on tasks.
3804
+ :type x_task_diagnostics: List[str]
3805
+ :param _request_timeout: timeout setting for this request. If one
3806
+ number provided, it will be total request
3807
+ timeout. It can also be a pair (tuple) of
3808
+ (connection, read) timeouts.
3809
+ :type _request_timeout: int, tuple(int, int), optional
3810
+ :param _request_auth: set to override the auth_settings for an a single
3811
+ request; this effectively ignores the
3812
+ authentication in the spec for a single request.
3813
+ :type _request_auth: dict, optional
3814
+ :param _content_type: force content-type for the request.
3815
+ :type _content_type: str, Optional
3816
+ :param _headers: set to override the headers for a single
3817
+ request; this effectively ignores the headers
3818
+ in the spec for a single request.
3819
+ :type _headers: dict, optional
3820
+ :param _host_index: set to override the host_index for a single
3821
+ request; this effectively ignores the host_index
3822
+ in the spec for a single request.
3823
+ :type _host_index: int, optional
3824
+ :return: Returns the result object.
3825
+ """ # noqa: E501
3826
+
3827
+ _param = self._set_label_serialize(
3828
+ file_file_repository_href=file_file_repository_href,
3829
+ set_label=set_label,
3830
+ x_task_diagnostics=x_task_diagnostics,
3831
+ _request_auth=_request_auth,
3832
+ _content_type=_content_type,
3833
+ _headers=_headers,
3834
+ _host_index=_host_index
3835
+ )
3836
+
3837
+ _response_types_map: Dict[str, Optional[str]] = {
3838
+ '201': "SetLabelResponse",
3839
+ }
3840
+ response_data = self.api_client.call_api(
3841
+ *_param,
3842
+ _request_timeout=_request_timeout
3843
+ )
3844
+ return response_data.response
3845
+
3846
+
3847
+ def _set_label_serialize(
3848
+ self,
3849
+ file_file_repository_href,
3850
+ set_label,
3851
+ x_task_diagnostics,
3852
+ _request_auth,
3853
+ _content_type,
3854
+ _headers,
3855
+ _host_index,
3856
+ ) -> RequestSerialized:
3857
+
3858
+ _host = None
3859
+
3860
+ _collection_formats: Dict[str, str] = {
3861
+ 'X-Task-Diagnostics': 'csv',
3862
+ }
3863
+
3864
+ _path_params: Dict[str, str] = {}
3865
+ _query_params: List[Tuple[str, str]] = []
3866
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3867
+ _form_params: List[Tuple[str, str]] = []
3868
+ _files: Dict[
3869
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3870
+ ] = {}
3871
+ _body_params: Optional[bytes] = None
3872
+
3873
+ # process the path parameters
3874
+ if file_file_repository_href is not None:
3875
+ _path_params['file_file_repository_href'] = file_file_repository_href
3876
+ # process the query parameters
3877
+ # process the header parameters
3878
+ if x_task_diagnostics is not None:
3879
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
3880
+ # process the form parameters
3881
+ # process the body parameter
3882
+ if set_label is not None:
3883
+ _body_params = set_label
3884
+
3885
+
3886
+ # set the HTTP header `Accept`
3887
+ if 'Accept' not in _header_params:
3888
+ _header_params['Accept'] = self.api_client.select_header_accept(
3889
+ [
3890
+ 'application/json'
3891
+ ]
3892
+ )
3893
+
3894
+ # set the HTTP header `Content-Type`
3895
+ if _content_type:
3896
+ _header_params['Content-Type'] = _content_type
3897
+ else:
3898
+ _default_content_type = (
3899
+ self.api_client.select_header_content_type(
3900
+ [
3901
+ 'application/json',
3902
+ 'application/x-www-form-urlencoded',
3903
+ 'multipart/form-data'
3904
+ ]
3905
+ )
3906
+ )
3907
+ if _default_content_type is not None:
3908
+ _header_params['Content-Type'] = _default_content_type
3909
+
3910
+ # authentication setting
3911
+ _auth_settings: List[str] = [
3912
+ 'json_header_remote_authentication',
3913
+ 'basicAuth',
3914
+ 'cookieAuth'
3915
+ ]
3916
+
3917
+ return self.api_client.param_serialize(
3918
+ method='POST',
3919
+ resource_path='{file_file_repository_href}set_label/',
3920
+ path_params=_path_params,
3921
+ query_params=_query_params,
3922
+ header_params=_header_params,
3923
+ body=_body_params,
3924
+ post_params=_form_params,
3925
+ files=_files,
3926
+ auth_settings=_auth_settings,
3927
+ collection_formats=_collection_formats,
3928
+ _host=_host,
3929
+ _request_auth=_request_auth
3930
+ )
3931
+
3932
+
3933
+
3934
+
3935
+ @validate_call
3936
+ def sync(
3937
+ self,
3938
+ file_file_repository_href: StrictStr,
3939
+ repository_sync_url: RepositorySyncURL,
3940
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3941
+ _request_timeout: Union[
3942
+ None,
3943
+ Annotated[StrictFloat, Field(gt=0)],
3944
+ Tuple[
3945
+ Annotated[StrictFloat, Field(gt=0)],
3946
+ Annotated[StrictFloat, Field(gt=0)]
3947
+ ]
3948
+ ] = None,
3949
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3950
+ _content_type: Optional[StrictStr] = None,
3951
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3952
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3953
+ ) -> AsyncOperationResponse:
3954
+ """Sync from a remote
3955
+
3956
+ Trigger an asynchronous task to sync file content.
3957
+
3958
+ :param file_file_repository_href: (required)
3959
+ :type file_file_repository_href: str
3960
+ :param repository_sync_url: (required)
3961
+ :type repository_sync_url: RepositorySyncURL
3962
+ :param x_task_diagnostics: List of profilers to use on tasks.
3963
+ :type x_task_diagnostics: List[str]
3964
+ :param _request_timeout: timeout setting for this request. If one
3965
+ number provided, it will be total request
3966
+ timeout. It can also be a pair (tuple) of
3967
+ (connection, read) timeouts.
3968
+ :type _request_timeout: int, tuple(int, int), optional
3969
+ :param _request_auth: set to override the auth_settings for an a single
3970
+ request; this effectively ignores the
3971
+ authentication in the spec for a single request.
3972
+ :type _request_auth: dict, optional
3973
+ :param _content_type: force content-type for the request.
3974
+ :type _content_type: str, Optional
3975
+ :param _headers: set to override the headers for a single
3976
+ request; this effectively ignores the headers
3977
+ in the spec for a single request.
3978
+ :type _headers: dict, optional
3979
+ :param _host_index: set to override the host_index for a single
3980
+ request; this effectively ignores the host_index
3981
+ in the spec for a single request.
3982
+ :type _host_index: int, optional
3983
+ :return: Returns the result object.
3984
+ """ # noqa: E501
3985
+
3986
+ _param = self._sync_serialize(
3987
+ file_file_repository_href=file_file_repository_href,
3988
+ repository_sync_url=repository_sync_url,
3989
+ x_task_diagnostics=x_task_diagnostics,
3990
+ _request_auth=_request_auth,
3991
+ _content_type=_content_type,
3992
+ _headers=_headers,
3993
+ _host_index=_host_index
3994
+ )
3995
+
3996
+ _response_types_map: Dict[str, Optional[str]] = {
3997
+ '202': "AsyncOperationResponse",
3998
+ }
3999
+ response_data = self.api_client.call_api(
4000
+ *_param,
4001
+ _request_timeout=_request_timeout
4002
+ )
4003
+ response_data.read()
4004
+ return self.api_client.response_deserialize(
4005
+ response_data=response_data,
4006
+ response_types_map=_response_types_map,
4007
+ ).data
4008
+
4009
+
4010
+ @validate_call
4011
+ def sync_with_http_info(
4012
+ self,
4013
+ file_file_repository_href: StrictStr,
4014
+ repository_sync_url: RepositorySyncURL,
4015
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4016
+ _request_timeout: Union[
4017
+ None,
4018
+ Annotated[StrictFloat, Field(gt=0)],
4019
+ Tuple[
4020
+ Annotated[StrictFloat, Field(gt=0)],
4021
+ Annotated[StrictFloat, Field(gt=0)]
4022
+ ]
4023
+ ] = None,
4024
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4025
+ _content_type: Optional[StrictStr] = None,
4026
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4027
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4028
+ ) -> ApiResponse[AsyncOperationResponse]:
4029
+ """Sync from a remote
4030
+
4031
+ Trigger an asynchronous task to sync file content.
4032
+
4033
+ :param file_file_repository_href: (required)
4034
+ :type file_file_repository_href: str
4035
+ :param repository_sync_url: (required)
4036
+ :type repository_sync_url: RepositorySyncURL
4037
+ :param x_task_diagnostics: List of profilers to use on tasks.
4038
+ :type x_task_diagnostics: List[str]
4039
+ :param _request_timeout: timeout setting for this request. If one
4040
+ number provided, it will be total request
4041
+ timeout. It can also be a pair (tuple) of
4042
+ (connection, read) timeouts.
4043
+ :type _request_timeout: int, tuple(int, int), optional
4044
+ :param _request_auth: set to override the auth_settings for an a single
4045
+ request; this effectively ignores the
4046
+ authentication in the spec for a single request.
4047
+ :type _request_auth: dict, optional
4048
+ :param _content_type: force content-type for the request.
4049
+ :type _content_type: str, Optional
4050
+ :param _headers: set to override the headers for a single
4051
+ request; this effectively ignores the headers
4052
+ in the spec for a single request.
4053
+ :type _headers: dict, optional
4054
+ :param _host_index: set to override the host_index for a single
4055
+ request; this effectively ignores the host_index
4056
+ in the spec for a single request.
4057
+ :type _host_index: int, optional
4058
+ :return: Returns the result object.
4059
+ """ # noqa: E501
4060
+
4061
+ _param = self._sync_serialize(
4062
+ file_file_repository_href=file_file_repository_href,
4063
+ repository_sync_url=repository_sync_url,
4064
+ x_task_diagnostics=x_task_diagnostics,
4065
+ _request_auth=_request_auth,
4066
+ _content_type=_content_type,
4067
+ _headers=_headers,
4068
+ _host_index=_host_index
4069
+ )
4070
+
4071
+ _response_types_map: Dict[str, Optional[str]] = {
4072
+ '202': "AsyncOperationResponse",
4073
+ }
4074
+ response_data = self.api_client.call_api(
4075
+ *_param,
4076
+ _request_timeout=_request_timeout
4077
+ )
4078
+ response_data.read()
4079
+ return self.api_client.response_deserialize(
4080
+ response_data=response_data,
4081
+ response_types_map=_response_types_map,
4082
+ )
4083
+
4084
+
4085
+ @validate_call
4086
+ def sync_without_preload_content(
4087
+ self,
4088
+ file_file_repository_href: StrictStr,
4089
+ repository_sync_url: RepositorySyncURL,
4090
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4091
+ _request_timeout: Union[
4092
+ None,
4093
+ Annotated[StrictFloat, Field(gt=0)],
4094
+ Tuple[
4095
+ Annotated[StrictFloat, Field(gt=0)],
4096
+ Annotated[StrictFloat, Field(gt=0)]
4097
+ ]
4098
+ ] = None,
4099
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4100
+ _content_type: Optional[StrictStr] = None,
4101
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4102
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4103
+ ) -> RESTResponseType:
4104
+ """Sync from a remote
4105
+
4106
+ Trigger an asynchronous task to sync file content.
4107
+
4108
+ :param file_file_repository_href: (required)
4109
+ :type file_file_repository_href: str
4110
+ :param repository_sync_url: (required)
4111
+ :type repository_sync_url: RepositorySyncURL
4112
+ :param x_task_diagnostics: List of profilers to use on tasks.
4113
+ :type x_task_diagnostics: List[str]
4114
+ :param _request_timeout: timeout setting for this request. If one
4115
+ number provided, it will be total request
4116
+ timeout. It can also be a pair (tuple) of
4117
+ (connection, read) timeouts.
4118
+ :type _request_timeout: int, tuple(int, int), optional
4119
+ :param _request_auth: set to override the auth_settings for an a single
4120
+ request; this effectively ignores the
4121
+ authentication in the spec for a single request.
4122
+ :type _request_auth: dict, optional
4123
+ :param _content_type: force content-type for the request.
4124
+ :type _content_type: str, Optional
4125
+ :param _headers: set to override the headers for a single
4126
+ request; this effectively ignores the headers
4127
+ in the spec for a single request.
4128
+ :type _headers: dict, optional
4129
+ :param _host_index: set to override the host_index for a single
4130
+ request; this effectively ignores the host_index
4131
+ in the spec for a single request.
4132
+ :type _host_index: int, optional
4133
+ :return: Returns the result object.
4134
+ """ # noqa: E501
4135
+
4136
+ _param = self._sync_serialize(
4137
+ file_file_repository_href=file_file_repository_href,
4138
+ repository_sync_url=repository_sync_url,
4139
+ x_task_diagnostics=x_task_diagnostics,
4140
+ _request_auth=_request_auth,
4141
+ _content_type=_content_type,
4142
+ _headers=_headers,
4143
+ _host_index=_host_index
4144
+ )
4145
+
4146
+ _response_types_map: Dict[str, Optional[str]] = {
4147
+ '202': "AsyncOperationResponse",
4148
+ }
4149
+ response_data = self.api_client.call_api(
4150
+ *_param,
4151
+ _request_timeout=_request_timeout
4152
+ )
4153
+ return response_data.response
4154
+
4155
+
4156
+ def _sync_serialize(
4157
+ self,
4158
+ file_file_repository_href,
4159
+ repository_sync_url,
4160
+ x_task_diagnostics,
4161
+ _request_auth,
4162
+ _content_type,
4163
+ _headers,
4164
+ _host_index,
4165
+ ) -> RequestSerialized:
4166
+
4167
+ _host = None
4168
+
4169
+ _collection_formats: Dict[str, str] = {
4170
+ 'X-Task-Diagnostics': 'csv',
4171
+ }
4172
+
4173
+ _path_params: Dict[str, str] = {}
4174
+ _query_params: List[Tuple[str, str]] = []
4175
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4176
+ _form_params: List[Tuple[str, str]] = []
4177
+ _files: Dict[
4178
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4179
+ ] = {}
4180
+ _body_params: Optional[bytes] = None
4181
+
4182
+ # process the path parameters
4183
+ if file_file_repository_href is not None:
4184
+ _path_params['file_file_repository_href'] = file_file_repository_href
4185
+ # process the query parameters
4186
+ # process the header parameters
4187
+ if x_task_diagnostics is not None:
4188
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
4189
+ # process the form parameters
4190
+ # process the body parameter
4191
+ if repository_sync_url is not None:
4192
+ _body_params = repository_sync_url
4193
+
4194
+
4195
+ # set the HTTP header `Accept`
4196
+ if 'Accept' not in _header_params:
4197
+ _header_params['Accept'] = self.api_client.select_header_accept(
4198
+ [
4199
+ 'application/json'
4200
+ ]
4201
+ )
4202
+
4203
+ # set the HTTP header `Content-Type`
4204
+ if _content_type:
4205
+ _header_params['Content-Type'] = _content_type
4206
+ else:
4207
+ _default_content_type = (
4208
+ self.api_client.select_header_content_type(
4209
+ [
4210
+ 'application/json',
4211
+ 'application/x-www-form-urlencoded',
4212
+ 'multipart/form-data'
4213
+ ]
4214
+ )
4215
+ )
4216
+ if _default_content_type is not None:
4217
+ _header_params['Content-Type'] = _default_content_type
4218
+
4219
+ # authentication setting
4220
+ _auth_settings: List[str] = [
4221
+ 'json_header_remote_authentication',
4222
+ 'basicAuth',
4223
+ 'cookieAuth'
4224
+ ]
4225
+
4226
+ return self.api_client.param_serialize(
4227
+ method='POST',
4228
+ resource_path='{file_file_repository_href}sync/',
4229
+ path_params=_path_params,
4230
+ query_params=_query_params,
4231
+ header_params=_header_params,
4232
+ body=_body_params,
4233
+ post_params=_form_params,
4234
+ files=_files,
4235
+ auth_settings=_auth_settings,
4236
+ collection_formats=_collection_formats,
4237
+ _host=_host,
4238
+ _request_auth=_request_auth
4239
+ )
4240
+
4241
+
4242
+
4243
+
4244
+ @validate_call
4245
+ def unset_label(
4246
+ self,
4247
+ file_file_repository_href: StrictStr,
4248
+ unset_label: UnsetLabel,
4249
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4250
+ _request_timeout: Union[
4251
+ None,
4252
+ Annotated[StrictFloat, Field(gt=0)],
4253
+ Tuple[
4254
+ Annotated[StrictFloat, Field(gt=0)],
4255
+ Annotated[StrictFloat, Field(gt=0)]
4256
+ ]
4257
+ ] = None,
4258
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4259
+ _content_type: Optional[StrictStr] = None,
4260
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4261
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4262
+ ) -> UnsetLabelResponse:
4263
+ """Unset a label
4264
+
4265
+ Unset a single pulp_label on the object.
4266
+
4267
+ :param file_file_repository_href: (required)
4268
+ :type file_file_repository_href: str
4269
+ :param unset_label: (required)
4270
+ :type unset_label: UnsetLabel
4271
+ :param x_task_diagnostics: List of profilers to use on tasks.
4272
+ :type x_task_diagnostics: List[str]
4273
+ :param _request_timeout: timeout setting for this request. If one
4274
+ number provided, it will be total request
4275
+ timeout. It can also be a pair (tuple) of
4276
+ (connection, read) timeouts.
4277
+ :type _request_timeout: int, tuple(int, int), optional
4278
+ :param _request_auth: set to override the auth_settings for an a single
4279
+ request; this effectively ignores the
4280
+ authentication in the spec for a single request.
4281
+ :type _request_auth: dict, optional
4282
+ :param _content_type: force content-type for the request.
4283
+ :type _content_type: str, Optional
4284
+ :param _headers: set to override the headers for a single
4285
+ request; this effectively ignores the headers
4286
+ in the spec for a single request.
4287
+ :type _headers: dict, optional
4288
+ :param _host_index: set to override the host_index for a single
4289
+ request; this effectively ignores the host_index
4290
+ in the spec for a single request.
4291
+ :type _host_index: int, optional
4292
+ :return: Returns the result object.
4293
+ """ # noqa: E501
4294
+
4295
+ _param = self._unset_label_serialize(
4296
+ file_file_repository_href=file_file_repository_href,
4297
+ unset_label=unset_label,
4298
+ x_task_diagnostics=x_task_diagnostics,
4299
+ _request_auth=_request_auth,
4300
+ _content_type=_content_type,
4301
+ _headers=_headers,
4302
+ _host_index=_host_index
4303
+ )
4304
+
4305
+ _response_types_map: Dict[str, Optional[str]] = {
4306
+ '201': "UnsetLabelResponse",
4307
+ }
4308
+ response_data = self.api_client.call_api(
4309
+ *_param,
4310
+ _request_timeout=_request_timeout
4311
+ )
4312
+ response_data.read()
4313
+ return self.api_client.response_deserialize(
4314
+ response_data=response_data,
4315
+ response_types_map=_response_types_map,
4316
+ ).data
4317
+
4318
+
4319
+ @validate_call
4320
+ def unset_label_with_http_info(
4321
+ self,
4322
+ file_file_repository_href: StrictStr,
4323
+ unset_label: UnsetLabel,
4324
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4325
+ _request_timeout: Union[
4326
+ None,
4327
+ Annotated[StrictFloat, Field(gt=0)],
4328
+ Tuple[
4329
+ Annotated[StrictFloat, Field(gt=0)],
4330
+ Annotated[StrictFloat, Field(gt=0)]
4331
+ ]
4332
+ ] = None,
4333
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4334
+ _content_type: Optional[StrictStr] = None,
4335
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4336
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4337
+ ) -> ApiResponse[UnsetLabelResponse]:
4338
+ """Unset a label
4339
+
4340
+ Unset a single pulp_label on the object.
4341
+
4342
+ :param file_file_repository_href: (required)
4343
+ :type file_file_repository_href: str
4344
+ :param unset_label: (required)
4345
+ :type unset_label: UnsetLabel
4346
+ :param x_task_diagnostics: List of profilers to use on tasks.
4347
+ :type x_task_diagnostics: List[str]
4348
+ :param _request_timeout: timeout setting for this request. If one
4349
+ number provided, it will be total request
4350
+ timeout. It can also be a pair (tuple) of
4351
+ (connection, read) timeouts.
4352
+ :type _request_timeout: int, tuple(int, int), optional
4353
+ :param _request_auth: set to override the auth_settings for an a single
4354
+ request; this effectively ignores the
4355
+ authentication in the spec for a single request.
4356
+ :type _request_auth: dict, optional
4357
+ :param _content_type: force content-type for the request.
4358
+ :type _content_type: str, Optional
4359
+ :param _headers: set to override the headers for a single
4360
+ request; this effectively ignores the headers
4361
+ in the spec for a single request.
4362
+ :type _headers: dict, optional
4363
+ :param _host_index: set to override the host_index for a single
4364
+ request; this effectively ignores the host_index
4365
+ in the spec for a single request.
4366
+ :type _host_index: int, optional
4367
+ :return: Returns the result object.
4368
+ """ # noqa: E501
4369
+
4370
+ _param = self._unset_label_serialize(
4371
+ file_file_repository_href=file_file_repository_href,
4372
+ unset_label=unset_label,
4373
+ x_task_diagnostics=x_task_diagnostics,
4374
+ _request_auth=_request_auth,
4375
+ _content_type=_content_type,
4376
+ _headers=_headers,
4377
+ _host_index=_host_index
4378
+ )
4379
+
4380
+ _response_types_map: Dict[str, Optional[str]] = {
4381
+ '201': "UnsetLabelResponse",
4382
+ }
4383
+ response_data = self.api_client.call_api(
4384
+ *_param,
4385
+ _request_timeout=_request_timeout
4386
+ )
4387
+ response_data.read()
4388
+ return self.api_client.response_deserialize(
4389
+ response_data=response_data,
4390
+ response_types_map=_response_types_map,
4391
+ )
4392
+
4393
+
4394
+ @validate_call
4395
+ def unset_label_without_preload_content(
4396
+ self,
4397
+ file_file_repository_href: StrictStr,
4398
+ unset_label: UnsetLabel,
4399
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4400
+ _request_timeout: Union[
4401
+ None,
4402
+ Annotated[StrictFloat, Field(gt=0)],
4403
+ Tuple[
4404
+ Annotated[StrictFloat, Field(gt=0)],
4405
+ Annotated[StrictFloat, Field(gt=0)]
4406
+ ]
4407
+ ] = None,
4408
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4409
+ _content_type: Optional[StrictStr] = None,
4410
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4411
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4412
+ ) -> RESTResponseType:
4413
+ """Unset a label
4414
+
4415
+ Unset a single pulp_label on the object.
4416
+
4417
+ :param file_file_repository_href: (required)
4418
+ :type file_file_repository_href: str
4419
+ :param unset_label: (required)
4420
+ :type unset_label: UnsetLabel
4421
+ :param x_task_diagnostics: List of profilers to use on tasks.
4422
+ :type x_task_diagnostics: List[str]
4423
+ :param _request_timeout: timeout setting for this request. If one
4424
+ number provided, it will be total request
4425
+ timeout. It can also be a pair (tuple) of
4426
+ (connection, read) timeouts.
4427
+ :type _request_timeout: int, tuple(int, int), optional
4428
+ :param _request_auth: set to override the auth_settings for an a single
4429
+ request; this effectively ignores the
4430
+ authentication in the spec for a single request.
4431
+ :type _request_auth: dict, optional
4432
+ :param _content_type: force content-type for the request.
4433
+ :type _content_type: str, Optional
4434
+ :param _headers: set to override the headers for a single
4435
+ request; this effectively ignores the headers
4436
+ in the spec for a single request.
4437
+ :type _headers: dict, optional
4438
+ :param _host_index: set to override the host_index for a single
4439
+ request; this effectively ignores the host_index
4440
+ in the spec for a single request.
4441
+ :type _host_index: int, optional
4442
+ :return: Returns the result object.
4443
+ """ # noqa: E501
4444
+
4445
+ _param = self._unset_label_serialize(
4446
+ file_file_repository_href=file_file_repository_href,
4447
+ unset_label=unset_label,
4448
+ x_task_diagnostics=x_task_diagnostics,
4449
+ _request_auth=_request_auth,
4450
+ _content_type=_content_type,
4451
+ _headers=_headers,
4452
+ _host_index=_host_index
4453
+ )
4454
+
4455
+ _response_types_map: Dict[str, Optional[str]] = {
4456
+ '201': "UnsetLabelResponse",
4457
+ }
4458
+ response_data = self.api_client.call_api(
4459
+ *_param,
4460
+ _request_timeout=_request_timeout
4461
+ )
4462
+ return response_data.response
4463
+
4464
+
4465
+ def _unset_label_serialize(
4466
+ self,
4467
+ file_file_repository_href,
4468
+ unset_label,
4469
+ x_task_diagnostics,
4470
+ _request_auth,
4471
+ _content_type,
4472
+ _headers,
4473
+ _host_index,
4474
+ ) -> RequestSerialized:
4475
+
4476
+ _host = None
4477
+
4478
+ _collection_formats: Dict[str, str] = {
4479
+ 'X-Task-Diagnostics': 'csv',
4480
+ }
4481
+
4482
+ _path_params: Dict[str, str] = {}
4483
+ _query_params: List[Tuple[str, str]] = []
4484
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4485
+ _form_params: List[Tuple[str, str]] = []
4486
+ _files: Dict[
4487
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4488
+ ] = {}
4489
+ _body_params: Optional[bytes] = None
4490
+
4491
+ # process the path parameters
4492
+ if file_file_repository_href is not None:
4493
+ _path_params['file_file_repository_href'] = file_file_repository_href
4494
+ # process the query parameters
4495
+ # process the header parameters
4496
+ if x_task_diagnostics is not None:
4497
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
4498
+ # process the form parameters
4499
+ # process the body parameter
4500
+ if unset_label is not None:
4501
+ _body_params = unset_label
4502
+
4503
+
4504
+ # set the HTTP header `Accept`
4505
+ if 'Accept' not in _header_params:
4506
+ _header_params['Accept'] = self.api_client.select_header_accept(
4507
+ [
4508
+ 'application/json'
4509
+ ]
4510
+ )
4511
+
4512
+ # set the HTTP header `Content-Type`
4513
+ if _content_type:
4514
+ _header_params['Content-Type'] = _content_type
4515
+ else:
4516
+ _default_content_type = (
4517
+ self.api_client.select_header_content_type(
4518
+ [
4519
+ 'application/json',
4520
+ 'application/x-www-form-urlencoded',
4521
+ 'multipart/form-data'
4522
+ ]
4523
+ )
4524
+ )
4525
+ if _default_content_type is not None:
4526
+ _header_params['Content-Type'] = _default_content_type
4527
+
4528
+ # authentication setting
4529
+ _auth_settings: List[str] = [
4530
+ 'json_header_remote_authentication',
4531
+ 'basicAuth',
4532
+ 'cookieAuth'
4533
+ ]
4534
+
4535
+ return self.api_client.param_serialize(
4536
+ method='POST',
4537
+ resource_path='{file_file_repository_href}unset_label/',
4538
+ path_params=_path_params,
4539
+ query_params=_query_params,
4540
+ header_params=_header_params,
4541
+ body=_body_params,
4542
+ post_params=_form_params,
4543
+ files=_files,
4544
+ auth_settings=_auth_settings,
4545
+ collection_formats=_collection_formats,
4546
+ _host=_host,
4547
+ _request_auth=_request_auth
4548
+ )
4549
+
4550
+
4551
+
4552
+
4553
+ @validate_call
4554
+ def update(
4555
+ self,
4556
+ file_file_repository_href: StrictStr,
4557
+ file_file_repository: FileFileRepository,
4558
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4559
+ _request_timeout: Union[
4560
+ None,
4561
+ Annotated[StrictFloat, Field(gt=0)],
4562
+ Tuple[
4563
+ Annotated[StrictFloat, Field(gt=0)],
4564
+ Annotated[StrictFloat, Field(gt=0)]
4565
+ ]
4566
+ ] = None,
4567
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4568
+ _content_type: Optional[StrictStr] = None,
4569
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4570
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4571
+ ) -> FileFileRepositoryResponse:
4572
+ """Update a file repository
4573
+
4574
+ Update the entity and trigger an asynchronous task if necessary
4575
+
4576
+ :param file_file_repository_href: (required)
4577
+ :type file_file_repository_href: str
4578
+ :param file_file_repository: (required)
4579
+ :type file_file_repository: FileFileRepository
4580
+ :param x_task_diagnostics: List of profilers to use on tasks.
4581
+ :type x_task_diagnostics: List[str]
4582
+ :param _request_timeout: timeout setting for this request. If one
4583
+ number provided, it will be total request
4584
+ timeout. It can also be a pair (tuple) of
4585
+ (connection, read) timeouts.
4586
+ :type _request_timeout: int, tuple(int, int), optional
4587
+ :param _request_auth: set to override the auth_settings for an a single
4588
+ request; this effectively ignores the
4589
+ authentication in the spec for a single request.
4590
+ :type _request_auth: dict, optional
4591
+ :param _content_type: force content-type for the request.
4592
+ :type _content_type: str, Optional
4593
+ :param _headers: set to override the headers for a single
4594
+ request; this effectively ignores the headers
4595
+ in the spec for a single request.
4596
+ :type _headers: dict, optional
4597
+ :param _host_index: set to override the host_index for a single
4598
+ request; this effectively ignores the host_index
4599
+ in the spec for a single request.
4600
+ :type _host_index: int, optional
4601
+ :return: Returns the result object.
4602
+ """ # noqa: E501
4603
+
4604
+ _param = self._update_serialize(
4605
+ file_file_repository_href=file_file_repository_href,
4606
+ file_file_repository=file_file_repository,
4607
+ x_task_diagnostics=x_task_diagnostics,
4608
+ _request_auth=_request_auth,
4609
+ _content_type=_content_type,
4610
+ _headers=_headers,
4611
+ _host_index=_host_index
4612
+ )
4613
+
4614
+ _response_types_map: Dict[str, Optional[str]] = {
4615
+ '200': "FileFileRepositoryResponse",
4616
+ '202': "AsyncOperationResponse",
4617
+ }
4618
+ response_data = self.api_client.call_api(
4619
+ *_param,
4620
+ _request_timeout=_request_timeout
4621
+ )
4622
+ response_data.read()
4623
+ return self.api_client.response_deserialize(
4624
+ response_data=response_data,
4625
+ response_types_map=_response_types_map,
4626
+ ).data
4627
+
4628
+
4629
+ @validate_call
4630
+ def update_with_http_info(
4631
+ self,
4632
+ file_file_repository_href: StrictStr,
4633
+ file_file_repository: FileFileRepository,
4634
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4635
+ _request_timeout: Union[
4636
+ None,
4637
+ Annotated[StrictFloat, Field(gt=0)],
4638
+ Tuple[
4639
+ Annotated[StrictFloat, Field(gt=0)],
4640
+ Annotated[StrictFloat, Field(gt=0)]
4641
+ ]
4642
+ ] = None,
4643
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4644
+ _content_type: Optional[StrictStr] = None,
4645
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4646
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4647
+ ) -> ApiResponse[FileFileRepositoryResponse]:
4648
+ """Update a file repository
4649
+
4650
+ Update the entity and trigger an asynchronous task if necessary
4651
+
4652
+ :param file_file_repository_href: (required)
4653
+ :type file_file_repository_href: str
4654
+ :param file_file_repository: (required)
4655
+ :type file_file_repository: FileFileRepository
4656
+ :param x_task_diagnostics: List of profilers to use on tasks.
4657
+ :type x_task_diagnostics: List[str]
4658
+ :param _request_timeout: timeout setting for this request. If one
4659
+ number provided, it will be total request
4660
+ timeout. It can also be a pair (tuple) of
4661
+ (connection, read) timeouts.
4662
+ :type _request_timeout: int, tuple(int, int), optional
4663
+ :param _request_auth: set to override the auth_settings for an a single
4664
+ request; this effectively ignores the
4665
+ authentication in the spec for a single request.
4666
+ :type _request_auth: dict, optional
4667
+ :param _content_type: force content-type for the request.
4668
+ :type _content_type: str, Optional
4669
+ :param _headers: set to override the headers for a single
4670
+ request; this effectively ignores the headers
4671
+ in the spec for a single request.
4672
+ :type _headers: dict, optional
4673
+ :param _host_index: set to override the host_index for a single
4674
+ request; this effectively ignores the host_index
4675
+ in the spec for a single request.
4676
+ :type _host_index: int, optional
4677
+ :return: Returns the result object.
4678
+ """ # noqa: E501
4679
+
4680
+ _param = self._update_serialize(
4681
+ file_file_repository_href=file_file_repository_href,
4682
+ file_file_repository=file_file_repository,
4683
+ x_task_diagnostics=x_task_diagnostics,
4684
+ _request_auth=_request_auth,
4685
+ _content_type=_content_type,
4686
+ _headers=_headers,
4687
+ _host_index=_host_index
4688
+ )
4689
+
4690
+ _response_types_map: Dict[str, Optional[str]] = {
4691
+ '200': "FileFileRepositoryResponse",
4692
+ '202': "AsyncOperationResponse",
4693
+ }
4694
+ response_data = self.api_client.call_api(
4695
+ *_param,
4696
+ _request_timeout=_request_timeout
4697
+ )
4698
+ response_data.read()
4699
+ return self.api_client.response_deserialize(
4700
+ response_data=response_data,
4701
+ response_types_map=_response_types_map,
4702
+ )
4703
+
4704
+
4705
+ @validate_call
4706
+ def update_without_preload_content(
4707
+ self,
4708
+ file_file_repository_href: StrictStr,
4709
+ file_file_repository: FileFileRepository,
4710
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
4711
+ _request_timeout: Union[
4712
+ None,
4713
+ Annotated[StrictFloat, Field(gt=0)],
4714
+ Tuple[
4715
+ Annotated[StrictFloat, Field(gt=0)],
4716
+ Annotated[StrictFloat, Field(gt=0)]
4717
+ ]
4718
+ ] = None,
4719
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4720
+ _content_type: Optional[StrictStr] = None,
4721
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4722
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4723
+ ) -> RESTResponseType:
4724
+ """Update a file repository
4725
+
4726
+ Update the entity and trigger an asynchronous task if necessary
4727
+
4728
+ :param file_file_repository_href: (required)
4729
+ :type file_file_repository_href: str
4730
+ :param file_file_repository: (required)
4731
+ :type file_file_repository: FileFileRepository
4732
+ :param x_task_diagnostics: List of profilers to use on tasks.
4733
+ :type x_task_diagnostics: List[str]
4734
+ :param _request_timeout: timeout setting for this request. If one
4735
+ number provided, it will be total request
4736
+ timeout. It can also be a pair (tuple) of
4737
+ (connection, read) timeouts.
4738
+ :type _request_timeout: int, tuple(int, int), optional
4739
+ :param _request_auth: set to override the auth_settings for an a single
4740
+ request; this effectively ignores the
4741
+ authentication in the spec for a single request.
4742
+ :type _request_auth: dict, optional
4743
+ :param _content_type: force content-type for the request.
4744
+ :type _content_type: str, Optional
4745
+ :param _headers: set to override the headers for a single
4746
+ request; this effectively ignores the headers
4747
+ in the spec for a single request.
4748
+ :type _headers: dict, optional
4749
+ :param _host_index: set to override the host_index for a single
4750
+ request; this effectively ignores the host_index
4751
+ in the spec for a single request.
4752
+ :type _host_index: int, optional
4753
+ :return: Returns the result object.
4754
+ """ # noqa: E501
4755
+
4756
+ _param = self._update_serialize(
4757
+ file_file_repository_href=file_file_repository_href,
4758
+ file_file_repository=file_file_repository,
4759
+ x_task_diagnostics=x_task_diagnostics,
4760
+ _request_auth=_request_auth,
4761
+ _content_type=_content_type,
4762
+ _headers=_headers,
4763
+ _host_index=_host_index
4764
+ )
4765
+
4766
+ _response_types_map: Dict[str, Optional[str]] = {
4767
+ '200': "FileFileRepositoryResponse",
4768
+ '202': "AsyncOperationResponse",
4769
+ }
4770
+ response_data = self.api_client.call_api(
4771
+ *_param,
4772
+ _request_timeout=_request_timeout
4773
+ )
4774
+ return response_data.response
4775
+
4776
+
4777
+ def _update_serialize(
4778
+ self,
4779
+ file_file_repository_href,
4780
+ file_file_repository,
4781
+ x_task_diagnostics,
4782
+ _request_auth,
4783
+ _content_type,
4784
+ _headers,
4785
+ _host_index,
4786
+ ) -> RequestSerialized:
4787
+
4788
+ _host = None
4789
+
4790
+ _collection_formats: Dict[str, str] = {
4791
+ 'X-Task-Diagnostics': 'csv',
4792
+ }
4793
+
4794
+ _path_params: Dict[str, str] = {}
4795
+ _query_params: List[Tuple[str, str]] = []
4796
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4797
+ _form_params: List[Tuple[str, str]] = []
4798
+ _files: Dict[
4799
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4800
+ ] = {}
4801
+ _body_params: Optional[bytes] = None
4802
+
4803
+ # process the path parameters
4804
+ if file_file_repository_href is not None:
4805
+ _path_params['file_file_repository_href'] = file_file_repository_href
4806
+ # process the query parameters
4807
+ # process the header parameters
4808
+ if x_task_diagnostics is not None:
4809
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
4810
+ # process the form parameters
4811
+ # process the body parameter
4812
+ if file_file_repository is not None:
4813
+ _body_params = file_file_repository
4814
+
4815
+
4816
+ # set the HTTP header `Accept`
4817
+ if 'Accept' not in _header_params:
4818
+ _header_params['Accept'] = self.api_client.select_header_accept(
4819
+ [
4820
+ 'application/json'
4821
+ ]
4822
+ )
4823
+
4824
+ # set the HTTP header `Content-Type`
4825
+ if _content_type:
4826
+ _header_params['Content-Type'] = _content_type
4827
+ else:
4828
+ _default_content_type = (
4829
+ self.api_client.select_header_content_type(
4830
+ [
4831
+ 'application/json',
4832
+ 'application/x-www-form-urlencoded',
4833
+ 'multipart/form-data'
4834
+ ]
4835
+ )
4836
+ )
4837
+ if _default_content_type is not None:
4838
+ _header_params['Content-Type'] = _default_content_type
4839
+
4840
+ # authentication setting
4841
+ _auth_settings: List[str] = [
4842
+ 'json_header_remote_authentication',
4843
+ 'basicAuth',
4844
+ 'cookieAuth'
4845
+ ]
4846
+
4847
+ return self.api_client.param_serialize(
4848
+ method='PUT',
4849
+ resource_path='{file_file_repository_href}',
4850
+ path_params=_path_params,
4851
+ query_params=_query_params,
4852
+ header_params=_header_params,
4853
+ body=_body_params,
4854
+ post_params=_form_params,
4855
+ files=_files,
4856
+ auth_settings=_auth_settings,
4857
+ collection_formats=_collection_formats,
4858
+ _host=_host,
4859
+ _request_auth=_request_auth
4860
+ )
4861
+
4862
+