pulp-python-client 3.12.4__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.4.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.4.dist-info/METADATA +0 -17
  63. pulp_python_client-3.12.4.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.4.dist-info → pulp_python_client-3.13.0.dist-info}/top_level.txt +0 -0
@@ -3,635 +3,1600 @@
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
-
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
13
11
 
14
- from __future__ import absolute_import
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
15
14
 
16
- import re # noqa: F401
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
17
19
 
18
- # python 2 and python 3 compatibility library
19
- import six
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.paginated_repository_version_response_list import PaginatedRepositoryVersionResponseList
26
+ from pulpcore.client.pulp_python.models.repair import Repair
27
+ from pulpcore.client.pulp_python.models.repository_version_response import RepositoryVersionResponse
20
28
 
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
- )
29
+ from pulpcore.client.pulp_python.api_client import ApiClient, RequestSerialized
30
+ from pulpcore.client.pulp_python.api_response import ApiResponse
31
+ from pulpcore.client.pulp_python.rest import RESTResponseType
26
32
 
27
33
 
28
- class RepositoriesPythonVersionsApi(object):
34
+ class RepositoriesPythonVersionsApi:
29
35
  """NOTE: This class is auto generated by OpenAPI Generator
30
36
  Ref: https://openapi-generator.tech
31
37
 
32
38
  Do not edit the class manually.
33
39
  """
34
40
 
35
- def __init__(self, api_client=None):
41
+ def __init__(self, api_client=None) -> None:
36
42
  if api_client is None:
37
- api_client = ApiClient()
43
+ api_client = ApiClient.get_default()
38
44
  self.api_client = api_client
39
45
 
40
- def delete(self, python_python_repository_version_href, **kwargs): # noqa: E501
41
- """Delete a repository version # noqa: E501
42
-
43
- Trigger an asynchronous task to delete a repository version. # 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.delete(python_python_repository_version_href, async_req=True)
47
- >>> result = thread.get()
48
46
 
49
- :param async_req bool: execute request asynchronously
50
- :param str python_python_repository_version_href: (required)
51
- :param _preload_content: if False, the urllib3.HTTPResponse object will
52
- be returned without reading/decoding response
53
- data. Default is True.
47
+ @validate_call
48
+ def delete(
49
+ self,
50
+ python_python_repository_version_href: StrictStr,
51
+ _request_timeout: Union[
52
+ None,
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Tuple[
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Annotated[StrictFloat, Field(gt=0)]
57
+ ]
58
+ ] = None,
59
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
60
+ _content_type: Optional[StrictStr] = None,
61
+ _headers: Optional[Dict[StrictStr, Any]] = None,
62
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
63
+ ) -> AsyncOperationResponse:
64
+ """Delete a repository version
65
+
66
+ Trigger an asynchronous task to delete a repository version.
67
+
68
+ :param python_python_repository_version_href: (required)
69
+ :type python_python_repository_version_href: str
54
70
  :param _request_timeout: timeout setting for this request. If one
55
71
  number provided, it will be total request
56
72
  timeout. It can also be a pair (tuple) of
57
73
  (connection, read) timeouts.
58
- :return: AsyncOperationResponse
59
- If the method is called asynchronously,
60
- returns the request thread.
61
- """
62
- kwargs['_return_http_data_only'] = True
63
- return self.delete_with_http_info(python_python_repository_version_href, **kwargs) # noqa: E501
64
-
65
- def delete_with_http_info(self, python_python_repository_version_href, **kwargs): # noqa: E501
66
- """Delete a repository version # noqa: E501
67
-
68
- Trigger an asynchronous task to delete a repository version. # noqa: E501
69
- This method makes a synchronous HTTP request by default. To make an
70
- asynchronous HTTP request, please pass async_req=True
71
- >>> thread = api.delete_with_http_info(python_python_repository_version_href, async_req=True)
72
- >>> result = thread.get()
73
-
74
- :param async_req bool: execute request asynchronously
75
- :param str python_python_repository_version_href: (required)
76
- :param _return_http_data_only: response data without head status code
77
- and headers
78
- :param _preload_content: if False, the urllib3.HTTPResponse object will
79
- be returned without reading/decoding response
80
- data. Default is True.
74
+ :type _request_timeout: int, tuple(int, int), optional
75
+ :param _request_auth: set to override the auth_settings for an a single
76
+ request; this effectively ignores the
77
+ authentication in the spec for a single request.
78
+ :type _request_auth: dict, optional
79
+ :param _content_type: force content-type for the request.
80
+ :type _content_type: str, Optional
81
+ :param _headers: set to override the headers for a single
82
+ request; this effectively ignores the headers
83
+ in the spec for a single request.
84
+ :type _headers: dict, optional
85
+ :param _host_index: set to override the host_index for a single
86
+ request; this effectively ignores the host_index
87
+ in the spec for a single request.
88
+ :type _host_index: int, optional
89
+ :return: Returns the result object.
90
+ """ # noqa: E501
91
+
92
+ _param = self._delete_serialize(
93
+ python_python_repository_version_href=python_python_repository_version_href,
94
+ _request_auth=_request_auth,
95
+ _content_type=_content_type,
96
+ _headers=_headers,
97
+ _host_index=_host_index
98
+ )
99
+
100
+ _response_types_map: Dict[str, Optional[str]] = {
101
+ '202': "AsyncOperationResponse",
102
+ }
103
+ response_data = self.api_client.call_api(
104
+ *_param,
105
+ _request_timeout=_request_timeout
106
+ )
107
+ response_data.read()
108
+ return self.api_client.response_deserialize(
109
+ response_data=response_data,
110
+ response_types_map=_response_types_map,
111
+ ).data
112
+
113
+
114
+ @validate_call
115
+ def delete_with_http_info(
116
+ self,
117
+ python_python_repository_version_href: StrictStr,
118
+ _request_timeout: Union[
119
+ None,
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Tuple[
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Annotated[StrictFloat, Field(gt=0)]
124
+ ]
125
+ ] = None,
126
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
127
+ _content_type: Optional[StrictStr] = None,
128
+ _headers: Optional[Dict[StrictStr, Any]] = None,
129
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
130
+ ) -> ApiResponse[AsyncOperationResponse]:
131
+ """Delete a repository version
132
+
133
+ Trigger an asynchronous task to delete a repository version.
134
+
135
+ :param python_python_repository_version_href: (required)
136
+ :type python_python_repository_version_href: str
81
137
  :param _request_timeout: timeout setting for this request. If one
82
138
  number provided, it will be total request
83
139
  timeout. It can also be a pair (tuple) of
84
140
  (connection, read) timeouts.
85
- :return: tuple(AsyncOperationResponse, status_code(int), headers(HTTPHeaderDict))
86
- If the method is called asynchronously,
87
- returns the request thread.
88
- """
141
+ :type _request_timeout: int, tuple(int, int), optional
142
+ :param _request_auth: set to override the auth_settings for an a single
143
+ request; this effectively ignores the
144
+ authentication in the spec for a single request.
145
+ :type _request_auth: dict, optional
146
+ :param _content_type: force content-type for the request.
147
+ :type _content_type: str, Optional
148
+ :param _headers: set to override the headers for a single
149
+ request; this effectively ignores the headers
150
+ in the spec for a single request.
151
+ :type _headers: dict, optional
152
+ :param _host_index: set to override the host_index for a single
153
+ request; this effectively ignores the host_index
154
+ in the spec for a single request.
155
+ :type _host_index: int, optional
156
+ :return: Returns the result object.
157
+ """ # noqa: E501
158
+
159
+ _param = self._delete_serialize(
160
+ python_python_repository_version_href=python_python_repository_version_href,
161
+ _request_auth=_request_auth,
162
+ _content_type=_content_type,
163
+ _headers=_headers,
164
+ _host_index=_host_index
165
+ )
89
166
 
90
- local_var_params = locals()
167
+ _response_types_map: Dict[str, Optional[str]] = {
168
+ '202': "AsyncOperationResponse",
169
+ }
170
+ response_data = self.api_client.call_api(
171
+ *_param,
172
+ _request_timeout=_request_timeout
173
+ )
174
+ response_data.read()
175
+ return self.api_client.response_deserialize(
176
+ response_data=response_data,
177
+ response_types_map=_response_types_map,
178
+ )
91
179
 
