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,213 @@
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, StrictBool, StrictInt, StrictStr
23
+ from typing import Any, ClassVar, Dict, List, Optional, Union
24
+ from typing_extensions import Annotated
25
+ from services-pulp_python-client.models.exclude_platforms_enum import ExcludePlatformsEnum
26
+ from services-pulp_python-client.models.package_types_enum import PackageTypesEnum
27
+ from services-pulp_python-client.models.policy_enum import PolicyEnum
28
+ from services-pulp_python-client.models.python_python_remote_response_hidden_fields_inner import PythonPythonRemoteResponseHiddenFieldsInner
29
+ from typing import Optional, Set
30
+ from typing_extensions import Self
31
+
32
+ class PythonPythonRemoteResponse(BaseModel):
33
+ """
34
+ A Serializer for PythonRemote.
35
+ """ # noqa: E501
36
+ pulp_href: Optional[StrictStr] = None
37
+ prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
38
+ pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
39
+ pulp_last_updated: Optional[datetime] = Field(default=None, description="Timestamp of the most recent update of the remote.")
40
+ name: StrictStr = Field(description="A unique name for this remote.")
41
+ url: StrictStr = Field(description="The URL of an external content source.")
42
+ ca_cert: Optional[StrictStr] = Field(default=None, description="A PEM encoded CA certificate used to validate the server certificate presented by the remote server.")
43
+ client_cert: Optional[StrictStr] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
44
+ tls_validation: Optional[StrictBool] = Field(default=None, description="If True, TLS peer validation must be performed.")
45
+ proxy_url: Optional[StrictStr] = Field(default=None, description="The proxy URL. Format: scheme://host:port")
46
+ pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
47
+ 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.")
48
+ 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.")
49
+ 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.")
50
+ 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.")
51
+ 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.")
52
+ 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.")
53
+ 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.")
54
+ headers: Optional[List[Dict[str, Any]]] = Field(default=None, description="Headers for aiohttp.Clientsession")
55
+ rate_limit: Optional[StrictInt] = Field(default=None, description="Limits requests per second for each concurrent downloader")
56
+ hidden_fields: Optional[List[PythonPythonRemoteResponseHiddenFieldsInner]] = Field(default=None, description="List of hidden (write only) fields")
57
+ includes: Optional[List[StrictStr]] = Field(default=None, description="A list containing project specifiers for Python packages to include.")
58
+ excludes: Optional[List[StrictStr]] = Field(default=None, description="A list containing project specifiers for Python packages to exclude.")
59
+ prereleases: Optional[StrictBool] = Field(default=None, description="Whether or not to include pre-release packages in the sync.")
60
+ package_types: Optional[List[PackageTypesEnum]] = Field(default=None, description="The package types to sync for Python content. Leave blank to get everypackage type.")
61
+ 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.")
62
+ 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.")
63
+ __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "name", "url", "ca_cert", "client_cert", "tls_validation", "proxy_url", "pulp_labels", "download_concurrency", "max_retries", "policy", "total_timeout", "connect_timeout", "sock_connect_timeout", "sock_read_timeout", "headers", "rate_limit", "hidden_fields", "includes", "excludes", "prereleases", "package_types", "keep_latest_packages", "exclude_platforms"]
64
+
65
+ model_config = ConfigDict(
66
+ populate_by_name=True,
67
+ validate_assignment=True,
68
+ protected_namespaces=(),
69
+ )
70
+
71
+
72
+ def to_str(self) -> str:
73
+ """Returns the string representation of the model using alias"""
74
+ return pprint.pformat(self.model_dump(by_alias=True))
75
+
76
+ def to_json(self) -> str:
77
+ """Returns the JSON representation of the model using alias"""
78
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
79
+ return json.dumps(self.to_dict())
80
+
81
+ @classmethod
82
+ def from_json(cls, json_str: str) -> Optional[Self]:
83
+ """Create an instance of PythonPythonRemoteResponse from a JSON string"""
84
+ return cls.from_dict(json.loads(json_str))
85
+
86
+ def to_dict(self) -> Dict[str, Any]:
87
+ """Return the dictionary representation of the model using alias.
88
+
89
+ This has the following differences from calling pydantic's
90
+ `self.model_dump(by_alias=True)`:
91
+
92
+ * `None` is only added to the output dict for nullable fields that
93
+ were set at model initialization. Other fields with value `None`
94
+ are ignored.
95
+ * OpenAPI `readOnly` fields are excluded.
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
+ """
101
+ excluded_fields: Set[str] = set([
102
+ "pulp_href",
103
+ "prn",
104
+ "pulp_created",
105
+ "pulp_last_updated",
106
+ "hidden_fields",
107
+ ])
108
+
109
+ _dict = self.model_dump(
110
+ by_alias=True,
111
+ exclude=excluded_fields,
112
+ exclude_none=True,
113
+ )
114
+ # override the default output from pydantic by calling `to_dict()` of each item in hidden_fields (list)
115
+ _items = []
116
+ if self.hidden_fields:
117
+ for _item_hidden_fields in self.hidden_fields:
118
+ if _item_hidden_fields:
119
+ _items.append(_item_hidden_fields.to_dict())
120
+ _dict['hidden_fields'] = _items
121
+ # set to None if ca_cert (nullable) is None
122
+ # and model_fields_set contains the field
123
+ if self.ca_cert is None and "ca_cert" in self.model_fields_set:
124
+ _dict['ca_cert'] = None
125
+
126
+ # set to None if client_cert (nullable) is None
127
+ # and model_fields_set contains the field
128
+ if self.client_cert is None and "client_cert" in self.model_fields_set:
129
+ _dict['client_cert'] = None
130
+
131
+ # set to None if proxy_url (nullable) is None
132
+ # and model_fields_set contains the field
133
+ if self.proxy_url is None and "proxy_url" in self.model_fields_set:
134
+ _dict['proxy_url'] = None
135
+
136
+ # set to None if download_concurrency (nullable) is None
137
+ # and model_fields_set contains the field
138
+ if self.download_concurrency is None and "download_concurrency" in self.model_fields_set:
139
+ _dict['download_concurrency'] = None
140
+
141
+ # set to None if max_retries (nullable) is None
142
+ # and model_fields_set contains the field
143
+ if self.max_retries is None and "max_retries" in self.model_fields_set:
144
+ _dict['max_retries'] = None
145
+
146
+ # set to None if total_timeout (nullable) is None
147
+ # and model_fields_set contains the field
148
+ if self.total_timeout is None and "total_timeout" in self.model_fields_set:
149
+ _dict['total_timeout'] = None
150
+
151
+ # set to None if connect_timeout (nullable) is None
152
+ # and model_fields_set contains the field
153
+ if self.connect_timeout is None and "connect_timeout" in self.model_fields_set:
154
+ _dict['connect_timeout'] = None
155
+
156
+ # set to None if sock_connect_timeout (nullable) is None
157
+ # and model_fields_set contains the field
158
+ if self.sock_connect_timeout is None and "sock_connect_timeout" in self.model_fields_set:
159
+ _dict['sock_connect_timeout'] = None
160
+
161
+ # set to None if sock_read_timeout (nullable) is None
162
+ # and model_fields_set contains the field
163
+ if self.sock_read_timeout is None and "sock_read_timeout" in self.model_fields_set:
164
+ _dict['sock_read_timeout'] = None
165
+
166
+ # set to None if rate_limit (nullable) is None
167
+ # and model_fields_set contains the field
168
+ if self.rate_limit is None and "rate_limit" in self.model_fields_set:
169
+ _dict['rate_limit'] = None
170
+
171
+ return _dict
172
+
173
+ @classmethod
174
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
175
+ """Create an instance of PythonPythonRemoteResponse from a dict"""
176
+ if obj is None:
177
+ return None
178
+
179
+ if not isinstance(obj, dict):
180
+ return cls.model_validate(obj)
181
+
182
+ _obj = cls.model_validate({
183
+ "pulp_href": obj.get("pulp_href"),
184
+ "prn": obj.get("prn"),
185
+ "pulp_created": obj.get("pulp_created"),
186
+ "pulp_last_updated": obj.get("pulp_last_updated"),
187
+ "name": obj.get("name"),
188
+ "url": obj.get("url"),
189
+ "ca_cert": obj.get("ca_cert"),
190
+ "client_cert": obj.get("client_cert"),
191
+ "tls_validation": obj.get("tls_validation"),
192
+ "proxy_url": obj.get("proxy_url"),
193
+ "pulp_labels": obj.get("pulp_labels"),
194
+ "download_concurrency": obj.get("download_concurrency"),
195
+ "max_retries": obj.get("max_retries"),
196
+ "policy": obj.get("policy"),
197
+ "total_timeout": obj.get("total_timeout"),
198
+ "connect_timeout": obj.get("connect_timeout"),
199
+ "sock_connect_timeout": obj.get("sock_connect_timeout"),
200
+ "sock_read_timeout": obj.get("sock_read_timeout"),
201
+ "headers": obj.get("headers"),
202
+ "rate_limit": obj.get("rate_limit"),
203
+ "hidden_fields": [PythonPythonRemoteResponseHiddenFieldsInner.from_dict(_item) for _item in obj["hidden_fields"]] if obj.get("hidden_fields") is not None else None,
204
+ "includes": obj.get("includes"),
205
+ "excludes": obj.get("excludes"),
206
+ "prereleases": obj.get("prereleases"),
207
+ "package_types": obj.get("package_types"),
208
+ "keep_latest_packages": obj.get("keep_latest_packages") if obj.get("keep_latest_packages") is not None else 0,
209
+ "exclude_platforms": obj.get("exclude_platforms")
210
+ })
211
+ return _obj
212
+
213
+
@@ -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, StrictBool, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class PythonPythonRemoteResponseHiddenFieldsInner(BaseModel):
27
+ """
28
+ PythonPythonRemoteResponseHiddenFieldsInner
29
+ """ # noqa: E501
30
+ name: StrictStr
31
+ is_set: StrictBool
32
+ __properties: ClassVar[List[str]] = ["name", "is_set"]
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 PythonPythonRemoteResponseHiddenFieldsInner 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 PythonPythonRemoteResponseHiddenFieldsInner 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
+ "name": obj.get("name"),
86
+ "is_set": obj.get("is_set")
87
+ })
88
+ return _obj
89
+
90
+
@@ -0,0 +1,114 @@
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, 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 PythonPythonRepository(BaseModel):
28
+ """
29
+ Serializer for Python Repositories.
30
+ """ # noqa: E501
31
+ pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
32
+ name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A unique name for this repository.")
33
+ description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="An optional description.")
34
+ retain_repo_versions: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Retain X versions of the repository. Default is null which retains all versions.")
35
+ remote: Optional[StrictStr] = Field(default=None, description="An optional remote to use by default when syncing.")
36
+ autopublish: Optional[StrictBool] = Field(default=False, description="Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository.")
37
+ __properties: ClassVar[List[str]] = ["pulp_labels", "name", "description", "retain_repo_versions", "remote", "autopublish"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of PythonPythonRepository from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # set to None if description (nullable) is None
79
+ # and model_fields_set contains the field
80
+ if self.description is None and "description" in self.model_fields_set:
81
+ _dict['description'] = None
82
+
83
+ # set to None if retain_repo_versions (nullable) is None
84
+ # and model_fields_set contains the field
85
+ if self.retain_repo_versions is None and "retain_repo_versions" in self.model_fields_set:
86
+ _dict['retain_repo_versions'] = None
87
+
88
+ # set to None if remote (nullable) is None
89
+ # and model_fields_set contains the field
90
+ if self.remote is None and "remote" in self.model_fields_set:
91
+ _dict['remote'] = None
92
+
93
+ return _dict
94
+
95
+ @classmethod
96
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
97
+ """Create an instance of PythonPythonRepository from a dict"""
98
+ if obj is None:
99
+ return None
100
+
101
+ if not isinstance(obj, dict):
102
+ return cls.model_validate(obj)
103
+
104
+ _obj = cls.model_validate({
105
+ "pulp_labels": obj.get("pulp_labels"),
106
+ "name": obj.get("name"),
107
+ "description": obj.get("description"),
108
+ "retain_repo_versions": obj.get("retain_repo_versions"),
109
+ "remote": obj.get("remote"),
110
+ "autopublish": obj.get("autopublish") if obj.get("autopublish") is not None else False
111
+ })
112
+ return _obj
113
+
114
+
@@ -0,0 +1,139 @@
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, StrictBool, StrictStr
23
+ from typing import Any, ClassVar, Dict, List, Optional
24
+ from typing_extensions import Annotated
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class PythonPythonRepositoryResponse(BaseModel):
29
+ """
30
+ Serializer for Python Repositories.
31
+ """ # noqa: E501
32
+ pulp_href: Optional[StrictStr] = None
33
+ prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
34
+ pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
35
+ 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.")
36
+ versions_href: Optional[StrictStr] = None
37
+ pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
38
+ latest_version_href: Optional[StrictStr] = None
39
+ name: StrictStr = Field(description="A unique name for this repository.")
40
+ description: Optional[StrictStr] = Field(default=None, description="An optional description.")
41
+ retain_repo_versions: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Retain X versions of the repository. Default is null which retains all versions.")
42
+ remote: Optional[StrictStr] = Field(default=None, description="An optional remote to use by default when syncing.")
43
+ autopublish: Optional[StrictBool] = Field(default=False, description="Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository.")
44
+ __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "versions_href", "pulp_labels", "latest_version_href", "name", "description", "retain_repo_versions", "remote", "autopublish"]
45
+
46
+ model_config = ConfigDict(
47
+ populate_by_name=True,
48
+ validate_assignment=True,
49
+ protected_namespaces=(),
50
+ )
51
+
52
+
53
+ def to_str(self) -> str:
54
+ """Returns the string representation of the model using alias"""
55
+ return pprint.pformat(self.model_dump(by_alias=True))
56
+
57
+ def to_json(self) -> str:
58
+ """Returns the JSON representation of the model using alias"""
59
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
60
+ return json.dumps(self.to_dict())
61
+
62
+ @classmethod
63
+ def from_json(cls, json_str: str) -> Optional[Self]:
64
+ """Create an instance of PythonPythonRepositoryResponse from a JSON string"""
65
+ return cls.from_dict(json.loads(json_str))
66
+
67
+ def to_dict(self) -> Dict[str, Any]:
68
+ """Return the dictionary representation of the model using alias.
69
+
70
+ This has the following differences from calling pydantic's
71
+ `self.model_dump(by_alias=True)`:
72
+
73
+ * `None` is only added to the output dict for nullable fields that
74
+ were set at model initialization. Other fields with value `None`
75
+ are ignored.
76
+ * OpenAPI `readOnly` fields are excluded.
77
+ * OpenAPI `readOnly` fields are excluded.
78
+ * OpenAPI `readOnly` fields are excluded.
79
+ * OpenAPI `readOnly` fields are excluded.
80
+ * OpenAPI `readOnly` fields are excluded.
81
+ * OpenAPI `readOnly` fields are excluded.
82
+ """
83
+ excluded_fields: Set[str] = set([
84
+ "pulp_href",
85
+ "prn",
86
+ "pulp_created",
87
+ "pulp_last_updated",
88
+ "versions_href",
89
+ "latest_version_href",
90
+ ])
91
+
92
+ _dict = self.model_dump(
93
+ by_alias=True,
94
+ exclude=excluded_fields,
95
+ exclude_none=True,
96
+ )
97
+ # set to None if description (nullable) is None
98
+ # and model_fields_set contains the field
99
+ if self.description is None and "description" in self.model_fields_set:
100
+ _dict['description'] = None
101
+
102
+ # set to None if retain_repo_versions (nullable) is None
103
+ # and model_fields_set contains the field
104
+ if self.retain_repo_versions is None and "retain_repo_versions" in self.model_fields_set:
105
+ _dict['retain_repo_versions'] = None
106
+
107
+ # set to None if remote (nullable) is None
108
+ # and model_fields_set contains the field
109
+ if self.remote is None and "remote" in self.model_fields_set:
110
+ _dict['remote'] = None
111
+
112
+ return _dict
113
+
114
+ @classmethod
115
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
116
+ """Create an instance of PythonPythonRepositoryResponse from a dict"""
117
+ if obj is None:
118
+ return None
119
+
120
+ if not isinstance(obj, dict):
121
+ return cls.model_validate(obj)
122
+
123
+ _obj = cls.model_validate({
124
+ "pulp_href": obj.get("pulp_href"),
125
+ "prn": obj.get("prn"),
126
+ "pulp_created": obj.get("pulp_created"),
127
+ "pulp_last_updated": obj.get("pulp_last_updated"),
128
+ "versions_href": obj.get("versions_href"),
129
+ "pulp_labels": obj.get("pulp_labels"),
130
+ "latest_version_href": obj.get("latest_version_href"),
131
+ "name": obj.get("name"),
132
+ "description": obj.get("description"),
133
+ "retain_repo_versions": obj.get("retain_repo_versions"),
134
+ "remote": obj.get("remote"),
135
+ "autopublish": obj.get("autopublish") if obj.get("autopublish") is not None else False
136
+ })
137
+ return _obj
138
+
139
+
@@ -0,0 +1,88 @@
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
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class Repair(BaseModel):
27
+ """
28
+ Repair
29
+ """ # noqa: E501
30
+ verify_checksums: Optional[StrictBool] = Field(default=True, description="Will verify that the checksum of all stored files matches what saved in the database. Otherwise only the existence of the files will be checked. Enabled by default")
31
+ __properties: ClassVar[List[str]] = ["verify_checksums"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of Repair from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of Repair from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "verify_checksums": obj.get("verify_checksums") if obj.get("verify_checksums") is not None else True
85
+ })
86
+ return _obj
87
+
88
+