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
|
@@ -3,197 +3,110 @@
|
|
|
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 pulpcore.client.pulp_python.
|
|
20
|
-
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from pulpcore.client.pulp_python.models.python_python_distribution_response import PythonPythonDistributionResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
21
26
|
|
|
22
|
-
class PaginatedpythonPythonDistributionResponseList(
|
|
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 PaginatedpythonPythonDistributionResponseList(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
|
-
self.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
29
|
+
PaginatedpythonPythonDistributionResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[PythonPythonDistributionResponse]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["count", "next", "previous", "results"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of PaginatedpythonPythonDistributionResponseList from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
74
67
|
"""
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if self.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
""
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.results:
|
|
79
|
+
for _item_results in self.results:
|
|
80
|
+
if _item_results:
|
|
81
|
+
_items.append(_item_results.to_dict())
|
|
82
|
+
_dict['results'] = _items
|
|
83
|
+
# set to None if next (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.next is None and "next" in self.model_fields_set:
|
|
86
|
+
_dict['next'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if previous (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.previous is None and "previous" in self.model_fields_set:
|
|
91
|
+
_dict['previous'] = 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 PaginatedpythonPythonDistributionResponseList 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
|
+
"count": obj.get("count"),
|
|
106
|
+
"next": obj.get("next"),
|
|
107
|
+
"previous": obj.get("previous"),
|
|
108
|
+
"results": [PythonPythonDistributionResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
103
111
|
|
|
104
112
|
|
|
105
|
-
:param next: The next of this PaginatedpythonPythonDistributionResponseList. # noqa: E501
|
|
106
|
-
:type: str
|
|
107
|
-
"""
|
|
108
|
-
|
|
109
|
-
self._next = next
|
|
110
|
-
|
|
111
|
-
@property
|
|
112
|
-
def previous(self):
|
|
113
|
-
"""Gets the previous of this PaginatedpythonPythonDistributionResponseList. # noqa: E501
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
:return: The previous of this PaginatedpythonPythonDistributionResponseList. # noqa: E501
|
|
117
|
-
:rtype: str
|
|
118
|
-
"""
|
|
119
|
-
return self._previous
|
|
120
|
-
|
|
121
|
-
@previous.setter
|
|
122
|
-
def previous(self, previous):
|
|
123
|
-
"""Sets the previous of this PaginatedpythonPythonDistributionResponseList.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
:param previous: The previous of this PaginatedpythonPythonDistributionResponseList. # noqa: E501
|
|
127
|
-
:type: str
|
|
128
|
-
"""
|
|
129
|
-
|
|
130
|
-
self._previous = previous
|
|
131
|
-
|
|
132
|
-
@property
|
|
133
|
-
def results(self):
|
|
134
|
-
"""Gets the results of this PaginatedpythonPythonDistributionResponseList. # noqa: E501
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
:return: The results of this PaginatedpythonPythonDistributionResponseList. # noqa: E501
|
|
138
|
-
:rtype: list[PythonPythonDistributionResponse]
|
|
139
|
-
"""
|
|
140
|
-
return self._results
|
|
141
|
-
|
|
142
|
-
@results.setter
|
|
143
|
-
def results(self, results):
|
|
144
|
-
"""Sets the results of this PaginatedpythonPythonDistributionResponseList.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
:param results: The results of this PaginatedpythonPythonDistributionResponseList. # noqa: E501
|
|
148
|
-
:type: list[PythonPythonDistributionResponse]
|
|
149
|
-
"""
|
|
150
|
-
if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501
|
|
151
|
-
raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501
|
|
152
|
-
|
|
153
|
-
self._results = results
|
|
154
|
-
|
|
155
|
-
def to_dict(self):
|
|
156
|
-
"""Returns the model properties as a dict"""
|
|
157
|
-
result = {}
|
|
158
|
-
|
|
159
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
160
|
-
value = getattr(self, attr)
|
|
161
|
-
if isinstance(value, list):
|
|
162
|
-
result[attr] = list(map(
|
|
163
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
164
|
-
value
|
|
165
|
-
))
|
|
166
|
-
elif hasattr(value, "to_dict"):
|
|
167
|
-
result[attr] = value.to_dict()
|
|
168
|
-
elif isinstance(value, dict):
|
|
169
|
-
result[attr] = dict(map(
|
|
170
|
-
lambda item: (item[0], item[1].to_dict())
|
|
171
|
-
if hasattr(item[1], "to_dict") else item,
|
|
172
|
-
value.items()
|
|
173
|
-
))
|
|
174
|
-
else:
|
|
175
|
-
result[attr] = value
|
|
176
|
-
|
|
177
|
-
return result
|
|
178
|
-
|
|
179
|
-
def to_str(self):
|
|
180
|
-
"""Returns the string representation of the model"""
|
|
181
|
-
return pprint.pformat(self.to_dict())
|
|
182
|
-
|
|
183
|
-
def __repr__(self):
|
|
184
|
-
"""For `print` and `pprint`"""
|
|
185
|
-
return self.to_str()
|
|
186
|
-
|
|
187
|
-
def __eq__(self, other):
|
|
188
|
-
"""Returns true if both objects are equal"""
|
|
189
|
-
if not isinstance(other, PaginatedpythonPythonDistributionResponseList):
|
|
190
|
-
return False
|
|
191
|
-
|
|
192
|
-
return self.to_dict() == other.to_dict()
|
|
193
|
-
|
|
194
|
-
def __ne__(self, other):
|
|
195
|
-
"""Returns true if both objects are not equal"""
|
|
196
|
-
if not isinstance(other, PaginatedpythonPythonDistributionResponseList):
|
|
197
|
-
return True
|
|
198
|
-
|
|
199
|
-
return self.to_dict() != other.to_dict()
|
|
@@ -3,197 +3,110 @@
|
|
|
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 pulpcore.client.pulp_python.
|
|
20
|
-
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from pulpcore.client.pulp_python.models.python_python_package_content_response import PythonPythonPackageContentResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
21
26
|
|
|
22
|
-
class PaginatedpythonPythonPackageContentResponseList(
|
|
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 PaginatedpythonPythonPackageContentResponseList(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
|
-
self.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
29
|
+
PaginatedpythonPythonPackageContentResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[PythonPythonPackageContentResponse]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["count", "next", "previous", "results"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of PaginatedpythonPythonPackageContentResponseList from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
74
67
|
"""
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if self.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
""
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.results:
|
|
79
|
+
for _item_results in self.results:
|
|
80
|
+
if _item_results:
|
|
81
|
+
_items.append(_item_results.to_dict())
|
|
82
|
+
_dict['results'] = _items
|
|
83
|
+
# set to None if next (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.next is None and "next" in self.model_fields_set:
|
|
86
|
+
_dict['next'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if previous (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.previous is None and "previous" in self.model_fields_set:
|
|
91
|
+
_dict['previous'] = 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 PaginatedpythonPythonPackageContentResponseList 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
|
+
"count": obj.get("count"),
|
|
106
|
+
"next": obj.get("next"),
|
|
107
|
+
"previous": obj.get("previous"),
|
|
108
|
+
"results": [PythonPythonPackageContentResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
103
111
|
|
|
104
112
|
|
|
105
|
-
:param next: The next of this PaginatedpythonPythonPackageContentResponseList. # noqa: E501
|
|
106
|
-
:type: str
|
|
107
|
-
"""
|
|
108
|
-
|
|
109
|
-
self._next = next
|
|
110
|
-
|
|
111
|
-
@property
|
|
112
|
-
def previous(self):
|
|
113
|
-
"""Gets the previous of this PaginatedpythonPythonPackageContentResponseList. # noqa: E501
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
:return: The previous of this PaginatedpythonPythonPackageContentResponseList. # noqa: E501
|
|
117
|
-
:rtype: str
|
|
118
|
-
"""
|
|
119
|
-
return self._previous
|
|
120
|
-
|
|
121
|
-
@previous.setter
|
|
122
|
-
def previous(self, previous):
|
|
123
|
-
"""Sets the previous of this PaginatedpythonPythonPackageContentResponseList.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
:param previous: The previous of this PaginatedpythonPythonPackageContentResponseList. # noqa: E501
|
|
127
|
-
:type: str
|
|
128
|
-
"""
|
|
129
|
-
|
|
130
|
-
self._previous = previous
|
|
131
|
-
|
|
132
|
-
@property
|
|
133
|
-
def results(self):
|
|
134
|
-
"""Gets the results of this PaginatedpythonPythonPackageContentResponseList. # noqa: E501
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
:return: The results of this PaginatedpythonPythonPackageContentResponseList. # noqa: E501
|
|
138
|
-
:rtype: list[PythonPythonPackageContentResponse]
|
|
139
|
-
"""
|
|
140
|
-
return self._results
|
|
141
|
-
|
|
142
|
-
@results.setter
|
|
143
|
-
def results(self, results):
|
|
144
|
-
"""Sets the results of this PaginatedpythonPythonPackageContentResponseList.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
:param results: The results of this PaginatedpythonPythonPackageContentResponseList. # noqa: E501
|
|
148
|
-
:type: list[PythonPythonPackageContentResponse]
|
|
149
|
-
"""
|
|
150
|
-
if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501
|
|
151
|
-
raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501
|
|
152
|
-
|
|
153
|
-
self._results = results
|
|
154
|
-
|
|
155
|
-
def to_dict(self):
|
|
156
|
-
"""Returns the model properties as a dict"""
|
|
157
|
-
result = {}
|
|
158
|
-
|
|
159
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
160
|
-
value = getattr(self, attr)
|
|
161
|
-
if isinstance(value, list):
|
|
162
|
-
result[attr] = list(map(
|
|
163
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
164
|
-
value
|
|
165
|
-
))
|
|
166
|
-
elif hasattr(value, "to_dict"):
|
|
167
|
-
result[attr] = value.to_dict()
|
|
168
|
-
elif isinstance(value, dict):
|
|
169
|
-
result[attr] = dict(map(
|
|
170
|
-
lambda item: (item[0], item[1].to_dict())
|
|
171
|
-
if hasattr(item[1], "to_dict") else item,
|
|
172
|
-
value.items()
|
|
173
|
-
))
|
|
174
|
-
else:
|
|
175
|
-
result[attr] = value
|
|
176
|
-
|
|
177
|
-
return result
|
|
178
|
-
|
|
179
|
-
def to_str(self):
|
|
180
|
-
"""Returns the string representation of the model"""
|
|
181
|
-
return pprint.pformat(self.to_dict())
|
|
182
|
-
|
|
183
|
-
def __repr__(self):
|
|
184
|
-
"""For `print` and `pprint`"""
|
|
185
|
-
return self.to_str()
|
|
186
|
-
|
|
187
|
-
def __eq__(self, other):
|
|
188
|
-
"""Returns true if both objects are equal"""
|
|
189
|
-
if not isinstance(other, PaginatedpythonPythonPackageContentResponseList):
|
|
190
|
-
return False
|
|
191
|
-
|
|
192
|
-
return self.to_dict() == other.to_dict()
|
|
193
|
-
|
|
194
|
-
def __ne__(self, other):
|
|
195
|
-
"""Returns true if both objects are not equal"""
|
|
196
|
-
if not isinstance(other, PaginatedpythonPythonPackageContentResponseList):
|
|
197
|
-
return True
|
|
198
|
-
|
|
199
|
-
return self.to_dict() != other.to_dict()
|