pulp-python-client 3.12.5__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.
- pulp_python_client-3.13.0.dist-info/METADATA +17 -0
- pulp_python_client-3.13.0.dist-info/RECORD +64 -0
- {pulp_python_client-3.12.5.dist-info → pulp_python_client-3.13.0.dist-info}/WHEEL +1 -1
- pulpcore/client/pulp_python/__init__.py +9 -10
- pulpcore/client/pulp_python/api/__init__.py +1 -2
- pulpcore/client/pulp_python/api/content_packages_api.py +1800 -655
- pulpcore/client/pulp_python/api/distributions_pypi_api.py +3755 -1474
- pulpcore/client/pulp_python/api/publications_pypi_api.py +2574 -982
- pulpcore/client/pulp_python/api/pypi_api.py +302 -128
- pulpcore/client/pulp_python/api/pypi_legacy_api.py +326 -153
- pulpcore/client/pulp_python/api/pypi_metadata_api.py +319 -139
- pulpcore/client/pulp_python/api/pypi_simple_api.py +899 -382
- pulpcore/client/pulp_python/api/remotes_python_api.py +4092 -1589
- pulpcore/client/pulp_python/api/repositories_python_api.py +4380 -1719
- pulpcore/client/pulp_python/api/repositories_python_versions_api.py +1526 -561
- pulpcore/client/pulp_python/api_client.py +444 -313
- pulpcore/client/pulp_python/api_response.py +21 -0
- pulpcore/client/pulp_python/configuration.py +266 -73
- pulpcore/client/pulp_python/exceptions.py +99 -20
- pulpcore/client/pulp_python/models/__init__.py +5 -8
- pulpcore/client/pulp_python/models/async_operation_response.py +60 -96
- pulpcore/client/pulp_python/models/content_summary_response.py +70 -154
- pulpcore/client/pulp_python/models/exclude_platforms_enum.py +19 -82
- pulpcore/client/pulp_python/models/my_permissions_response.py +60 -94
- pulpcore/client/pulp_python/models/nested_role.py +71 -155
- pulpcore/client/pulp_python/models/nested_role_response.py +70 -152
- pulpcore/client/pulp_python/models/object_roles_response.py +70 -96
- pulpcore/client/pulp_python/models/package_metadata_response.py +91 -191
- pulpcore/client/pulp_python/models/package_types_enum.py +23 -86
- pulpcore/client/pulp_python/models/package_upload_task_response.py +85 -154
- pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +94 -181
- pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +94 -181
- pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +94 -181
- pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +94 -181
- pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +94 -181
- pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +94 -181
- pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +108 -330
- pulpcore/client/pulp_python/models/patchedpython_python_remote.py +204 -864
- pulpcore/client/pulp_python/models/patchedpython_python_repository.py +96 -249
- pulpcore/client/pulp_python/models/policy_enum.py +18 -81
- pulpcore/client/pulp_python/models/python_python_distribution.py +108 -332
- pulpcore/client/pulp_python/models/python_python_distribution_response.py +132 -490
- pulpcore/client/pulp_python/models/python_python_package_content_response.py +182 -972
- pulpcore/client/pulp_python/models/python_python_publication.py +68 -127
- pulpcore/client/pulp_python/models/python_python_publication_response.py +93 -269
- pulpcore/client/pulp_python/models/python_python_remote.py +204 -866
- pulpcore/client/pulp_python/models/python_python_remote_response.py +198 -839
- pulpcore/client/pulp_python/models/python_python_remote_response_hidden_fields_inner.py +90 -0
- pulpcore/client/pulp_python/models/python_python_repository.py +96 -250
- pulpcore/client/pulp_python/models/python_python_repository_response.py +122 -407
- pulpcore/client/pulp_python/models/repair.py +60 -95
- pulpcore/client/pulp_python/models/repository_add_remove_content.py +71 -157
- pulpcore/client/pulp_python/models/repository_sync_url.py +68 -129
- pulpcore/client/pulp_python/models/repository_version_response.py +104 -296
- pulpcore/client/pulp_python/models/set_label.py +80 -130
- pulpcore/client/pulp_python/models/set_label_response.py +80 -127
- pulpcore/client/pulp_python/models/summary_response.py +70 -160
- pulpcore/client/pulp_python/models/unset_label.py +75 -107
- pulpcore/client/pulp_python/models/unset_label_response.py +78 -129
- pulpcore/client/pulp_python/py.typed +0 -0
- pulpcore/client/pulp_python/rest.py +136 -170
- pulp_python_client-3.12.5.dist-info/METADATA +0 -17
- pulp_python_client-3.12.5.dist-info/RECORD +0 -65
- pulpcore/client/pulp_python/models/package_upload.py +0 -190
- pulpcore/client/pulp_python/models/python_bander_remote.py +0 -184
- pulpcore/client/pulp_python/models/python_python_package_content.py +0 -889
- pulpcore/client/pulp_python/models/python_python_remote_response_hidden_fields.py +0 -149
- {pulp_python_client-3.12.5.dist-info → pulp_python_client-3.13.0.dist-info}/top_level.txt +0 -0
|
@@ -3,422 +3,137 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Pulp 3 API
|
|
5
5
|
|
|
6
|
-
Fetch, Upload, Organize, and Distribute Software Packages
|
|
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
|
|
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
|
|
18
|
-
|
|
19
|
-
from
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
"""
|
|
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
|
|
28
27
|
|
|
28
|
+
class PythonPythonRepositoryResponse(BaseModel):
|
|
29
29
|
"""
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
""
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return
|
|
138
|
-
|
|
139
|
-
@prn.setter
|
|
140
|
-
def prn(self, prn):
|
|
141
|
-
"""Sets the prn of this PythonPythonRepositoryResponse.
|
|
142
|
-
|
|
143
|
-
The Pulp Resource Name (PRN). # noqa: E501
|
|
144
|
-
|
|
145
|
-
:param prn: The prn of this PythonPythonRepositoryResponse. # noqa: E501
|
|
146
|
-
:type: str
|
|
147
|
-
"""
|
|
148
|
-
|
|
149
|
-
self._prn = prn
|
|
150
|
-
|
|
151
|
-
@property
|
|
152
|
-
def pulp_created(self):
|
|
153
|
-
"""Gets the pulp_created of this PythonPythonRepositoryResponse. # noqa: E501
|
|
154
|
-
|
|
155
|
-
Timestamp of creation. # noqa: E501
|
|
156
|
-
|
|
157
|
-
:return: The pulp_created of this PythonPythonRepositoryResponse. # noqa: E501
|
|
158
|
-
:rtype: datetime
|
|
159
|
-
"""
|
|
160
|
-
return self._pulp_created
|
|
161
|
-
|
|
162
|
-
@pulp_created.setter
|
|
163
|
-
def pulp_created(self, pulp_created):
|
|
164
|
-
"""Sets the pulp_created of this PythonPythonRepositoryResponse.
|
|
165
|
-
|
|
166
|
-
Timestamp of creation. # noqa: E501
|
|
167
|
-
|
|
168
|
-
:param pulp_created: The pulp_created of this PythonPythonRepositoryResponse. # noqa: E501
|
|
169
|
-
:type: datetime
|
|
170
|
-
"""
|
|
171
|
-
|
|
172
|
-
self._pulp_created = pulp_created
|
|
173
|
-
|
|
174
|
-
@property
|
|
175
|
-
def pulp_last_updated(self):
|
|
176
|
-
"""Gets the pulp_last_updated of this PythonPythonRepositoryResponse. # noqa: E501
|
|
177
|
-
|
|
178
|
-
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. # noqa: E501
|
|
179
|
-
|
|
180
|
-
:return: The pulp_last_updated of this PythonPythonRepositoryResponse. # noqa: E501
|
|
181
|
-
:rtype: datetime
|
|
182
|
-
"""
|
|
183
|
-
return self._pulp_last_updated
|
|
184
|
-
|
|
185
|
-
@pulp_last_updated.setter
|
|
186
|
-
def pulp_last_updated(self, pulp_last_updated):
|
|
187
|
-
"""Sets the pulp_last_updated of this PythonPythonRepositoryResponse.
|
|
188
|
-
|
|
189
|
-
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. # noqa: E501
|
|
190
|
-
|
|
191
|
-
:param pulp_last_updated: The pulp_last_updated of this PythonPythonRepositoryResponse. # noqa: E501
|
|
192
|
-
:type: datetime
|
|
193
|
-
"""
|
|
194
|
-
|
|
195
|
-
self._pulp_last_updated = pulp_last_updated
|
|
196
|
-
|
|
197
|
-
@property
|
|
198
|
-
def versions_href(self):
|
|
199
|
-
"""Gets the versions_href of this PythonPythonRepositoryResponse. # noqa: E501
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
:return: The versions_href of this PythonPythonRepositoryResponse. # noqa: E501
|
|
203
|
-
:rtype: str
|
|
204
|
-
"""
|
|
205
|
-
return self._versions_href
|
|
206
|
-
|
|
207
|
-
@versions_href.setter
|
|
208
|
-
def versions_href(self, versions_href):
|
|
209
|
-
"""Sets the versions_href of this PythonPythonRepositoryResponse.
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
:param versions_href: The versions_href of this PythonPythonRepositoryResponse. # noqa: E501
|
|
213
|
-
:type: str
|
|
214
|
-
"""
|
|
215
|
-
|
|
216
|
-
self._versions_href = versions_href
|
|
217
|
-
|
|
218
|
-
@property
|
|
219
|
-
def pulp_labels(self):
|
|
220
|
-
"""Gets the pulp_labels of this PythonPythonRepositoryResponse. # noqa: E501
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
:return: The pulp_labels of this PythonPythonRepositoryResponse. # noqa: E501
|
|
224
|
-
:rtype: dict(str, str)
|
|
225
|
-
"""
|
|
226
|
-
return self._pulp_labels
|
|
227
|
-
|
|
228
|
-
@pulp_labels.setter
|
|
229
|
-
def pulp_labels(self, pulp_labels):
|
|
230
|
-
"""Sets the pulp_labels of this PythonPythonRepositoryResponse.
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
:param pulp_labels: The pulp_labels of this PythonPythonRepositoryResponse. # noqa: E501
|
|
234
|
-
:type: dict(str, str)
|
|
235
|
-
"""
|
|
236
|
-
|
|
237
|
-
self._pulp_labels = pulp_labels
|
|
238
|
-
|
|
239
|
-
@property
|
|
240
|
-
def latest_version_href(self):
|
|
241
|
-
"""Gets the latest_version_href of this PythonPythonRepositoryResponse. # noqa: E501
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
:return: The latest_version_href of this PythonPythonRepositoryResponse. # noqa: E501
|
|
245
|
-
:rtype: str
|
|
246
|
-
"""
|
|
247
|
-
return self._latest_version_href
|
|
248
|
-
|
|
249
|
-
@latest_version_href.setter
|
|
250
|
-
def latest_version_href(self, latest_version_href):
|
|
251
|
-
"""Sets the latest_version_href of this PythonPythonRepositoryResponse.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
:param latest_version_href: The latest_version_href of this PythonPythonRepositoryResponse. # noqa: E501
|
|
255
|
-
:type: str
|
|
256
|
-
"""
|
|
257
|
-
|
|
258
|
-
self._latest_version_href = latest_version_href
|
|
259
|
-
|
|
260
|
-
@property
|
|
261
|
-
def name(self):
|
|
262
|
-
"""Gets the name of this PythonPythonRepositoryResponse. # noqa: E501
|
|
263
|
-
|
|
264
|
-
A unique name for this repository. # noqa: E501
|
|
265
|
-
|
|
266
|
-
:return: The name of this PythonPythonRepositoryResponse. # noqa: E501
|
|
267
|
-
:rtype: str
|
|
268
|
-
"""
|
|
269
|
-
return self._name
|
|
270
|
-
|
|
271
|
-
@name.setter
|
|
272
|
-
def name(self, name):
|
|
273
|
-
"""Sets the name of this PythonPythonRepositoryResponse.
|
|
274
|
-
|
|
275
|
-
A unique name for this repository. # noqa: E501
|
|
276
|
-
|
|
277
|
-
:param name: The name of this PythonPythonRepositoryResponse. # noqa: E501
|
|
278
|
-
:type: str
|
|
279
|
-
"""
|
|
280
|
-
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
|
|
281
|
-
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
|
|
282
|
-
|
|
283
|
-
self._name = name
|
|
284
|
-
|
|
285
|
-
@property
|
|
286
|
-
def description(self):
|
|
287
|
-
"""Gets the description of this PythonPythonRepositoryResponse. # noqa: E501
|
|
288
|
-
|
|
289
|
-
An optional description. # noqa: E501
|
|
290
|
-
|
|
291
|
-
:return: The description of this PythonPythonRepositoryResponse. # noqa: E501
|
|
292
|
-
:rtype: str
|
|
293
|
-
"""
|
|
294
|
-
return self._description
|
|
295
|
-
|
|
296
|
-
@description.setter
|
|
297
|
-
def description(self, description):
|
|
298
|
-
"""Sets the description of this PythonPythonRepositoryResponse.
|
|
299
|
-
|
|
300
|
-
An optional description. # noqa: E501
|
|
301
|
-
|
|
302
|
-
:param description: The description of this PythonPythonRepositoryResponse. # noqa: E501
|
|
303
|
-
:type: str
|
|
304
|
-
"""
|
|
305
|
-
|
|
306
|
-
self._description = description
|
|
307
|
-
|
|
308
|
-
@property
|
|
309
|
-
def retain_repo_versions(self):
|
|
310
|
-
"""Gets the retain_repo_versions of this PythonPythonRepositoryResponse. # noqa: E501
|
|
311
|
-
|
|
312
|
-
Retain X versions of the repository. Default is null which retains all versions. # noqa: E501
|
|
313
|
-
|
|
314
|
-
:return: The retain_repo_versions of this PythonPythonRepositoryResponse. # noqa: E501
|
|
315
|
-
:rtype: int
|
|
316
|
-
"""
|
|
317
|
-
return self._retain_repo_versions
|
|
318
|
-
|
|
319
|
-
@retain_repo_versions.setter
|
|
320
|
-
def retain_repo_versions(self, retain_repo_versions):
|
|
321
|
-
"""Sets the retain_repo_versions of this PythonPythonRepositoryResponse.
|
|
322
|
-
|
|
323
|
-
Retain X versions of the repository. Default is null which retains all versions. # noqa: E501
|
|
324
|
-
|
|
325
|
-
:param retain_repo_versions: The retain_repo_versions of this PythonPythonRepositoryResponse. # noqa: E501
|
|
326
|
-
:type: int
|
|
327
|
-
"""
|
|
328
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
329
|
-
retain_repo_versions is not None and retain_repo_versions < 1): # noqa: E501
|
|
330
|
-
raise ValueError("Invalid value for `retain_repo_versions`, must be a value greater than or equal to `1`") # noqa: E501
|
|
331
|
-
|
|
332
|
-
self._retain_repo_versions = retain_repo_versions
|
|
333
|
-
|
|
334
|
-
@property
|
|
335
|
-
def remote(self):
|
|
336
|
-
"""Gets the remote of this PythonPythonRepositoryResponse. # noqa: E501
|
|
337
|
-
|
|
338
|
-
An optional remote to use by default when syncing. # noqa: E501
|
|
339
|
-
|
|
340
|
-
:return: The remote of this PythonPythonRepositoryResponse. # noqa: E501
|
|
341
|
-
:rtype: str
|
|
342
|
-
"""
|
|
343
|
-
return self._remote
|
|
344
|
-
|
|
345
|
-
@remote.setter
|
|
346
|
-
def remote(self, remote):
|
|
347
|
-
"""Sets the remote of this PythonPythonRepositoryResponse.
|
|
348
|
-
|
|
349
|
-
An optional remote to use by default when syncing. # noqa: E501
|
|
350
|
-
|
|
351
|
-
:param remote: The remote of this PythonPythonRepositoryResponse. # noqa: E501
|
|
352
|
-
:type: str
|
|
353
|
-
"""
|
|
354
|
-
|
|
355
|
-
self._remote = remote
|
|
356
|
-
|
|
357
|
-
@property
|
|
358
|
-
def autopublish(self):
|
|
359
|
-
"""Gets the autopublish of this PythonPythonRepositoryResponse. # noqa: E501
|
|
360
|
-
|
|
361
|
-
Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. # noqa: E501
|
|
362
|
-
|
|
363
|
-
:return: The autopublish of this PythonPythonRepositoryResponse. # noqa: E501
|
|
364
|
-
:rtype: bool
|
|
365
|
-
"""
|
|
366
|
-
return self._autopublish
|
|
367
|
-
|
|
368
|
-
@autopublish.setter
|
|
369
|
-
def autopublish(self, autopublish):
|
|
370
|
-
"""Sets the autopublish of this PythonPythonRepositoryResponse.
|
|
371
|
-
|
|
372
|
-
Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. # noqa: E501
|
|
373
|
-
|
|
374
|
-
:param autopublish: The autopublish of this PythonPythonRepositoryResponse. # noqa: E501
|
|
375
|
-
:type: bool
|
|
376
|
-
"""
|
|
377
|
-
|
|
378
|
-
self._autopublish = autopublish
|
|
379
|
-
|
|
380
|
-
def to_dict(self):
|
|
381
|
-
"""Returns the model properties as a dict"""
|
|
382
|
-
result = {}
|
|
383
|
-
|
|
384
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
385
|
-
value = getattr(self, attr)
|
|
386
|
-
if isinstance(value, list):
|
|
387
|
-
result[attr] = list(map(
|
|
388
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
389
|
-
value
|
|
390
|
-
))
|
|
391
|
-
elif hasattr(value, "to_dict"):
|
|
392
|
-
result[attr] = value.to_dict()
|
|
393
|
-
elif isinstance(value, dict):
|
|
394
|
-
result[attr] = dict(map(
|
|
395
|
-
lambda item: (item[0], item[1].to_dict())
|
|
396
|
-
if hasattr(item[1], "to_dict") else item,
|
|
397
|
-
value.items()
|
|
398
|
-
))
|
|
399
|
-
else:
|
|
400
|
-
result[attr] = value
|
|
401
|
-
|
|
402
|
-
return result
|
|
403
|
-
|
|
404
|
-
def to_str(self):
|
|
405
|
-
"""Returns the string representation of the model"""
|
|
406
|
-
return pprint.pformat(self.to_dict())
|
|
407
|
-
|
|
408
|
-
def __repr__(self):
|
|
409
|
-
"""For `print` and `pprint`"""
|
|
410
|
-
return self.to_str()
|
|
411
|
-
|
|
412
|
-
def __eq__(self, other):
|
|
413
|
-
"""Returns true if both objects are equal"""
|
|
414
|
-
if not isinstance(other, PythonPythonRepositoryResponse):
|
|
415
|
-
return False
|
|
416
|
-
|
|
417
|
-
return self.to_dict() == other.to_dict()
|
|
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
|
|
418
138
|
|
|
419
|
-
def __ne__(self, other):
|
|
420
|
-
"""Returns true if both objects are not equal"""
|
|
421
|
-
if not isinstance(other, PythonPythonRepositoryResponse):
|
|
422
|
-
return True
|
|
423
139
|
|
|
424
|
-
return self.to_dict() != other.to_dict()
|