pulp-python-client 3.12.5__py3-none-any.whl → 3.13.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 pulp-python-client might be problematic. Click here for more details.

Files changed (68) hide show
  1. pulp_python_client-3.13.1.dist-info/METADATA +17 -0
  2. pulp_python_client-3.13.1.dist-info/RECORD +64 -0
  3. {pulp_python_client-3.12.5.dist-info → pulp_python_client-3.13.1.dist-info}/WHEEL +1 -1
  4. pulpcore/client/pulp_python/__init__.py +9 -10
  5. pulpcore/client/pulp_python/api/__init__.py +1 -2
  6. pulpcore/client/pulp_python/api/content_packages_api.py +1800 -655
  7. pulpcore/client/pulp_python/api/distributions_pypi_api.py +3755 -1474
  8. pulpcore/client/pulp_python/api/publications_pypi_api.py +2574 -982
  9. pulpcore/client/pulp_python/api/pypi_api.py +302 -128
  10. pulpcore/client/pulp_python/api/pypi_legacy_api.py +326 -153
  11. pulpcore/client/pulp_python/api/pypi_metadata_api.py +319 -139
  12. pulpcore/client/pulp_python/api/pypi_simple_api.py +899 -382
  13. pulpcore/client/pulp_python/api/remotes_python_api.py +4092 -1589
  14. pulpcore/client/pulp_python/api/repositories_python_api.py +4380 -1719
  15. pulpcore/client/pulp_python/api/repositories_python_versions_api.py +1526 -561
  16. pulpcore/client/pulp_python/api_client.py +444 -313
  17. pulpcore/client/pulp_python/api_response.py +21 -0
  18. pulpcore/client/pulp_python/configuration.py +266 -73
  19. pulpcore/client/pulp_python/exceptions.py +99 -20
  20. pulpcore/client/pulp_python/models/__init__.py +5 -8
  21. pulpcore/client/pulp_python/models/async_operation_response.py +60 -96
  22. pulpcore/client/pulp_python/models/content_summary_response.py +70 -154
  23. pulpcore/client/pulp_python/models/exclude_platforms_enum.py +19 -82
  24. pulpcore/client/pulp_python/models/my_permissions_response.py +60 -94
  25. pulpcore/client/pulp_python/models/nested_role.py +71 -155
  26. pulpcore/client/pulp_python/models/nested_role_response.py +70 -152
  27. pulpcore/client/pulp_python/models/object_roles_response.py +70 -96
  28. pulpcore/client/pulp_python/models/package_metadata_response.py +91 -191
  29. pulpcore/client/pulp_python/models/package_types_enum.py +23 -86
  30. pulpcore/client/pulp_python/models/package_upload_task_response.py +85 -154
  31. pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +94 -181
  32. pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +94 -181
  33. pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +94 -181
  34. pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +94 -181
  35. pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +94 -181
  36. pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +94 -181
  37. pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +108 -330
  38. pulpcore/client/pulp_python/models/patchedpython_python_remote.py +204 -864
  39. pulpcore/client/pulp_python/models/patchedpython_python_repository.py +96 -249
  40. pulpcore/client/pulp_python/models/policy_enum.py +18 -81
  41. pulpcore/client/pulp_python/models/python_python_distribution.py +108 -332
  42. pulpcore/client/pulp_python/models/python_python_distribution_response.py +132 -490
  43. pulpcore/client/pulp_python/models/python_python_package_content_response.py +182 -972
  44. pulpcore/client/pulp_python/models/python_python_publication.py +68 -127
  45. pulpcore/client/pulp_python/models/python_python_publication_response.py +93 -269
  46. pulpcore/client/pulp_python/models/python_python_remote.py +204 -866
  47. pulpcore/client/pulp_python/models/python_python_remote_response.py +198 -839
  48. pulpcore/client/pulp_python/models/python_python_remote_response_hidden_fields_inner.py +90 -0
  49. pulpcore/client/pulp_python/models/python_python_repository.py +96 -250
  50. pulpcore/client/pulp_python/models/python_python_repository_response.py +122 -407
  51. pulpcore/client/pulp_python/models/repair.py +60 -95
  52. pulpcore/client/pulp_python/models/repository_add_remove_content.py +71 -157
  53. pulpcore/client/pulp_python/models/repository_sync_url.py +68 -129
  54. pulpcore/client/pulp_python/models/repository_version_response.py +104 -296
  55. pulpcore/client/pulp_python/models/set_label.py +80 -130
  56. pulpcore/client/pulp_python/models/set_label_response.py +80 -127
  57. pulpcore/client/pulp_python/models/summary_response.py +70 -160
  58. pulpcore/client/pulp_python/models/unset_label.py +75 -107
  59. pulpcore/client/pulp_python/models/unset_label_response.py +78 -129
  60. pulpcore/client/pulp_python/py.typed +0 -0
  61. pulpcore/client/pulp_python/rest.py +136 -170
  62. pulp_python_client-3.12.5.dist-info/METADATA +0 -17
  63. pulp_python_client-3.12.5.dist-info/RECORD +0 -65
  64. pulpcore/client/pulp_python/models/package_upload.py +0 -190
  65. pulpcore/client/pulp_python/models/python_bander_remote.py +0 -184
  66. pulpcore/client/pulp_python/models/python_python_package_content.py +0 -889
  67. pulpcore/client/pulp_python/models/python_python_remote_response_hidden_fields.py +0 -149
  68. {pulp_python_client-3.12.5.dist-info → pulp_python_client-3.13.1.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 # noqa: E501
6
+ Fetch, Upload, Organize, and Distribute Software Packages
7
7
 
8
8
  The version of the OpenAPI document: v3
9
9
  Contact: pulp-list@redhat.com
10
- Generated by: https://openapi-generator.tech
11
- """
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
12
14
 
13
15
 
16
+ from __future__ import annotations
14
17
  import pprint
15
18
  import re # noqa: F401
19
+ import json
16
20
 
17
- import six
18
-
19
- from pulpcore.client.pulp_python.configuration import Configuration
20
-
21
-
22
- class PythonPythonRepositoryResponse(object):
23
- """NOTE: This class is auto generated by OpenAPI Generator.
24
- Ref: https://openapi-generator.tech
25
-
26
- Do not edit the class manually.
27
- """
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
- Attributes:
31
- openapi_types (dict): The key is attribute name
32
- and the value is attribute type.
33
- attribute_map (dict): The key is attribute name
34
- and the value is json key in definition.
35
- """
36
- openapi_types = {
37
- 'pulp_href': 'str',
38
- 'prn': 'str',
39
- 'pulp_created': 'datetime',
40
- 'pulp_last_updated': 'datetime',
41
- 'versions_href': 'str',
42
- 'pulp_labels': 'dict(str, str)',
43
- 'latest_version_href': 'str',
44
- 'name': 'str',
45
- 'description': 'str',
46
- 'retain_repo_versions': 'int',
47
- 'remote': 'str',
48
- 'autopublish': 'bool'
49
- }
50
-
51
- attribute_map = {
52
- 'pulp_href': 'pulp_href',
53
- 'prn': 'prn',
54
- 'pulp_created': 'pulp_created',
55
- 'pulp_last_updated': 'pulp_last_updated',
56
- 'versions_href': 'versions_href',
57
- 'pulp_labels': 'pulp_labels',
58
- 'latest_version_href': 'latest_version_href',
59
- 'name': 'name',
60
- 'description': 'description',
61
- 'retain_repo_versions': 'retain_repo_versions',
62
- 'remote': 'remote',
63
- 'autopublish': 'autopublish'
64
- }
65
-
66
- def __init__(self, pulp_href=None, prn=None, pulp_created=None, pulp_last_updated=None, versions_href=None, pulp_labels=None, latest_version_href=None, name=None, description=None, retain_repo_versions=None, remote=None, autopublish=False, local_vars_configuration=None): # noqa: E501
67
- """PythonPythonRepositoryResponse - a model defined in OpenAPI""" # noqa: E501
68
- if local_vars_configuration is None:
69
- local_vars_configuration = Configuration()
70
- self.local_vars_configuration = local_vars_configuration
71
-
72
- self._pulp_href = None
73
- self._prn = None
74
- self._pulp_created = None
75
- self._pulp_last_updated = None
76
- self._versions_href = None
77
- self._pulp_labels = None
78
- self._latest_version_href = None
79
- self._name = None
80
- self._description = None
81
- self._retain_repo_versions = None
82
- self._remote = None
83
- self._autopublish = None
84
- self.discriminator = None
85
-
86
- if pulp_href is not None:
87
- self.pulp_href = pulp_href
88
- if prn is not None:
89
- self.prn = prn
90
- if pulp_created is not None:
91
- self.pulp_created = pulp_created
92
- if pulp_last_updated is not None:
93
- self.pulp_last_updated = pulp_last_updated
94
- if versions_href is not None:
95
- self.versions_href = versions_href
96
- if pulp_labels is not None:
97
- self.pulp_labels = pulp_labels
98
- if latest_version_href is not None:
99
- self.latest_version_href = latest_version_href
100
- self.name = name
101
- self.description = description
102
- self.retain_repo_versions = retain_repo_versions
103
- self.remote = remote
104
- if autopublish is not None:
105
- self.autopublish = autopublish
106
-
107
- @property
108
- def pulp_href(self):
109
- """Gets the pulp_href of this PythonPythonRepositoryResponse. # noqa: E501
110
-
111
-
112
- :return: The pulp_href of this PythonPythonRepositoryResponse. # noqa: E501
113
- :rtype: str
114
- """
115
- return self._pulp_href
116
-
117
- @pulp_href.setter
118
- def pulp_href(self, pulp_href):
119
- """Sets the pulp_href of this PythonPythonRepositoryResponse.
120
-
121
-
122
- :param pulp_href: The pulp_href of this PythonPythonRepositoryResponse. # noqa: E501
123
- :type: str
124
- """
125
-
126
- self._pulp_href = pulp_href
127
-
128
- @property
129
- def prn(self):
130
- """Gets the prn of this PythonPythonRepositoryResponse. # noqa: E501
131
-
132
- The Pulp Resource Name (PRN). # noqa: E501
133
-
134
- :return: The prn of this PythonPythonRepositoryResponse. # noqa: E501
135
- :rtype: str
136
- """
137
- return self._prn
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()