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