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,2881 @@
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 datetime import datetime
21
+ from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
22
+ from typing import List, Optional
23
+ from typing_extensions import Annotated
24
+ from pulpcore.client.pulp_file.models.async_operation_response import AsyncOperationResponse
25
+ from pulpcore.client.pulp_file.models.file_file_publication import FileFilePublication
26
+ from pulpcore.client.pulp_file.models.file_file_publication_response import FileFilePublicationResponse
27
+ from pulpcore.client.pulp_file.models.my_permissions_response import MyPermissionsResponse
28
+ from pulpcore.client.pulp_file.models.nested_role import NestedRole
29
+ from pulpcore.client.pulp_file.models.nested_role_response import NestedRoleResponse
30
+ from pulpcore.client.pulp_file.models.object_roles_response import ObjectRolesResponse
31
+ from pulpcore.client.pulp_file.models.paginatedfile_file_publication_response_list import PaginatedfileFilePublicationResponseList
32
+
33
+ from pulpcore.client.pulp_file.api_client import ApiClient, RequestSerialized
34
+ from pulpcore.client.pulp_file.api_response import ApiResponse
35
+ from pulpcore.client.pulp_file.rest import RESTResponseType
36
+
37
+
38
+ class PublicationsFileApi:
39
+ """NOTE: This class is auto generated by OpenAPI Generator
40
+ Ref: https://openapi-generator.tech
41
+
42
+ Do not edit the class manually.
43
+ """
44
+
45
+ def __init__(self, api_client=None) -> None:
46
+ if api_client is None:
47
+ api_client = ApiClient.get_default()
48
+ self.api_client = api_client
49
+
50
+
51
+ @validate_call
52
+ def add_role(
53
+ self,
54
+ file_file_publication_href: StrictStr,
55
+ nested_role: NestedRole,
56
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
57
+ _request_timeout: Union[
58
+ None,
59
+ Annotated[StrictFloat, Field(gt=0)],
60
+ Tuple[
61
+ Annotated[StrictFloat, Field(gt=0)],
62
+ Annotated[StrictFloat, Field(gt=0)]
63
+ ]
64
+ ] = None,
65
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
66
+ _content_type: Optional[StrictStr] = None,
67
+ _headers: Optional[Dict[StrictStr, Any]] = None,
68
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
69
+ ) -> NestedRoleResponse:
70
+ """Add a role
71
+
72
+ Add a role for this object to users/groups.
73
+
74
+ :param file_file_publication_href: (required)
75
+ :type file_file_publication_href: str
76
+ :param nested_role: (required)
77
+ :type nested_role: NestedRole
78
+ :param x_task_diagnostics: List of profilers to use on tasks.
79
+ :type x_task_diagnostics: List[str]
80
+ :param _request_timeout: timeout setting for this request. If one
81
+ number provided, it will be total request
82
+ timeout. It can also be a pair (tuple) of
83
+ (connection, read) timeouts.
84
+ :type _request_timeout: int, tuple(int, int), optional
85
+ :param _request_auth: set to override the auth_settings for an a single
86
+ request; this effectively ignores the
87
+ authentication in the spec for a single request.
88
+ :type _request_auth: dict, optional
89
+ :param _content_type: force content-type for the request.
90
+ :type _content_type: str, Optional
91
+ :param _headers: set to override the headers for a single
92
+ request; this effectively ignores the headers
93
+ in the spec for a single request.
94
+ :type _headers: dict, optional
95
+ :param _host_index: set to override the host_index for a single
96
+ request; this effectively ignores the host_index
97
+ in the spec for a single request.
98
+ :type _host_index: int, optional
99
+ :return: Returns the result object.
100
+ """ # noqa: E501
101
+
102
+ _param = self._add_role_serialize(
103
+ file_file_publication_href=file_file_publication_href,
104
+ nested_role=nested_role,
105
+ x_task_diagnostics=x_task_diagnostics,
106
+ _request_auth=_request_auth,
107
+ _content_type=_content_type,
108
+ _headers=_headers,
109
+ _host_index=_host_index
110
+ )
111
+
112
+ _response_types_map: Dict[str, Optional[str]] = {
113
+ '201': "NestedRoleResponse",
114
+ }
115
+ response_data = self.api_client.call_api(
116
+ *_param,
117
+ _request_timeout=_request_timeout
118
+ )
119
+ response_data.read()
120
+ return self.api_client.response_deserialize(
121
+ response_data=response_data,
122
+ response_types_map=_response_types_map,
123
+ ).data
124
+
125
+
126
+ @validate_call
127
+ def add_role_with_http_info(
128
+ self,
129
+ file_file_publication_href: StrictStr,
130
+ nested_role: NestedRole,
131
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
132
+ _request_timeout: Union[
133
+ None,
134
+ Annotated[StrictFloat, Field(gt=0)],
135
+ Tuple[
136
+ Annotated[StrictFloat, Field(gt=0)],
137
+ Annotated[StrictFloat, Field(gt=0)]
138
+ ]
139
+ ] = None,
140
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
141
+ _content_type: Optional[StrictStr] = None,
142
+ _headers: Optional[Dict[StrictStr, Any]] = None,
143
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
144
+ ) -> ApiResponse[NestedRoleResponse]:
145
+ """Add a role
146
+
147
+ Add a role for this object to users/groups.
148
+
149
+ :param file_file_publication_href: (required)
150
+ :type file_file_publication_href: str
151
+ :param nested_role: (required)
152
+ :type nested_role: NestedRole
153
+ :param x_task_diagnostics: List of profilers to use on tasks.
154
+ :type x_task_diagnostics: List[str]
155
+ :param _request_timeout: timeout setting for this request. If one
156
+ number provided, it will be total request
157
+ timeout. It can also be a pair (tuple) of
158
+ (connection, read) timeouts.
159
+ :type _request_timeout: int, tuple(int, int), optional
160
+ :param _request_auth: set to override the auth_settings for an a single
161
+ request; this effectively ignores the
162
+ authentication in the spec for a single request.
163
+ :type _request_auth: dict, optional
164
+ :param _content_type: force content-type for the request.
165
+ :type _content_type: str, Optional
166
+ :param _headers: set to override the headers for a single
167
+ request; this effectively ignores the headers
168
+ in the spec for a single request.
169
+ :type _headers: dict, optional
170
+ :param _host_index: set to override the host_index for a single
171
+ request; this effectively ignores the host_index
172
+ in the spec for a single request.
173
+ :type _host_index: int, optional
174
+ :return: Returns the result object.
175
+ """ # noqa: E501
176
+
177
+ _param = self._add_role_serialize(
178
+ file_file_publication_href=file_file_publication_href,
179
+ nested_role=nested_role,
180
+ x_task_diagnostics=x_task_diagnostics,
181
+ _request_auth=_request_auth,
182
+ _content_type=_content_type,
183
+ _headers=_headers,
184
+ _host_index=_host_index
185
+ )
186
+
187
+ _response_types_map: Dict[str, Optional[str]] = {
188
+ '201': "NestedRoleResponse",
189
+ }
190
+ response_data = self.api_client.call_api(
191
+ *_param,
192
+ _request_timeout=_request_timeout
193
+ )
194
+ response_data.read()
195
+ return self.api_client.response_deserialize(
196
+ response_data=response_data,
197
+ response_types_map=_response_types_map,
198
+ )
199
+
200
+
201
+ @validate_call
202
+ def add_role_without_preload_content(
203
+ self,
204
+ file_file_publication_href: StrictStr,
205
+ nested_role: NestedRole,
206
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
207
+ _request_timeout: Union[
208
+ None,
209
+ Annotated[StrictFloat, Field(gt=0)],
210
+ Tuple[
211
+ Annotated[StrictFloat, Field(gt=0)],
212
+ Annotated[StrictFloat, Field(gt=0)]
213
+ ]
214
+ ] = None,
215
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
216
+ _content_type: Optional[StrictStr] = None,
217
+ _headers: Optional[Dict[StrictStr, Any]] = None,
218
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
219
+ ) -> RESTResponseType:
220
+ """Add a role
221
+
222
+ Add a role for this object to users/groups.
223
+
224
+ :param file_file_publication_href: (required)
225
+ :type file_file_publication_href: str
226
+ :param nested_role: (required)
227
+ :type nested_role: NestedRole
228
+ :param x_task_diagnostics: List of profilers to use on tasks.
229
+ :type x_task_diagnostics: List[str]
230
+ :param _request_timeout: timeout setting for this request. If one
231
+ number provided, it will be total request
232
+ timeout. It can also be a pair (tuple) of
233
+ (connection, read) timeouts.
234
+ :type _request_timeout: int, tuple(int, int), optional
235
+ :param _request_auth: set to override the auth_settings for an a single
236
+ request; this effectively ignores the
237
+ authentication in the spec for a single request.
238
+ :type _request_auth: dict, optional
239
+ :param _content_type: force content-type for the request.
240
+ :type _content_type: str, Optional
241
+ :param _headers: set to override the headers for a single
242
+ request; this effectively ignores the headers
243
+ in the spec for a single request.
244
+ :type _headers: dict, optional
245
+ :param _host_index: set to override the host_index for a single
246
+ request; this effectively ignores the host_index
247
+ in the spec for a single request.
248
+ :type _host_index: int, optional
249
+ :return: Returns the result object.
250
+ """ # noqa: E501
251
+
252
+ _param = self._add_role_serialize(
253
+ file_file_publication_href=file_file_publication_href,
254
+ nested_role=nested_role,
255
+ x_task_diagnostics=x_task_diagnostics,
256
+ _request_auth=_request_auth,
257
+ _content_type=_content_type,
258
+ _headers=_headers,
259
+ _host_index=_host_index
260
+ )
261
+
262
+ _response_types_map: Dict[str, Optional[str]] = {
263
+ '201': "NestedRoleResponse",
264
+ }
265
+ response_data = self.api_client.call_api(
266
+ *_param,
267
+ _request_timeout=_request_timeout
268
+ )
269
+ return response_data.response
270
+
271
+
272
+ def _add_role_serialize(
273
+ self,
274
+ file_file_publication_href,
275
+ nested_role,
276
+ x_task_diagnostics,
277
+ _request_auth,
278
+ _content_type,
279
+ _headers,
280
+ _host_index,
281
+ ) -> RequestSerialized:
282
+
283
+ _host = None
284
+
285
+ _collection_formats: Dict[str, str] = {
286
+ 'X-Task-Diagnostics': 'csv',
287
+ }
288
+
289
+ _path_params: Dict[str, str] = {}
290
+ _query_params: List[Tuple[str, str]] = []
291
+ _header_params: Dict[str, Optional[str]] = _headers or {}
292
+ _form_params: List[Tuple[str, str]] = []
293
+ _files: Dict[
294
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
295
+ ] = {}
296
+ _body_params: Optional[bytes] = None
297
+
298
+ # process the path parameters
299
+ if file_file_publication_href is not None:
300
+ _path_params['file_file_publication_href'] = file_file_publication_href
301
+ # process the query parameters
302
+ # process the header parameters
303
+ if x_task_diagnostics is not None:
304
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
305
+ # process the form parameters
306
+ # process the body parameter
307
+ if nested_role is not None:
308
+ _body_params = nested_role
309
+
310
+
311
+ # set the HTTP header `Accept`
312
+ if 'Accept' not in _header_params:
313
+ _header_params['Accept'] = self.api_client.select_header_accept(
314
+ [
315
+ 'application/json'
316
+ ]
317
+ )
318
+
319
+ # set the HTTP header `Content-Type`
320
+ if _content_type:
321
+ _header_params['Content-Type'] = _content_type
322
+ else:
323
+ _default_content_type = (
324
+ self.api_client.select_header_content_type(
325
+ [
326
+ 'application/json',
327
+ 'application/x-www-form-urlencoded',
328
+ 'multipart/form-data'
329
+ ]
330
+ )
331
+ )
332
+ if _default_content_type is not None:
333
+ _header_params['Content-Type'] = _default_content_type
334
+
335
+ # authentication setting
336
+ _auth_settings: List[str] = [
337
+ 'json_header_remote_authentication',
338
+ 'basicAuth',
339
+ 'cookieAuth'
340
+ ]
341
+
342
+ return self.api_client.param_serialize(
343
+ method='POST',
344
+ resource_path='{file_file_publication_href}add_role/',
345
+ path_params=_path_params,
346
+ query_params=_query_params,
347
+ header_params=_header_params,
348
+ body=_body_params,
349
+ post_params=_form_params,
350
+ files=_files,
351
+ auth_settings=_auth_settings,
352
+ collection_formats=_collection_formats,
353
+ _host=_host,
354
+ _request_auth=_request_auth
355
+ )
356
+
357
+
358
+
359
+
360
+ @validate_call
361
+ def create(
362
+ self,
363
+ file_file_publication: FileFilePublication,
364
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
365
+ pulp_domain: StrictStr = "default",
366
+ _request_timeout: Union[
367
+ None,
368
+ Annotated[StrictFloat, Field(gt=0)],
369
+ Tuple[
370
+ Annotated[StrictFloat, Field(gt=0)],
371
+ Annotated[StrictFloat, Field(gt=0)]
372
+ ]
373
+ ] = None,
374
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
375
+ _content_type: Optional[StrictStr] = None,
376
+ _headers: Optional[Dict[StrictStr, Any]] = None,
377
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
378
+ ) -> AsyncOperationResponse:
379
+ """Create a file publication
380
+
381
+ Trigger an asynchronous task to publish file content.
382
+
383
+ :param pulp_domain: (required)
384
+ :type pulp_domain: str
385
+ :param file_file_publication: (required)
386
+ :type file_file_publication: FileFilePublication
387
+ :param x_task_diagnostics: List of profilers to use on tasks.
388
+ :type x_task_diagnostics: List[str]
389
+ :param _request_timeout: timeout setting for this request. If one
390
+ number provided, it will be total request
391
+ timeout. It can also be a pair (tuple) of
392
+ (connection, read) timeouts.
393
+ :type _request_timeout: int, tuple(int, int), optional
394
+ :param _request_auth: set to override the auth_settings for an a single
395
+ request; this effectively ignores the
396
+ authentication in the spec for a single request.
397
+ :type _request_auth: dict, optional
398
+ :param _content_type: force content-type for the request.
399
+ :type _content_type: str, Optional
400
+ :param _headers: set to override the headers for a single
401
+ request; this effectively ignores the headers
402
+ in the spec for a single request.
403
+ :type _headers: dict, optional
404
+ :param _host_index: set to override the host_index for a single
405
+ request; this effectively ignores the host_index
406
+ in the spec for a single request.
407
+ :type _host_index: int, optional
408
+ :return: Returns the result object.
409
+ """ # noqa: E501
410
+
411
+ _param = self._create_serialize(
412
+ pulp_domain=pulp_domain,
413
+ file_file_publication=file_file_publication,
414
+ x_task_diagnostics=x_task_diagnostics,
415
+ _request_auth=_request_auth,
416
+ _content_type=_content_type,
417
+ _headers=_headers,
418
+ _host_index=_host_index
419
+ )
420
+
421
+ _response_types_map: Dict[str, Optional[str]] = {
422
+ '202': "AsyncOperationResponse",
423
+ }
424
+ response_data = self.api_client.call_api(
425
+ *_param,
426
+ _request_timeout=_request_timeout
427
+ )
428
+ response_data.read()
429
+ return self.api_client.response_deserialize(
430
+ response_data=response_data,
431
+ response_types_map=_response_types_map,
432
+ ).data
433
+
434
+
435
+ @validate_call
436
+ def create_with_http_info(
437
+ self,
438
+ file_file_publication: FileFilePublication,
439
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
440
+ pulp_domain: StrictStr = "default",
441
+ _request_timeout: Union[
442
+ None,
443
+ Annotated[StrictFloat, Field(gt=0)],
444
+ Tuple[
445
+ Annotated[StrictFloat, Field(gt=0)],
446
+ Annotated[StrictFloat, Field(gt=0)]
447
+ ]
448
+ ] = None,
449
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
450
+ _content_type: Optional[StrictStr] = None,
451
+ _headers: Optional[Dict[StrictStr, Any]] = None,
452
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
453
+ ) -> ApiResponse[AsyncOperationResponse]:
454
+ """Create a file publication
455
+
456
+ Trigger an asynchronous task to publish file content.
457
+
458
+ :param pulp_domain: (required)
459
+ :type pulp_domain: str
460
+ :param file_file_publication: (required)
461
+ :type file_file_publication: FileFilePublication
462
+ :param x_task_diagnostics: List of profilers to use on tasks.
463
+ :type x_task_diagnostics: List[str]
464
+ :param _request_timeout: timeout setting for this request. If one
465
+ number provided, it will be total request
466
+ timeout. It can also be a pair (tuple) of
467
+ (connection, read) timeouts.
468
+ :type _request_timeout: int, tuple(int, int), optional
469
+ :param _request_auth: set to override the auth_settings for an a single
470
+ request; this effectively ignores the
471
+ authentication in the spec for a single request.
472
+ :type _request_auth: dict, optional
473
+ :param _content_type: force content-type for the request.
474
+ :type _content_type: str, Optional
475
+ :param _headers: set to override the headers for a single
476
+ request; this effectively ignores the headers
477
+ in the spec for a single request.
478
+ :type _headers: dict, optional
479
+ :param _host_index: set to override the host_index for a single
480
+ request; this effectively ignores the host_index
481
+ in the spec for a single request.
482
+ :type _host_index: int, optional
483
+ :return: Returns the result object.
484
+ """ # noqa: E501
485
+
486
+ _param = self._create_serialize(
487
+ pulp_domain=pulp_domain,
488
+ file_file_publication=file_file_publication,
489
+ x_task_diagnostics=x_task_diagnostics,
490
+ _request_auth=_request_auth,
491
+ _content_type=_content_type,
492
+ _headers=_headers,
493
+ _host_index=_host_index
494
+ )
495
+
496
+ _response_types_map: Dict[str, Optional[str]] = {
497
+ '202': "AsyncOperationResponse",
498
+ }
499
+ response_data = self.api_client.call_api(
500
+ *_param,
501
+ _request_timeout=_request_timeout
502
+ )
503
+ response_data.read()
504
+ return self.api_client.response_deserialize(
505
+ response_data=response_data,
506
+ response_types_map=_response_types_map,
507
+ )
508
+
509
+
510
+ @validate_call
511
+ def create_without_preload_content(
512
+ self,
513
+ file_file_publication: FileFilePublication,
514
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
515
+ pulp_domain: StrictStr = "default",
516
+ _request_timeout: Union[
517
+ None,
518
+ Annotated[StrictFloat, Field(gt=0)],
519
+ Tuple[
520
+ Annotated[StrictFloat, Field(gt=0)],
521
+ Annotated[StrictFloat, Field(gt=0)]
522
+ ]
523
+ ] = None,
524
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
525
+ _content_type: Optional[StrictStr] = None,
526
+ _headers: Optional[Dict[StrictStr, Any]] = None,
527
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
528
+ ) -> RESTResponseType:
529
+ """Create a file publication
530
+
531
+ Trigger an asynchronous task to publish file content.
532
+
533
+ :param pulp_domain: (required)
534
+ :type pulp_domain: str
535
+ :param file_file_publication: (required)
536
+ :type file_file_publication: FileFilePublication
537
+ :param x_task_diagnostics: List of profilers to use on tasks.
538
+ :type x_task_diagnostics: List[str]
539
+ :param _request_timeout: timeout setting for this request. If one
540
+ number provided, it will be total request
541
+ timeout. It can also be a pair (tuple) of
542
+ (connection, read) timeouts.
543
+ :type _request_timeout: int, tuple(int, int), optional
544
+ :param _request_auth: set to override the auth_settings for an a single
545
+ request; this effectively ignores the
546
+ authentication in the spec for a single request.
547
+ :type _request_auth: dict, optional
548
+ :param _content_type: force content-type for the request.
549
+ :type _content_type: str, Optional
550
+ :param _headers: set to override the headers for a single
551
+ request; this effectively ignores the headers
552
+ in the spec for a single request.
553
+ :type _headers: dict, optional
554
+ :param _host_index: set to override the host_index for a single
555
+ request; this effectively ignores the host_index
556
+ in the spec for a single request.
557
+ :type _host_index: int, optional
558
+ :return: Returns the result object.
559
+ """ # noqa: E501
560
+
561
+ _param = self._create_serialize(
562
+ pulp_domain=pulp_domain,
563
+ file_file_publication=file_file_publication,
564
+ x_task_diagnostics=x_task_diagnostics,
565
+ _request_auth=_request_auth,
566
+ _content_type=_content_type,
567
+ _headers=_headers,
568
+ _host_index=_host_index
569
+ )
570
+
571
+ _response_types_map: Dict[str, Optional[str]] = {
572
+ '202': "AsyncOperationResponse",
573
+ }
574
+ response_data = self.api_client.call_api(
575
+ *_param,
576
+ _request_timeout=_request_timeout
577
+ )
578
+ return response_data.response
579
+
580
+
581
+ def _create_serialize(
582
+ self,
583
+ pulp_domain,
584
+ file_file_publication,
585
+ x_task_diagnostics,
586
+ _request_auth,
587
+ _content_type,
588
+ _headers,
589
+ _host_index,
590
+ ) -> RequestSerialized:
591
+
592
+ _host = None
593
+
594
+ _collection_formats: Dict[str, str] = {
595
+ 'X-Task-Diagnostics': 'csv',
596
+ }
597
+
598
+ _path_params: Dict[str, str] = {}
599
+ _query_params: List[Tuple[str, str]] = []
600
+ _header_params: Dict[str, Optional[str]] = _headers or {}
601
+ _form_params: List[Tuple[str, str]] = []
602
+ _files: Dict[
603
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
604
+ ] = {}
605
+ _body_params: Optional[bytes] = None
606
+
607
+ # process the path parameters
608
+ if pulp_domain is not None:
609
+ _path_params['pulp_domain'] = pulp_domain
610
+ # process the query parameters
611
+ # process the header parameters
612
+ if x_task_diagnostics is not None:
613
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
614
+ # process the form parameters
615
+ # process the body parameter
616
+ if file_file_publication is not None:
617
+ _body_params = file_file_publication
618
+
619
+
620
+ # set the HTTP header `Accept`
621
+ if 'Accept' not in _header_params:
622
+ _header_params['Accept'] = self.api_client.select_header_accept(
623
+ [
624
+ 'application/json'
625
+ ]
626
+ )
627
+
628
+ # set the HTTP header `Content-Type`
629
+ if _content_type:
630
+ _header_params['Content-Type'] = _content_type
631
+ else:
632
+ _default_content_type = (
633
+ self.api_client.select_header_content_type(
634
+ [
635
+ 'application/json',
636
+ 'application/x-www-form-urlencoded',
637
+ 'multipart/form-data'
638
+ ]
639
+ )
640
+ )
641
+ if _default_content_type is not None:
642
+ _header_params['Content-Type'] = _default_content_type
643
+
644
+ # authentication setting
645
+ _auth_settings: List[str] = [
646
+ 'json_header_remote_authentication',
647
+ 'basicAuth',
648
+ 'cookieAuth'
649
+ ]
650
+
651
+ return self.api_client.param_serialize(
652
+ method='POST',
653
+ resource_path='/api/pulp/{pulp_domain}/api/v3/publications/file/file/',
654
+ path_params=_path_params,
655
+ query_params=_query_params,
656
+ header_params=_header_params,
657
+ body=_body_params,
658
+ post_params=_form_params,
659
+ files=_files,
660
+ auth_settings=_auth_settings,
661
+ collection_formats=_collection_formats,
662
+ _host=_host,
663
+ _request_auth=_request_auth
664
+ )
665
+
666
+
667
+
668
+
669
+ @validate_call
670
+ def delete(
671
+ self,
672
+ file_file_publication_href: StrictStr,
673
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
674
+ _request_timeout: Union[
675
+ None,
676
+ Annotated[StrictFloat, Field(gt=0)],
677
+ Tuple[
678
+ Annotated[StrictFloat, Field(gt=0)],
679
+ Annotated[StrictFloat, Field(gt=0)]
680
+ ]
681
+ ] = None,
682
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
683
+ _content_type: Optional[StrictStr] = None,
684
+ _headers: Optional[Dict[StrictStr, Any]] = None,
685
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
686
+ ) -> None:
687
+ """Delete a file publication
688
+
689
+ A FilePublication contains metadata about all the File Content in a particular File Repository Version. Once a FilePublication has been created, it can be hosted using the File Distribution API.
690
+
691
+ :param file_file_publication_href: (required)
692
+ :type file_file_publication_href: str
693
+ :param x_task_diagnostics: List of profilers to use on tasks.
694
+ :type x_task_diagnostics: List[str]
695
+ :param _request_timeout: timeout setting for this request. If one
696
+ number provided, it will be total request
697
+ timeout. It can also be a pair (tuple) of
698
+ (connection, read) timeouts.
699
+ :type _request_timeout: int, tuple(int, int), optional
700
+ :param _request_auth: set to override the auth_settings for an a single
701
+ request; this effectively ignores the
702
+ authentication in the spec for a single request.
703
+ :type _request_auth: dict, optional
704
+ :param _content_type: force content-type for the request.
705
+ :type _content_type: str, Optional
706
+ :param _headers: set to override the headers for a single
707
+ request; this effectively ignores the headers
708
+ in the spec for a single request.
709
+ :type _headers: dict, optional
710
+ :param _host_index: set to override the host_index for a single
711
+ request; this effectively ignores the host_index
712
+ in the spec for a single request.
713
+ :type _host_index: int, optional
714
+ :return: Returns the result object.
715
+ """ # noqa: E501
716
+
717
+ _param = self._delete_serialize(
718
+ file_file_publication_href=file_file_publication_href,
719
+ x_task_diagnostics=x_task_diagnostics,
720
+ _request_auth=_request_auth,
721
+ _content_type=_content_type,
722
+ _headers=_headers,
723
+ _host_index=_host_index
724
+ )
725
+
726
+ _response_types_map: Dict[str, Optional[str]] = {
727
+ '204': None,
728
+ }
729
+ response_data = self.api_client.call_api(
730
+ *_param,
731
+ _request_timeout=_request_timeout
732
+ )
733
+ response_data.read()
734
+ return self.api_client.response_deserialize(
735
+ response_data=response_data,
736
+ response_types_map=_response_types_map,
737
+ ).data
738
+
739
+
740
+ @validate_call
741
+ def delete_with_http_info(
742
+ self,
743
+ file_file_publication_href: StrictStr,
744
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
745
+ _request_timeout: Union[
746
+ None,
747
+ Annotated[StrictFloat, Field(gt=0)],
748
+ Tuple[
749
+ Annotated[StrictFloat, Field(gt=0)],
750
+ Annotated[StrictFloat, Field(gt=0)]
751
+ ]
752
+ ] = None,
753
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
754
+ _content_type: Optional[StrictStr] = None,
755
+ _headers: Optional[Dict[StrictStr, Any]] = None,
756
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
757
+ ) -> ApiResponse[None]:
758
+ """Delete a file publication
759
+
760
+ A FilePublication contains metadata about all the File Content in a particular File Repository Version. Once a FilePublication has been created, it can be hosted using the File Distribution API.
761
+
762
+ :param file_file_publication_href: (required)
763
+ :type file_file_publication_href: str
764
+ :param x_task_diagnostics: List of profilers to use on tasks.
765
+ :type x_task_diagnostics: List[str]
766
+ :param _request_timeout: timeout setting for this request. If one
767
+ number provided, it will be total request
768
+ timeout. It can also be a pair (tuple) of
769
+ (connection, read) timeouts.
770
+ :type _request_timeout: int, tuple(int, int), optional
771
+ :param _request_auth: set to override the auth_settings for an a single
772
+ request; this effectively ignores the
773
+ authentication in the spec for a single request.
774
+ :type _request_auth: dict, optional
775
+ :param _content_type: force content-type for the request.
776
+ :type _content_type: str, Optional
777
+ :param _headers: set to override the headers for a single
778
+ request; this effectively ignores the headers
779
+ in the spec for a single request.
780
+ :type _headers: dict, optional
781
+ :param _host_index: set to override the host_index for a single
782
+ request; this effectively ignores the host_index
783
+ in the spec for a single request.
784
+ :type _host_index: int, optional
785
+ :return: Returns the result object.
786
+ """ # noqa: E501
787
+
788
+ _param = self._delete_serialize(
789
+ file_file_publication_href=file_file_publication_href,
790
+ x_task_diagnostics=x_task_diagnostics,
791
+ _request_auth=_request_auth,
792
+ _content_type=_content_type,
793
+ _headers=_headers,
794
+ _host_index=_host_index
795
+ )
796
+
797
+ _response_types_map: Dict[str, Optional[str]] = {
798
+ '204': None,
799
+ }
800
+ response_data = self.api_client.call_api(
801
+ *_param,
802
+ _request_timeout=_request_timeout
803
+ )
804
+ response_data.read()
805
+ return self.api_client.response_deserialize(
806
+ response_data=response_data,
807
+ response_types_map=_response_types_map,
808
+ )
809
+
810
+
811
+ @validate_call
812
+ def delete_without_preload_content(
813
+ self,
814
+ file_file_publication_href: StrictStr,
815
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
816
+ _request_timeout: Union[
817
+ None,
818
+ Annotated[StrictFloat, Field(gt=0)],
819
+ Tuple[
820
+ Annotated[StrictFloat, Field(gt=0)],
821
+ Annotated[StrictFloat, Field(gt=0)]
822
+ ]
823
+ ] = None,
824
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
825
+ _content_type: Optional[StrictStr] = None,
826
+ _headers: Optional[Dict[StrictStr, Any]] = None,
827
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
828
+ ) -> RESTResponseType:
829
+ """Delete a file publication
830
+
831
+ A FilePublication contains metadata about all the File Content in a particular File Repository Version. Once a FilePublication has been created, it can be hosted using the File Distribution API.
832
+
833
+ :param file_file_publication_href: (required)
834
+ :type file_file_publication_href: str
835
+ :param x_task_diagnostics: List of profilers to use on tasks.
836
+ :type x_task_diagnostics: List[str]
837
+ :param _request_timeout: timeout setting for this request. If one
838
+ number provided, it will be total request
839
+ timeout. It can also be a pair (tuple) of
840
+ (connection, read) timeouts.
841
+ :type _request_timeout: int, tuple(int, int), optional
842
+ :param _request_auth: set to override the auth_settings for an a single
843
+ request; this effectively ignores the
844
+ authentication in the spec for a single request.
845
+ :type _request_auth: dict, optional
846
+ :param _content_type: force content-type for the request.
847
+ :type _content_type: str, Optional
848
+ :param _headers: set to override the headers for a single
849
+ request; this effectively ignores the headers
850
+ in the spec for a single request.
851
+ :type _headers: dict, optional
852
+ :param _host_index: set to override the host_index for a single
853
+ request; this effectively ignores the host_index
854
+ in the spec for a single request.
855
+ :type _host_index: int, optional
856
+ :return: Returns the result object.
857
+ """ # noqa: E501
858
+
859
+ _param = self._delete_serialize(
860
+ file_file_publication_href=file_file_publication_href,
861
+ x_task_diagnostics=x_task_diagnostics,
862
+ _request_auth=_request_auth,
863
+ _content_type=_content_type,
864
+ _headers=_headers,
865
+ _host_index=_host_index
866
+ )
867
+
868
+ _response_types_map: Dict[str, Optional[str]] = {
869
+ '204': None,
870
+ }
871
+ response_data = self.api_client.call_api(
872
+ *_param,
873
+ _request_timeout=_request_timeout
874
+ )
875
+ return response_data.response
876
+
877
+
878
+ def _delete_serialize(
879
+ self,
880
+ file_file_publication_href,
881
+ x_task_diagnostics,
882
+ _request_auth,
883
+ _content_type,
884
+ _headers,
885
+ _host_index,
886
+ ) -> RequestSerialized:
887
+
888
+ _host = None
889
+
890
+ _collection_formats: Dict[str, str] = {
891
+ 'X-Task-Diagnostics': 'csv',
892
+ }
893
+
894
+ _path_params: Dict[str, str] = {}
895
+ _query_params: List[Tuple[str, str]] = []
896
+ _header_params: Dict[str, Optional[str]] = _headers or {}
897
+ _form_params: List[Tuple[str, str]] = []
898
+ _files: Dict[
899
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
900
+ ] = {}
901
+ _body_params: Optional[bytes] = None
902
+
903
+ # process the path parameters
904
+ if file_file_publication_href is not None:
905
+ _path_params['file_file_publication_href'] = file_file_publication_href
906
+ # process the query parameters
907
+ # process the header parameters
908
+ if x_task_diagnostics is not None:
909
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
910
+ # process the form parameters
911
+ # process the body parameter
912
+
913
+
914
+
915
+
916
+ # authentication setting
917
+ _auth_settings: List[str] = [
918
+ 'json_header_remote_authentication',
919
+ 'basicAuth',
920
+ 'cookieAuth'
921
+ ]
922
+
923
+ return self.api_client.param_serialize(
924
+ method='DELETE',
925
+ resource_path='{file_file_publication_href}',
926
+ path_params=_path_params,
927
+ query_params=_query_params,
928
+ header_params=_header_params,
929
+ body=_body_params,
930
+ post_params=_form_params,
931
+ files=_files,
932
+ auth_settings=_auth_settings,
933
+ collection_formats=_collection_formats,
934
+ _host=_host,
935
+ _request_auth=_request_auth
936
+ )
937
+
938
+
939
+
940
+
941
+ @validate_call
942
+ def list(
943
+ self,
944
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
945
+ checkpoint: Annotated[Optional[StrictBool], Field(description="Filter results where checkpoint matches value")] = None,
946
+ content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
947
+ content__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
948
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
949
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
950
+ 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) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
951
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
952
+ pulp_created: Annotated[Optional[datetime], Field(description="Filter results where pulp_created matches value")] = None,
953
+ pulp_created__gt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than value")] = None,
954
+ pulp_created__gte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than or equal to value")] = None,
955
+ pulp_created__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where pulp_created has a null value")] = None,
956
+ pulp_created__lt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than value")] = None,
957
+ pulp_created__lte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than or equal to value")] = None,
958
+ pulp_created__range: Annotated[Optional[List[datetime]], Field(description="Filter results where pulp_created is between two comma separated values")] = None,
959
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
960
+ pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
961
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
962
+ repository: Annotated[Optional[StrictStr], Field(description="Repository referenced by HREF/PRN")] = None,
963
+ repository_version: Annotated[Optional[StrictStr], Field(description="Repository Version referenced by HREF/PRN")] = None,
964
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
965
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
966
+ pulp_domain: StrictStr = "default",
967
+ _request_timeout: Union[
968
+ None,
969
+ Annotated[StrictFloat, Field(gt=0)],
970
+ Tuple[
971
+ Annotated[StrictFloat, Field(gt=0)],
972
+ Annotated[StrictFloat, Field(gt=0)]
973
+ ]
974
+ ] = None,
975
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
976
+ _content_type: Optional[StrictStr] = None,
977
+ _headers: Optional[Dict[StrictStr, Any]] = None,
978
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
979
+ ) -> PaginatedfileFilePublicationResponseList:
980
+ """List file publications
981
+
982
+ A FilePublication contains metadata about all the File Content in a particular File Repository Version. Once a FilePublication has been created, it can be hosted using the File Distribution API.
983
+
984
+ :param pulp_domain: (required)
985
+ :type pulp_domain: str
986
+ :param x_task_diagnostics: List of profilers to use on tasks.
987
+ :type x_task_diagnostics: List[str]
988
+ :param checkpoint: Filter results where checkpoint matches value
989
+ :type checkpoint: bool
990
+ :param content: Content Unit referenced by HREF/PRN
991
+ :type content: str
992
+ :param content__in: Multiple values may be separated by commas.
993
+ :type content__in: List[str]
994
+ :param limit: Number of results to return per page.
995
+ :type limit: int
996
+ :param offset: The initial index from which to return the results.
997
+ :type offset: int
998
+ :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) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)
999
+ :type ordering: List[str]
1000
+ :param prn__in: Multiple values may be separated by commas.
1001
+ :type prn__in: List[str]
1002
+ :param pulp_created: Filter results where pulp_created matches value
1003
+ :type pulp_created: datetime
1004
+ :param pulp_created__gt: Filter results where pulp_created is greater than value
1005
+ :type pulp_created__gt: datetime
1006
+ :param pulp_created__gte: Filter results where pulp_created is greater than or equal to value
1007
+ :type pulp_created__gte: datetime
1008
+ :param pulp_created__isnull: Filter results where pulp_created has a null value
1009
+ :type pulp_created__isnull: bool
1010
+ :param pulp_created__lt: Filter results where pulp_created is less than value
1011
+ :type pulp_created__lt: datetime
1012
+ :param pulp_created__lte: Filter results where pulp_created is less than or equal to value
1013
+ :type pulp_created__lte: datetime
1014
+ :param pulp_created__range: Filter results where pulp_created is between two comma separated values
1015
+ :type pulp_created__range: List[datetime]
1016
+ :param pulp_href__in: Multiple values may be separated by commas.
1017
+ :type pulp_href__in: List[str]
1018
+ :param pulp_id__in: Multiple values may be separated by commas.
1019
+ :type pulp_id__in: List[str]
1020
+ :param q: Filter results by using NOT, AND and OR operations on other filters
1021
+ :type q: str
1022
+ :param repository: Repository referenced by HREF/PRN
1023
+ :type repository: str
1024
+ :param repository_version: Repository Version referenced by HREF/PRN
1025
+ :type repository_version: str
1026
+ :param fields: A list of fields to include in the response.
1027
+ :type fields: List[str]
1028
+ :param exclude_fields: A list of fields to exclude from the response.
1029
+ :type exclude_fields: List[str]
1030
+ :param _request_timeout: timeout setting for this request. If one
1031
+ number provided, it will be total request
1032
+ timeout. It can also be a pair (tuple) of
1033
+ (connection, read) timeouts.
1034
+ :type _request_timeout: int, tuple(int, int), optional
1035
+ :param _request_auth: set to override the auth_settings for an a single
1036
+ request; this effectively ignores the
1037
+ authentication in the spec for a single request.
1038
+ :type _request_auth: dict, optional
1039
+ :param _content_type: force content-type for the request.
1040
+ :type _content_type: str, Optional
1041
+ :param _headers: set to override the headers for a single
1042
+ request; this effectively ignores the headers
1043
+ in the spec for a single request.
1044
+ :type _headers: dict, optional
1045
+ :param _host_index: set to override the host_index for a single
1046
+ request; this effectively ignores the host_index
1047
+ in the spec for a single request.
1048
+ :type _host_index: int, optional
1049
+ :return: Returns the result object.
1050
+ """ # noqa: E501
1051
+
1052
+ _param = self._list_serialize(
1053
+ pulp_domain=pulp_domain,
1054
+ x_task_diagnostics=x_task_diagnostics,
1055
+ checkpoint=checkpoint,
1056
+ content=content,
1057
+ content__in=content__in,
1058
+ limit=limit,
1059
+ offset=offset,
1060
+ ordering=ordering,
1061
+ prn__in=prn__in,
1062
+ pulp_created=pulp_created,
1063
+ pulp_created__gt=pulp_created__gt,
1064
+ pulp_created__gte=pulp_created__gte,
1065
+ pulp_created__isnull=pulp_created__isnull,
1066
+ pulp_created__lt=pulp_created__lt,
1067
+ pulp_created__lte=pulp_created__lte,
1068
+ pulp_created__range=pulp_created__range,
1069
+ pulp_href__in=pulp_href__in,
1070
+ pulp_id__in=pulp_id__in,
1071
+ q=q,
1072
+ repository=repository,
1073
+ repository_version=repository_version,
1074
+ fields=fields,
1075
+ exclude_fields=exclude_fields,
1076
+ _request_auth=_request_auth,
1077
+ _content_type=_content_type,
1078
+ _headers=_headers,
1079
+ _host_index=_host_index
1080
+ )
1081
+
1082
+ _response_types_map: Dict[str, Optional[str]] = {
1083
+ '200': "PaginatedfileFilePublicationResponseList",
1084
+ }
1085
+ response_data = self.api_client.call_api(
1086
+ *_param,
1087
+ _request_timeout=_request_timeout
1088
+ )
1089
+ response_data.read()
1090
+ return self.api_client.response_deserialize(
1091
+ response_data=response_data,
1092
+ response_types_map=_response_types_map,
1093
+ ).data
1094
+
1095
+
1096
+ @validate_call
1097
+ def list_with_http_info(
1098
+ self,
1099
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1100
+ checkpoint: Annotated[Optional[StrictBool], Field(description="Filter results where checkpoint matches value")] = None,
1101
+ content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
1102
+ content__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1103
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1104
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
1105
+ 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) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
1106
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1107
+ pulp_created: Annotated[Optional[datetime], Field(description="Filter results where pulp_created matches value")] = None,
1108
+ pulp_created__gt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than value")] = None,
1109
+ pulp_created__gte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than or equal to value")] = None,
1110
+ pulp_created__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where pulp_created has a null value")] = None,
1111
+ pulp_created__lt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than value")] = None,
1112
+ pulp_created__lte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than or equal to value")] = None,
1113
+ pulp_created__range: Annotated[Optional[List[datetime]], Field(description="Filter results where pulp_created is between two comma separated values")] = None,
1114
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1115
+ pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1116
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
1117
+ repository: Annotated[Optional[StrictStr], Field(description="Repository referenced by HREF/PRN")] = None,
1118
+ repository_version: Annotated[Optional[StrictStr], Field(description="Repository Version referenced by HREF/PRN")] = None,
1119
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1120
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1121
+ pulp_domain: StrictStr = "default",
1122
+ _request_timeout: Union[
1123
+ None,
1124
+ Annotated[StrictFloat, Field(gt=0)],
1125
+ Tuple[
1126
+ Annotated[StrictFloat, Field(gt=0)],
1127
+ Annotated[StrictFloat, Field(gt=0)]
1128
+ ]
1129
+ ] = None,
1130
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1131
+ _content_type: Optional[StrictStr] = None,
1132
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1133
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1134
+ ) -> ApiResponse[PaginatedfileFilePublicationResponseList]:
1135
+ """List file publications
1136
+
1137
+ A FilePublication contains metadata about all the File Content in a particular File Repository Version. Once a FilePublication has been created, it can be hosted using the File Distribution API.
1138
+
1139
+ :param pulp_domain: (required)
1140
+ :type pulp_domain: str
1141
+ :param x_task_diagnostics: List of profilers to use on tasks.
1142
+ :type x_task_diagnostics: List[str]
1143
+ :param checkpoint: Filter results where checkpoint matches value
1144
+ :type checkpoint: bool
1145
+ :param content: Content Unit referenced by HREF/PRN
1146
+ :type content: str
1147
+ :param content__in: Multiple values may be separated by commas.
1148
+ :type content__in: List[str]
1149
+ :param limit: Number of results to return per page.
1150
+ :type limit: int
1151
+ :param offset: The initial index from which to return the results.
1152
+ :type offset: int
1153
+ :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) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)
1154
+ :type ordering: List[str]
1155
+ :param prn__in: Multiple values may be separated by commas.
1156
+ :type prn__in: List[str]
1157
+ :param pulp_created: Filter results where pulp_created matches value
1158
+ :type pulp_created: datetime
1159
+ :param pulp_created__gt: Filter results where pulp_created is greater than value
1160
+ :type pulp_created__gt: datetime
1161
+ :param pulp_created__gte: Filter results where pulp_created is greater than or equal to value
1162
+ :type pulp_created__gte: datetime
1163
+ :param pulp_created__isnull: Filter results where pulp_created has a null value
1164
+ :type pulp_created__isnull: bool
1165
+ :param pulp_created__lt: Filter results where pulp_created is less than value
1166
+ :type pulp_created__lt: datetime
1167
+ :param pulp_created__lte: Filter results where pulp_created is less than or equal to value
1168
+ :type pulp_created__lte: datetime
1169
+ :param pulp_created__range: Filter results where pulp_created is between two comma separated values
1170
+ :type pulp_created__range: List[datetime]
1171
+ :param pulp_href__in: Multiple values may be separated by commas.
1172
+ :type pulp_href__in: List[str]
1173
+ :param pulp_id__in: Multiple values may be separated by commas.
1174
+ :type pulp_id__in: List[str]
1175
+ :param q: Filter results by using NOT, AND and OR operations on other filters
1176
+ :type q: str
1177
+ :param repository: Repository referenced by HREF/PRN
1178
+ :type repository: str
1179
+ :param repository_version: Repository Version referenced by HREF/PRN
1180
+ :type repository_version: str
1181
+ :param fields: A list of fields to include in the response.
1182
+ :type fields: List[str]
1183
+ :param exclude_fields: A list of fields to exclude from the response.
1184
+ :type exclude_fields: List[str]
1185
+ :param _request_timeout: timeout setting for this request. If one
1186
+ number provided, it will be total request
1187
+ timeout. It can also be a pair (tuple) of
1188
+ (connection, read) timeouts.
1189
+ :type _request_timeout: int, tuple(int, int), optional
1190
+ :param _request_auth: set to override the auth_settings for an a single
1191
+ request; this effectively ignores the
1192
+ authentication in the spec for a single request.
1193
+ :type _request_auth: dict, optional
1194
+ :param _content_type: force content-type for the request.
1195
+ :type _content_type: str, Optional
1196
+ :param _headers: set to override the headers for a single
1197
+ request; this effectively ignores the headers
1198
+ in the spec for a single request.
1199
+ :type _headers: dict, optional
1200
+ :param _host_index: set to override the host_index for a single
1201
+ request; this effectively ignores the host_index
1202
+ in the spec for a single request.
1203
+ :type _host_index: int, optional
1204
+ :return: Returns the result object.
1205
+ """ # noqa: E501
1206
+
1207
+ _param = self._list_serialize(
1208
+ pulp_domain=pulp_domain,
1209
+ x_task_diagnostics=x_task_diagnostics,
1210
+ checkpoint=checkpoint,
1211
+ content=content,
1212
+ content__in=content__in,
1213
+ limit=limit,
1214
+ offset=offset,
1215
+ ordering=ordering,
1216
+ prn__in=prn__in,
1217
+ pulp_created=pulp_created,
1218
+ pulp_created__gt=pulp_created__gt,
1219
+ pulp_created__gte=pulp_created__gte,
1220
+ pulp_created__isnull=pulp_created__isnull,
1221
+ pulp_created__lt=pulp_created__lt,
1222
+ pulp_created__lte=pulp_created__lte,
1223
+ pulp_created__range=pulp_created__range,
1224
+ pulp_href__in=pulp_href__in,
1225
+ pulp_id__in=pulp_id__in,
1226
+ q=q,
1227
+ repository=repository,
1228
+ repository_version=repository_version,
1229
+ fields=fields,
1230
+ exclude_fields=exclude_fields,
1231
+ _request_auth=_request_auth,
1232
+ _content_type=_content_type,
1233
+ _headers=_headers,
1234
+ _host_index=_host_index
1235
+ )
1236
+
1237
+ _response_types_map: Dict[str, Optional[str]] = {
1238
+ '200': "PaginatedfileFilePublicationResponseList",
1239
+ }
1240
+ response_data = self.api_client.call_api(
1241
+ *_param,
1242
+ _request_timeout=_request_timeout
1243
+ )
1244
+ response_data.read()
1245
+ return self.api_client.response_deserialize(
1246
+ response_data=response_data,
1247
+ response_types_map=_response_types_map,
1248
+ )
1249
+
1250
+
1251
+ @validate_call
1252
+ def list_without_preload_content(
1253
+ self,
1254
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1255
+ checkpoint: Annotated[Optional[StrictBool], Field(description="Filter results where checkpoint matches value")] = None,
1256
+ content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
1257
+ content__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1258
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1259
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
1260
+ 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) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
1261
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1262
+ pulp_created: Annotated[Optional[datetime], Field(description="Filter results where pulp_created matches value")] = None,
1263
+ pulp_created__gt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than value")] = None,
1264
+ pulp_created__gte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than or equal to value")] = None,
1265
+ pulp_created__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where pulp_created has a null value")] = None,
1266
+ pulp_created__lt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than value")] = None,
1267
+ pulp_created__lte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than or equal to value")] = None,
1268
+ pulp_created__range: Annotated[Optional[List[datetime]], Field(description="Filter results where pulp_created is between two comma separated values")] = None,
1269
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1270
+ pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1271
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
1272
+ repository: Annotated[Optional[StrictStr], Field(description="Repository referenced by HREF/PRN")] = None,
1273
+ repository_version: Annotated[Optional[StrictStr], Field(description="Repository Version referenced by HREF/PRN")] = None,
1274
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1275
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1276
+ pulp_domain: StrictStr = "default",
1277
+ _request_timeout: Union[
1278
+ None,
1279
+ Annotated[StrictFloat, Field(gt=0)],
1280
+ Tuple[
1281
+ Annotated[StrictFloat, Field(gt=0)],
1282
+ Annotated[StrictFloat, Field(gt=0)]
1283
+ ]
1284
+ ] = None,
1285
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1286
+ _content_type: Optional[StrictStr] = None,
1287
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1288
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1289
+ ) -> RESTResponseType:
1290
+ """List file publications
1291
+
1292
+ A FilePublication contains metadata about all the File Content in a particular File Repository Version. Once a FilePublication has been created, it can be hosted using the File Distribution API.
1293
+
1294
+ :param pulp_domain: (required)
1295
+ :type pulp_domain: str
1296
+ :param x_task_diagnostics: List of profilers to use on tasks.
1297
+ :type x_task_diagnostics: List[str]
1298
+ :param checkpoint: Filter results where checkpoint matches value
1299
+ :type checkpoint: bool
1300
+ :param content: Content Unit referenced by HREF/PRN
1301
+ :type content: str
1302
+ :param content__in: Multiple values may be separated by commas.
1303
+ :type content__in: List[str]
1304
+ :param limit: Number of results to return per page.
1305
+ :type limit: int
1306
+ :param offset: The initial index from which to return the results.
1307
+ :type offset: int
1308
+ :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) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)
1309
+ :type ordering: List[str]
1310
+ :param prn__in: Multiple values may be separated by commas.
1311
+ :type prn__in: List[str]
1312
+ :param pulp_created: Filter results where pulp_created matches value
1313
+ :type pulp_created: datetime
1314
+ :param pulp_created__gt: Filter results where pulp_created is greater than value
1315
+ :type pulp_created__gt: datetime
1316
+ :param pulp_created__gte: Filter results where pulp_created is greater than or equal to value
1317
+ :type pulp_created__gte: datetime
1318
+ :param pulp_created__isnull: Filter results where pulp_created has a null value
1319
+ :type pulp_created__isnull: bool
1320
+ :param pulp_created__lt: Filter results where pulp_created is less than value
1321
+ :type pulp_created__lt: datetime
1322
+ :param pulp_created__lte: Filter results where pulp_created is less than or equal to value
1323
+ :type pulp_created__lte: datetime
1324
+ :param pulp_created__range: Filter results where pulp_created is between two comma separated values
1325
+ :type pulp_created__range: List[datetime]
1326
+ :param pulp_href__in: Multiple values may be separated by commas.
1327
+ :type pulp_href__in: List[str]
1328
+ :param pulp_id__in: Multiple values may be separated by commas.
1329
+ :type pulp_id__in: List[str]
1330
+ :param q: Filter results by using NOT, AND and OR operations on other filters
1331
+ :type q: str
1332
+ :param repository: Repository referenced by HREF/PRN
1333
+ :type repository: str
1334
+ :param repository_version: Repository Version referenced by HREF/PRN
1335
+ :type repository_version: str
1336
+ :param fields: A list of fields to include in the response.
1337
+ :type fields: List[str]
1338
+ :param exclude_fields: A list of fields to exclude from the response.
1339
+ :type exclude_fields: List[str]
1340
+ :param _request_timeout: timeout setting for this request. If one
1341
+ number provided, it will be total request
1342
+ timeout. It can also be a pair (tuple) of
1343
+ (connection, read) timeouts.
1344
+ :type _request_timeout: int, tuple(int, int), optional
1345
+ :param _request_auth: set to override the auth_settings for an a single
1346
+ request; this effectively ignores the
1347
+ authentication in the spec for a single request.
1348
+ :type _request_auth: dict, optional
1349
+ :param _content_type: force content-type for the request.
1350
+ :type _content_type: str, Optional
1351
+ :param _headers: set to override the headers for a single
1352
+ request; this effectively ignores the headers
1353
+ in the spec for a single request.
1354
+ :type _headers: dict, optional
1355
+ :param _host_index: set to override the host_index for a single
1356
+ request; this effectively ignores the host_index
1357
+ in the spec for a single request.
1358
+ :type _host_index: int, optional
1359
+ :return: Returns the result object.
1360
+ """ # noqa: E501
1361
+
1362
+ _param = self._list_serialize(
1363
+ pulp_domain=pulp_domain,
1364
+ x_task_diagnostics=x_task_diagnostics,
1365
+ checkpoint=checkpoint,
1366
+ content=content,
1367
+ content__in=content__in,
1368
+ limit=limit,
1369
+ offset=offset,
1370
+ ordering=ordering,
1371
+ prn__in=prn__in,
1372
+ pulp_created=pulp_created,
1373
+ pulp_created__gt=pulp_created__gt,
1374
+ pulp_created__gte=pulp_created__gte,
1375
+ pulp_created__isnull=pulp_created__isnull,
1376
+ pulp_created__lt=pulp_created__lt,
1377
+ pulp_created__lte=pulp_created__lte,
1378
+ pulp_created__range=pulp_created__range,
1379
+ pulp_href__in=pulp_href__in,
1380
+ pulp_id__in=pulp_id__in,
1381
+ q=q,
1382
+ repository=repository,
1383
+ repository_version=repository_version,
1384
+ fields=fields,
1385
+ exclude_fields=exclude_fields,
1386
+ _request_auth=_request_auth,
1387
+ _content_type=_content_type,
1388
+ _headers=_headers,
1389
+ _host_index=_host_index
1390
+ )
1391
+
1392
+ _response_types_map: Dict[str, Optional[str]] = {
1393
+ '200': "PaginatedfileFilePublicationResponseList",
1394
+ }
1395
+ response_data = self.api_client.call_api(
1396
+ *_param,
1397
+ _request_timeout=_request_timeout
1398
+ )
1399
+ return response_data.response
1400
+
1401
+
1402
+ def _list_serialize(
1403
+ self,
1404
+ pulp_domain,
1405
+ x_task_diagnostics,
1406
+ checkpoint,
1407
+ content,
1408
+ content__in,
1409
+ limit,
1410
+ offset,
1411
+ ordering,
1412
+ prn__in,
1413
+ pulp_created,
1414
+ pulp_created__gt,
1415
+ pulp_created__gte,
1416
+ pulp_created__isnull,
1417
+ pulp_created__lt,
1418
+ pulp_created__lte,
1419
+ pulp_created__range,
1420
+ pulp_href__in,
1421
+ pulp_id__in,
1422
+ q,
1423
+ repository,
1424
+ repository_version,
1425
+ fields,
1426
+ exclude_fields,
1427
+ _request_auth,
1428
+ _content_type,
1429
+ _headers,
1430
+ _host_index,
1431
+ ) -> RequestSerialized:
1432
+
1433
+ _host = None
1434
+
1435
+ _collection_formats: Dict[str, str] = {
1436
+ 'X-Task-Diagnostics': 'csv',
1437
+ 'content__in': 'csv',
1438
+ 'ordering': 'csv',
1439
+ 'prn__in': 'csv',
1440
+ 'pulp_created__range': 'csv',
1441
+ 'pulp_href__in': 'csv',
1442
+ 'pulp_id__in': 'csv',
1443
+ 'fields': 'multi',
1444
+ 'exclude_fields': 'multi',
1445
+ }
1446
+
1447
+ _path_params: Dict[str, str] = {}
1448
+ _query_params: List[Tuple[str, str]] = []
1449
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1450
+ _form_params: List[Tuple[str, str]] = []
1451
+ _files: Dict[
1452
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1453
+ ] = {}
1454
+ _body_params: Optional[bytes] = None
1455
+
1456
+ # process the path parameters
1457
+ if pulp_domain is not None:
1458
+ _path_params['pulp_domain'] = pulp_domain
1459
+ # process the query parameters
1460
+ if checkpoint is not None:
1461
+
1462
+ _query_params.append(('checkpoint', checkpoint))
1463
+
1464
+ if content is not None:
1465
+
1466
+ _query_params.append(('content', content))
1467
+
1468
+ if content__in is not None:
1469
+
1470
+ _query_params.append(('content__in', content__in))
1471
+
1472
+ if limit is not None:
1473
+
1474
+ _query_params.append(('limit', limit))
1475
+
1476
+ if offset is not None:
1477
+
1478
+ _query_params.append(('offset', offset))
1479
+
1480
+ if ordering is not None:
1481
+
1482
+ _query_params.append(('ordering', ordering))
1483
+
1484
+ if prn__in is not None:
1485
+
1486
+ _query_params.append(('prn__in', prn__in))
1487
+
1488
+ if pulp_created is not None:
1489
+ if isinstance(pulp_created, datetime):
1490
+ _query_params.append(
1491
+ (
1492
+ 'pulp_created',
1493
+ pulp_created.strftime(
1494
+ self.api_client.configuration.datetime_format
1495
+ )
1496
+ )
1497
+ )
1498
+ else:
1499
+ _query_params.append(('pulp_created', pulp_created))
1500
+
1501
+ if pulp_created__gt is not None:
1502
+ if isinstance(pulp_created__gt, datetime):
1503
+ _query_params.append(
1504
+ (
1505
+ 'pulp_created__gt',
1506
+ pulp_created__gt.strftime(
1507
+ self.api_client.configuration.datetime_format
1508
+ )
1509
+ )
1510
+ )
1511
+ else:
1512
+ _query_params.append(('pulp_created__gt', pulp_created__gt))
1513
+
1514
+ if pulp_created__gte is not None:
1515
+ if isinstance(pulp_created__gte, datetime):
1516
+ _query_params.append(
1517
+ (
1518
+ 'pulp_created__gte',
1519
+ pulp_created__gte.strftime(
1520
+ self.api_client.configuration.datetime_format
1521
+ )
1522
+ )
1523
+ )
1524
+ else:
1525
+ _query_params.append(('pulp_created__gte', pulp_created__gte))
1526
+
1527
+ if pulp_created__isnull is not None:
1528
+
1529
+ _query_params.append(('pulp_created__isnull', pulp_created__isnull))
1530
+
1531
+ if pulp_created__lt is not None:
1532
+ if isinstance(pulp_created__lt, datetime):
1533
+ _query_params.append(
1534
+ (
1535
+ 'pulp_created__lt',
1536
+ pulp_created__lt.strftime(
1537
+ self.api_client.configuration.datetime_format
1538
+ )
1539
+ )
1540
+ )
1541
+ else:
1542
+ _query_params.append(('pulp_created__lt', pulp_created__lt))
1543
+
1544
+ if pulp_created__lte is not None:
1545
+ if isinstance(pulp_created__lte, datetime):
1546
+ _query_params.append(
1547
+ (
1548
+ 'pulp_created__lte',
1549
+ pulp_created__lte.strftime(
1550
+ self.api_client.configuration.datetime_format
1551
+ )
1552
+ )
1553
+ )
1554
+ else:
1555
+ _query_params.append(('pulp_created__lte', pulp_created__lte))
1556
+
1557
+ if pulp_created__range is not None:
1558
+
1559
+ _query_params.append(('pulp_created__range', pulp_created__range))
1560
+
1561
+ if pulp_href__in is not None:
1562
+
1563
+ _query_params.append(('pulp_href__in', pulp_href__in))
1564
+
1565
+ if pulp_id__in is not None:
1566
+
1567
+ _query_params.append(('pulp_id__in', pulp_id__in))
1568
+
1569
+ if q is not None:
1570
+
1571
+ _query_params.append(('q', q))
1572
+
1573
+ if repository is not None:
1574
+
1575
+ _query_params.append(('repository', repository))
1576
+
1577
+ if repository_version is not None:
1578
+
1579
+ _query_params.append(('repository_version', repository_version))
1580
+
1581
+ if fields is not None:
1582
+
1583
+ _query_params.append(('fields', fields))
1584
+
1585
+ if exclude_fields is not None:
1586
+
1587
+ _query_params.append(('exclude_fields', exclude_fields))
1588
+
1589
+ # process the header parameters
1590
+ if x_task_diagnostics is not None:
1591
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1592
+ # process the form parameters
1593
+ # process the body parameter
1594
+
1595
+
1596
+ # set the HTTP header `Accept`
1597
+ if 'Accept' not in _header_params:
1598
+ _header_params['Accept'] = self.api_client.select_header_accept(
1599
+ [
1600
+ 'application/json'
1601
+ ]
1602
+ )
1603
+
1604
+
1605
+ # authentication setting
1606
+ _auth_settings: List[str] = [
1607
+ 'json_header_remote_authentication',
1608
+ 'basicAuth',
1609
+ 'cookieAuth'
1610
+ ]
1611
+
1612
+ return self.api_client.param_serialize(
1613
+ method='GET',
1614
+ resource_path='/api/pulp/{pulp_domain}/api/v3/publications/file/file/',
1615
+ path_params=_path_params,
1616
+ query_params=_query_params,
1617
+ header_params=_header_params,
1618
+ body=_body_params,
1619
+ post_params=_form_params,
1620
+ files=_files,
1621
+ auth_settings=_auth_settings,
1622
+ collection_formats=_collection_formats,
1623
+ _host=_host,
1624
+ _request_auth=_request_auth
1625
+ )
1626
+
1627
+
1628
+
1629
+
1630
+ @validate_call
1631
+ def list_roles(
1632
+ self,
1633
+ file_file_publication_href: StrictStr,
1634
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1635
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1636
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1637
+ _request_timeout: Union[
1638
+ None,
1639
+ Annotated[StrictFloat, Field(gt=0)],
1640
+ Tuple[
1641
+ Annotated[StrictFloat, Field(gt=0)],
1642
+ Annotated[StrictFloat, Field(gt=0)]
1643
+ ]
1644
+ ] = None,
1645
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1646
+ _content_type: Optional[StrictStr] = None,
1647
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1648
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1649
+ ) -> ObjectRolesResponse:
1650
+ """List roles
1651
+
1652
+ List roles assigned to this object.
1653
+
1654
+ :param file_file_publication_href: (required)
1655
+ :type file_file_publication_href: str
1656
+ :param x_task_diagnostics: List of profilers to use on tasks.
1657
+ :type x_task_diagnostics: List[str]
1658
+ :param fields: A list of fields to include in the response.
1659
+ :type fields: List[str]
1660
+ :param exclude_fields: A list of fields to exclude from the response.
1661
+ :type exclude_fields: List[str]
1662
+ :param _request_timeout: timeout setting for this request. If one
1663
+ number provided, it will be total request
1664
+ timeout. It can also be a pair (tuple) of
1665
+ (connection, read) timeouts.
1666
+ :type _request_timeout: int, tuple(int, int), optional
1667
+ :param _request_auth: set to override the auth_settings for an a single
1668
+ request; this effectively ignores the
1669
+ authentication in the spec for a single request.
1670
+ :type _request_auth: dict, optional
1671
+ :param _content_type: force content-type for the request.
1672
+ :type _content_type: str, Optional
1673
+ :param _headers: set to override the headers for a single
1674
+ request; this effectively ignores the headers
1675
+ in the spec for a single request.
1676
+ :type _headers: dict, optional
1677
+ :param _host_index: set to override the host_index for a single
1678
+ request; this effectively ignores the host_index
1679
+ in the spec for a single request.
1680
+ :type _host_index: int, optional
1681
+ :return: Returns the result object.
1682
+ """ # noqa: E501
1683
+
1684
+ _param = self._list_roles_serialize(
1685
+ file_file_publication_href=file_file_publication_href,
1686
+ x_task_diagnostics=x_task_diagnostics,
1687
+ fields=fields,
1688
+ exclude_fields=exclude_fields,
1689
+ _request_auth=_request_auth,
1690
+ _content_type=_content_type,
1691
+ _headers=_headers,
1692
+ _host_index=_host_index
1693
+ )
1694
+
1695
+ _response_types_map: Dict[str, Optional[str]] = {
1696
+ '200': "ObjectRolesResponse",
1697
+ }
1698
+ response_data = self.api_client.call_api(
1699
+ *_param,
1700
+ _request_timeout=_request_timeout
1701
+ )
1702
+ response_data.read()
1703
+ return self.api_client.response_deserialize(
1704
+ response_data=response_data,
1705
+ response_types_map=_response_types_map,
1706
+ ).data
1707
+
1708
+
1709
+ @validate_call
1710
+ def list_roles_with_http_info(
1711
+ self,
1712
+ file_file_publication_href: StrictStr,
1713
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1714
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1715
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1716
+ _request_timeout: Union[
1717
+ None,
1718
+ Annotated[StrictFloat, Field(gt=0)],
1719
+ Tuple[
1720
+ Annotated[StrictFloat, Field(gt=0)],
1721
+ Annotated[StrictFloat, Field(gt=0)]
1722
+ ]
1723
+ ] = None,
1724
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1725
+ _content_type: Optional[StrictStr] = None,
1726
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1727
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1728
+ ) -> ApiResponse[ObjectRolesResponse]:
1729
+ """List roles
1730
+
1731
+ List roles assigned to this object.
1732
+
1733
+ :param file_file_publication_href: (required)
1734
+ :type file_file_publication_href: str
1735
+ :param x_task_diagnostics: List of profilers to use on tasks.
1736
+ :type x_task_diagnostics: List[str]
1737
+ :param fields: A list of fields to include in the response.
1738
+ :type fields: List[str]
1739
+ :param exclude_fields: A list of fields to exclude from the response.
1740
+ :type exclude_fields: List[str]
1741
+ :param _request_timeout: timeout setting for this request. If one
1742
+ number provided, it will be total request
1743
+ timeout. It can also be a pair (tuple) of
1744
+ (connection, read) timeouts.
1745
+ :type _request_timeout: int, tuple(int, int), optional
1746
+ :param _request_auth: set to override the auth_settings for an a single
1747
+ request; this effectively ignores the
1748
+ authentication in the spec for a single request.
1749
+ :type _request_auth: dict, optional
1750
+ :param _content_type: force content-type for the request.
1751
+ :type _content_type: str, Optional
1752
+ :param _headers: set to override the headers for a single
1753
+ request; this effectively ignores the headers
1754
+ in the spec for a single request.
1755
+ :type _headers: dict, optional
1756
+ :param _host_index: set to override the host_index for a single
1757
+ request; this effectively ignores the host_index
1758
+ in the spec for a single request.
1759
+ :type _host_index: int, optional
1760
+ :return: Returns the result object.
1761
+ """ # noqa: E501
1762
+
1763
+ _param = self._list_roles_serialize(
1764
+ file_file_publication_href=file_file_publication_href,
1765
+ x_task_diagnostics=x_task_diagnostics,
1766
+ fields=fields,
1767
+ exclude_fields=exclude_fields,
1768
+ _request_auth=_request_auth,
1769
+ _content_type=_content_type,
1770
+ _headers=_headers,
1771
+ _host_index=_host_index
1772
+ )
1773
+
1774
+ _response_types_map: Dict[str, Optional[str]] = {
1775
+ '200': "ObjectRolesResponse",
1776
+ }
1777
+ response_data = self.api_client.call_api(
1778
+ *_param,
1779
+ _request_timeout=_request_timeout
1780
+ )
1781
+ response_data.read()
1782
+ return self.api_client.response_deserialize(
1783
+ response_data=response_data,
1784
+ response_types_map=_response_types_map,
1785
+ )
1786
+
1787
+
1788
+ @validate_call
1789
+ def list_roles_without_preload_content(
1790
+ self,
1791
+ file_file_publication_href: StrictStr,
1792
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1793
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1794
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1795
+ _request_timeout: Union[
1796
+ None,
1797
+ Annotated[StrictFloat, Field(gt=0)],
1798
+ Tuple[
1799
+ Annotated[StrictFloat, Field(gt=0)],
1800
+ Annotated[StrictFloat, Field(gt=0)]
1801
+ ]
1802
+ ] = None,
1803
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1804
+ _content_type: Optional[StrictStr] = None,
1805
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1806
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1807
+ ) -> RESTResponseType:
1808
+ """List roles
1809
+
1810
+ List roles assigned to this object.
1811
+
1812
+ :param file_file_publication_href: (required)
1813
+ :type file_file_publication_href: str
1814
+ :param x_task_diagnostics: List of profilers to use on tasks.
1815
+ :type x_task_diagnostics: List[str]
1816
+ :param fields: A list of fields to include in the response.
1817
+ :type fields: List[str]
1818
+ :param exclude_fields: A list of fields to exclude from the response.
1819
+ :type exclude_fields: List[str]
1820
+ :param _request_timeout: timeout setting for this request. If one
1821
+ number provided, it will be total request
1822
+ timeout. It can also be a pair (tuple) of
1823
+ (connection, read) timeouts.
1824
+ :type _request_timeout: int, tuple(int, int), optional
1825
+ :param _request_auth: set to override the auth_settings for an a single
1826
+ request; this effectively ignores the
1827
+ authentication in the spec for a single request.
1828
+ :type _request_auth: dict, optional
1829
+ :param _content_type: force content-type for the request.
1830
+ :type _content_type: str, Optional
1831
+ :param _headers: set to override the headers for a single
1832
+ request; this effectively ignores the headers
1833
+ in the spec for a single request.
1834
+ :type _headers: dict, optional
1835
+ :param _host_index: set to override the host_index for a single
1836
+ request; this effectively ignores the host_index
1837
+ in the spec for a single request.
1838
+ :type _host_index: int, optional
1839
+ :return: Returns the result object.
1840
+ """ # noqa: E501
1841
+
1842
+ _param = self._list_roles_serialize(
1843
+ file_file_publication_href=file_file_publication_href,
1844
+ x_task_diagnostics=x_task_diagnostics,
1845
+ fields=fields,
1846
+ exclude_fields=exclude_fields,
1847
+ _request_auth=_request_auth,
1848
+ _content_type=_content_type,
1849
+ _headers=_headers,
1850
+ _host_index=_host_index
1851
+ )
1852
+
1853
+ _response_types_map: Dict[str, Optional[str]] = {
1854
+ '200': "ObjectRolesResponse",
1855
+ }
1856
+ response_data = self.api_client.call_api(
1857
+ *_param,
1858
+ _request_timeout=_request_timeout
1859
+ )
1860
+ return response_data.response
1861
+
1862
+
1863
+ def _list_roles_serialize(
1864
+ self,
1865
+ file_file_publication_href,
1866
+ x_task_diagnostics,
1867
+ fields,
1868
+ exclude_fields,
1869
+ _request_auth,
1870
+ _content_type,
1871
+ _headers,
1872
+ _host_index,
1873
+ ) -> RequestSerialized:
1874
+
1875
+ _host = None
1876
+
1877
+ _collection_formats: Dict[str, str] = {
1878
+ 'X-Task-Diagnostics': 'csv',
1879
+ 'fields': 'multi',
1880
+ 'exclude_fields': 'multi',
1881
+ }
1882
+
1883
+ _path_params: Dict[str, str] = {}
1884
+ _query_params: List[Tuple[str, str]] = []
1885
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1886
+ _form_params: List[Tuple[str, str]] = []
1887
+ _files: Dict[
1888
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1889
+ ] = {}
1890
+ _body_params: Optional[bytes] = None
1891
+
1892
+ # process the path parameters
1893
+ if file_file_publication_href is not None:
1894
+ _path_params['file_file_publication_href'] = file_file_publication_href
1895
+ # process the query parameters
1896
+ if fields is not None:
1897
+
1898
+ _query_params.append(('fields', fields))
1899
+
1900
+ if exclude_fields is not None:
1901
+
1902
+ _query_params.append(('exclude_fields', exclude_fields))
1903
+
1904
+ # process the header parameters
1905
+ if x_task_diagnostics is not None:
1906
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1907
+ # process the form parameters
1908
+ # process the body parameter
1909
+
1910
+
1911
+ # set the HTTP header `Accept`
1912
+ if 'Accept' not in _header_params:
1913
+ _header_params['Accept'] = self.api_client.select_header_accept(
1914
+ [
1915
+ 'application/json'
1916
+ ]
1917
+ )
1918
+
1919
+
1920
+ # authentication setting
1921
+ _auth_settings: List[str] = [
1922
+ 'json_header_remote_authentication',
1923
+ 'basicAuth',
1924
+ 'cookieAuth'
1925
+ ]
1926
+
1927
+ return self.api_client.param_serialize(
1928
+ method='GET',
1929
+ resource_path='{file_file_publication_href}list_roles/',
1930
+ path_params=_path_params,
1931
+ query_params=_query_params,
1932
+ header_params=_header_params,
1933
+ body=_body_params,
1934
+ post_params=_form_params,
1935
+ files=_files,
1936
+ auth_settings=_auth_settings,
1937
+ collection_formats=_collection_formats,
1938
+ _host=_host,
1939
+ _request_auth=_request_auth
1940
+ )
1941
+
1942
+
1943
+
1944
+
1945
+ @validate_call
1946
+ def my_permissions(
1947
+ self,
1948
+ file_file_publication_href: StrictStr,
1949
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1950
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1951
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1952
+ _request_timeout: Union[
1953
+ None,
1954
+ Annotated[StrictFloat, Field(gt=0)],
1955
+ Tuple[
1956
+ Annotated[StrictFloat, Field(gt=0)],
1957
+ Annotated[StrictFloat, Field(gt=0)]
1958
+ ]
1959
+ ] = None,
1960
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1961
+ _content_type: Optional[StrictStr] = None,
1962
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1963
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1964
+ ) -> MyPermissionsResponse:
1965
+ """List user permissions
1966
+
1967
+ List permissions available to the current user on this object.
1968
+
1969
+ :param file_file_publication_href: (required)
1970
+ :type file_file_publication_href: str
1971
+ :param x_task_diagnostics: List of profilers to use on tasks.
1972
+ :type x_task_diagnostics: List[str]
1973
+ :param fields: A list of fields to include in the response.
1974
+ :type fields: List[str]
1975
+ :param exclude_fields: A list of fields to exclude from the response.
1976
+ :type exclude_fields: List[str]
1977
+ :param _request_timeout: timeout setting for this request. If one
1978
+ number provided, it will be total request
1979
+ timeout. It can also be a pair (tuple) of
1980
+ (connection, read) timeouts.
1981
+ :type _request_timeout: int, tuple(int, int), optional
1982
+ :param _request_auth: set to override the auth_settings for an a single
1983
+ request; this effectively ignores the
1984
+ authentication in the spec for a single request.
1985
+ :type _request_auth: dict, optional
1986
+ :param _content_type: force content-type for the request.
1987
+ :type _content_type: str, Optional
1988
+ :param _headers: set to override the headers for a single
1989
+ request; this effectively ignores the headers
1990
+ in the spec for a single request.
1991
+ :type _headers: dict, optional
1992
+ :param _host_index: set to override the host_index for a single
1993
+ request; this effectively ignores the host_index
1994
+ in the spec for a single request.
1995
+ :type _host_index: int, optional
1996
+ :return: Returns the result object.
1997
+ """ # noqa: E501
1998
+
1999
+ _param = self._my_permissions_serialize(
2000
+ file_file_publication_href=file_file_publication_href,
2001
+ x_task_diagnostics=x_task_diagnostics,
2002
+ fields=fields,
2003
+ exclude_fields=exclude_fields,
2004
+ _request_auth=_request_auth,
2005
+ _content_type=_content_type,
2006
+ _headers=_headers,
2007
+ _host_index=_host_index
2008
+ )
2009
+
2010
+ _response_types_map: Dict[str, Optional[str]] = {
2011
+ '200': "MyPermissionsResponse",
2012
+ }
2013
+ response_data = self.api_client.call_api(
2014
+ *_param,
2015
+ _request_timeout=_request_timeout
2016
+ )
2017
+ response_data.read()
2018
+ return self.api_client.response_deserialize(
2019
+ response_data=response_data,
2020
+ response_types_map=_response_types_map,
2021
+ ).data
2022
+
2023
+
2024
+ @validate_call
2025
+ def my_permissions_with_http_info(
2026
+ self,
2027
+ file_file_publication_href: StrictStr,
2028
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2029
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2030
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2031
+ _request_timeout: Union[
2032
+ None,
2033
+ Annotated[StrictFloat, Field(gt=0)],
2034
+ Tuple[
2035
+ Annotated[StrictFloat, Field(gt=0)],
2036
+ Annotated[StrictFloat, Field(gt=0)]
2037
+ ]
2038
+ ] = None,
2039
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2040
+ _content_type: Optional[StrictStr] = None,
2041
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2042
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2043
+ ) -> ApiResponse[MyPermissionsResponse]:
2044
+ """List user permissions
2045
+
2046
+ List permissions available to the current user on this object.
2047
+
2048
+ :param file_file_publication_href: (required)
2049
+ :type file_file_publication_href: str
2050
+ :param x_task_diagnostics: List of profilers to use on tasks.
2051
+ :type x_task_diagnostics: List[str]
2052
+ :param fields: A list of fields to include in the response.
2053
+ :type fields: List[str]
2054
+ :param exclude_fields: A list of fields to exclude from the response.
2055
+ :type exclude_fields: List[str]
2056
+ :param _request_timeout: timeout setting for this request. If one
2057
+ number provided, it will be total request
2058
+ timeout. It can also be a pair (tuple) of
2059
+ (connection, read) timeouts.
2060
+ :type _request_timeout: int, tuple(int, int), optional
2061
+ :param _request_auth: set to override the auth_settings for an a single
2062
+ request; this effectively ignores the
2063
+ authentication in the spec for a single request.
2064
+ :type _request_auth: dict, optional
2065
+ :param _content_type: force content-type for the request.
2066
+ :type _content_type: str, Optional
2067
+ :param _headers: set to override the headers for a single
2068
+ request; this effectively ignores the headers
2069
+ in the spec for a single request.
2070
+ :type _headers: dict, optional
2071
+ :param _host_index: set to override the host_index for a single
2072
+ request; this effectively ignores the host_index
2073
+ in the spec for a single request.
2074
+ :type _host_index: int, optional
2075
+ :return: Returns the result object.
2076
+ """ # noqa: E501
2077
+
2078
+ _param = self._my_permissions_serialize(
2079
+ file_file_publication_href=file_file_publication_href,
2080
+ x_task_diagnostics=x_task_diagnostics,
2081
+ fields=fields,
2082
+ exclude_fields=exclude_fields,
2083
+ _request_auth=_request_auth,
2084
+ _content_type=_content_type,
2085
+ _headers=_headers,
2086
+ _host_index=_host_index
2087
+ )
2088
+
2089
+ _response_types_map: Dict[str, Optional[str]] = {
2090
+ '200': "MyPermissionsResponse",
2091
+ }
2092
+ response_data = self.api_client.call_api(
2093
+ *_param,
2094
+ _request_timeout=_request_timeout
2095
+ )
2096
+ response_data.read()
2097
+ return self.api_client.response_deserialize(
2098
+ response_data=response_data,
2099
+ response_types_map=_response_types_map,
2100
+ )
2101
+
2102
+
2103
+ @validate_call
2104
+ def my_permissions_without_preload_content(
2105
+ self,
2106
+ file_file_publication_href: StrictStr,
2107
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2108
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2109
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2110
+ _request_timeout: Union[
2111
+ None,
2112
+ Annotated[StrictFloat, Field(gt=0)],
2113
+ Tuple[
2114
+ Annotated[StrictFloat, Field(gt=0)],
2115
+ Annotated[StrictFloat, Field(gt=0)]
2116
+ ]
2117
+ ] = None,
2118
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2119
+ _content_type: Optional[StrictStr] = None,
2120
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2121
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2122
+ ) -> RESTResponseType:
2123
+ """List user permissions
2124
+
2125
+ List permissions available to the current user on this object.
2126
+
2127
+ :param file_file_publication_href: (required)
2128
+ :type file_file_publication_href: str
2129
+ :param x_task_diagnostics: List of profilers to use on tasks.
2130
+ :type x_task_diagnostics: List[str]
2131
+ :param fields: A list of fields to include in the response.
2132
+ :type fields: List[str]
2133
+ :param exclude_fields: A list of fields to exclude from the response.
2134
+ :type exclude_fields: List[str]
2135
+ :param _request_timeout: timeout setting for this request. If one
2136
+ number provided, it will be total request
2137
+ timeout. It can also be a pair (tuple) of
2138
+ (connection, read) timeouts.
2139
+ :type _request_timeout: int, tuple(int, int), optional
2140
+ :param _request_auth: set to override the auth_settings for an a single
2141
+ request; this effectively ignores the
2142
+ authentication in the spec for a single request.
2143
+ :type _request_auth: dict, optional
2144
+ :param _content_type: force content-type for the request.
2145
+ :type _content_type: str, Optional
2146
+ :param _headers: set to override the headers for a single
2147
+ request; this effectively ignores the headers
2148
+ in the spec for a single request.
2149
+ :type _headers: dict, optional
2150
+ :param _host_index: set to override the host_index for a single
2151
+ request; this effectively ignores the host_index
2152
+ in the spec for a single request.
2153
+ :type _host_index: int, optional
2154
+ :return: Returns the result object.
2155
+ """ # noqa: E501
2156
+
2157
+ _param = self._my_permissions_serialize(
2158
+ file_file_publication_href=file_file_publication_href,
2159
+ x_task_diagnostics=x_task_diagnostics,
2160
+ fields=fields,
2161
+ exclude_fields=exclude_fields,
2162
+ _request_auth=_request_auth,
2163
+ _content_type=_content_type,
2164
+ _headers=_headers,
2165
+ _host_index=_host_index
2166
+ )
2167
+
2168
+ _response_types_map: Dict[str, Optional[str]] = {
2169
+ '200': "MyPermissionsResponse",
2170
+ }
2171
+ response_data = self.api_client.call_api(
2172
+ *_param,
2173
+ _request_timeout=_request_timeout
2174
+ )
2175
+ return response_data.response
2176
+
2177
+
2178
+ def _my_permissions_serialize(
2179
+ self,
2180
+ file_file_publication_href,
2181
+ x_task_diagnostics,
2182
+ fields,
2183
+ exclude_fields,
2184
+ _request_auth,
2185
+ _content_type,
2186
+ _headers,
2187
+ _host_index,
2188
+ ) -> RequestSerialized:
2189
+
2190
+ _host = None
2191
+
2192
+ _collection_formats: Dict[str, str] = {
2193
+ 'X-Task-Diagnostics': 'csv',
2194
+ 'fields': 'multi',
2195
+ 'exclude_fields': 'multi',
2196
+ }
2197
+
2198
+ _path_params: Dict[str, str] = {}
2199
+ _query_params: List[Tuple[str, str]] = []
2200
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2201
+ _form_params: List[Tuple[str, str]] = []
2202
+ _files: Dict[
2203
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2204
+ ] = {}
2205
+ _body_params: Optional[bytes] = None
2206
+
2207
+ # process the path parameters
2208
+ if file_file_publication_href is not None:
2209
+ _path_params['file_file_publication_href'] = file_file_publication_href
2210
+ # process the query parameters
2211
+ if fields is not None:
2212
+
2213
+ _query_params.append(('fields', fields))
2214
+
2215
+ if exclude_fields is not None:
2216
+
2217
+ _query_params.append(('exclude_fields', exclude_fields))
2218
+
2219
+ # process the header parameters
2220
+ if x_task_diagnostics is not None:
2221
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2222
+ # process the form parameters
2223
+ # process the body parameter
2224
+
2225
+
2226
+ # set the HTTP header `Accept`
2227
+ if 'Accept' not in _header_params:
2228
+ _header_params['Accept'] = self.api_client.select_header_accept(
2229
+ [
2230
+ 'application/json'
2231
+ ]
2232
+ )
2233
+
2234
+
2235
+ # authentication setting
2236
+ _auth_settings: List[str] = [
2237
+ 'json_header_remote_authentication',
2238
+ 'basicAuth',
2239
+ 'cookieAuth'
2240
+ ]
2241
+
2242
+ return self.api_client.param_serialize(
2243
+ method='GET',
2244
+ resource_path='{file_file_publication_href}my_permissions/',
2245
+ path_params=_path_params,
2246
+ query_params=_query_params,
2247
+ header_params=_header_params,
2248
+ body=_body_params,
2249
+ post_params=_form_params,
2250
+ files=_files,
2251
+ auth_settings=_auth_settings,
2252
+ collection_formats=_collection_formats,
2253
+ _host=_host,
2254
+ _request_auth=_request_auth
2255
+ )
2256
+
2257
+
2258
+
2259
+
2260
+ @validate_call
2261
+ def read(
2262
+ self,
2263
+ file_file_publication_href: StrictStr,
2264
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2265
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2266
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2267
+ _request_timeout: Union[
2268
+ None,
2269
+ Annotated[StrictFloat, Field(gt=0)],
2270
+ Tuple[
2271
+ Annotated[StrictFloat, Field(gt=0)],
2272
+ Annotated[StrictFloat, Field(gt=0)]
2273
+ ]
2274
+ ] = None,
2275
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2276
+ _content_type: Optional[StrictStr] = None,
2277
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2278
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2279
+ ) -> FileFilePublicationResponse:
2280
+ """Inspect a file publication
2281
+
2282
+ A FilePublication contains metadata about all the File Content in a particular File Repository Version. Once a FilePublication has been created, it can be hosted using the File Distribution API.
2283
+
2284
+ :param file_file_publication_href: (required)
2285
+ :type file_file_publication_href: str
2286
+ :param x_task_diagnostics: List of profilers to use on tasks.
2287
+ :type x_task_diagnostics: List[str]
2288
+ :param fields: A list of fields to include in the response.
2289
+ :type fields: List[str]
2290
+ :param exclude_fields: A list of fields to exclude from the response.
2291
+ :type exclude_fields: List[str]
2292
+ :param _request_timeout: timeout setting for this request. If one
2293
+ number provided, it will be total request
2294
+ timeout. It can also be a pair (tuple) of
2295
+ (connection, read) timeouts.
2296
+ :type _request_timeout: int, tuple(int, int), optional
2297
+ :param _request_auth: set to override the auth_settings for an a single
2298
+ request; this effectively ignores the
2299
+ authentication in the spec for a single request.
2300
+ :type _request_auth: dict, optional
2301
+ :param _content_type: force content-type for the request.
2302
+ :type _content_type: str, Optional
2303
+ :param _headers: set to override the headers for a single
2304
+ request; this effectively ignores the headers
2305
+ in the spec for a single request.
2306
+ :type _headers: dict, optional
2307
+ :param _host_index: set to override the host_index for a single
2308
+ request; this effectively ignores the host_index
2309
+ in the spec for a single request.
2310
+ :type _host_index: int, optional
2311
+ :return: Returns the result object.
2312
+ """ # noqa: E501
2313
+
2314
+ _param = self._read_serialize(
2315
+ file_file_publication_href=file_file_publication_href,
2316
+ x_task_diagnostics=x_task_diagnostics,
2317
+ fields=fields,
2318
+ exclude_fields=exclude_fields,
2319
+ _request_auth=_request_auth,
2320
+ _content_type=_content_type,
2321
+ _headers=_headers,
2322
+ _host_index=_host_index
2323
+ )
2324
+
2325
+ _response_types_map: Dict[str, Optional[str]] = {
2326
+ '200': "FileFilePublicationResponse",
2327
+ }
2328
+ response_data = self.api_client.call_api(
2329
+ *_param,
2330
+ _request_timeout=_request_timeout
2331
+ )
2332
+ response_data.read()
2333
+ return self.api_client.response_deserialize(
2334
+ response_data=response_data,
2335
+ response_types_map=_response_types_map,
2336
+ ).data
2337
+
2338
+
2339
+ @validate_call
2340
+ def read_with_http_info(
2341
+ self,
2342
+ file_file_publication_href: StrictStr,
2343
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2344
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2345
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2346
+ _request_timeout: Union[
2347
+ None,
2348
+ Annotated[StrictFloat, Field(gt=0)],
2349
+ Tuple[
2350
+ Annotated[StrictFloat, Field(gt=0)],
2351
+ Annotated[StrictFloat, Field(gt=0)]
2352
+ ]
2353
+ ] = None,
2354
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2355
+ _content_type: Optional[StrictStr] = None,
2356
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2357
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2358
+ ) -> ApiResponse[FileFilePublicationResponse]:
2359
+ """Inspect a file publication
2360
+
2361
+ A FilePublication contains metadata about all the File Content in a particular File Repository Version. Once a FilePublication has been created, it can be hosted using the File Distribution API.
2362
+
2363
+ :param file_file_publication_href: (required)
2364
+ :type file_file_publication_href: str
2365
+ :param x_task_diagnostics: List of profilers to use on tasks.
2366
+ :type x_task_diagnostics: List[str]
2367
+ :param fields: A list of fields to include in the response.
2368
+ :type fields: List[str]
2369
+ :param exclude_fields: A list of fields to exclude from the response.
2370
+ :type exclude_fields: List[str]
2371
+ :param _request_timeout: timeout setting for this request. If one
2372
+ number provided, it will be total request
2373
+ timeout. It can also be a pair (tuple) of
2374
+ (connection, read) timeouts.
2375
+ :type _request_timeout: int, tuple(int, int), optional
2376
+ :param _request_auth: set to override the auth_settings for an a single
2377
+ request; this effectively ignores the
2378
+ authentication in the spec for a single request.
2379
+ :type _request_auth: dict, optional
2380
+ :param _content_type: force content-type for the request.
2381
+ :type _content_type: str, Optional
2382
+ :param _headers: set to override the headers for a single
2383
+ request; this effectively ignores the headers
2384
+ in the spec for a single request.
2385
+ :type _headers: dict, optional
2386
+ :param _host_index: set to override the host_index for a single
2387
+ request; this effectively ignores the host_index
2388
+ in the spec for a single request.
2389
+ :type _host_index: int, optional
2390
+ :return: Returns the result object.
2391
+ """ # noqa: E501
2392
+
2393
+ _param = self._read_serialize(
2394
+ file_file_publication_href=file_file_publication_href,
2395
+ x_task_diagnostics=x_task_diagnostics,
2396
+ fields=fields,
2397
+ exclude_fields=exclude_fields,
2398
+ _request_auth=_request_auth,
2399
+ _content_type=_content_type,
2400
+ _headers=_headers,
2401
+ _host_index=_host_index
2402
+ )
2403
+
2404
+ _response_types_map: Dict[str, Optional[str]] = {
2405
+ '200': "FileFilePublicationResponse",
2406
+ }
2407
+ response_data = self.api_client.call_api(
2408
+ *_param,
2409
+ _request_timeout=_request_timeout
2410
+ )
2411
+ response_data.read()
2412
+ return self.api_client.response_deserialize(
2413
+ response_data=response_data,
2414
+ response_types_map=_response_types_map,
2415
+ )
2416
+
2417
+
2418
+ @validate_call
2419
+ def read_without_preload_content(
2420
+ self,
2421
+ file_file_publication_href: StrictStr,
2422
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2423
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2424
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2425
+ _request_timeout: Union[
2426
+ None,
2427
+ Annotated[StrictFloat, Field(gt=0)],
2428
+ Tuple[
2429
+ Annotated[StrictFloat, Field(gt=0)],
2430
+ Annotated[StrictFloat, Field(gt=0)]
2431
+ ]
2432
+ ] = None,
2433
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2434
+ _content_type: Optional[StrictStr] = None,
2435
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2436
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2437
+ ) -> RESTResponseType:
2438
+ """Inspect a file publication
2439
+
2440
+ A FilePublication contains metadata about all the File Content in a particular File Repository Version. Once a FilePublication has been created, it can be hosted using the File Distribution API.
2441
+
2442
+ :param file_file_publication_href: (required)
2443
+ :type file_file_publication_href: str
2444
+ :param x_task_diagnostics: List of profilers to use on tasks.
2445
+ :type x_task_diagnostics: List[str]
2446
+ :param fields: A list of fields to include in the response.
2447
+ :type fields: List[str]
2448
+ :param exclude_fields: A list of fields to exclude from the response.
2449
+ :type exclude_fields: List[str]
2450
+ :param _request_timeout: timeout setting for this request. If one
2451
+ number provided, it will be total request
2452
+ timeout. It can also be a pair (tuple) of
2453
+ (connection, read) timeouts.
2454
+ :type _request_timeout: int, tuple(int, int), optional
2455
+ :param _request_auth: set to override the auth_settings for an a single
2456
+ request; this effectively ignores the
2457
+ authentication in the spec for a single request.
2458
+ :type _request_auth: dict, optional
2459
+ :param _content_type: force content-type for the request.
2460
+ :type _content_type: str, Optional
2461
+ :param _headers: set to override the headers for a single
2462
+ request; this effectively ignores the headers
2463
+ in the spec for a single request.
2464
+ :type _headers: dict, optional
2465
+ :param _host_index: set to override the host_index for a single
2466
+ request; this effectively ignores the host_index
2467
+ in the spec for a single request.
2468
+ :type _host_index: int, optional
2469
+ :return: Returns the result object.
2470
+ """ # noqa: E501
2471
+
2472
+ _param = self._read_serialize(
2473
+ file_file_publication_href=file_file_publication_href,
2474
+ x_task_diagnostics=x_task_diagnostics,
2475
+ fields=fields,
2476
+ exclude_fields=exclude_fields,
2477
+ _request_auth=_request_auth,
2478
+ _content_type=_content_type,
2479
+ _headers=_headers,
2480
+ _host_index=_host_index
2481
+ )
2482
+
2483
+ _response_types_map: Dict[str, Optional[str]] = {
2484
+ '200': "FileFilePublicationResponse",
2485
+ }
2486
+ response_data = self.api_client.call_api(
2487
+ *_param,
2488
+ _request_timeout=_request_timeout
2489
+ )
2490
+ return response_data.response
2491
+
2492
+
2493
+ def _read_serialize(
2494
+ self,
2495
+ file_file_publication_href,
2496
+ x_task_diagnostics,
2497
+ fields,
2498
+ exclude_fields,
2499
+ _request_auth,
2500
+ _content_type,
2501
+ _headers,
2502
+ _host_index,
2503
+ ) -> RequestSerialized:
2504
+
2505
+ _host = None
2506
+
2507
+ _collection_formats: Dict[str, str] = {
2508
+ 'X-Task-Diagnostics': 'csv',
2509
+ 'fields': 'multi',
2510
+ 'exclude_fields': 'multi',
2511
+ }
2512
+
2513
+ _path_params: Dict[str, str] = {}
2514
+ _query_params: List[Tuple[str, str]] = []
2515
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2516
+ _form_params: List[Tuple[str, str]] = []
2517
+ _files: Dict[
2518
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2519
+ ] = {}
2520
+ _body_params: Optional[bytes] = None
2521
+
2522
+ # process the path parameters
2523
+ if file_file_publication_href is not None:
2524
+ _path_params['file_file_publication_href'] = file_file_publication_href
2525
+ # process the query parameters
2526
+ if fields is not None:
2527
+
2528
+ _query_params.append(('fields', fields))
2529
+
2530
+ if exclude_fields is not None:
2531
+
2532
+ _query_params.append(('exclude_fields', exclude_fields))
2533
+
2534
+ # process the header parameters
2535
+ if x_task_diagnostics is not None:
2536
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2537
+ # process the form parameters
2538
+ # process the body parameter
2539
+
2540
+
2541
+ # set the HTTP header `Accept`
2542
+ if 'Accept' not in _header_params:
2543
+ _header_params['Accept'] = self.api_client.select_header_accept(
2544
+ [
2545
+ 'application/json'
2546
+ ]
2547
+ )
2548
+
2549
+
2550
+ # authentication setting
2551
+ _auth_settings: List[str] = [
2552
+ 'json_header_remote_authentication',
2553
+ 'basicAuth',
2554
+ 'cookieAuth'
2555
+ ]
2556
+
2557
+ return self.api_client.param_serialize(
2558
+ method='GET',
2559
+ resource_path='{file_file_publication_href}',
2560
+ path_params=_path_params,
2561
+ query_params=_query_params,
2562
+ header_params=_header_params,
2563
+ body=_body_params,
2564
+ post_params=_form_params,
2565
+ files=_files,
2566
+ auth_settings=_auth_settings,
2567
+ collection_formats=_collection_formats,
2568
+ _host=_host,
2569
+ _request_auth=_request_auth
2570
+ )
2571
+
2572
+
2573
+
2574
+
2575
+ @validate_call
2576
+ def remove_role(
2577
+ self,
2578
+ file_file_publication_href: StrictStr,
2579
+ nested_role: NestedRole,
2580
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2581
+ _request_timeout: Union[
2582
+ None,
2583
+ Annotated[StrictFloat, Field(gt=0)],
2584
+ Tuple[
2585
+ Annotated[StrictFloat, Field(gt=0)],
2586
+ Annotated[StrictFloat, Field(gt=0)]
2587
+ ]
2588
+ ] = None,
2589
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2590
+ _content_type: Optional[StrictStr] = None,
2591
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2592
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2593
+ ) -> NestedRoleResponse:
2594
+ """Remove a role
2595
+
2596
+ Remove a role for this object from users/groups.
2597
+
2598
+ :param file_file_publication_href: (required)
2599
+ :type file_file_publication_href: str
2600
+ :param nested_role: (required)
2601
+ :type nested_role: NestedRole
2602
+ :param x_task_diagnostics: List of profilers to use on tasks.
2603
+ :type x_task_diagnostics: List[str]
2604
+ :param _request_timeout: timeout setting for this request. If one
2605
+ number provided, it will be total request
2606
+ timeout. It can also be a pair (tuple) of
2607
+ (connection, read) timeouts.
2608
+ :type _request_timeout: int, tuple(int, int), optional
2609
+ :param _request_auth: set to override the auth_settings for an a single
2610
+ request; this effectively ignores the
2611
+ authentication in the spec for a single request.
2612
+ :type _request_auth: dict, optional
2613
+ :param _content_type: force content-type for the request.
2614
+ :type _content_type: str, Optional
2615
+ :param _headers: set to override the headers for a single
2616
+ request; this effectively ignores the headers
2617
+ in the spec for a single request.
2618
+ :type _headers: dict, optional
2619
+ :param _host_index: set to override the host_index for a single
2620
+ request; this effectively ignores the host_index
2621
+ in the spec for a single request.
2622
+ :type _host_index: int, optional
2623
+ :return: Returns the result object.
2624
+ """ # noqa: E501
2625
+
2626
+ _param = self._remove_role_serialize(
2627
+ file_file_publication_href=file_file_publication_href,
2628
+ nested_role=nested_role,
2629
+ x_task_diagnostics=x_task_diagnostics,
2630
+ _request_auth=_request_auth,
2631
+ _content_type=_content_type,
2632
+ _headers=_headers,
2633
+ _host_index=_host_index
2634
+ )
2635
+
2636
+ _response_types_map: Dict[str, Optional[str]] = {
2637
+ '201': "NestedRoleResponse",
2638
+ }
2639
+ response_data = self.api_client.call_api(
2640
+ *_param,
2641
+ _request_timeout=_request_timeout
2642
+ )
2643
+ response_data.read()
2644
+ return self.api_client.response_deserialize(
2645
+ response_data=response_data,
2646
+ response_types_map=_response_types_map,
2647
+ ).data
2648
+
2649
+
2650
+ @validate_call
2651
+ def remove_role_with_http_info(
2652
+ self,
2653
+ file_file_publication_href: StrictStr,
2654
+ nested_role: NestedRole,
2655
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2656
+ _request_timeout: Union[
2657
+ None,
2658
+ Annotated[StrictFloat, Field(gt=0)],
2659
+ Tuple[
2660
+ Annotated[StrictFloat, Field(gt=0)],
2661
+ Annotated[StrictFloat, Field(gt=0)]
2662
+ ]
2663
+ ] = None,
2664
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2665
+ _content_type: Optional[StrictStr] = None,
2666
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2667
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2668
+ ) -> ApiResponse[NestedRoleResponse]:
2669
+ """Remove a role
2670
+
2671
+ Remove a role for this object from users/groups.
2672
+
2673
+ :param file_file_publication_href: (required)
2674
+ :type file_file_publication_href: str
2675
+ :param nested_role: (required)
2676
+ :type nested_role: NestedRole
2677
+ :param x_task_diagnostics: List of profilers to use on tasks.
2678
+ :type x_task_diagnostics: List[str]
2679
+ :param _request_timeout: timeout setting for this request. If one
2680
+ number provided, it will be total request
2681
+ timeout. It can also be a pair (tuple) of
2682
+ (connection, read) timeouts.
2683
+ :type _request_timeout: int, tuple(int, int), optional
2684
+ :param _request_auth: set to override the auth_settings for an a single
2685
+ request; this effectively ignores the
2686
+ authentication in the spec for a single request.
2687
+ :type _request_auth: dict, optional
2688
+ :param _content_type: force content-type for the request.
2689
+ :type _content_type: str, Optional
2690
+ :param _headers: set to override the headers for a single
2691
+ request; this effectively ignores the headers
2692
+ in the spec for a single request.
2693
+ :type _headers: dict, optional
2694
+ :param _host_index: set to override the host_index for a single
2695
+ request; this effectively ignores the host_index
2696
+ in the spec for a single request.
2697
+ :type _host_index: int, optional
2698
+ :return: Returns the result object.
2699
+ """ # noqa: E501
2700
+
2701
+ _param = self._remove_role_serialize(
2702
+ file_file_publication_href=file_file_publication_href,
2703
+ nested_role=nested_role,
2704
+ x_task_diagnostics=x_task_diagnostics,
2705
+ _request_auth=_request_auth,
2706
+ _content_type=_content_type,
2707
+ _headers=_headers,
2708
+ _host_index=_host_index
2709
+ )
2710
+
2711
+ _response_types_map: Dict[str, Optional[str]] = {
2712
+ '201': "NestedRoleResponse",
2713
+ }
2714
+ response_data = self.api_client.call_api(
2715
+ *_param,
2716
+ _request_timeout=_request_timeout
2717
+ )
2718
+ response_data.read()
2719
+ return self.api_client.response_deserialize(
2720
+ response_data=response_data,
2721
+ response_types_map=_response_types_map,
2722
+ )
2723
+
2724
+
2725
+ @validate_call
2726
+ def remove_role_without_preload_content(
2727
+ self,
2728
+ file_file_publication_href: StrictStr,
2729
+ nested_role: NestedRole,
2730
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2731
+ _request_timeout: Union[
2732
+ None,
2733
+ Annotated[StrictFloat, Field(gt=0)],
2734
+ Tuple[
2735
+ Annotated[StrictFloat, Field(gt=0)],
2736
+ Annotated[StrictFloat, Field(gt=0)]
2737
+ ]
2738
+ ] = None,
2739
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2740
+ _content_type: Optional[StrictStr] = None,
2741
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2742
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2743
+ ) -> RESTResponseType:
2744
+ """Remove a role
2745
+
2746
+ Remove a role for this object from users/groups.
2747
+
2748
+ :param file_file_publication_href: (required)
2749
+ :type file_file_publication_href: str
2750
+ :param nested_role: (required)
2751
+ :type nested_role: NestedRole
2752
+ :param x_task_diagnostics: List of profilers to use on tasks.
2753
+ :type x_task_diagnostics: List[str]
2754
+ :param _request_timeout: timeout setting for this request. If one
2755
+ number provided, it will be total request
2756
+ timeout. It can also be a pair (tuple) of
2757
+ (connection, read) timeouts.
2758
+ :type _request_timeout: int, tuple(int, int), optional
2759
+ :param _request_auth: set to override the auth_settings for an a single
2760
+ request; this effectively ignores the
2761
+ authentication in the spec for a single request.
2762
+ :type _request_auth: dict, optional
2763
+ :param _content_type: force content-type for the request.
2764
+ :type _content_type: str, Optional
2765
+ :param _headers: set to override the headers for a single
2766
+ request; this effectively ignores the headers
2767
+ in the spec for a single request.
2768
+ :type _headers: dict, optional
2769
+ :param _host_index: set to override the host_index for a single
2770
+ request; this effectively ignores the host_index
2771
+ in the spec for a single request.
2772
+ :type _host_index: int, optional
2773
+ :return: Returns the result object.
2774
+ """ # noqa: E501
2775
+
2776
+ _param = self._remove_role_serialize(
2777
+ file_file_publication_href=file_file_publication_href,
2778
+ nested_role=nested_role,
2779
+ x_task_diagnostics=x_task_diagnostics,
2780
+ _request_auth=_request_auth,
2781
+ _content_type=_content_type,
2782
+ _headers=_headers,
2783
+ _host_index=_host_index
2784
+ )
2785
+
2786
+ _response_types_map: Dict[str, Optional[str]] = {
2787
+ '201': "NestedRoleResponse",
2788
+ }
2789
+ response_data = self.api_client.call_api(
2790
+ *_param,
2791
+ _request_timeout=_request_timeout
2792
+ )
2793
+ return response_data.response
2794
+
2795
+
2796
+ def _remove_role_serialize(
2797
+ self,
2798
+ file_file_publication_href,
2799
+ nested_role,
2800
+ x_task_diagnostics,
2801
+ _request_auth,
2802
+ _content_type,
2803
+ _headers,
2804
+ _host_index,
2805
+ ) -> RequestSerialized:
2806
+
2807
+ _host = None
2808
+
2809
+ _collection_formats: Dict[str, str] = {
2810
+ 'X-Task-Diagnostics': 'csv',
2811
+ }
2812
+
2813
+ _path_params: Dict[str, str] = {}
2814
+ _query_params: List[Tuple[str, str]] = []
2815
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2816
+ _form_params: List[Tuple[str, str]] = []
2817
+ _files: Dict[
2818
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2819
+ ] = {}
2820
+ _body_params: Optional[bytes] = None
2821
+
2822
+ # process the path parameters
2823
+ if file_file_publication_href is not None:
2824
+ _path_params['file_file_publication_href'] = file_file_publication_href
2825
+ # process the query parameters
2826
+ # process the header parameters
2827
+ if x_task_diagnostics is not None:
2828
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2829
+ # process the form parameters
2830
+ # process the body parameter
2831
+ if nested_role is not None:
2832
+ _body_params = nested_role
2833
+
2834
+
2835
+ # set the HTTP header `Accept`
2836
+ if 'Accept' not in _header_params:
2837
+ _header_params['Accept'] = self.api_client.select_header_accept(
2838
+ [
2839
+ 'application/json'
2840
+ ]
2841
+ )
2842
+
2843
+ # set the HTTP header `Content-Type`
2844
+ if _content_type:
2845
+ _header_params['Content-Type'] = _content_type
2846
+ else:
2847
+ _default_content_type = (
2848
+ self.api_client.select_header_content_type(
2849
+ [
2850
+ 'application/json',
2851
+ 'application/x-www-form-urlencoded',
2852
+ 'multipart/form-data'
2853
+ ]
2854
+ )
2855
+ )
2856
+ if _default_content_type is not None:
2857
+ _header_params['Content-Type'] = _default_content_type
2858
+
2859
+ # authentication setting
2860
+ _auth_settings: List[str] = [
2861
+ 'json_header_remote_authentication',
2862
+ 'basicAuth',
2863
+ 'cookieAuth'
2864
+ ]
2865
+
2866
+ return self.api_client.param_serialize(
2867
+ method='POST',
2868
+ resource_path='{file_file_publication_href}remove_role/',
2869
+ path_params=_path_params,
2870
+ query_params=_query_params,
2871
+ header_params=_header_params,
2872
+ body=_body_params,
2873
+ post_params=_form_params,
2874
+ files=_files,
2875
+ auth_settings=_auth_settings,
2876
+ collection_formats=_collection_formats,
2877
+ _host=_host,
2878
+ _request_auth=_request_auth
2879
+ )
2880
+
2881
+