92
- all_params = [
93
- 'python_python_repository_version_href'
94
- ]
95
- all_params.extend(
96
- [
97
- 'async_req',
98
- '_return_http_data_only',
99
- '_preload_content',
100
- '_request_timeout'
180
+
181
+ @validate_call
182
+ def delete_without_preload_content(
183
+ self,
184
+ python_python_repository_version_href: StrictStr,
185
+ _request_timeout: Union[
186
+ None,
187
+ Annotated[StrictFloat, Field(gt=0)],
188
+ Tuple[
189
+ Annotated[StrictFloat, Field(gt=0)],
190
+ Annotated[StrictFloat, Field(gt=0)]
101
191
  ]
192
+ ] = None,
193
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
194
+ _content_type: Optional[StrictStr] = None,
195
+ _headers: Optional[Dict[StrictStr, Any]] = None,
196
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
197
+ ) -> RESTResponseType:
198
+ """Delete a repository version
199
+
200
+ Trigger an asynchronous task to delete a repository version.
201
+
202
+ :param python_python_repository_version_href: (required)
203
+ :type python_python_repository_version_href: str
204
+ :param _request_timeout: timeout setting for this request. If one
205
+ number provided, it will be total request
206
+ timeout. It can also be a pair (tuple) of
207
+ (connection, read) timeouts.
208
+ :type _request_timeout: int, tuple(int, int), optional
209
+ :param _request_auth: set to override the auth_settings for an a single
210
+ request; this effectively ignores the
211
+ authentication in the spec for a single request.
212
+ :type _request_auth: dict, optional
213
+ :param _content_type: force content-type for the request.
214
+ :type _content_type: str, Optional
215
+ :param _headers: set to override the headers for a single
216
+ request; this effectively ignores the headers
217
+ in the spec for a single request.
218
+ :type _headers: dict, optional
219
+ :param _host_index: set to override the host_index for a single
220
+ request; this effectively ignores the host_index
221
+ in the spec for a single request.
222
+ :type _host_index: int, optional
223
+ :return: Returns the result object.
224
+ """ # noqa: E501
225
+
226
+ _param = self._delete_serialize(
227
+ python_python_repository_version_href=python_python_repository_version_href,
228
+ _request_auth=_request_auth,
229
+ _content_type=_content_type,
230
+ _headers=_headers,
231
+ _host_index=_host_index
102
232
  )
103
233
 
104
- for key, val in six.iteritems(local_var_params['kwargs']):
105
- if key not in all_params:
106
- raise ApiTypeError(
107
- "Got an unexpected keyword argument '%s'"
108
- " to method delete" % key
109
- )
110
- local_var_params[key] = val
111
- del local_var_params['kwargs']
112
- # verify the required parameter 'python_python_repository_version_href' is set
113
- if self.api_client.client_side_validation and ('python_python_repository_version_href' not in local_var_params or # noqa: E501
114
- local_var_params['python_python_repository_version_href'] is None): # noqa: E501
115
- raise ApiValueError("Missing the required parameter `python_python_repository_version_href` when calling `delete`") # noqa: E501
116
-
117
- collection_formats = {}
118
-
119
- path_params = {}
120
- if 'python_python_repository_version_href' in local_var_params:
121
- path_params['python_python_repository_version_href'] = local_var_params['python_python_repository_version_href'] # noqa: E501
122
-
123
- query_params = []
124
-
125
- header_params = {}
126
-
127
- form_params = []
128
- local_var_files = {}
129
-
130
- body_params = None
131
- # HTTP header `Accept`
132
- header_params['Accept'] = self.api_client.select_header_accept(
133
- ['application/json']) # noqa: E501
134
-
135
- # Authentication setting
136
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
137
-
138
- return self.api_client.call_api(
139
- '{python_python_repository_version_href}', 'DELETE',
140
- path_params,
141
- query_params,
142
- header_params,
143
- body=body_params,
144
- post_params=form_params,
145
- files=local_var_files,
146
- response_type='AsyncOperationResponse', # noqa: E501
147
- auth_settings=auth_settings,
148
- async_req=local_var_params.get('async_req'),
149
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
150
- _preload_content=local_var_params.get('_preload_content', True),
151
- _request_timeout=local_var_params.get('_request_timeout'),
152
- collection_formats=collection_formats)
153
-
154
- def list(self, python_python_repository_href, **kwargs): # noqa: E501
155
- """List repository versions # noqa: E501
156
-
157
- PythonRepositoryVersion represents a single Python repository version. # noqa: E501
158
- This method makes a synchronous HTTP request by default. To make an
159
- asynchronous HTTP request, please pass async_req=True
160
- >>> thread = api.list(python_python_repository_href, async_req=True)
161
- >>> result = thread.get()
162
-
163
- :param async_req bool: execute request asynchronously
164
- :param str python_python_repository_href: (required)
165
- :param str content: Content Unit referenced by HREF/PRN
166
- :param list[str] content__in: Multiple values may be separated by commas.
167
- :param int limit: Number of results to return per page.
168
- :param int number: Filter results where number matches value
169
- :param int number__gt: Filter results where number is greater than value
170
- :param int number__gte: Filter results where number is greater than or equal to value
171
- :param int number__lt: Filter results where number is less than value
172
- :param int number__lte: Filter results where number is less than or equal to value
173
- :param list[int] number__range: Filter results where number is between two comma separated values
174
- :param int offset: The initial index from which to return the results.
175
- :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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending)
176
- :param list[str] prn__in: Multiple values may be separated by commas.
177
- :param datetime pulp_created: Filter results where pulp_created matches value
178
- :param datetime pulp_created__gt: Filter results where pulp_created is greater than value
179
- :param datetime pulp_created__gte: Filter results where pulp_created is greater than or equal to value
180
- :param datetime pulp_created__lt: Filter results where pulp_created is less than value
181
- :param datetime pulp_created__lte: Filter results where pulp_created is less than or equal to value
182
- :param list[datetime] pulp_created__range: Filter results where pulp_created is between two comma separated values
183
- :param list[str] pulp_href__in: Multiple values may be separated by commas.
184
- :param str q: Filter results by using NOT, AND and OR operations on other filters
185
- :param list[str] fields: A list of fields to include in the response.
186
- :param list[str] exclude_fields: A list of fields to exclude from the response.
187
- :param _preload_content: if False, the urllib3.HTTPResponse object will
188
- be returned without reading/decoding response
189
- data. Default is True.
234
+ _response_types_map: Dict[str, Optional[str]] = {
235
+ '202': "AsyncOperationResponse",
236
+ }
237
+ response_data = self.api_client.call_api(
238
+ *_param,
239
+ _request_timeout=_request_timeout
240
+ )
241
+ return response_data.response
242
+
243
+
244
+ def _delete_serialize(
245
+ self,
246
+ python_python_repository_version_href,
247
+ _request_auth,
248
+ _content_type,
249
+ _headers,
250
+ _host_index,
251
+ ) -> RequestSerialized:
252
+
253
+ _host = None
254
+
255
+ _collection_formats: Dict[str, str] = {
256
+ }
257
+
258
+ _path_params: Dict[str, str] = {}
259
+ _query_params: List[Tuple[str, str]] = []
260
+ _header_params: Dict[str, Optional[str]] = _headers or {}
261
+ _form_params: List[Tuple[str, str]] = []
262
+ _files: Dict[
263
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
264
+ ] = {}
265
+ _body_params: Optional[bytes] = None
266
+
267
+ # process the path parameters
268
+ if python_python_repository_version_href is not None:
269
+ _path_params['python_python_repository_version_href'] = python_python_repository_version_href
270
+ # process the query parameters
271
+ # process the header parameters
272
+ # process the form parameters
273
+ # process the body parameter
274
+
275
+
276
+ # set the HTTP header `Accept`
277
+ if 'Accept' not in _header_params:
278
+ _header_params['Accept'] = self.api_client.select_header_accept(
279
+ [
280
+ 'application/json'
281
+ ]
282
+ )
283
+
284
+
285
+ # authentication setting
286
+ _auth_settings: List[str] = [
287
+ 'basicAuth',
288
+ 'cookieAuth'
289
+ ]
290
+
291
+ return self.api_client.param_serialize(
292
+ method='DELETE',
293
+ resource_path='{python_python_repository_version_href}',
294
+ path_params=_path_params,
295
+ query_params=_query_params,
296
+ header_params=_header_params,
297
+ body=_body_params,
298
+ post_params=_form_params,
299
+ files=_files,
300
+ auth_settings=_auth_settings,
301
+ collection_formats=_collection_formats,
302
+ _host=_host,
303
+ _request_auth=_request_auth
304
+ )
305
+
306
+
307
+
308
+
309
+ @validate_call
310
+ def list(
311
+ self,
312
+ python_python_repository_href: StrictStr,
313
+ content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
314
+ content__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
315
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
316
+ number: Annotated[Optional[StrictInt], Field(description="Filter results where number matches value")] = None,
317
+ number__gt: Annotated[Optional[StrictInt], Field(description="Filter results where number is greater than value")] = None,
318
+ number__gte: Annotated[Optional[StrictInt], Field(description="Filter results where number is greater than or equal to value")] = None,
319
+ number__lt: Annotated[Optional[StrictInt], Field(description="Filter results where number is less than value")] = None,
320
+ number__lte: Annotated[Optional[StrictInt], Field(description="Filter results where number is less than or equal to value")] = None,
321
+ number__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where number is between two comma separated values")] = None,
322
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
323
+ 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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
324
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
325
+ pulp_created: Annotated[Optional[datetime], Field(description="Filter results where pulp_created matches value")] = None,
326
+ pulp_created__gt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than value")] = None,
327
+ pulp_created__gte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than or equal to value")] = None,
328
+ pulp_created__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where pulp_created has a null value")] = None,
329
+ pulp_created__lt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than value")] = None,
330
+ pulp_created__lte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than or equal to value")] = None,
331
+ pulp_created__range: Annotated[Optional[List[datetime]], Field(description="Filter results where pulp_created is between two comma separated values")] = None,
332
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
333
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
334
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
335
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
336
+ _request_timeout: Union[
337
+ None,
338
+ Annotated[StrictFloat, Field(gt=0)],
339
+ Tuple[
340
+ Annotated[StrictFloat, Field(gt=0)],
341
+ Annotated[StrictFloat, Field(gt=0)]
342
+ ]
343
+ ] = None,
344
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
345
+ _content_type: Optional[StrictStr] = None,
346
+ _headers: Optional[Dict[StrictStr, Any]] = None,
347
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
348
+ ) -> PaginatedRepositoryVersionResponseList:
349
+ """List repository versions
350
+
351
+ PythonRepositoryVersion represents a single Python repository version.
352
+
353
+ :param python_python_repository_href: (required)
354
+ :type python_python_repository_href: str
355
+ :param content: Content Unit referenced by HREF/PRN
356
+ :type content: str
357
+ :param content__in: Multiple values may be separated by commas.
358
+ :type content__in: List[str]
359
+ :param limit: Number of results to return per page.
360
+ :type limit: int
361
+ :param number: Filter results where number matches value
362
+ :type number: int
363
+ :param number__gt: Filter results where number is greater than value
364
+ :type number__gt: int
365
+ :param number__gte: Filter results where number is greater than or equal to value
366
+ :type number__gte: int
367
+ :param number__lt: Filter results where number is less than value
368
+ :type number__lt: int
369
+ :param number__lte: Filter results where number is less than or equal to value
370
+ :type number__lte: int
371
+ :param number__range: Filter results where number is between two comma separated values
372
+ :type number__range: List[int]
373
+ :param offset: The initial index from which to return the results.
374
+ :type offset: int
375
+ :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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending)
376
+ :type ordering: List[str]
377
+ :param prn__in: Multiple values may be separated by commas.
378
+ :type prn__in: List[str]
379
+ :param pulp_created: Filter results where pulp_created matches value
380
+ :type pulp_created: datetime
381
+ :param pulp_created__gt: Filter results where pulp_created is greater than value
382
+ :type pulp_created__gt: datetime
383
+ :param pulp_created__gte: Filter results where pulp_created is greater than or equal to value
384
+ :type pulp_created__gte: datetime
385
+ :param pulp_created__isnull: Filter results where pulp_created has a null value
386
+ :type pulp_created__isnull: bool
387
+ :param pulp_created__lt: Filter results where pulp_created is less than value
388
+ :type pulp_created__lt: datetime
389
+ :param pulp_created__lte: Filter results where pulp_created is less than or equal to value
390
+ :type pulp_created__lte: datetime
391
+ :param pulp_created__range: Filter results where pulp_created is between two comma separated values
392
+ :type pulp_created__range: List[datetime]
393
+ :param pulp_href__in: Multiple values may be separated by commas.
394
+ :type pulp_href__in: List[str]
395
+ :param q: Filter results by using NOT, AND and OR operations on other filters
396
+ :type q: str
397
+ :param fields: A list of fields to include in the response.
398
+ :type fields: List[str]
399
+ :param exclude_fields: A list of fields to exclude from the response.
400
+ :type exclude_fields: List[str]
190
401
  :param _request_timeout: timeout setting for this request. If one
191
402
  number provided, it will be total request
192
403
  timeout. It can also be a pair (tuple) of
193
404
  (connection, read) timeouts.
194
- :return: PaginatedRepositoryVersionResponseList
195
- If the method is called asynchronously,
196
- returns the request thread.
197
- """
198
- kwargs['_return_http_data_only'] = True
199
- return self.list_with_http_info(python_python_repository_href, **kwargs) # noqa: E501
200
-
201
- def list_with_http_info(self, python_python_repository_href, **kwargs): # noqa: E501
202
- """List repository versions # noqa: E501
203
-
204
- PythonRepositoryVersion represents a single Python repository version. # noqa: E501
205
- This method makes a synchronous HTTP request by default. To make an
206
- asynchronous HTTP request, please pass async_req=True
207
- >>> thread = api.list_with_http_info(python_python_repository_href, async_req=True)
208
- >>> result = thread.get()
209
-
210
- :param async_req bool: execute request asynchronously
211
- :param str python_python_repository_href: (required)
212
- :param str content: Content Unit referenced by HREF/PRN
213
- :param list[str] content__in: Multiple values may be separated by commas.
214
- :param int limit: Number of results to return per page.
215
- :param int number: Filter results where number matches value
216
- :param int number__gt: Filter results where number is greater than value
217
- :param int number__gte: Filter results where number is greater than or equal to value
218
- :param int number__lt: Filter results where number is less than value
219
- :param int number__lte: Filter results where number is less than or equal to value
220
- :param list[int] number__range: Filter results where number is between two comma separated values
221
- :param int offset: The initial index from which to return the results.
222
- :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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending)
223
- :param list[str] prn__in: Multiple values may be separated by commas.
224
- :param datetime pulp_created: Filter results where pulp_created matches value
225
- :param datetime pulp_created__gt: Filter results where pulp_created is greater than value
226
- :param datetime pulp_created__gte: Filter results where pulp_created is greater than or equal to value
227
- :param datetime pulp_created__lt: Filter results where pulp_created is less than value
228
- :param datetime pulp_created__lte: Filter results where pulp_created is less than or equal to value
229
- :param list[datetime] pulp_created__range: Filter results where pulp_created is between two comma separated values
230
- :param list[str] pulp_href__in: Multiple values may be separated by commas.
231
- :param str q: Filter results by using NOT, AND and OR operations on other filters
232
- :param list[str] fields: A list of fields to include in the response.
233
- :param list[str] exclude_fields: A list of fields to exclude from the response.
234
- :param _return_http_data_only: response data without head status code
235
- and headers
236
- :param _preload_content: if False, the urllib3.HTTPResponse object will
237
- be returned without reading/decoding response
238
- data. Default is True.
405
+ :type _request_timeout: int, tuple(int, int), optional
406
+ :param _request_auth: set to override the auth_settings for an a single
407
+ request; this effectively ignores the
408
+ authentication in the spec for a single request.
409
+ :type _request_auth: dict, optional
410
+ :param _content_type: force content-type for the request.
411
+ :type _content_type: str, Optional
412
+ :param _headers: set to override the headers for a single
413
+ request; this effectively ignores the headers
414
+ in the spec for a single request.
415
+ :type _headers: dict, optional
416
+ :param _host_index: set to override the host_index for a single
417
+ request; this effectively ignores the host_index
418
+ in the spec for a single request.
419
+ :type _host_index: int, optional
420
+ :return: Returns the result object.
421
+ """ # noqa: E501
422
+
423
+ _param = self._list_serialize(
424
+ python_python_repository_href=python_python_repository_href,
425
+ content=content,
426
+ content__in=content__in,
427
+ limit=limit,
428
+ number=number,
429
+ number__gt=number__gt,
430
+ number__gte=number__gte,
431
+ number__lt=number__lt,
432
+ number__lte=number__lte,
433
+ number__range=number__range,
434
+ offset=offset,
435
+ ordering=ordering,
436
+ prn__in=prn__in,
437
+ pulp_created=pulp_created,
438
+ pulp_created__gt=pulp_created__gt,
439
+ pulp_created__gte=pulp_created__gte,
440
+ pulp_created__isnull=pulp_created__isnull,
441
+ pulp_created__lt=pulp_created__lt,
442
+ pulp_created__lte=pulp_created__lte,
443
+ pulp_created__range=pulp_created__range,
444
+ pulp_href__in=pulp_href__in,
445
+ q=q,
446
+ fields=fields,
447
+ exclude_fields=exclude_fields,
448
+ _request_auth=_request_auth,
449
+ _content_type=_content_type,
450
+ _headers=_headers,
451
+ _host_index=_host_index
452
+ )
453
+
454
+ _response_types_map: Dict[str, Optional[str]] = {
455
+ '200': "PaginatedRepositoryVersionResponseList",
456
+ }
457
+ response_data = self.api_client.call_api(
458
+ *_param,
459
+ _request_timeout=_request_timeout
460
+ )
461
+ response_data.read()
462
+ return self.api_client.response_deserialize(
463
+ response_data=response_data,
464
+ response_types_map=_response_types_map,
465
+ ).data
466
+
467
+
468
+ @validate_call
469
+ def list_with_http_info(
470
+ self,
471
+ python_python_repository_href: StrictStr,
472
+ content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
473
+ content__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
474
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
475
+ number: Annotated[Optional[StrictInt], Field(description="Filter results where number matches value")] = None,
476
+ number__gt: Annotated[Optional[StrictInt], Field(description="Filter results where number is greater than value")] = None,
477
+ number__gte: Annotated[Optional[StrictInt], Field(description="Filter results where number is greater than or equal to value")] = None,
478
+ number__lt: Annotated[Optional[StrictInt], Field(description="Filter results where number is less than value")] = None,
479
+ number__lte: Annotated[Optional[StrictInt], Field(description="Filter results where number is less than or equal to value")] = None,
480
+ number__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where number is between two comma separated values")] = None,
481
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
482
+ 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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
483
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
484
+ pulp_created: Annotated[Optional[datetime], Field(description="Filter results where pulp_created matches value")] = None,
485
+ pulp_created__gt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than value")] = None,
486
+ pulp_created__gte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than or equal to value")] = None,
487
+ pulp_created__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where pulp_created has a null value")] = None,
488
+ pulp_created__lt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than value")] = None,
489
+ pulp_created__lte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than or equal to value")] = None,
490
+ pulp_created__range: Annotated[Optional[List[datetime]], Field(description="Filter results where pulp_created is between two comma separated values")] = None,
491
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
492
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
493
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
494
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
495
+ _request_timeout: Union[
496
+ None,
497
+ Annotated[StrictFloat, Field(gt=0)],
498
+ Tuple[
499
+ Annotated[StrictFloat, Field(gt=0)],
500
+ Annotated[StrictFloat, Field(gt=0)]
501
+ ]
502
+ ] = None,
503
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
504
+ _content_type: Optional[StrictStr] = None,
505
+ _headers: Optional[Dict[StrictStr, Any]] = None,
506
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
507
+ ) -> ApiResponse[PaginatedRepositoryVersionResponseList]:
508
+ """List repository versions
509
+
510
+ PythonRepositoryVersion represents a single Python repository version.
511
+
512
+ :param python_python_repository_href: (required)
513
+ :type python_python_repository_href: str
514
+ :param content: Content Unit referenced by HREF/PRN
515
+ :type content: str
516
+ :param content__in: Multiple values may be separated by commas.
517
+ :type content__in: List[str]
518
+ :param limit: Number of results to return per page.
519
+ :type limit: int
520
+ :param number: Filter results where number matches value
521
+ :type number: int
522
+ :param number__gt: Filter results where number is greater than value
523
+ :type number__gt: int
524
+ :param number__gte: Filter results where number is greater than or equal to value
525
+ :type number__gte: int
526
+ :param number__lt: Filter results where number is less than value
527
+ :type number__lt: int
528
+ :param number__lte: Filter results where number is less than or equal to value
529
+ :type number__lte: int
530
+ :param number__range: Filter results where number is between two comma separated values
531
+ :type number__range: List[int]
532
+ :param offset: The initial index from which to return the results.
533
+ :type offset: int
534
+ :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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending)
535
+ :type ordering: List[str]
536
+ :param prn__in: Multiple values may be separated by commas.
537
+ :type prn__in: List[str]
538
+ :param pulp_created: Filter results where pulp_created matches value
539
+ :type pulp_created: datetime
540
+ :param pulp_created__gt: Filter results where pulp_created is greater than value
541
+ :type pulp_created__gt: datetime
542
+ :param pulp_created__gte: Filter results where pulp_created is greater than or equal to value
543
+ :type pulp_created__gte: datetime
544
+ :param pulp_created__isnull: Filter results where pulp_created has a null value
545
+ :type pulp_created__isnull: bool
546
+ :param pulp_created__lt: Filter results where pulp_created is less than value
547
+ :type pulp_created__lt: datetime
548
+ :param pulp_created__lte: Filter results where pulp_created is less than or equal to value
549
+ :type pulp_created__lte: datetime
550
+ :param pulp_created__range: Filter results where pulp_created is between two comma separated values
551
+ :type pulp_created__range: List[datetime]
552
+ :param pulp_href__in: Multiple values may be separated by commas.
553
+ :type pulp_href__in: List[str]
554
+ :param q: Filter results by using NOT, AND and OR operations on other filters
555
+ :type q: str
556
+ :param fields: A list of fields to include in the response.
557
+ :type fields: List[str]
558
+ :param exclude_fields: A list of fields to exclude from the response.
559
+ :type exclude_fields: List[str]
239
560
  :param _request_timeout: timeout setting for this request. If one
