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