pulp-python-client 3.12.4__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.4.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.4.dist-info/METADATA +0 -17
- pulp_python_client-3.12.4.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.4.dist-info → pulp_python_client-3.13.0.dist-info}/top_level.txt +0 -0
|
@@ -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
|
+
|
|
@@ -3,266 +3,112 @@
|
|
|
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
|
+
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
|
|
21
26
|
|
|
22
|
-
class PythonPythonRepository(
|
|
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
|
-
"""
|
|
28
|
-
|
|
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.
|
|
27
|
+
class PythonPythonRepository(BaseModel):
|
|
35
28
|
"""
|
|
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
|
-
self.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
self.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
@property
|
|
78
|
-
def pulp_labels(self):
|
|
79
|
-
"""Gets the pulp_labels of this PythonPythonRepository. # noqa: E501
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
:return: The pulp_labels of this PythonPythonRepository. # noqa: E501
|
|
83
|
-
:rtype: dict(str, str)
|
|
84
|
-
"""
|
|
85
|
-
return self._pulp_labels
|
|
86
|
-
|
|
87
|
-
@pulp_labels.setter
|
|
88
|
-
def pulp_labels(self, pulp_labels):
|
|
89
|
-
"""Sets the pulp_labels of this PythonPythonRepository.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
:param pulp_labels: The pulp_labels of this PythonPythonRepository. # noqa: E501
|
|
93
|
-
:type: dict(str, str)
|
|
94
|
-
"""
|
|
95
|
-
|
|
96
|
-
self._pulp_labels = pulp_labels
|
|
97
|
-
|
|
98
|
-
@property
|
|
99
|
-
def name(self):
|
|
100
|
-
"""Gets the name of this PythonPythonRepository. # noqa: E501
|
|
101
|
-
|
|
102
|
-
A unique name for this repository. # noqa: E501
|
|
103
|
-
|
|
104
|
-
:return: The name of this PythonPythonRepository. # noqa: E501
|
|
105
|
-
:rtype: str
|
|
106
|
-
"""
|
|
107
|
-
return self._name
|
|
108
|
-
|
|
109
|
-
@name.setter
|
|
110
|
-
def name(self, name):
|
|
111
|
-
"""Sets the name of this PythonPythonRepository.
|
|
112
|
-
|
|
113
|
-
A unique name for this repository. # noqa: E501
|
|
114
|
-
|
|
115
|
-
:param name: The name of this PythonPythonRepository. # noqa: E501
|
|
116
|
-
:type: str
|
|
117
|
-
"""
|
|
118
|
-
if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
|
|
119
|
-
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
|
|
120
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
121
|
-
name is not None and len(name) < 1):
|
|
122
|
-
raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501
|
|
123
|
-
|
|
124
|
-
self._name = name
|
|
125
|
-
|
|
126
|
-
@property
|
|
127
|
-
def description(self):
|
|
128
|
-
"""Gets the description of this PythonPythonRepository. # noqa: E501
|
|
129
|
-
|
|
130
|
-
An optional description. # noqa: E501
|
|
131
|
-
|
|
132
|
-
:return: The description of this PythonPythonRepository. # noqa: E501
|
|
133
|
-
:rtype: str
|
|
134
|
-
"""
|
|
135
|
-
return self._description
|
|
136
|
-
|
|
137
|
-
@description.setter
|
|
138
|
-
def description(self, description):
|
|
139
|
-
"""Sets the description of this PythonPythonRepository.
|
|
140
|
-
|
|
141
|
-
An optional description. # noqa: E501
|
|
142
|
-
|
|
143
|
-
:param description: The description of this PythonPythonRepository. # noqa: E501
|
|
144
|
-
:type: str
|
|
145
|
-
"""
|
|
146
|
-
if (self.local_vars_configuration.client_side_validation and
|
|
147
|
-
description is not None and len(description) < 1):
|
|
148
|
-
raise ValueError("Invalid value for `description`, length must be greater than or equal to `1`") # noqa: E501
|
|
149
|
-
|
|
150
|
-
self._description = description
|
|
151
|
-
|
|
152
|
-
@property
|
|
153
|
-
def retain_repo_versions(self):
|
|
154
|
-
"""Gets the retain_repo_versions of this PythonPythonRepository. # noqa: E501
|
|
155
|
-
|
|
156
|
-
Retain X versions of the repository. Default is null which retains all versions. # noqa: E501
|
|
157
|
-
|
|
158
|
-
:return: The retain_repo_versions of this PythonPythonRepository. # noqa: E501
|
|
159
|
-
:rtype: int
|
|
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.
|
|
160
69
|
"""
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
""
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
self.
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. # noqa: E501
|
|
206
|
-
|
|
207
|
-
:return: The autopublish of this PythonPythonRepository. # noqa: E501
|
|
208
|
-
:rtype: bool
|
|
209
|
-
"""
|
|
210
|
-
return self._autopublish
|
|
211
|
-
|
|
212
|
-
@autopublish.setter
|
|
213
|
-
def autopublish(self, autopublish):
|
|
214
|
-
"""Sets the autopublish of this PythonPythonRepository.
|
|
215
|
-
|
|
216
|
-
Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. # noqa: E501
|
|
217
|
-
|
|
218
|
-
:param autopublish: The autopublish of this PythonPythonRepository. # noqa: E501
|
|
219
|
-
:type: bool
|
|
220
|
-
"""
|
|
221
|
-
|
|
222
|
-
self._autopublish = autopublish
|
|
223
|
-
|
|
224
|
-
def to_dict(self):
|
|
225
|
-
"""Returns the model properties as a dict"""
|
|
226
|
-
result = {}
|
|
227
|
-
|
|
228
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
229
|
-
value = getattr(self, attr)
|
|
230
|
-
if isinstance(value, list):
|
|
231
|
-
result[attr] = list(map(
|
|
232
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
233
|
-
value
|
|
234
|
-
))
|
|
235
|
-
elif hasattr(value, "to_dict"):
|
|
236
|
-
result[attr] = value.to_dict()
|
|
237
|
-
elif isinstance(value, dict):
|
|
238
|
-
result[attr] = dict(map(
|
|
239
|
-
lambda item: (item[0], item[1].to_dict())
|
|
240
|
-
if hasattr(item[1], "to_dict") else item,
|
|
241
|
-
value.items()
|
|
242
|
-
))
|
|
243
|
-
else:
|
|
244
|
-
result[attr] = value
|
|
245
|
-
|
|
246
|
-
return result
|
|
247
|
-
|
|
248
|
-
def to_str(self):
|
|
249
|
-
"""Returns the string representation of the model"""
|
|
250
|
-
return pprint.pformat(self.to_dict())
|
|
251
|
-
|
|
252
|
-
def __repr__(self):
|
|
253
|
-
"""For `print` and `pprint`"""
|
|
254
|
-
return self.to_str()
|
|
255
|
-
|
|
256
|
-
def __eq__(self, other):
|
|
257
|
-
"""Returns true if both objects are equal"""
|
|
258
|
-
if not isinstance(other, PythonPythonRepository):
|
|
259
|
-
return False
|
|
260
|
-
|
|
261
|
-
return self.to_dict() == other.to_dict()
|
|
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
|
|
262
113
|
|
|
263
|
-
def __ne__(self, other):
|
|
264
|
-
"""Returns true if both objects are not equal"""
|
|
265
|
-
if not isinstance(other, PythonPythonRepository):
|
|
266
|
-
return True
|
|
267
114
|
|
|
268
|
-
return self.to_dict() != other.to_dict()
|