240
561
  number provided, it will be total request
241
562
  timeout. It can also be a pair (tuple) of
242
563
  (connection, read) timeouts.
243
- :return: tuple(PaginatedRepositoryVersionResponseList, status_code(int), headers(HTTPHeaderDict))
244
- If the method is called asynchronously,
245
- returns the request thread.
246
- """
247
-
248
- local_var_params = locals()
249
-
250
- all_params = [
251
- 'python_python_repository_href',
252
- 'content',
253
- 'content__in',
254
- 'limit',
255
- 'number',
256
- 'number__gt',
257
- 'number__gte',
258
- 'number__lt',
259
- 'number__lte',
260
- 'number__range',
261
- 'offset',
262
- 'ordering',
263
- 'prn__in',
264
- 'pulp_created',
265
- 'pulp_created__gt',
266
- 'pulp_created__gte',
267
- 'pulp_created__lt',
268
- 'pulp_created__lte',
269
- 'pulp_created__range',
270
- 'pulp_href__in',
271
- 'q',
272
- 'fields',
273
- 'exclude_fields'
274
- ]
275
- all_params.extend(
276
- [
277
- 'async_req',
278
- '_return_http_data_only',
279
- '_preload_content',
280
- '_request_timeout'
564
+ :type _request_timeout: int, tuple(int, int), optional
565
+ :param _request_auth: set to override the auth_settings for an a single
566
+ request; this effectively ignores the
567
+ authentication in the spec for a single request.
568
+ :type _request_auth: dict, optional
569
+ :param _content_type: force content-type for the request.
570
+ :type _content_type: str, Optional
571
+ :param _headers: set to override the headers for a single
572
+ request; this effectively ignores the headers
573
+ in the spec for a single request.
574
+ :type _headers: dict, optional
575
+ :param _host_index: set to override the host_index for a single
576
+ request; this effectively ignores the host_index
577
+ in the spec for a single request.
578
+ :type _host_index: int, optional
579
+ :return: Returns the result object.
580
+ """ # noqa: E501
581
+
582
+ _param = self._list_serialize(
583
+ python_python_repository_href=python_python_repository_href,
584
+ content=content,
585
+ content__in=content__in,
586
+ limit=limit,
587
+ number=number,
588
+ number__gt=number__gt,
589
+ number__gte=number__gte,
590
+ number__lt=number__lt,
591
+ number__lte=number__lte,
592
+ number__range=number__range,
593
+ offset=offset,
594
+ ordering=ordering,
595
+ prn__in=prn__in,
596
+ pulp_created=pulp_created,
597
+ pulp_created__gt=pulp_created__gt,
598
+ pulp_created__gte=pulp_created__gte,
599
+ pulp_created__isnull=pulp_created__isnull,
600
+ pulp_created__lt=pulp_created__lt,
601
+ pulp_created__lte=pulp_created__lte,
602
+ pulp_created__range=pulp_created__range,
603
+ pulp_href__in=pulp_href__in,
604
+ q=q,
605
+ fields=fields,
606
+ exclude_fields=exclude_fields,
607
+ _request_auth=_request_auth,
608
+ _content_type=_content_type,
609
+ _headers=_headers,
610
+ _host_index=_host_index
611
+ )
612
+
613
+ _response_types_map: Dict[str, Optional[str]] = {
614
+ '200': "PaginatedRepositoryVersionResponseList",
615
+ }
616
+ response_data = self.api_client.call_api(
617
+ *_param,
618
+ _request_timeout=_request_timeout
619
+ )
620
+ response_data.read()
621
+ return self.api_client.response_deserialize(
622
+ response_data=response_data,
623
+ response_types_map=_response_types_map,
624
+ )
625
+
626
+
627
+ @validate_call
628
+ def list_without_preload_content(
629
+ self,
630
+ python_python_repository_href: StrictStr,
631
+ content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
632
+ content__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
633
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
634
+ number: Annotated[Optional[StrictInt], Field(description="Filter results where number matches value")] = None,
635
+ number__gt: Annotated[Optional[StrictInt], Field(description="Filter results where number is greater than value")] = None,
636
+ number__gte: Annotated[Optional[StrictInt], Field(description="Filter results where number is greater than or equal to value")] = None,
637
+ number__lt: Annotated[Optional[StrictInt], Field(description="Filter results where number is less than value")] = None,
638
+ number__lte: Annotated[Optional[StrictInt], Field(description="Filter results where number is less than or equal to value")] = None,
639
+ number__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where number is between two comma separated values")] = None,
640
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
641
+ 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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
642
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
643
+ pulp_created: Annotated[Optional[datetime], Field(description="Filter results where pulp_created matches value")] = None,
644
+ pulp_created__gt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than value")] = None,
645
+ pulp_created__gte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than or equal to value")] = None,
646
+ pulp_created__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where pulp_created has a null value")] = None,
647
+ pulp_created__lt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than value")] = None,
648
+ pulp_created__lte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than or equal to value")] = None,
649
+ pulp_created__range: Annotated[Optional[List[datetime]], Field(description="Filter results where pulp_created is between two comma separated values")] = None,
650
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
651
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
652
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
653
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
654
+ _request_timeout: Union[
655
+ None,
656
+ Annotated[StrictFloat, Field(gt=0)],
657
+ Tuple[
658
+ Annotated[StrictFloat, Field(gt=0)],
659
+ Annotated[StrictFloat, Field(gt=0)]
281
660
  ]
661
+ ] = None,
662
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
663
+ _content_type: Optional[StrictStr] = None,
664
+ _headers: Optional[Dict[StrictStr, Any]] = None,
665
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
666
+ ) -> RESTResponseType:
667
+ """List repository versions
668
+
669
+ PythonRepositoryVersion represents a single Python repository version.
670
+
671
+ :param python_python_repository_href: (required)
672
+ :type python_python_repository_href: str
673
+ :param content: Content Unit referenced by HREF/PRN
674
+ :type content: str
675
+ :param content__in: Multiple values may be separated by commas.
676
+ :type content__in: List[str]
677
+ :param limit: Number of results to return per page.
678
+ :type limit: int
679
+ :param number: Filter results where number matches value
680
+ :type number: int
681
+ :param number__gt: Filter results where number is greater than value
682
+ :type number__gt: int
683
+ :param number__gte: Filter results where number is greater than or equal to value
684
+ :type number__gte: int
685
+ :param number__lt: Filter results where number is less than value
686
+ :type number__lt: int
687
+ :param number__lte: Filter results where number is less than or equal to value
688
+ :type number__lte: int
689
+ :param number__range: Filter results where number is between two comma separated values
690
+ :type number__range: List[int]
691
+ :param offset: The initial index from which to return the results.
692
+ :type offset: int
693
+ :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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending)
694
+ :type ordering: List[str]
695
+ :param prn__in: Multiple values may be separated by commas.
696
+ :type prn__in: List[str]
697
+ :param pulp_created: Filter results where pulp_created matches value
698
+ :type pulp_created: datetime
699
+ :param pulp_created__gt: Filter results where pulp_created is greater than value
700
+ :type pulp_created__gt: datetime
701
+ :param pulp_created__gte: Filter results where pulp_created is greater than or equal to value
702
+ :type pulp_created__gte: datetime
703
+ :param pulp_created__isnull: Filter results where pulp_created has a null value
704
+ :type pulp_created__isnull: bool
705
+ :param pulp_created__lt: Filter results where pulp_created is less than value
706
+ :type pulp_created__lt: datetime
707
+ :param pulp_created__lte: Filter results where pulp_created is less than or equal to value
708
+ :type pulp_created__lte: datetime
709
+ :param pulp_created__range: Filter results where pulp_created is between two comma separated values
710
+ :type pulp_created__range: List[datetime]
711
+ :param pulp_href__in: Multiple values may be separated by commas.
712
+ :type pulp_href__in: List[str]
713
+ :param q: Filter results by using NOT, AND and OR operations on other filters
714
+ :type q: str
715
+ :param fields: A list of fields to include in the response.
716
+ :type fields: List[str]
717
+ :param exclude_fields: A list of fields to exclude from the response.
718
+ :type exclude_fields: List[str]
719
+ :param _request_timeout: timeout setting for this request. If one
720
+ number provided, it will be total request
721
+ timeout. It can also be a pair (tuple) of
722
+ (connection, read) timeouts.
723
+ :type _request_timeout: int, tuple(int, int), optional
724
+ :param _request_auth: set to override the auth_settings for an a single
725
+ request; this effectively ignores the
726
+ authentication in the spec for a single request.
727
+ :type _request_auth: dict, optional
728
+ :param _content_type: force content-type for the request.
729
+ :type _content_type: str, Optional
730
+ :param _headers: set to override the headers for a single
731
+ request; this effectively ignores the headers
732
+ in the spec for a single request.
733
+ :type _headers: dict, optional
734
+ :param _host_index: set to override the host_index for a single
735
+ request; this effectively ignores the host_index
736
+ in the spec for a single request.
737
+ :type _host_index: int, optional
738
+ :return: Returns the result object.
739
+ """ # noqa: E501
740
+
741
+ _param = self._list_serialize(
742
+ python_python_repository_href=python_python_repository_href,
743
+ content=content,
744
+ content__in=content__in,
745
+ limit=limit,
746
+ number=number,
747
+ number__gt=number__gt,
748
+ number__gte=number__gte,
749
+ number__lt=number__lt,
750
+ number__lte=number__lte,
751
+ number__range=number__range,
752
+ offset=offset,
753
+ ordering=ordering,
754
+ prn__in=prn__in,
755
+ pulp_created=pulp_created,
756
+ pulp_created__gt=pulp_created__gt,
757
+ pulp_created__gte=pulp_created__gte,
758
+ pulp_created__isnull=pulp_created__isnull,
759
+ pulp_created__lt=pulp_created__lt,
760
+ pulp_created__lte=pulp_created__lte,
761
+ pulp_created__range=pulp_created__range,
762
+ pulp_href__in=pulp_href__in,
763
+ q=q,
764
+ fields=fields,
765
+ exclude_fields=exclude_fields,
766
+ _request_auth=_request_auth,
767
+ _content_type=_content_type,
768
+ _headers=_headers,
769
+ _host_index=_host_index
282
770
  )
