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,345 +3,123 @@
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
- """
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
12
14
 
13
15
 
16
+ from __future__ import annotations
14
17
  import pprint
15
18
  import re # noqa: F401
19
+ import json
16
20
 
17
- import six
18
-
19
- from pulpcore.client.pulp_python.configuration import Configuration
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
20
26
 
21
-
22
- class PatchedpythonPythonDistribution(object):
23
- """NOTE: This class is auto generated by OpenAPI Generator.
24
- Ref: https://openapi-generator.tech
25
-
26
- Do not edit the class manually.
27
+ class PatchedpythonPythonDistribution(BaseModel):
27
28
  """
29
+ Serializer for Pulp distributions for the Python type.
30
+ """ # noqa: E501
31
+ base_path: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")")
32
+ content_guard: Optional[StrictStr] = Field(default=None, description="An optional content-guard.")
33
+ hidden: Optional[StrictBool] = Field(default=False, description="Whether this distribution should be shown in the content app.")
34
+ pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
35
+ name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A unique name. Ex, `rawhide` and `stable`.")
36
+ repository: Optional[StrictStr] = Field(default=None, description="The latest RepositoryVersion for this Repository will be served.")
37
+ publication: Optional[StrictStr] = Field(default=None, description="Publication to be served")
38
+ allow_uploads: Optional[StrictBool] = Field(default=True, description="Allow packages to be uploaded to this index.")
39
+ remote: Optional[StrictStr] = Field(default=None, description="Remote that can be used to fetch content when using pull-through caching.")
40
+ __properties: ClassVar[List[str]] = ["base_path", "content_guard", "hidden", "pulp_labels", "name", "repository", "publication", "allow_uploads", "remote"]
41
+
42
+ model_config = ConfigDict(
43
+ populate_by_name=True,
44
+ validate_assignment=True,
45
+ protected_namespaces=(),
46
+ )
47
+
48
+
49
+ def to_str(self) -> str:
50
+ """Returns the string representation of the model using alias"""
51
+ return pprint.pformat(self.model_dump(by_alias=True))
52
+
53
+ def to_json(self) -> str:
54
+ """Returns the JSON representation of the model using alias"""
55
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> Optional[Self]:
60
+ """Create an instance of PatchedpythonPythonDistribution from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self) -> Dict[str, Any]:
64
+ """Return the dictionary representation of the model using alias.
65
+
66
+ This has the following differences from calling pydantic's
67
+ `self.model_dump(by_alias=True)`:
68
+
69
+ * `None` is only added to the output dict for nullable fields that
70
+ were set at model initialization. Other fields with value `None`
71
+ are ignored.
72
+ """
73
+ excluded_fields: Set[str] = set([
74
+ ])
75
+
76
+ _dict = self.model_dump(
77
+ by_alias=True,
78
+ exclude=excluded_fields,
79
+ exclude_none=True,
80
+ )
81
+ # set to None if content_guard (nullable) is None
82
+ # and model_fields_set contains the field
83
+ if self.content_guard is None and "content_guard" in self.model_fields_set:
84
+ _dict['content_guard'] = None
85
+
86
+ # set to None if repository (nullable) is None
87
+ # and model_fields_set contains the field
88
+ if self.repository is None and "repository" in self.model_fields_set:
89
+ _dict['repository'] = None
90
+
91
+ # set to None if publication (nullable) is None
92
+ # and model_fields_set contains the field
93
+ if self.publication is None and "publication" in self.model_fields_set:
94
+ _dict['publication'] = None
95
+
96
+ # set to None if remote (nullable) is None
97
+ # and model_fields_set contains the field
98
+ if self.remote is None and "remote" in self.model_fields_set:
99
+ _dict['remote'] = None
100
+
101
+ return _dict
102
+
103
+ @classmethod
104
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
105
+ """Create an instance of PatchedpythonPythonDistribution from a dict"""
106
+ if obj is None:
107
+ return None
108
+
109
+ if not isinstance(obj, dict):
110
+ return cls.model_validate(obj)
111
+
112
+ _obj = cls.model_validate({
113
+ "base_path": obj.get("base_path"),
114
+ "content_guard": obj.get("content_guard"),
115
+ "hidden": obj.get("hidden") if obj.get("hidden") is not None else False,
116
+ "pulp_labels": obj.get("pulp_labels"),
117
+ "name": obj.get("name"),
118
+ "repository": obj.get("repository"),
119
+ "publication": obj.get("publication"),
120
+ "allow_uploads": obj.get("allow_uploads") if obj.get("allow_uploads") is not None else True,
121
+ "remote": obj.get("remote")
122
+ })
123
+ return _obj
28
124
 
29
- """
30
- Attributes:
31
- openapi_types (dict): The key is attribute name
32
- and the value is attribute type.
33
- attribute_map (dict): The key is attribute name
34
- and the value is json key in definition.
35
- """
36
- openapi_types = {
37
- 'base_path': 'str',
38
- 'content_guard': 'str',
39
- 'hidden': 'bool',
40
- 'pulp_labels': 'dict(str, str)',
41
- 'name': 'str',
42
- 'repository': 'str',
43
- 'publication': 'str',
44
- 'allow_uploads': 'bool',
45
- 'remote': 'str'
46
- }
47
-
48
- attribute_map = {
49
- 'base_path': 'base_path',
50
- 'content_guard': 'content_guard',
51
- 'hidden': 'hidden',
52
- 'pulp_labels': 'pulp_labels',
53
- 'name': 'name',
54
- 'repository': 'repository',
55
- 'publication': 'publication',
56
- 'allow_uploads': 'allow_uploads',
57
- 'remote': 'remote'
58
- }
59
-
60
- def __init__(self, base_path=None, content_guard=None, hidden=False, pulp_labels=None, name=None, repository=None, publication=None, allow_uploads=True, remote=None, local_vars_configuration=None): # noqa: E501
61
- """PatchedpythonPythonDistribution - a model defined in OpenAPI""" # noqa: E501
62
- if local_vars_configuration is None:
63
- local_vars_configuration = Configuration()
64
- self.local_vars_configuration = local_vars_configuration
65
-
66
- self._base_path = None
67
- self._content_guard = None
68
- self._hidden = None
69
- self._pulp_labels = None
70
- self._name = None
71
- self._repository = None
72
- self._publication = None
73
- self._allow_uploads = None
74
- self._remote = None
75
- self.discriminator = None
76
-
77
- if base_path is not None:
78
- self.base_path = base_path
79
- self.content_guard = content_guard
80
- if hidden is not None:
81
- self.hidden = hidden
82
- if pulp_labels is not None:
83
- self.pulp_labels = pulp_labels
84
- if name is not None:
85
- self.name = name
86
- self.repository = repository
87
- self.publication = publication
88
- if allow_uploads is not None:
89
- self.allow_uploads = allow_uploads
90
- self.remote = remote
91
-
92
- @property
93
- def base_path(self):
94
- """Gets the base_path of this PatchedpythonPythonDistribution. # noqa: E501
95
-
96
- The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") # noqa: E501
97
-
98
- :return: The base_path of this PatchedpythonPythonDistribution. # noqa: E501
99
- :rtype: str
100
- """
101
- return self._base_path
102
-
103
- @base_path.setter
104
- def base_path(self, base_path):
105
- """Sets the base_path of this PatchedpythonPythonDistribution.
106
-
107
- The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") # noqa: E501
108
-
109
- :param base_path: The base_path of this PatchedpythonPythonDistribution. # noqa: E501
110
- :type: str
111
- """
112
- if (self.local_vars_configuration.client_side_validation and
113
- base_path is not None and len(base_path) < 1):
114
- raise ValueError("Invalid value for `base_path`, length must be greater than or equal to `1`") # noqa: E501
115
-
116
- self._base_path = base_path
117
-
118
- @property
119
- def content_guard(self):
120
- """Gets the content_guard of this PatchedpythonPythonDistribution. # noqa: E501
121
-
122
- An optional content-guard. # noqa: E501
123
-
124
- :return: The content_guard of this PatchedpythonPythonDistribution. # noqa: E501
125
- :rtype: str
126
- """
127
- return self._content_guard
128
-
129
- @content_guard.setter
130
- def content_guard(self, content_guard):
131
- """Sets the content_guard of this PatchedpythonPythonDistribution.
132
-
133
- An optional content-guard. # noqa: E501
134
-
135
- :param content_guard: The content_guard of this PatchedpythonPythonDistribution. # noqa: E501
136
- :type: str
137
- """
138
-
139
- self._content_guard = content_guard
140
-
141
- @property
142
- def hidden(self):
143
- """Gets the hidden of this PatchedpythonPythonDistribution. # noqa: E501
144
-
145
- Whether this distribution should be shown in the content app. # noqa: E501
146
-
147
- :return: The hidden of this PatchedpythonPythonDistribution. # noqa: E501
148
- :rtype: bool
149
- """
150
- return self._hidden
151
-
152
- @hidden.setter
153
- def hidden(self, hidden):
154
- """Sets the hidden of this PatchedpythonPythonDistribution.
155
-
156
- Whether this distribution should be shown in the content app. # noqa: E501
157
-
158
- :param hidden: The hidden of this PatchedpythonPythonDistribution. # noqa: E501
159
- :type: bool
160
- """
161
-
162
- self._hidden = hidden
163
-
164
- @property
165
- def pulp_labels(self):
166
- """Gets the pulp_labels of this PatchedpythonPythonDistribution. # noqa: E501
167
-
168
-
169
- :return: The pulp_labels of this PatchedpythonPythonDistribution. # noqa: E501
170
- :rtype: dict(str, str)
171
- """
172
- return self._pulp_labels
173
-
174
- @pulp_labels.setter
175
- def pulp_labels(self, pulp_labels):
176
- """Sets the pulp_labels of this PatchedpythonPythonDistribution.
177
-
178
-
179
- :param pulp_labels: The pulp_labels of this PatchedpythonPythonDistribution. # noqa: E501
180
- :type: dict(str, str)
181
- """
182
-
183
- self._pulp_labels = pulp_labels
184
-
185
- @property
186
- def name(self):
187
- """Gets the name of this PatchedpythonPythonDistribution. # noqa: E501
188
-
189
- A unique name. Ex, `rawhide` and `stable`. # noqa: E501
190
-
191
- :return: The name of this PatchedpythonPythonDistribution. # noqa: E501
192
- :rtype: str
193
- """
194
- return self._name
195
-
196
- @name.setter
197
- def name(self, name):
198
- """Sets the name of this PatchedpythonPythonDistribution.
199
-
200
- A unique name. Ex, `rawhide` and `stable`. # noqa: E501
201
-
202
- :param name: The name of this PatchedpythonPythonDistribution. # noqa: E501
203
- :type: str
204
- """
205
- if (self.local_vars_configuration.client_side_validation and
206
- name is not None and len(name) < 1):
207
- raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501
208
-
209
- self._name = name
210
-
211
- @property
212
- def repository(self):
213
- """Gets the repository of this PatchedpythonPythonDistribution. # noqa: E501
214
-
215
- The latest RepositoryVersion for this Repository will be served. # noqa: E501
216
-
217
- :return: The repository of this PatchedpythonPythonDistribution. # noqa: E501
218
- :rtype: str
219
- """
220
- return self._repository
221
-
222
- @repository.setter
223
- def repository(self, repository):
224
- """Sets the repository of this PatchedpythonPythonDistribution.
225
-
226
- The latest RepositoryVersion for this Repository will be served. # noqa: E501
227
-
228
- :param repository: The repository of this PatchedpythonPythonDistribution. # noqa: E501
229
- :type: str
230
- """
231
-
232
- self._repository = repository
233
-
234
- @property
235
- def publication(self):
236
- """Gets the publication of this PatchedpythonPythonDistribution. # noqa: E501
237
-
238
- Publication to be served # noqa: E501
239
-
240
- :return: The publication of this PatchedpythonPythonDistribution. # noqa: E501
241
- :rtype: str
242
- """
243
- return self._publication
244
-
245
- @publication.setter
246
- def publication(self, publication):
247
- """Sets the publication of this PatchedpythonPythonDistribution.
248
-
249
- Publication to be served # noqa: E501
250
-
251
- :param publication: The publication of this PatchedpythonPythonDistribution. # noqa: E501
252
- :type: str
253
- """
254
-
255
- self._publication = publication
256
-
257
- @property
258
- def allow_uploads(self):
259
- """Gets the allow_uploads of this PatchedpythonPythonDistribution. # noqa: E501
260
-
261
- Allow packages to be uploaded to this index. # noqa: E501
262
-
263
- :return: The allow_uploads of this PatchedpythonPythonDistribution. # noqa: E501
264
- :rtype: bool
265
- """
266
- return self._allow_uploads
267
-
268
- @allow_uploads.setter
269
- def allow_uploads(self, allow_uploads):
270
- """Sets the allow_uploads of this PatchedpythonPythonDistribution.
271
-
272
- Allow packages to be uploaded to this index. # noqa: E501
273
-
274
- :param allow_uploads: The allow_uploads of this PatchedpythonPythonDistribution. # noqa: E501
275
- :type: bool
276
- """
277
-
278
- self._allow_uploads = allow_uploads
279
-
280
- @property
281
- def remote(self):
282
- """Gets the remote of this PatchedpythonPythonDistribution. # noqa: E501
283
-
284
- Remote that can be used to fetch content when using pull-through caching. # noqa: E501
285
-
286
- :return: The remote of this PatchedpythonPythonDistribution. # noqa: E501
287
- :rtype: str
288
- """
289
- return self._remote
290
-
291
- @remote.setter
292
- def remote(self, remote):
293
- """Sets the remote of this PatchedpythonPythonDistribution.
294
-
295
- Remote that can be used to fetch content when using pull-through caching. # noqa: E501
296
-
297
- :param remote: The remote of this PatchedpythonPythonDistribution. # noqa: E501
298
- :type: str
299
- """
300
-
301
- self._remote = remote
302
-
303
- def to_dict(self):
304
- """Returns the model properties as a dict"""
305
- result = {}
306
-
307
- for attr, _ in six.iteritems(self.openapi_types):
308
- value = getattr(self, attr)
309
- if isinstance(value, list):
310
- result[attr] = list(map(
311
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
312
- value
313
- ))
314
- elif hasattr(value, "to_dict"):
315
- result[attr] = value.to_dict()
316
- elif isinstance(value, dict):
317
- result[attr] = dict(map(
318
- lambda item: (item[0], item[1].to_dict())
319
- if hasattr(item[1], "to_dict") else item,
320
- value.items()
321
- ))
322
- else:
323
- result[attr] = value
324
-
325
- return result
326
-
327
- def to_str(self):
328
- """Returns the string representation of the model"""
329
- return pprint.pformat(self.to_dict())
330
-
331
- def __repr__(self):
332
- """For `print` and `pprint`"""
333
- return self.to_str()
334
-
335
- def __eq__(self, other):
336
- """Returns true if both objects are equal"""
337
- if not isinstance(other, PatchedpythonPythonDistribution):
338
- return False
339
-
340
- return self.to_dict() == other.to_dict()
341
-
342
- def __ne__(self, other):
343
- """Returns true if both objects are not equal"""
344
- if not isinstance(other, PatchedpythonPythonDistribution):
345
- return True
346
125
 
347
- return self.to_dict() != other.to_dict()