pulp-python-client 3.12.5__py3-none-any.whl → 3.13.0__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 pulp-python-client might be problematic. Click here for more details.

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