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