crc-pulp-python-client 20250819.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of crc-pulp-python-client might be problematic. Click here for more details.

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