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

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

Potentially problematic release.


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

Files changed (120) hide show
  1. crc-pulp_python-client/__init__.py +2 -0
  2. crc-pulp_python-client/api/__init__.py +14 -0
  3. crc-pulp_python-client/api/api_pypi_api.py +370 -0
  4. crc-pulp_python-client/api/api_pypi_legacy_api.py +393 -0
  5. crc-pulp_python-client/api/api_pypi_simple_api.py +1045 -0
  6. crc-pulp_python-client/api/content_packages_api.py +2594 -0
  7. crc-pulp_python-client/api/distributions_pypi_api.py +4186 -0
  8. crc-pulp_python-client/api/publications_pypi_api.py +2881 -0
  9. crc-pulp_python-client/api/pypi_metadata_api.py +385 -0
  10. crc-pulp_python-client/api/remotes_python_api.py +4552 -0
  11. crc-pulp_python-client/api/repositories_python_api.py +4856 -0
  12. crc-pulp_python-client/api/repositories_python_versions_api.py +1670 -0
  13. crc-pulp_python-client/api_client.py +798 -0
  14. crc-pulp_python-client/api_response.py +21 -0
  15. crc-pulp_python-client/configuration.py +628 -0
  16. crc-pulp_python-client/exceptions.py +200 -0
  17. crc-pulp_python-client/models/__init__.py +56 -0
  18. crc-pulp_python-client/models/async_operation_response.py +88 -0
  19. crc-pulp_python-client/models/content_summary_response.py +92 -0
  20. crc-pulp_python-client/models/exclude_platforms_enum.py +40 -0
  21. crc-pulp_python-client/models/my_permissions_response.py +88 -0
  22. crc-pulp_python-client/models/nested_role.py +93 -0
  23. crc-pulp_python-client/models/nested_role_response.py +92 -0
  24. crc-pulp_python-client/models/object_roles_response.py +96 -0
  25. crc-pulp_python-client/models/package_metadata_response.py +109 -0
  26. crc-pulp_python-client/models/package_types_enum.py +44 -0
  27. crc-pulp_python-client/models/package_upload_task_response.py +103 -0
  28. crc-pulp_python-client/models/paginated_repository_version_response_list.py +112 -0
  29. crc-pulp_python-client/models/paginatedpython_python_distribution_response_list.py +112 -0
  30. crc-pulp_python-client/models/paginatedpython_python_package_content_response_list.py +112 -0
  31. crc-pulp_python-client/models/paginatedpython_python_publication_response_list.py +112 -0
  32. crc-pulp_python-client/models/paginatedpython_python_remote_response_list.py +112 -0
  33. crc-pulp_python-client/models/paginatedpython_python_repository_response_list.py +112 -0
  34. crc-pulp_python-client/models/patchedpython_python_distribution.py +125 -0
  35. crc-pulp_python-client/models/patchedpython_python_remote.py +219 -0
  36. crc-pulp_python-client/models/patchedpython_python_repository.py +114 -0
  37. crc-pulp_python-client/models/policy_enum.py +39 -0
  38. crc-pulp_python-client/models/python_python_distribution.py +125 -0
  39. crc-pulp_python-client/models/python_python_distribution_response.py +149 -0
  40. crc-pulp_python-client/models/python_python_package_content_response.py +201 -0
  41. crc-pulp_python-client/models/python_python_publication.py +90 -0
  42. crc-pulp_python-client/models/python_python_publication_response.py +111 -0
  43. crc-pulp_python-client/models/python_python_remote.py +219 -0
  44. crc-pulp_python-client/models/python_python_remote_response.py +213 -0
  45. crc-pulp_python-client/models/python_python_remote_response_hidden_fields_inner.py +90 -0
  46. crc-pulp_python-client/models/python_python_repository.py +114 -0
  47. crc-pulp_python-client/models/python_python_repository_response.py +139 -0
  48. crc-pulp_python-client/models/repair.py +88 -0
  49. crc-pulp_python-client/models/repository_add_remove_content.py +93 -0
  50. crc-pulp_python-client/models/repository_sync_url.py +90 -0
  51. crc-pulp_python-client/models/repository_version_response.py +121 -0
  52. crc-pulp_python-client/models/set_label.py +103 -0
  53. crc-pulp_python-client/models/set_label_response.py +103 -0
  54. crc-pulp_python-client/models/summary_response.py +92 -0
  55. crc-pulp_python-client/models/unset_label.py +96 -0
  56. crc-pulp_python-client/models/unset_label_response.py +100 -0
  57. crc-pulp_python-client/py.typed +0 -0
  58. crc-pulp_python-client/rest.py +258 -0
  59. crc_pulp_python_client-20250819.1.dist-info/METADATA +25 -0
  60. crc_pulp_python_client-20250819.1.dist-info/RECORD +120 -0
  61. crc_pulp_python_client-20250819.1.dist-info/WHEEL +5 -0
  62. crc_pulp_python_client-20250819.1.dist-info/top_level.txt +2 -0
  63. services-pulp_python-client/__init__.py +2 -0
  64. services-pulp_python-client/api/__init__.py +14 -0
  65. services-pulp_python-client/api/api_pypi_api.py +370 -0
  66. services-pulp_python-client/api/api_pypi_legacy_api.py +393 -0
  67. services-pulp_python-client/api/api_pypi_simple_api.py +1045 -0
  68. services-pulp_python-client/api/content_packages_api.py +2594 -0
  69. services-pulp_python-client/api/distributions_pypi_api.py +4186 -0
  70. services-pulp_python-client/api/publications_pypi_api.py +2881 -0
  71. services-pulp_python-client/api/pypi_metadata_api.py +385 -0
  72. services-pulp_python-client/api/remotes_python_api.py +4552 -0
  73. services-pulp_python-client/api/repositories_python_api.py +4856 -0
  74. services-pulp_python-client/api/repositories_python_versions_api.py +1670 -0
  75. services-pulp_python-client/api_client.py +798 -0
  76. services-pulp_python-client/api_response.py +21 -0
  77. services-pulp_python-client/configuration.py +628 -0
  78. services-pulp_python-client/exceptions.py +200 -0
  79. services-pulp_python-client/models/__init__.py +56 -0
  80. services-pulp_python-client/models/async_operation_response.py +88 -0
  81. services-pulp_python-client/models/content_summary_response.py +92 -0
  82. services-pulp_python-client/models/exclude_platforms_enum.py +40 -0
  83. services-pulp_python-client/models/my_permissions_response.py +88 -0
  84. services-pulp_python-client/models/nested_role.py +93 -0
  85. services-pulp_python-client/models/nested_role_response.py +92 -0
  86. services-pulp_python-client/models/object_roles_response.py +96 -0
  87. services-pulp_python-client/models/package_metadata_response.py +109 -0
  88. services-pulp_python-client/models/package_types_enum.py +44 -0
  89. services-pulp_python-client/models/package_upload_task_response.py +103 -0
  90. services-pulp_python-client/models/paginated_repository_version_response_list.py +112 -0
  91. services-pulp_python-client/models/paginatedpython_python_distribution_response_list.py +112 -0
  92. services-pulp_python-client/models/paginatedpython_python_package_content_response_list.py +112 -0
  93. services-pulp_python-client/models/paginatedpython_python_publication_response_list.py +112 -0
  94. services-pulp_python-client/models/paginatedpython_python_remote_response_list.py +112 -0
  95. services-pulp_python-client/models/paginatedpython_python_repository_response_list.py +112 -0
  96. services-pulp_python-client/models/patchedpython_python_distribution.py +125 -0
  97. services-pulp_python-client/models/patchedpython_python_remote.py +219 -0
  98. services-pulp_python-client/models/patchedpython_python_repository.py +114 -0
  99. services-pulp_python-client/models/policy_enum.py +39 -0
  100. services-pulp_python-client/models/python_python_distribution.py +125 -0
  101. services-pulp_python-client/models/python_python_distribution_response.py +149 -0
  102. services-pulp_python-client/models/python_python_package_content_response.py +201 -0
  103. services-pulp_python-client/models/python_python_publication.py +90 -0
  104. services-pulp_python-client/models/python_python_publication_response.py +111 -0
  105. services-pulp_python-client/models/python_python_remote.py +219 -0
  106. services-pulp_python-client/models/python_python_remote_response.py +213 -0
  107. services-pulp_python-client/models/python_python_remote_response_hidden_fields_inner.py +90 -0
  108. services-pulp_python-client/models/python_python_repository.py +114 -0
  109. services-pulp_python-client/models/python_python_repository_response.py +139 -0
  110. services-pulp_python-client/models/repair.py +88 -0
  111. services-pulp_python-client/models/repository_add_remove_content.py +93 -0
  112. services-pulp_python-client/models/repository_sync_url.py +90 -0
  113. services-pulp_python-client/models/repository_version_response.py +121 -0
  114. services-pulp_python-client/models/set_label.py +103 -0
  115. services-pulp_python-client/models/set_label_response.py +103 -0
  116. services-pulp_python-client/models/summary_response.py +92 -0
  117. services-pulp_python-client/models/unset_label.py +96 -0
  118. services-pulp_python-client/models/unset_label_response.py +100 -0
  119. services-pulp_python-client/py.typed +0 -0
  120. services-pulp_python-client/rest.py +258 -0
