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