283
771
 
284
- for key, val in six.iteritems(local_var_params['kwargs']):
285
- if key not in all_params:
286
- raise ApiTypeError(
287
- "Got an unexpected keyword argument '%s'"
288
- " to method list" % key
772
+ _response_types_map: Dict[str, Optional[str]] = {
773
+ '200': "PaginatedRepositoryVersionResponseList",
774
+ }
775
+ response_data = self.api_client.call_api(
776
+ *_param,
777
+ _request_timeout=_request_timeout
778
+ )
779
+ return response_data.response
780
+
781
+
782
+ def _list_serialize(
783
+ self,
784
+ python_python_repository_href,
785
+ content,
786
+ content__in,
787
+ limit,
788
+ number,
789
+ number__gt,
790
+ number__gte,
791
+ number__lt,
792
+ number__lte,
793
+ number__range,
794
+ offset,
795
+ ordering,
796
+ prn__in,
797
+ pulp_created,
798
+ pulp_created__gt,
799
+ pulp_created__gte,
800
+ pulp_created__isnull,
801
+ pulp_created__lt,
802
+ pulp_created__lte,
803
+ pulp_created__range,
804
+ pulp_href__in,
805
+ q,
806
+ fields,
807
+ exclude_fields,
808
+ _request_auth,
809
+ _content_type,
810
+ _headers,
811
+ _host_index,
812
+ ) -> RequestSerialized:
813
+
814
+ _host = None
815
+
816
+ _collection_formats: Dict[str, str] = {
817
+ 'content__in': 'csv',
818
+ 'number__range': 'csv',
819
+ 'ordering': 'csv',
820
+ 'prn__in': 'csv',
821
+ 'pulp_created__range': 'csv',
822
+ 'pulp_href__in': 'csv',
823
+ 'fields': 'multi',
824
+ 'exclude_fields': 'multi',
825
+ }
826
+
827
+ _path_params: Dict[str, str] = {}
828
+ _query_params: List[Tuple[str, str]] = []
829
+ _header_params: Dict[str, Optional[str]] = _headers or {}
830
+ _form_params: List[Tuple[str, str]] = []
831
+ _files: Dict[
832
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
833
+ ] = {}
834
+ _body_params: Optional[bytes] = None
835
+
836
+ # process the path parameters
837
+ if python_python_repository_href is not None:
838
+ _path_params['python_python_repository_href'] = python_python_repository_href
839
+ # process the query parameters
840
+ if content is not None:
841
+
842
+ _query_params.append(('content', content))
843
+
844
+ if content__in is not None:
845
+
846
+ _query_params.append(('content__in', content__in))
847
+
848
+ if limit is not None:
849
+
850
+ _query_params.append(('limit', limit))
851
+
852
+ if number is not None:
853
+
854
+ _query_params.append(('number', number))
855
+
856
+ if number__gt is not None:
857
+
858
+ _query_params.append(('number__gt', number__gt))
859
+
860
+ if number__gte is not None:
861
+
862
+ _query_params.append(('number__gte', number__gte))
863
+
864
+ if number__lt is not None:
865
+
866
+ _query_params.append(('number__lt', number__lt))
867
+
868
+ if number__lte is not None:
869
+
870
+ _query_params.append(('number__lte', number__lte))
871
+
872
+ if number__range is not None:
873
+
874
+ _query_params.append(('number__range', number__range))
875
+
876
+ if offset is not None:
877
+
878
+ _query_params.append(('offset', offset))
879
+
880
+ if ordering is not None:
881
+
882
+ _query_params.append(('ordering', ordering))
883
+
884
+ if prn__in is not None:
885
+
886
+ _query_params.append(('prn__in', prn__in))
887
+
888
+ if pulp_created is not None:
889
+ if isinstance(pulp_created, datetime):
890
+ _query_params.append(
891
+ (
892
+ 'pulp_created',
893
+ pulp_created.strftime(
894
+ self.api_client.configuration.datetime_format
895
+ )
896
+ )
897
+ )
898
+ else:
899
+ _query_params.append(('pulp_created', pulp_created))
900
+
901
+ if pulp_created__gt is not None:
902
+ if isinstance(pulp_created__gt, datetime):
903
+ _query_params.append(
904
+ (
905
+ 'pulp_created__gt',
906
+ pulp_created__gt.strftime(
907
+ self.api_client.configuration.datetime_format
908
+ )
909
+ )
910
+ )
911
+ else:
912
+ _query_params.append(('pulp_created__gt', pulp_created__gt))
913
+
914
+ if pulp_created__gte is not None:
915
+ if isinstance(pulp_created__gte, datetime):
916
+ _query_params.append(
917
+ (
918
+ 'pulp_created__gte',
919
+ pulp_created__gte.strftime(
920
+ self.api_client.configuration.datetime_format
921
+ )
922
+ )
289
923
  )
290
- local_var_params[key] = val
291
- del local_var_params['kwargs']
292
- # verify the required parameter 'python_python_repository_href' is set
293
- if self.api_client.client_side_validation and ('python_python_repository_href' not in local_var_params or # noqa: E501
294
- local_var_params['python_python_repository_href'] is None): # noqa: E501
295
- raise ApiValueError("Missing the required parameter `python_python_repository_href` when calling `list`") # noqa: E501
296
-
297
- collection_formats = {}
298
-
299
- path_params = {}
300
- if 'python_python_repository_href' in local_var_params:
301
- path_params['python_python_repository_href'] = local_var_params['python_python_repository_href'] # noqa: E501
302
-
303
- query_params = []
304
- if 'content' in local_var_params and local_var_params['content'] is not None: # noqa: E501
305
- query_params.append(('content', local_var_params['content'])) # noqa: E501
306
- if 'content__in' in local_var_params and local_var_params['content__in'] is not None: # noqa: E501
307
- query_params.append(('content__in', local_var_params['content__in'])) # noqa: E501
308
- collection_formats['content__in'] = 'csv' # noqa: E501
309
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
310
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
311
- if 'number' in local_var_params and local_var_params['number'] is not None: # noqa: E501
312
- query_params.append(('number', local_var_params['number'])) # noqa: E501
313
- if 'number__gt' in local_var_params and local_var_params['number__gt'] is not None: # noqa: E501
314
- query_params.append(('number__gt', local_var_params['number__gt'])) # noqa: E501
315
- if 'number__gte' in local_var_params and local_var_params['number__gte'] is not None: # noqa: E501
316
- query_params.append(('number__gte', local_var_params['number__gte'])) # noqa: E501
317
- if 'number__lt' in local_var_params and local_var_params['number__lt'] is not None: # noqa: E501
318
- query_params.append(('number__lt', local_var_params['number__lt'])) # noqa: E501
319
- if 'number__lte' in local_var_params and local_var_params['number__lte'] is not None: # noqa: E501
320
- query_params.append(('number__lte', local_var_params['number__lte'])) # noqa: E501
321
- if 'number__range' in local_var_params and local_var_params['number__range'] is not None: # noqa: E501
322
- query_params.append(('number__range', local_var_params['number__range'])) # noqa: E501
323
- collection_formats['number__range'] = 'csv' # noqa: E501
324
- if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
325
- query_params.append(('offset', local_var_params['offset'])) # noqa: E501
326
- if 'ordering' in local_var_params and local_var_params['ordering'] is not None: # noqa: E501
327
- query_params.append(('ordering', local_var_params['ordering'])) # noqa: E501
328
- collection_formats['ordering'] = 'csv' # noqa: E501
329
- if 'prn__in' in local_var_params and local_var_params['prn__in'] is not None: # noqa: E501
330
- query_params.append(('prn__in', local_var_params['prn__in'])) # noqa: E501
331
- collection_formats['prn__in'] = 'csv' # noqa: E501
332
- if 'pulp_created' in local_var_params and local_var_params['pulp_created'] is not None: # noqa: E501
333
- query_params.append(('pulp_created', local_var_params['pulp_created'])) # noqa: E501
334
- if 'pulp_created__gt' in local_var_params and local_var_params['pulp_created__gt'] is not None: # noqa: E501
335
- query_params.append(('pulp_created__gt', local_var_params['pulp_created__gt'])) # noqa: E501
336
- if 'pulp_created__gte' in local_var_params and local_var_params['pulp_created__gte'] is not None: # noqa: E501
337
- query_params.append(('pulp_created__gte', local_var_params['pulp_created__gte'])) # noqa: E501
338
- if 'pulp_created__lt' in local_var_params and local_var_params['pulp_created__lt'] is not None: # noqa: E501
339
- query_params.append(('pulp_created__lt', local_var_params['pulp_created__lt'])) # noqa: E501
340
- if 'pulp_created__lte' in local_var_params and local_var_params['pulp_created__lte'] is not None: # noqa: E501
341
- query_params.append(('pulp_created__lte', local_var_params['pulp_created__lte'])) # noqa: E501
342
- if 'pulp_created__range' in local_var_params and local_var_params['pulp_created__range'] is not None: # noqa: E501
343
- query_params.append(('pulp_created__range', local_var_params['pulp_created__range'])) # noqa: E501
344
- collection_formats['pulp_created__range'] = 'csv' # noqa: E501
345
- if 'pulp_href__in' in local_var_params and local_var_params['pulp_href__in'] is not None: # noqa: E501
346
- query_params.append(('pulp_href__in', local_var_params['pulp_href__in'])) # noqa: E501
347
- collection_formats['pulp_href__in'] = 'csv' # noqa: E501
348
- if 'q' in local_var_params and local_var_params['q'] is not None: # noqa: E501
349
- query_params.append(('q', local_var_params['q'])) # noqa: E501
350
- if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
351
- query_params.append(('fields', local_var_params['fields'])) # noqa: E501
352
- collection_formats['fields'] = 'multi' # noqa: E501
353
- if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
354
- query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
355
- collection_formats['exclude_fields'] = 'multi' # noqa: E501
356
-
357
- header_params = {}
358
-
359
- form_params = []
360
- local_var_files = {}
361
-
362
- body_params = None
363
- # HTTP header `Accept`
364
- header_params['Accept'] = self.api_client.select_header_accept(
365
- ['application/json']) # noqa: E501
366
-
367
- # Authentication setting
368
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
369
-
370
- return self.api_client.call_api(
371
- '{python_python_repository_href}versions/', 'GET',
372
- path_params,
373
- query_params,
374
- header_params,
375
- body=body_params,
376
- post_params=form_params,
377
- files=local_var_files,
378
- response_type='PaginatedRepositoryVersionResponseList', # noqa: E501
379
- auth_settings=auth_settings,
380
- async_req=local_var_params.get('async_req'),
381
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
382
- _preload_content=local_var_params.get('_preload_content', True),
383
- _request_timeout=local_var_params.get('_request_timeout'),
384
- collection_formats=collection_formats)
385
-
386
- def read(self, python_python_repository_version_href, **kwargs): # noqa: E501
387
- """Inspect a repository version # noqa: E501
388
-
389
- PythonRepositoryVersion represents a single Python repository version. # noqa: E501
390
- This method makes a synchronous HTTP request by default. To make an
391
- asynchronous HTTP request, please pass async_req=True
392
- >>> thread = api.read(python_python_repository_version_href, async_req=True)
393
- >>> result = thread.get()
394
-
395
- :param async_req bool: execute request asynchronously
396
- :param str python_python_repository_version_href: (required)
397
- :param list[str] fields: A list of fields to include in the response.
398
- :param list[str] exclude_fields: A list of fields to exclude from the response.
399
- :param _preload_content: if False, the urllib3.HTTPResponse object will
400
- be returned without reading/decoding response
401
- data. Default is True.
924
+ else:
925
+ _query_params.append(('pulp_created__gte', pulp_created__gte))
926
+
927
+ if pulp_created__isnull is not None:
928
+
929
+ _query_params.append(('pulp_created__isnull', pulp_created__isnull))
930
+
931
+ if pulp_created__lt is not None:
932
+ if isinstance(pulp_created__lt, datetime):
933
+ _query_params.append(
934
+ (
935
+ 'pulp_created__lt',
936
+ pulp_created__lt.strftime(
937
+ self.api_client.configuration.datetime_format
938
+ )
939
+ )
940
+ )
941
+ else:
942
+ _query_params.append(('pulp_created__lt', pulp_created__lt))
943
+
944
+ if pulp_created__lte is not None:
945
+ if isinstance(pulp_created__lte, datetime):
946
+ _query_params.append(
947
+ (
948
+ 'pulp_created__lte',
949
+ pulp_created__lte.strftime(
950
+ self.api_client.configuration.datetime_format
951
+ )
952
+ )
953
+ )
954
+ else:
955
+ _query_params.append(('pulp_created__lte', pulp_created__lte))
956
+
957
+ if pulp_created__range is not None:
958
+
959
+ _query_params.append(('pulp_created__range', pulp_created__range))
960
+
961
+ if pulp_href__in is not None:
962
+
963
+ _query_params.append(('pulp_href__in', pulp_href__in))
964
+
965
+ if q is not None:
966
+
967
+ _query_params.append(('q', q))
968
+
969
+ if fields is not None:
970
+
971
+ _query_params.append(('fields', fields))
972
+
973
+ if exclude_fields is not None:
974
+
975
+ _query_params.append(('exclude_fields', exclude_fields))
976
+
977
+ # process the header parameters
978
+ # process the form parameters
979
+ # process the body parameter
980
+
981
+
982
+ # set the HTTP header `Accept`
983
+ if 'Accept' not in _header_params:
984
+ _header_params['Accept'] = self.api_client.select_header_accept(
985
+ [
986
+ 'application/json'
987
+ ]
988
+ )
989
+
990
+
991
+ # authentication setting
992
+ _auth_settings: List[str] = [
993
+ 'basicAuth',
994
+ 'cookieAuth'
995
+ ]
996
+
997
+ return self.api_client.param_serialize(
998
+ method='GET',
999
+ resource_path='{python_python_repository_href}versions/',
1000
+ path_params=_path_params,
1001
+ query_params=_query_params,
1002
+ header_params=_header_params,
1003
+ body=_body_params,
1004
+ post_params=_form_params,
1005
+ files=_files,
1006
+ auth_settings=_auth_settings,
1007
+ collection_formats=_collection_formats,
1008
+ _host=_host,
1009
+ _request_auth=_request_auth
1010
+ )
1011
+
1012
+
1013
+
1014
+
1015
+ @validate_call
1016
+ def read(
1017
+ self,
1018
+ python_python_repository_version_href: StrictStr,
1019
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1020
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1021
+ _request_timeout: Union[
1022
+ None,
1023
+ Annotated[StrictFloat, Field(gt=0)],
1024
+ Tuple[
1025
+ Annotated[StrictFloat, Field(gt=0)],
1026
+ Annotated[StrictFloat, Field(gt=0)]
1027
+ ]
1028
+ ] = None,
1029
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1030
+ _content_type: Optional[StrictStr] = None,
1031
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1032
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1033
+ ) -> RepositoryVersionResponse:
1034
+ """Inspect a repository version
1035
+
1036
+ PythonRepositoryVersion represents a single Python repository version.
1037
+
1038
+ :param python_python_repository_version_href: (required)
1039
+ :type python_python_repository_version_href: str
1040
+ :param fields: A list of fields to include in the response.
1041
+ :type fields: List[str]
1042
+ :param exclude_fields: A list of fields to exclude from the response.
1043
+ :type exclude_fields: List[str]
402
1044
  :param _request_timeout: timeout setting for this request. If one
403
1045
  number provided, it will be total request
404
1046
  timeout. It can also be a pair (tuple) of
405
1047
  (connection, read) timeouts.
406
- :return: RepositoryVersionResponse
407
- If the method is called asynchronously,
408
- returns the request thread.
409
- """
410
- kwargs['_return_http_data_only'] = True
411
- return self.read_with_http_info(python_python_repository_version_href, **kwargs) # noqa: E501
412
-
413
- def read_with_http_info(self, python_python_repository_version_href, **kwargs): # noqa: E501
414
- """Inspect a repository version # noqa: E501
415
-
416
- PythonRepositoryVersion represents a single Python repository version. # noqa: E501
417
- This method makes a synchronous HTTP request by default. To make an
418
- asynchronous HTTP request, please pass async_req=True
419
- >>> thread = api.read_with_http_info(python_python_repository_version_href, async_req=True)
420
- >>> result = thread.get()
421
-
422
- :param async_req bool: execute request asynchronously
423
- :param str python_python_repository_version_href: (required)
424
- :param list[str] fields: A list of fields to include in the response.
425
- :param list[str] exclude_fields: A list of fields to exclude from the response.
426
- :param _return_http_data_only: response data without head status code
427
- and headers
428
- :param _preload_content: if False, the urllib3.HTTPResponse object will
429
- be returned without reading/decoding response
430
- data. Default is True.
1048
+ :type _request_timeout: int, tuple(int, int), optional
1049
+ :param _request_auth: set to override the auth_settings for an a single
1050
+ request; this effectively ignores the
1051
+ authentication in the spec for a single request.
1052
+ :type _request_auth: dict, optional
1053
+ :param _content_type: force content-type for the request.
1054
+ :type _content_type: str, Optional
1055
+ :param _headers: set to override the headers for a single
1056
+ request; this effectively ignores the headers
1057
+ in the spec for a single request.
1058
+ :type _headers: dict, optional
1059
+ :param _host_index: set to override the host_index for a single
1060
+ request; this effectively ignores the host_index
1061
+ in the spec for a single request.
1062
+ :type _host_index: int, optional
1063
+ :return: Returns the result object.
1064
+ """ # noqa: E501
1065
+
1066
+ _param = self._read_serialize(
1067
+ python_python_repository_version_href=python_python_repository_version_href,
1068
+ fields=fields,
1069
+ exclude_fields=exclude_fields,
1070
+ _request_auth=_request_auth,
1071
+ _content_type=_content_type,
1072
+ _headers=_headers,
1073
+ _host_index=_host_index
1074
+ )
1075
+
1076
+ _response_types_map: Dict[str, Optional[str]] = {
1077
+ '200': "RepositoryVersionResponse",
1078
+ }
1079
+ response_data = self.api_client.call_api(
1080
+ *_param,
1081
+ _request_timeout=_request_timeout
1082
+ )
1083
+ response_data.read()
1084
+ return self.api_client.response_deserialize(
1085
+ response_data=response_data,
1086
+ response_types_map=_response_types_map,
1087
+ ).data
1088
+
1089
+
1090
+ @validate_call
1091
+ def read_with_http_info(
1092
+ self,
1093
+ python_python_repository_version_href: StrictStr,
1094
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1095
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1096
+ _request_timeout: Union[
1097
+ None,
1098
+ Annotated[StrictFloat, Field(gt=0)],
1099
+ Tuple[
1100
+ Annotated[StrictFloat, Field(gt=0)],
1101
+ Annotated[StrictFloat, Field(gt=0)]
1102
+ ]
1103
+ ] = None,
1104
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1105
+ _content_type: Optional[StrictStr] = None,
1106
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1107
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1108
+ ) -> ApiResponse[RepositoryVersionResponse]:
1109
+ """Inspect a repository version
1110
+
1111
+ PythonRepositoryVersion represents a single Python repository version.
1112
+
1113
+ :param python_python_repository_version_href: (required)
1114
+ :type python_python_repository_version_href: str
1115
+ :param fields: A list of fields to include in the response.
1116
+ :type fields: List[str]
1117
+ :param exclude_fields: A list of fields to exclude from the response.
1118
+ :type exclude_fields: List[str]
431
1119
  :param _request_timeout: timeout setting for this request. If one
432
1120
  number provided, it will be total request
433
1121
  timeout. It can also be a pair (tuple) of
434
1122
  (connection, read) timeouts.
435
- :return: tuple(RepositoryVersionResponse, status_code(int), headers(HTTPHeaderDict))
436
- If the method is called asynchronously,
437
- returns the request thread.
438
- """
1123
+ :type _request_timeout: int, tuple(int, int), optional
1124
+ :param _request_auth: set to override the auth_settings for an a single
1125
+ request; this effectively ignores the
1126
+ authentication in the spec for a single request.
1127
+ :type _request_auth: dict, optional
1128
+ :param _content_type: force content-type for the request.
1129
+ :type _content_type: str, Optional
1130
+ :param _headers: set to override the headers for a single
1131
+ request; this effectively ignores the headers
1132
+ in the spec for a single request.
1133
+ :type _headers: dict, optional
1134
+ :param _host_index: set to override the host_index for a single
1135
+ request; this effectively ignores the host_index
1136
+ in the spec for a single request.
1137
+ :type _host_index: int, optional
1138
+ :return: Returns the result object.
1139
+ """ # noqa: E501
1140
+
1141
+ _param = self._read_serialize(
1142
+ python_python_repository_version_href=python_python_repository_version_href,
1143
+ fields=fields,
1144
+ exclude_fields=exclude_fields,
1145
+ _request_auth=_request_auth,
1146
+ _content_type=_content_type,
1147
+ _headers=_headers,
1148
+ _host_index=_host_index
1149
+ )
439
1150
 
440
- local_var_params = locals()
1151
+ _response_types_map: Dict[str, Optional[str]] = {
1152
+ '200': "RepositoryVersionResponse",
1153
+ }
1154
+ response_data = self.api_client.call_api(
1155
+ *_param,
1156
+ _request_timeout=_request_timeout
1157
+ )
1158
+ response_data.read()
1159
+ return self.api_client.response_deserialize(
1160
+ response_data=response_data,
1161
+ response_types_map=_response_types_map,
1162
+ )
441
1163
 
442
- all_params = [
443
- 'python_python_repository_version_href',
444
- 'fields',
445
- 'exclude_fields'
446
- ]
447
- all_params.extend(
448
- [
449
- 'async_req',
450
- '_return_http_data_only',
451
- '_preload_content',
452
- '_request_timeout'
1164
+
1165
+ @validate_call
1166
+ def read_without_preload_content(
1167
+ self,
1168
+ python_python_repository_version_href: StrictStr,
1169
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1170
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1171
+ _request_timeout: Union[
1172
+ None,
1173
+ Annotated[StrictFloat, Field(gt=0)],
1174
+ Tuple[
1175
+ Annotated[StrictFloat, Field(gt=0)],
1176
+ Annotated[StrictFloat, Field(gt=0)]
453
1177
  ]
1178
+ ] = None,
1179
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1180
+ _content_type: Optional[StrictStr] = None,
1181
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1182
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1183
+ ) -> RESTResponseType:
1184
+ """Inspect a repository version
1185
+
1186
+ PythonRepositoryVersion represents a single Python repository version.
1187
+
1188
+ :param python_python_repository_version_href: (required)
1189
+ :type python_python_repository_version_href: str
1190
+ :param fields: A list of fields to include in the response.
1191
+ :type fields: List[str]
1192
+ :param exclude_fields: A list of fields to exclude from the response.
1193
+ :type exclude_fields: List[str]
1194
+ :param _request_timeout: timeout setting for this request. If one
1195
+ number provided, it will be total request
1196
+ timeout. It can also be a pair (tuple) of
1197
+ (connection, read) timeouts.
1198
+ :type _request_timeout: int, tuple(int, int), optional
1199
+ :param _request_auth: set to override the auth_settings for an a single
1200
+ request; this effectively ignores the
1201
+ authentication in the spec for a single request.
1202
+ :type _request_auth: dict, optional
1203
+ :param _content_type: force content-type for the request.
1204
+ :type _content_type: str, Optional
1205
+ :param _headers: set to override the headers for a single
1206
+ request; this effectively ignores the headers
1207
+ in the spec for a single request.
1208
+ :type _headers: dict, optional
1209
+ :param _host_index: set to override the host_index for a single
1210
+ request; this effectively ignores the host_index
1211
+ in the spec for a single request.
1212
+ :type _host_index: int, optional
1213
+ :return: Returns the result object.
1214
+ """ # noqa: E501
1215
+
1216
+ _param = self._read_serialize(
1217
+ python_python_repository_version_href=python_python_repository_version_href,
1218
+ fields=fields,
1219
+ exclude_fields=exclude_fields,
1220
+ _request_auth=_request_auth,
1221
+ _content_type=_content_type,
1222
+ _headers=_headers,
1223
+ _host_index=_host_index
454
1224
  )
455
1225
 
456
- for key, val in six.iteritems(local_var_params['kwargs']):
457
- if key not in all_params:
458
- raise ApiTypeError(
459
- "Got an unexpected keyword argument '%s'"
460
- " to method read" % key
461
- )
462
- local_var_params[key] = val
463
- del local_var_params['kwargs']
464
- # verify the required parameter 'python_python_repository_version_href' is set
465
- if self.api_client.client_side_validation and ('python_python_repository_version_href' not in local_var_params or # noqa: E501
466
- local_var_params['python_python_repository_version_href'] is None): # noqa: E501
467
- raise ApiValueError("Missing the required parameter `python_python_repository_version_href` when calling `read`") # noqa: E501
468
-
469
- collection_formats = {}
470
-
471
- path_params = {}
472
- if 'python_python_repository_version_href' in local_var_params:
473
- path_params['python_python_repository_version_href'] = local_var_params['python_python_repository_version_href'] # noqa: E501
474
-
475
- query_params = []
476
- if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
477
- query_params.append(('fields', local_var_params['fields'])) # noqa: E501
478
- collection_formats['fields'] = 'multi' # noqa: E501
479
- if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
480
- query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
481
- collection_formats['exclude_fields'] = 'multi' # noqa: E501
482
-
483
- header_params = {}
484
-
485
- form_params = []
486
- local_var_files = {}
487
-
488
- body_params = None
489
- # HTTP header `Accept`
490
- header_params['Accept'] = self.api_client.select_header_accept(
491
- ['application/json']) # noqa: E501
492
-
493
- # Authentication setting
494
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
495
-
496
- return self.api_client.call_api(
497
- '{python_python_repository_version_href}', 'GET',
498
- path_params,
499
- query_params,
500
- header_params,
501
- body=body_params,
502
- post_params=form_params,
503
- files=local_var_files,
504
- response_type='RepositoryVersionResponse', # noqa: E501
505
- auth_settings=auth_settings,
506
- async_req=local_var_params.get('async_req'),
507
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
508
- _preload_content=local_var_params.get('_preload_content', True),
509
- _request_timeout=local_var_params.get('_request_timeout'),
510
- collection_formats=collection_formats)
511
-
512
- def repair(self, python_python_repository_version_href, repair, **kwargs): # noqa: E501
513
- """repair # noqa: E501
514
-
515
- Trigger an asynchronous task to repair a repository version. # noqa: E501
516
- This method makes a synchronous HTTP request by default. To make an
517
- asynchronous HTTP request, please pass async_req=True
518
- >>> thread = api.repair(python_python_repository_version_href, repair, async_req=True)
519
- >>> result = thread.get()
520
-
521
- :param async_req bool: execute request asynchronously
522
- :param str python_python_repository_version_href: (required)
523
- :param Repair repair: (required)
524
- :param _preload_content: if False, the urllib3.HTTPResponse object will
525
- be returned without reading/decoding response
526
- data. Default is True.
1226
+ _response_types_map: Dict[str, Optional[str]] = {
1227
+ '200': "RepositoryVersionResponse",
1228
+ }
1229
+ response_data = self.api_client.call_api(
1230
+ *_param,
1231
+ _request_timeout=_request_timeout
1232
+ )
1233
+ return response_data.response
1234
+
1235
+
1236
+ def _read_serialize(
1237
+ self,
1238
+ python_python_repository_version_href,
1239
+ fields,
1240
+ exclude_fields,
1241
+ _request_auth,
1242
+ _content_type,
1243
+ _headers,
1244
+ _host_index,
1245
+ ) -> RequestSerialized:
1246
+
1247
+ _host = None
1248
+
1249
+ _collection_formats: Dict[str, str] = {
1250
+ 'fields': 'multi',
1251
+ 'exclude_fields': 'multi',
1252
+ }
1253
+
1254
+ _path_params: Dict[str, str] = {}
1255
+ _query_params: List[Tuple[str, str]] = []
1256
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1257
+ _form_params: List[Tuple[str, str]] = []
1258
+ _files: Dict[
1259
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1260
+ ] = {}
1261
+ _body_params: Optional[bytes] = None
1262
+
1263
+ # process the path parameters
1264
+ if python_python_repository_version_href is not None:
1265
+ _path_params['python_python_repository_version_href'] = python_python_repository_version_href
1266
+ # process the query parameters
1267
+ if fields is not None:
1268
+
1269
+ _query_params.append(('fields', fields))
1270
+
1271
+ if exclude_fields is not None:
1272
+
1273
+ _query_params.append(('exclude_fields', exclude_fields))
1274
+
1275
+ # process the header parameters
1276
+ # process the form parameters
1277
+ # process the body parameter
1278
+
1279
+
1280
+ # set the HTTP header `Accept`
1281
+ if 'Accept' not in _header_params:
1282
+ _header_params['Accept'] = self.api_client.select_header_accept(
1283
+ [
1284
+ 'application/json'
1285
+ ]
1286
+ )
1287
+
1288
+
1289
+ # authentication setting
1290
+ _auth_settings: List[str] = [
1291
+ 'basicAuth',
1292
+ 'cookieAuth'
1293
+ ]
1294
+
1295
+ return self.api_client.param_serialize(
1296
+ method='GET',
1297
+ resource_path='{python_python_repository_version_href}',
1298
+ path_params=_path_params,
1299
+ query_params=_query_params,
1300
+ header_params=_header_params,
1301
+ body=_body_params,
1302
+ post_params=_form_params,
1303
+ files=_files,
1304
+ auth_settings=_auth_settings,
1305
+ collection_formats=_collection_formats,
1306
+ _host=_host,
1307
+ _request_auth=_request_auth
1308
+ )
1309
+
1310
+
1311
+
1312
+
1313
+ @validate_call
1314
+ def repair(
1315
+ self,
1316
+ python_python_repository_version_href: StrictStr,
1317
+ repair: Repair,
1318
+ _request_timeout: Union[
1319
+ None,
1320
+ Annotated[StrictFloat, Field(gt=0)],
1321
+ Tuple[
1322
+ Annotated[StrictFloat, Field(gt=0)],
1323
+ Annotated[StrictFloat, Field(gt=0)]
1324
+ ]
1325
+ ] = None,
1326
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1327
+ _content_type: Optional[StrictStr] = None,
1328
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1329
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1330
+ ) -> AsyncOperationResponse:
1331
+ """repair
1332
+
1333
+ Trigger an asynchronous task to repair a repository version.
1334
+
1335
+ :param python_python_repository_version_href: (required)
1336
+ :type python_python_repository_version_href: str
1337
+ :param repair: (required)
1338
+ :type repair: Repair
527
1339
  :param _request_timeout: timeout setting for this request. If one
528
1340
  number provided, it will be total request
529
1341
  timeout. It can also be a pair (tuple) of
530
1342
  (connection, read) timeouts.
531
- :return: AsyncOperationResponse
532
- If the method is called asynchronously,
533
- returns the request thread.
534
- """
535
- kwargs['_return_http_data_only'] = True
536
- return self.repair_with_http_info(python_python_repository_version_href, repair, **kwargs) # noqa: E501
537
-
538
- def repair_with_http_info(self, python_python_repository_version_href, repair, **kwargs): # noqa: E501
539
- """repair # noqa: E501
540
-
541
- Trigger an asynchronous task to repair a repository version. # noqa: E501
542
- This method makes a synchronous HTTP request by default. To make an
543
- asynchronous HTTP request, please pass async_req=True
544
- >>> thread = api.repair_with_http_info(python_python_repository_version_href, repair, async_req=True)
545
- >>> result = thread.get()
546
-
547
- :param async_req bool: execute request asynchronously
548
- :param str python_python_repository_version_href: (required)
549
- :param Repair repair: (required)
550
- :param _return_http_data_only: response data without head status code
551
- and headers
552
- :param _preload_content: if False, the urllib3.HTTPResponse object will
553
- be returned without reading/decoding response
554
- data. Default is True.
1343
+ :type _request_timeout: int, tuple(int, int), optional
1344
+ :param _request_auth: set to override the auth_settings for an a single
1345
+ request; this effectively ignores the
1346
+ authentication in the spec for a single request.
1347
+ :type _request_auth: dict, optional
1348
+ :param _content_type: force content-type for the request.
1349
+ :type _content_type: str, Optional
1350
+ :param _headers: set to override the headers for a single
1351
+ request; this effectively ignores the headers
1352
+ in the spec for a single request.
1353
+ :type _headers: dict, optional
1354
+ :param _host_index: set to override the host_index for a single
1355
+ request; this effectively ignores the host_index
1356
+ in the spec for a single request.
1357
+ :type _host_index: int, optional
1358
+ :return: Returns the result object.
1359
+ """ # noqa: E501
1360
+
1361
+ _param = self._repair_serialize(
1362
+ python_python_repository_version_href=python_python_repository_version_href,
1363
+ repair=repair,
1364
+ _request_auth=_request_auth,
1365
+ _content_type=_content_type,
1366
+ _headers=_headers,
1367
+ _host_index=_host_index
1368
+ )
1369
+
1370
+ _response_types_map: Dict[str, Optional[str]] = {
1371
+ '202': "AsyncOperationResponse",
1372
+ }
1373
+ response_data = self.api_client.call_api(
1374
+ *_param,
1375
+ _request_timeout=_request_timeout
1376
+ )
1377
+ response_data.read()
1378
+ return self.api_client.response_deserialize(
1379
+ response_data=response_data,
1380
+ response_types_map=_response_types_map,
1381
+ ).data
1382
+
1383
+
1384
+ @validate_call
1385
+ def repair_with_http_info(
1386
+ self,
1387
+ python_python_repository_version_href: StrictStr,
1388
+ repair: Repair,
1389
+ _request_timeout: Union[
1390
+ None,
1391
+ Annotated[StrictFloat, Field(gt=0)],
1392
+ Tuple[
1393
+ Annotated[StrictFloat, Field(gt=0)],
1394
+ Annotated[StrictFloat, Field(gt=0)]
1395
+ ]
1396
+ ] = None,
1397
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1398
+ _content_type: Optional[StrictStr] = None,
1399
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1400
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1401
+ ) -> ApiResponse[AsyncOperationResponse]:
1402
+ """repair
1403
+
1404
+ Trigger an asynchronous task to repair a repository version.
1405
+
1406
+ :param python_python_repository_version_href: (required)
1407
+ :type python_python_repository_version_href: str
1408
+ :param repair: (required)
1409
+ :type repair: Repair
555
1410
  :param _request_timeout: timeout setting for this request. If one
556
1411
  number provided, it will be total request
557
1412
  timeout. It can also be a pair (tuple) of
558
1413
  (connection, read) timeouts.
559
- :return: tuple(AsyncOperationResponse, status_code(int), headers(HTTPHeaderDict))
560
- If the method is called asynchronously,
561
- returns the request thread.
562
- """
1414
+ :type _request_timeout: int, tuple(int, int), optional
1415
+ :param _request_auth: set to override the auth_settings for an a single
1416
+ request; this effectively ignores the
1417
+ authentication in the spec for a single request.
1418
+ :type _request_auth: dict, optional
1419
+ :param _content_type: force content-type for the request.
1420
+ :type _content_type: str, Optional
1421
+ :param _headers: set to override the headers for a single
1422
+ request; this effectively ignores the headers
1423
+ in the spec for a single request.
1424
+ :type _headers: dict, optional
1425
+ :param _host_index: set to override the host_index for a single
1426
+ request; this effectively ignores the host_index
1427
+ in the spec for a single request.
1428
+ :type _host_index: int, optional
1429
+ :return: Returns the result object.
1430
+ """ # noqa: E501
1431
+
1432
+ _param = self._repair_serialize(
1433
+ python_python_repository_version_href=python_python_repository_version_href,
1434
+ repair=repair,
1435
+ _request_auth=_request_auth,
1436
+ _content_type=_content_type,
1437
+ _headers=_headers,
1438
+ _host_index=_host_index
1439
+ )
1440
+
1441
+ _response_types_map: Dict[str, Optional[str]] = {
1442
+ '202': "AsyncOperationResponse",
1443
+ }
1444
+ response_data = self.api_client.call_api(
1445
+ *_param,
1446
+ _request_timeout=_request_timeout
1447
+ )
1448
+ response_data.read()
1449
+ return self.api_client.response_deserialize(
1450
+ response_data=response_data,
1451
+ response_types_map=_response_types_map,
1452
+ )
563
1453
 
564
- local_var_params = locals()
565
1454
 
566
- all_params = [
567
- 'python_python_repository_version_href',
568
- 'repair'
569
- ]
570
- all_params.extend(
571
- [
572
- 'async_req',
573
- '_return_http_data_only',
574
- '_preload_content',
575
- '_request_timeout'
1455
+ @validate_call
1456
+ def repair_without_preload_content(
1457
+ self,
1458
+ python_python_repository_version_href: StrictStr,
1459
+ repair: Repair,
1460
+ _request_timeout: Union[
1461
+ None,
1462
+ Annotated[StrictFloat, Field(gt=0)],
1463
+ Tuple[
1464
+ Annotated[StrictFloat, Field(gt=0)],
1465
+ Annotated[StrictFloat, Field(gt=0)]
576
1466
  ]
1467
+ ] = None,
1468
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1469
+ _content_type: Optional[StrictStr] = None,
1470
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1471
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1472
+ ) -> RESTResponseType:
1473
+ """repair
1474
+
1475
+ Trigger an asynchronous task to repair a repository version.
1476
+
1477
+ :param python_python_repository_version_href: (required)
1478
+ :type python_python_repository_version_href: str
1479
+ :param repair: (required)
1480
+ :type repair: Repair
1481
+ :param _request_timeout: timeout setting for this request. If one
1482
+ number provided, it will be total request
1483
+ timeout. It can also be a pair (tuple) of
1484
+ (connection, read) timeouts.
1485
+ :type _request_timeout: int, tuple(int, int), optional
1486
+ :param _request_auth: set to override the auth_settings for an a single
1487
+ request; this effectively ignores the
1488
+ authentication in the spec for a single request.
1489
+ :type _request_auth: dict, optional
1490
+ :param _content_type: force content-type for the request.
1491
+ :type _content_type: str, Optional
1492
+ :param _headers: set to override the headers for a single
1493
+ request; this effectively ignores the headers
1494
+ in the spec for a single request.
1495
+ :type _headers: dict, optional
1496
+ :param _host_index: set to override the host_index for a single
1497
+ request; this effectively ignores the host_index
1498
+ in the spec for a single request.
1499
+ :type _host_index: int, optional
1500
+ :return: Returns the result object.
1501
+ """ # noqa: E501
1502
+
1503
+ _param = self._repair_serialize(
1504
+ python_python_repository_version_href=python_python_repository_version_href,
1505
+ repair=repair,
1506
+ _request_auth=_request_auth,
1507
+ _content_type=_content_type,
1508
+ _headers=_headers,
1509
+ _host_index=_host_index
577
1510
  )
578
1511
 
579
- for key, val in six.iteritems(local_var_params['kwargs']):
580
- if key not in all_params:
581
- raise ApiTypeError(
582
- "Got an unexpected keyword argument '%s'"
583
- " to method repair" % key
1512
+ _response_types_map: Dict[str, Optional[str]] = {
1513
+ '202': "AsyncOperationResponse",
1514
+ }
1515
+ response_data = self.api_client.call_api(
1516
+ *_param,
1517
+ _request_timeout=_request_timeout
1518
+ )
1519
+ return response_data.response
1520
+
1521
+
1522
+ def _repair_serialize(
1523
+ self,
1524
+ python_python_repository_version_href,
1525
+ repair,
1526
+ _request_auth,
1527
+ _content_type,
1528
+ _headers,
1529
+ _host_index,
1530
+ ) -> RequestSerialized:
1531
+
1532
+ _host = None
1533
+
1534
+ _collection_formats: Dict[str, str] = {
1535
+ }
1536
+
1537
+ _path_params: Dict[str, str] = {}
1538
+ _query_params: List[Tuple[str, str]] = []
1539
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1540
+ _form_params: List[Tuple[str, str]] = []
1541
+ _files: Dict[
1542
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1543
+ ] = {}
1544
+ _body_params: Optional[bytes] = None
1545
+
1546
+ # process the path parameters
1547
+ if python_python_repository_version_href is not None:
1548
+ _path_params['python_python_repository_version_href'] = python_python_repository_version_href
1549
+ # process the query parameters
1550
+ # process the header parameters
1551
+ # process the form parameters
1552
+ # process the body parameter
1553
+ if repair is not None:
1554
+ _body_params = repair
1555
+
1556
+
1557
+ # set the HTTP header `Accept`
1558
+ if 'Accept' not in _header_params:
1559
+ _header_params['Accept'] = self.api_client.select_header_accept(
1560
+ [
1561
+ 'application/json'
1562
+ ]
1563
+ )
1564
+
1565
+ # set the HTTP header `Content-Type`
1566
+ if _content_type:
1567
+ _header_params['Content-Type'] = _content_type
1568
+ else:
1569
+ _default_content_type = (
1570
+ self.api_client.select_header_content_type(
1571
+ [
1572
+ 'application/json',
1573
+ 'application/x-www-form-urlencoded',
1574
+ 'multipart/form-data'
1575
+ ]
584
1576
  )
585
- local_var_params[key] = val
586
- del local_var_params['kwargs']
587
- # verify the required parameter 'python_python_repository_version_href' is set
588
- if self.api_client.client_side_validation and ('python_python_repository_version_href' not in local_var_params or # noqa: E501
589
- local_var_params['python_python_repository_version_href'] is None): # noqa: E501
590
- raise ApiValueError("Missing the required parameter `python_python_repository_version_href` when calling `repair`") # noqa: E501
591
- # verify the required parameter 'repair' is set
592
- if self.api_client.client_side_validation and ('repair' not in local_var_params or # noqa: E501
593
- local_var_params['repair'] is None): # noqa: E501
594
- raise ApiValueError("Missing the required parameter `repair` when calling `repair`") # noqa: E501
595
-
596
- collection_formats = {}
597
-
598
- path_params = {}
599
- if 'python_python_repository_version_href' in local_var_params:
600
- path_params['python_python_repository_version_href'] = local_var_params['python_python_repository_version_href'] # noqa: E501
601
-
602
- query_params = []
603
-
604
- header_params = {}
605
-
606
- form_params = []
607
- local_var_files = {}
608
-
609
- body_params = None
610
- if 'repair' in local_var_params:
611
- body_params = local_var_params['repair']
612
- # HTTP header `Accept`
613
- header_params['Accept'] = self.api_client.select_header_accept(
614
- ['application/json']) # noqa: E501
615
-
616
- # HTTP header `Content-Type`
617
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
618
- ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # noqa: E501
619
-
620
- # Authentication setting
621
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
622
-
623
- return self.api_client.call_api(
624
- '{python_python_repository_version_href}repair/', 'POST',
625
- path_params,
626
- query_params,
627
- header_params,
628
- body=body_params,
629
- post_params=form_params,
630
- files=local_var_files,
631
- response_type='AsyncOperationResponse', # noqa: E501
632
- auth_settings=auth_settings,
633
- async_req=local_var_params.get('async_req'),
634
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
635
- _preload_content=local_var_params.get('_preload_content', True),
636
- _request_timeout=local_var_params.get('_request_timeout'),
637
- collection_formats=collection_formats)
1577
+ )
1578
+ if _default_content_type is not None:
1579
+ _header_params['Content-Type'] = _default_content_type
1580
+
1581
+ # authentication setting
1582
+ _auth_settings: List[str] = [
1583
+ 'basicAuth',
1584
+ 'cookieAuth'
1585
+ ]
1586
+
1587
+ return self.api_client.param_serialize(
1588
+ method='POST',
1589
+ resource_path='{python_python_repository_version_href}repair/',
1590
+ path_params=_path_params,
1591
+ query_params=_query_params,
1592
+ header_params=_header_params,
1593
+ body=_body_params,
1594
+ post_params=_form_params,
1595
+ files=_files,
1596
+ auth_settings=_auth_settings,
1597
+ collection_formats=_collection_formats,
1598
+ _host=_host,
1599
+ _request_auth=_request_auth
1600
+ )
1601
+
1602
+