@@ -0,0 +1,201 @@
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 datetime import datetime
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from typing import Any, ClassVar, Dict, List, Optional
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class PythonPythonPackageContentResponse(BaseModel):
28
+ """
29
+ A Serializer for PythonPackageContent.
30
+ """ # noqa: E501
31
+ pulp_href: Optional[StrictStr] = None
32
+ prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
33
+ pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
34
+ pulp_last_updated: Optional[datetime] = Field(default=None, description="Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.")
35
+ pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")
36
+ artifact: Optional[StrictStr] = Field(default=None, description="Artifact file representing the physical content")
37
+ filename: Optional[StrictStr] = Field(default=None, description="The name of the distribution package, usually of the format: {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.{packagetype}")
38
+ packagetype: Optional[StrictStr] = Field(default=None, description="The type of the distribution package (e.g. sdist, bdist_wheel, bdist_egg, etc)")
39
+ name: Optional[StrictStr] = Field(default=None, description="The name of the python project.")
40
+ version: Optional[StrictStr] = Field(default=None, description="The packages version number.")
41
+ sha256: Optional[StrictStr] = Field(default='', description="The SHA256 digest of this package.")
42
+ metadata_version: Optional[StrictStr] = Field(default=None, description="Version of the file format")
43
+ summary: Optional[StrictStr] = Field(default=None, description="A one-line summary of what the package does.")
44
+ description: Optional[StrictStr] = Field(default=None, description="A longer description of the package that can run to several paragraphs.")
45
+ description_content_type: Optional[StrictStr] = Field(default=None, description="A string stating the markup syntax (if any) used in the distribution’s description, so that tools can intelligently render the description.")
46
+ keywords: Optional[StrictStr] = Field(default=None, description="Additional keywords to be used to assist searching for the package in a larger catalog.")
47
+ home_page: Optional[StrictStr] = Field(default=None, description="The URL for the package's home page.")
48
+ download_url: Optional[StrictStr] = Field(default=None, description="Legacy field denoting the URL from which this package can be downloaded.")
49
+ author: Optional[StrictStr] = Field(default=None, description="Text containing the author's name. Contact information can also be added, separated with newlines.")
50
+ author_email: Optional[StrictStr] = Field(default=None, description="The author's e-mail address. ")
51
+ maintainer: Optional[StrictStr] = Field(default=None, description="The maintainer's name at a minimum; additional contact information may be provided.")
52
+ maintainer_email: Optional[StrictStr] = Field(default=None, description="The maintainer's e-mail address.")
53
+ license: Optional[StrictStr] = Field(default=None, description="Text indicating the license covering the distribution")
54
+ requires_python: Optional[StrictStr] = Field(default=None, description="The Python version(s) that the distribution is guaranteed to be compatible with.")
55
+ project_url: Optional[StrictStr] = Field(default=None, description="A browsable URL for the project and a label for it, separated by a comma.")
56
+ project_urls: Optional[Any] = Field(default=None, description="A dictionary of labels and URLs for the project.")
57
+ platform: Optional[StrictStr] = Field(default=None, description="A comma-separated list of platform specifications, summarizing the operating systems supported by the package.")
58
+ supported_platform: Optional[StrictStr] = Field(default=None, description="Field to specify the OS and CPU for which the binary package was compiled. ")
59
+ requires_dist: Optional[Any] = Field(default=None, description="A JSON list containing names of some other distutils project required by this distribution.")
60
+ provides_dist: Optional[Any] = Field(default=None, description="A JSON list containing names of a Distutils project which is contained within this distribution.")
61
+ obsoletes_dist: Optional[Any] = Field(default=None, description="A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time.")
62
+ requires_external: Optional[Any] = Field(default=None, description="A JSON list containing some dependency in the system that the distribution is to be used.")
63
+ classifiers: Optional[Any] = Field(default=None, description="A JSON list containing classification values for a Python package.")
64
+ __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "pulp_labels", "artifact", "filename", "packagetype", "name", "version", "sha256", "metadata_version", "summary", "description", "description_content_type", "keywords", "home_page", "download_url", "author", "author_email", "maintainer", "maintainer_email", "license", "requires_python", "project_url", "project_urls", "platform", "supported_platform", "requires_dist", "provides_dist", "obsoletes_dist", "requires_external", "classifiers"]
65
+
66
+ model_config = ConfigDict(
67
+ populate_by_name=True,
68
+ validate_assignment=True,
69
+ protected_namespaces=(),
70
+ )
71
+
72
+
73
+ def to_str(self) -> str:
74
+ """Returns the string representation of the model using alias"""
75
+ return pprint.pformat(self.model_dump(by_alias=True))
76
+
77
+ def to_json(self) -> str:
78
+ """Returns the JSON representation of the model using alias"""
79
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
80
+ return json.dumps(self.to_dict())
81
+
82
+ @classmethod
83
+ def from_json(cls, json_str: str) -> Optional[Self]:
84
+ """Create an instance of PythonPythonPackageContentResponse from a JSON string"""
85
+ return cls.from_dict(json.loads(json_str))
86
+
87
+ def to_dict(self) -> Dict[str, Any]:
88
+ """Return the dictionary representation of the model using alias.
89
+
90
+ This has the following differences from calling pydantic's
91
+ `self.model_dump(by_alias=True)`:
92
+
93
+ * `None` is only added to the output dict for nullable fields that
94
+ were set at model initialization. Other fields with value `None`
95
+ are ignored.
96
+ * OpenAPI `readOnly` fields are excluded.
97
+ * OpenAPI `readOnly` fields are excluded.
98
+ * OpenAPI `readOnly` fields are excluded.
99
+ * OpenAPI `readOnly` fields are excluded.
100
+ * OpenAPI `readOnly` fields are excluded.
101
+ * OpenAPI `readOnly` fields are excluded.
102
+ * OpenAPI `readOnly` fields are excluded.
103
+ * OpenAPI `readOnly` fields are excluded.
104
+ * OpenAPI `readOnly` fields are excluded.
105
+ """
106
+ excluded_fields: Set[str] = set([
107
+ "pulp_href",
108
+ "prn",
109
+ "pulp_created",
110
+ "pulp_last_updated",
111
+ "filename",
112
+ "packagetype",
113
+ "name",
114
+ "version",
115
+ "metadata_version",
116
+ ])
117
+
118
+ _dict = self.model_dump(
119
+ by_alias=True,
120
+ exclude=excluded_fields,
121
+ exclude_none=True,
122
+ )
123
+ # set to None if project_urls (nullable) is None
124
+ # and model_fields_set contains the field
125
+ if self.project_urls is None and "project_urls" in self.model_fields_set:
126
+ _dict['project_urls'] = None
127
+
128
+ # set to None if requires_dist (nullable) is None
129
+ # and model_fields_set contains the field
130
+ if self.requires_dist is None and "requires_dist" in self.model_fields_set:
131
+ _dict['requires_dist'] = None
132
+
133
+ # set to None if provides_dist (nullable) is None
134
+ # and model_fields_set contains the field
135
+ if self.provides_dist is None and "provides_dist" in self.model_fields_set:
136
+ _dict['provides_dist'] = None
137
+
138
+ # set to None if obsoletes_dist (nullable) is None
139
+ # and model_fields_set contains the field
140
+ if self.obsoletes_dist is None and "obsoletes_dist" in self.model_fields_set:
141
+ _dict['obsoletes_dist'] = None
142
+
143
+ # set to None if requires_external (nullable) is None
144
+ # and model_fields_set contains the field
145
+ if self.requires_external is None and "requires_external" in self.model_fields_set:
146
+ _dict['requires_external'] = None
147
+
148
+ # set to None if classifiers (nullable) is None
149
+ # and model_fields_set contains the field
150
+ if self.classifiers is None and "classifiers" in self.model_fields_set:
151
+ _dict['classifiers'] = None
152
+
153
+ return _dict
154
+
155
+ @classmethod
156
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
157
+ """Create an instance of PythonPythonPackageContentResponse from a dict"""
158
+ if obj is None:
159
+ return None
160
+
161
+ if not isinstance(obj, dict):
162
+ return cls.model_validate(obj)
163
+
164
+ _obj = cls.model_validate({
165
+ "pulp_href": obj.get("pulp_href"),
166
+ "prn": obj.get("prn"),
167
+ "pulp_created": obj.get("pulp_created"),
168
+ "pulp_last_updated": obj.get("pulp_last_updated"),
169
+ "pulp_labels": obj.get("pulp_labels"),
170
+ "artifact": obj.get("artifact"),
171
+ "filename": obj.get("filename"),
172
+ "packagetype": obj.get("packagetype"),
173
+ "name": obj.get("name"),
174
+ "version": obj.get("version"),
175
+ "sha256": obj.get("sha256") if obj.get("sha256") is not None else '',
176
+ "metadata_version": obj.get("metadata_version"),
177
+ "summary": obj.get("summary"),
178
+ "description": obj.get("description"),
179
+ "description_content_type": obj.get("description_content_type"),
180
+ "keywords": obj.get("keywords"),
181
+ "home_page": obj.get("home_page"),
182
+ "download_url": obj.get("download_url"),
183
+ "author": obj.get("author"),
184
+ "author_email": obj.get("author_email"),
185
+ "maintainer": obj.get("maintainer"),
186
+ "maintainer_email": obj.get("maintainer_email"),
187
+ "license": obj.get("license"),
188
+ "requires_python": obj.get("requires_python"),
189
+ "project_url": obj.get("project_url"),
190
+ "project_urls": obj.get("project_urls"),
191
+ "platform": obj.get("platform"),
192
+ "supported_platform": obj.get("supported_platform"),
193
+ "requires_dist": obj.get("requires_dist"),
194
+ "provides_dist": obj.get("provides_dist"),
195
+ "obsoletes_dist": obj.get("obsoletes_dist"),
196
+ "requires_external": obj.get("requires_external"),
197
+ "classifiers": obj.get("classifiers")
198
+ })
199
+ return _obj
200
+
201
+
@@ -0,0 +1,90 @@
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 import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class PythonPythonPublication(BaseModel):
27
+ """
28
+ A Serializer for PythonPublication.
29
+ """ # noqa: E501
30
+ repository_version: Optional[StrictStr] = None
31
+ repository: Optional[StrictStr] = Field(default=None, description="A URI of the repository to be published.")
32
+ __properties: ClassVar[List[str]] = ["repository_version", "repository"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of PythonPythonPublication from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of PythonPythonPublication from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "repository_version": obj.get("repository_version"),
86
+ "repository": obj.get("repository")
87
+ })
88
+ return _obj
89
+
90
+
@@ -0,0 +1,111 @@
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 datetime import datetime
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from typing import Any, ClassVar, Dict, List, Optional
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class PythonPythonPublicationResponse(BaseModel):
28
+ """
29
+ A Serializer for PythonPublication.
30
+ """ # noqa: E501
31
+ pulp_href: Optional[StrictStr] = None
32
+ prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
33
+ pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
34
+ pulp_last_updated: Optional[datetime] = Field(default=None, description="Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.")
35
+ repository_version: Optional[StrictStr] = None
36
+ repository: Optional[StrictStr] = Field(default=None, description="A URI of the repository to be published.")
37
+ distributions: Optional[List[StrictStr]] = Field(default=None, description="This publication is currently being hosted as configured by these distributions.")
38
+ __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "repository_version", "repository", "distributions"]
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> Optional[Self]:
58
+ """Create an instance of PythonPythonPublicationResponse from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self) -> Dict[str, Any]:
62
+ """Return the dictionary representation of the model using alias.
63
+
64
+ This has the following differences from calling pydantic's
65
+ `self.model_dump(by_alias=True)`:
66
+
67
+ * `None` is only added to the output dict for nullable fields that
68
+ were set at model initialization. Other fields with value `None`
69
+ are ignored.
70
+ * OpenAPI `readOnly` fields are excluded.
71
+ * OpenAPI `readOnly` fields are excluded.
72
+ * OpenAPI `readOnly` fields are excluded.
73
+ * OpenAPI `readOnly` fields are excluded.
74
+ * OpenAPI `readOnly` fields are excluded.
75
+ """
76
+ excluded_fields: Set[str] = set([
77
+ "pulp_href",
78
+ "prn",
79
+ "pulp_created",
80
+ "pulp_last_updated",
81
+ "distributions",
82
+ ])
83
+
84
+ _dict = self.model_dump(
85
+ by_alias=True,
86
+ exclude=excluded_fields,
87
+ exclude_none=True,
88
+ )
89
+ return _dict
90
+
91
+ @classmethod
92
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
+ """Create an instance of PythonPythonPublicationResponse from a dict"""
94
+ if obj is None:
95
+ return None
96
+
97
+ if not isinstance(obj, dict):
98
+ return cls.model_validate(obj)
99
+
100
+ _obj = cls.model_validate({
101
+ "pulp_href": obj.get("pulp_href"),
102
+ "prn": obj.get("prn"),
103
+ "pulp_created": obj.get("pulp_created"),
104
+ "pulp_last_updated": obj.get("pulp_last_updated"),
105
+ "repository_version": obj.get("repository_version"),
106
+ "repository": obj.get("repository"),
107
+ "distributions": obj.get("distributions")
108
+ })
109
+ return _obj
110
+
111
+
@@ -0,0 +1,219 @@
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, StrictBool, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional, Union
23
+ from typing_extensions import Annotated
24
+ from crc-pulp_python-client.models.exclude_platforms_enum import ExcludePlatformsEnum
25
+ from crc-pulp_python-client.models.package_types_enum import PackageTypesEnum
26
+ from crc-pulp_python-client.models.policy_enum import PolicyEnum
27
+ from typing import Optional, Set
28
+ from typing_extensions import Self
29
+
30
+ class PythonPythonRemote(BaseModel):
31
+ """
32
+ A Serializer for PythonRemote.
33
+ """ # noqa: E501
34
+ name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A unique name for this remote.")
35
+ url: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The URL of an external content source.")
36
+ ca_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded CA certificate used to validate the server certificate presented by the remote server.")
37
+ client_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
38
+ client_key: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded private key used for authentication.")
39
+ tls_validation: Optional[StrictBool] = Field(default=None, description="If True, TLS peer validation must be performed.")
40
+ proxy_url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The proxy URL. Format: scheme://host:port")
41
+ proxy_username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to authenticte to the proxy.")
42
+ proxy_password: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed.")
43
+ username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to be used for authentication when syncing.")
44
+ password: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed.")
45
+ pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
46
+ download_concurrency: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Total number of simultaneous connections. If not set then the default value will be used.")
47
+ max_retries: Optional[StrictInt] = Field(default=None, description="Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.")
48
+ policy: Optional[PolicyEnum] = Field(default=None, description="The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'on_demand' is the default. * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.")
49
+ total_timeout: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.")
50
+ connect_timeout: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.")
51
+ sock_connect_timeout: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.")
52
+ sock_read_timeout: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.")
53
+ headers: Optional[List[Dict[str, Any]]] = Field(default=None, description="Headers for aiohttp.Clientsession")
54
+ rate_limit: Optional[StrictInt] = Field(default=None, description="Limits requests per second for each concurrent downloader")
55
+ includes: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = Field(default=None, description="A list containing project specifiers for Python packages to include.")
56
+ excludes: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = Field(default=None, description="A list containing project specifiers for Python packages to exclude.")
57
+ prereleases: Optional[StrictBool] = Field(default=None, description="Whether or not to include pre-release packages in the sync.")
58
+ package_types: Optional[List[PackageTypesEnum]] = Field(default=None, description="The package types to sync for Python content. Leave blank to get everypackage type.")
59
+ keep_latest_packages: Optional[StrictInt] = Field(default=0, description="The amount of latest versions of a package to keep on sync, includespre-releases if synced. Default 0 keeps all versions.")
60
+ exclude_platforms: Optional[List[ExcludePlatformsEnum]] = Field(default=None, description="List of platforms to exclude syncing Python packages for. Possible valuesinclude: windows, macos, freebsd, and linux.")
61
+ __properties: ClassVar[List[str]] = ["name", "url", "ca_cert", "client_cert", "client_key", "tls_validation", "proxy_url", "proxy_username", "proxy_password", "username", "password", "pulp_labels", "download_concurrency", "max_retries", "policy", "total_timeout", "connect_timeout", "sock_connect_timeout", "sock_read_timeout", "headers", "rate_limit", "includes", "excludes", "prereleases", "package_types", "keep_latest_packages", "exclude_platforms"]
62
+
63
+ model_config = ConfigDict(
64
+ populate_by_name=True,
65
+ validate_assignment=True,
66
+ protected_namespaces=(),
67
+ )
68
+
69
+
70
+ def to_str(self) -> str:
71
+ """Returns the string representation of the model using alias"""
72
+ return pprint.pformat(self.model_dump(by_alias=True))
73
+
74
+ def to_json(self) -> str:
75
+ """Returns the JSON representation of the model using alias"""
76
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
77
+ return json.dumps(self.to_dict())
78
+
79
+ @classmethod
80
+ def from_json(cls, json_str: str) -> Optional[Self]:
81
+ """Create an instance of PythonPythonRemote from a JSON string"""
82
+ return cls.from_dict(json.loads(json_str))
83
+
84
+ def to_dict(self) -> Dict[str, Any]:
85
+ """Return the dictionary representation of the model using alias.
86
+
87
+ This has the following differences from calling pydantic's
88
+ `self.model_dump(by_alias=True)`:
89
+
90
+ * `None` is only added to the output dict for nullable fields that
91
+ were set at model initialization. Other fields with value `None`
92
+ are ignored.
93
+ """
94
+ excluded_fields: Set[str] = set([
95
+ ])
96
+
97
+ _dict = self.model_dump(
98
+ by_alias=True,
99
+ exclude=excluded_fields,
100
+ exclude_none=True,
101
+ )
102
+ # set to None if ca_cert (nullable) is None
103
+ # and model_fields_set contains the field
104
+ if self.ca_cert is None and "ca_cert" in self.model_fields_set:
105
+ _dict['ca_cert'] = None
106
+
107
+ # set to None if client_cert (nullable) is None
108
+ # and model_fields_set contains the field
109
+ if self.client_cert is None and "client_cert" in self.model_fields_set:
110
+ _dict['client_cert'] = None
111
+
112
+ # set to None if client_key (nullable) is None
113
+ # and model_fields_set contains the field
114
+ if self.client_key is None and "client_key" in self.model_fields_set:
115
+ _dict['client_key'] = None
116
+
117
+ # set to None if proxy_url (nullable) is None
118
+ # and model_fields_set contains the field
119
+ if self.proxy_url is None and "proxy_url" in self.model_fields_set:
120
+ _dict['proxy_url'] = None
121
+
122
+ # set to None if proxy_username (nullable) is None
123
+ # and model_fields_set contains the field
124
+ if self.proxy_username is None and "proxy_username" in self.model_fields_set:
125
+ _dict['proxy_username'] = None
126
+
127
+ # set to None if proxy_password (nullable) is None
128
+ # and model_fields_set contains the field
129
+ if self.proxy_password is None and "proxy_password" in self.model_fields_set:
130
+ _dict['proxy_password'] = None
131
+
132
+ # set to None if username (nullable) is None
133
+ # and model_fields_set contains the field
134
+ if self.username is None and "username" in self.model_fields_set:
135
+ _dict['username'] = None
136
+
137
+ # set to None if password (nullable) is None
138
+ # and model_fields_set contains the field
139
+ if self.password is None and "password" in self.model_fields_set:
140
+ _dict['password'] = None
141
+
142
+ # set to None if download_concurrency (nullable) is None
143
+ # and model_fields_set contains the field
144
+ if self.download_concurrency is None and "download_concurrency" in self.model_fields_set:
145
+ _dict['download_concurrency'] = None
146
+
147
+ # set to None if max_retries (nullable) is None
148
+ # and model_fields_set contains the field
149
+ if self.max_retries is None and "max_retries" in self.model_fields_set:
150
+ _dict['max_retries'] = None
151
+
152
+ # set to None if total_timeout (nullable) is None
153
+ # and model_fields_set contains the field
154
+ if self.total_timeout is None and "total_timeout" in self.model_fields_set:
155
+ _dict['total_timeout'] = None
156
+
157
+ # set to None if connect_timeout (nullable) is None
158
+ # and model_fields_set contains the field
159
+ if self.connect_timeout is None and "connect_timeout" in self.model_fields_set:
160
+ _dict['connect_timeout'] = None
161
+
162
+ # set to None if sock_connect_timeout (nullable) is None
163
+ # and model_fields_set contains the field
164
+ if self.sock_connect_timeout is None and "sock_connect_timeout" in self.model_fields_set:
165
+ _dict['sock_connect_timeout'] = None
166
+
167
+ # set to None if sock_read_timeout (nullable) is None
168
+ # and model_fields_set contains the field
169
+ if self.sock_read_timeout is None and "sock_read_timeout" in self.model_fields_set:
170
+ _dict['sock_read_timeout'] = None
171
+
172
+ # set to None if rate_limit (nullable) is None
173
+ # and model_fields_set contains the field
174
+ if self.rate_limit is None and "rate_limit" in self.model_fields_set:
175
+ _dict['rate_limit'] = None
176
+
177
+ return _dict
178
+
179
+ @classmethod
180
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
181
+ """Create an instance of PythonPythonRemote from a dict"""
182
+ if obj is None:
183
+ return None
184
+
185
+ if not isinstance(obj, dict):
186
+ return cls.model_validate(obj)
187
+
188
+ _obj = cls.model_validate({
189
+ "name": obj.get("name"),
190
+ "url": obj.get("url"),
191
+ "ca_cert": obj.get("ca_cert"),
192
+ "client_cert": obj.get("client_cert"),
193
+ "client_key": obj.get("client_key"),
194
+ "tls_validation": obj.get("tls_validation"),
195
+ "proxy_url": obj.get("proxy_url"),
196
+ "proxy_username": obj.get("proxy_username"),
197
+ "proxy_password": obj.get("proxy_password"),
198
+ "username": obj.get("username"),
199
+ "password": obj.get("password"),
200
+ "pulp_labels": obj.get("pulp_labels"),
201
+ "download_concurrency": obj.get("download_concurrency"),
202
+ "max_retries": obj.get("max_retries"),
203
+ "policy": obj.get("policy"),
204
+ "total_timeout": obj.get("total_timeout"),
205
+ "connect_timeout": obj.get("connect_timeout"),
206
+ "sock_connect_timeout": obj.get("sock_connect_timeout"),
207
+ "sock_read_timeout": obj.get("sock_read_timeout"),
208
+ "headers": obj.get("headers"),
209
+ "rate_limit": obj.get("rate_limit"),
210
+ "includes": obj.get("includes"),
211
+ "excludes": obj.get("excludes"),
212
+ "prereleases": obj.get("prereleases"),
213
+ "package_types": obj.get("package_types"),
214
+ "keep_latest_packages": obj.get("keep_latest_packages") if obj.get("keep_latest_packages") is not None else 0,
215
+ "exclude_platforms": obj.get("exclude_platforms")
216
+ })
217
+ return _obj
218
+
219
+