pulp-python-client 3.32.1__py3-none-any.whl → 3.34.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.
Files changed (22) hide show
  1. {pulp_python_client-3.32.1.dist-info → pulp_python_client-3.34.0.dist-info}/METADATA +11 -2
  2. {pulp_python_client-3.32.1.dist-info → pulp_python_client-3.34.0.dist-info}/RECORD +22 -16
  3. {pulp_python_client-3.32.1.dist-info → pulp_python_client-3.34.0.dist-info}/WHEEL +1 -1
  4. pulpcore/client/pulp_python/__init__.py +13 -1
  5. pulpcore/client/pulp_python/api/__init__.py +3 -0
  6. pulpcore/client/pulp_python/api/content_packages_api.py +17 -0
  7. pulpcore/client/pulp_python/api/content_yanks_api.py +1483 -0
  8. pulpcore/client/pulp_python/api/pypi_legacy_api.py +6 -6
  9. pulpcore/client/pulp_python/api/pypi_simple_api.py +6 -6
  10. pulpcore/client/pulp_python/api/pypi_unyank_api.py +349 -0
  11. pulpcore/client/pulp_python/api/pypi_yank_api.py +349 -0
  12. pulpcore/client/pulp_python/api_client.py +1 -1
  13. pulpcore/client/pulp_python/configuration.py +1 -1
  14. pulpcore/client/pulp_python/models/__init__.py +3 -0
  15. pulpcore/client/pulp_python/models/metadata_version_enum.py +2 -1
  16. pulpcore/client/pulp_python/models/paginatedpython_package_yank_response_list.py +97 -0
  17. pulpcore/client/pulp_python/models/patchedpython_python_repository.py +2 -1
  18. pulpcore/client/pulp_python/models/python_package_yank_response.py +111 -0
  19. pulpcore/client/pulp_python/models/python_python_repository.py +2 -1
  20. pulpcore/client/pulp_python/models/python_python_repository_response.py +2 -1
  21. pulpcore/client/pulp_python/models/yank.py +89 -0
  22. {pulp_python_client-3.32.1.dist-info → pulp_python_client-3.34.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,89 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pulp 3 API
5
+
6
+ Fetch, Upload, Organize, and Distribute Software Packages
7
+
8
+ The version of the OpenAPI document: v3
9
+ Contact: pulp-list@redhat.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, Field, 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
26
+
27
+ class Yank(BaseModel):
28
+ """
29
+ A Serializer for yank/unyank requests (PEP 592).
30
+ """ # noqa: E501
31
+ name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The name of the package to yank or unyank.")
32
+ version: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The version of the package to yank or unyank.")
33
+ yanked_reason: Optional[StrictStr] = Field(default='', description="The reason for yanking the package version.")
34
+ __properties: ClassVar[List[str]] = ["name", "version", "yanked_reason"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of Yank from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of Yank from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return cls.model_validate(obj)
85
+
86
+ _obj = cls.model_validate(obj)
87
+ return _obj
88
+
89
+