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,16 +3,17 @@
|
|
|
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
|
-
"""
|
|
12
|
-
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
15
14
|
|
|
15
|
+
from typing import Any, Optional
|
|
16
|
+
from typing_extensions import Self
|
|
16
17
|
|
|
17
18
|
class OpenApiException(Exception):
|
|
18
19
|
"""The base exception class for all OpenAPIExceptions"""
|
|
@@ -20,7 +21,7 @@ class OpenApiException(Exception):
|
|
|
20
21
|
|
|
21
22
|
class ApiTypeError(OpenApiException, TypeError):
|
|
22
23
|
def __init__(self, msg, path_to_item=None, valid_classes=None,
|
|
23
|
-
key_type=None):
|
|
24
|
+
key_type=None) -> None:
|
|
24
25
|
""" Raises an exception for TypeErrors
|
|
25
26
|
|
|
26
27
|
Args:
|
|
@@ -48,7 +49,7 @@ class ApiTypeError(OpenApiException, TypeError):
|
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
class ApiValueError(OpenApiException, ValueError):
|
|
51
|
-
def __init__(self, msg, path_to_item=None):
|
|
52
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
52
53
|
"""
|
|
53
54
|
Args:
|
|
54
55
|
msg (str): the exception message
|
|
@@ -65,8 +66,27 @@ class ApiValueError(OpenApiException, ValueError):
|
|
|
65
66
|
super(ApiValueError, self).__init__(full_msg)
|
|
66
67
|
|
|
67
68
|
|
|
69
|
+
class ApiAttributeError(OpenApiException, AttributeError):
|
|
70
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
71
|
+
"""
|
|
72
|
+
Raised when an attribute reference or assignment fails.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
msg (str): the exception message
|
|
76
|
+
|
|
77
|
+
Keyword Args:
|
|
78
|
+
path_to_item (None/list) the path to the exception in the
|
|
79
|
+
received_data dict
|
|
80
|
+
"""
|
|
81
|
+
self.path_to_item = path_to_item
|
|
82
|
+
full_msg = msg
|
|
83
|
+
if path_to_item:
|
|
84
|
+
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
85
|
+
super(ApiAttributeError, self).__init__(full_msg)
|
|
86
|
+
|
|
87
|
+
|
|
68
88
|
class ApiKeyError(OpenApiException, KeyError):
|
|
69
|
-
def __init__(self, msg, path_to_item=None):
|
|
89
|
+
def __init__(self, msg, path_to_item=None) -> None:
|
|
70
90
|
"""
|
|
71
91
|
Args:
|
|
72
92
|
msg (str): the exception message
|
|
@@ -84,17 +104,56 @@ class ApiKeyError(OpenApiException, KeyError):
|
|
|
84
104
|
|
|
85
105
|
class ApiException(OpenApiException):
|
|
86
106
|
|
|
87
|
-
def __init__(
|
|
107
|
+
def __init__(
|
|
108
|
+
self,
|
|
109
|
+
status=None,
|
|
110
|
+
reason=None,
|
|
111
|
+
http_resp=None,
|
|
112
|
+
*,
|
|
113
|
+
body: Optional[str] = None,
|
|
114
|
+
data: Optional[Any] = None,
|
|
115
|
+
) -> None:
|
|
116
|
+
self.status = status
|
|
117
|
+
self.reason = reason
|
|
118
|
+
self.body = body
|
|
119
|
+
self.data = data
|
|
120
|
+
self.headers = None
|
|
121
|
+
|
|
88
122
|
if http_resp:
|
|
89
|
-
self.status
|
|
90
|
-
|
|
91
|
-
self.
|
|
123
|
+
if self.status is None:
|
|
124
|
+
self.status = http_resp.status
|
|
125
|
+
if self.reason is None:
|
|
126
|
+
self.reason = http_resp.reason
|
|
127
|
+
if self.body is None:
|
|
128
|
+
try:
|
|
129
|
+
self.body = http_resp.data.decode('utf-8')
|
|
130
|
+
except Exception:
|
|
131
|
+
pass
|
|
92
132
|
self.headers = http_resp.getheaders()
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
133
|
+
|
|
134
|
+
@classmethod
|
|
135
|
+
def from_response(
|
|
136
|
+
cls,
|
|
137
|
+
*,
|
|
138
|
+
http_resp,
|
|
139
|
+
body: Optional[str],
|
|
140
|
+
data: Optional[Any],
|
|
141
|
+
) -> Self:
|
|
142
|
+
if http_resp.status == 400:
|
|
143
|
+
raise BadRequestException(http_resp=http_resp, body=body, data=data)
|
|
144
|
+
|
|
145
|
+
if http_resp.status == 401:
|
|
146
|
+
raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
|
|
147
|
+
|
|
148
|
+
if http_resp.status == 403:
|
|
149
|
+
raise ForbiddenException(http_resp=http_resp, body=body, data=data)
|
|
150
|
+
|
|
151
|
+
if http_resp.status == 404:
|
|
152
|
+
raise NotFoundException(http_resp=http_resp, body=body, data=data)
|
|
153
|
+
|
|
154
|
+
if 500 <= http_resp.status <= 599:
|
|
155
|
+
raise ServiceException(http_resp=http_resp, body=body, data=data)
|
|
156
|
+
raise ApiException(http_resp=http_resp, body=body, data=data)
|
|
98
157
|
|
|
99
158
|
def __str__(self):
|
|
100
159
|
"""Custom error messages for exception"""
|
|
@@ -104,17 +163,37 @@ class ApiException(OpenApiException):
|
|
|
104
163
|
error_message += "HTTP response headers: {0}\n".format(
|
|
105
164
|
self.headers)
|
|
106
165
|
|
|
107
|
-
if self.body:
|
|
108
|
-
error_message += "HTTP response body: {0}\n".format(self.body)
|
|
166
|
+
if self.data or self.body:
|
|
167
|
+
error_message += "HTTP response body: {0}\n".format(self.data or self.body)
|
|
109
168
|
|
|
110
169
|
return error_message
|
|
111
170
|
|
|
112
171
|
|
|
172
|
+
class BadRequestException(ApiException):
|
|
173
|
+
pass
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
class NotFoundException(ApiException):
|
|
177
|
+
pass
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class UnauthorizedException(ApiException):
|
|
181
|
+
pass
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
class ForbiddenException(ApiException):
|
|
185
|
+
pass
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
class ServiceException(ApiException):
|
|
189
|
+
pass
|
|
190
|
+
|
|
191
|
+
|
|
113
192
|
def render_path(path_to_item):
|
|
114
193
|
"""Returns a string representation of a path"""
|
|
115
194
|
result = ""
|
|
116
195
|
for pth in path_to_item:
|
|
117
|
-
if isinstance(pth,
|
|
196
|
+
if isinstance(pth, int):
|
|
118
197
|
result += "[{0}]".format(pth)
|
|
119
198
|
else:
|
|
120
199
|
result += "['{0}']".format(pth)
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
"""
|
|
5
5
|
Pulp 3 API
|
|
6
6
|
|
|
7
|
-
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
|
+
Fetch, Upload, Organize, and Distribute Software Packages
|
|
8
8
|
|
|
9
9
|
The version of the OpenAPI document: v3
|
|
10
10
|
Contact: pulp-list@redhat.com
|
|
11
|
-
Generated by
|
|
12
|
-
"""
|
|
11
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
13
12
|
|
|
13
|
+
Do not edit the class manually.
|
|
14
|
+
""" # noqa: E501
|
|
14
15
|
|
|
15
|
-
from __future__ import absolute_import
|
|
16
16
|
|
|
17
17
|
# import models into model package
|
|
18
18
|
from pulpcore.client.pulp_python.models.async_operation_response import AsyncOperationResponse
|
|
@@ -24,7 +24,6 @@ from pulpcore.client.pulp_python.models.nested_role_response import NestedRoleRe
|
|
|
24
24
|
from pulpcore.client.pulp_python.models.object_roles_response import ObjectRolesResponse
|
|
25
25
|
from pulpcore.client.pulp_python.models.package_metadata_response import PackageMetadataResponse
|
|
26
26
|
from pulpcore.client.pulp_python.models.package_types_enum import PackageTypesEnum
|
|
27
|
-
from pulpcore.client.pulp_python.models.package_upload import PackageUpload
|
|
28
27
|
from pulpcore.client.pulp_python.models.package_upload_task_response import PackageUploadTaskResponse
|
|
29
28
|
from pulpcore.client.pulp_python.models.paginated_repository_version_response_list import PaginatedRepositoryVersionResponseList
|
|
30
29
|
from pulpcore.client.pulp_python.models.paginatedpython_python_distribution_response_list import PaginatedpythonPythonDistributionResponseList
|
|
@@ -36,16 +35,14 @@ from pulpcore.client.pulp_python.models.patchedpython_python_distribution import
|
|
|
36
35
|
from pulpcore.client.pulp_python.models.patchedpython_python_remote import PatchedpythonPythonRemote
|
|
37
36
|
from pulpcore.client.pulp_python.models.patchedpython_python_repository import PatchedpythonPythonRepository
|
|
38
37
|
from pulpcore.client.pulp_python.models.policy_enum import PolicyEnum
|
|
39
|
-
from pulpcore.client.pulp_python.models.python_bander_remote import PythonBanderRemote
|
|
40
38
|
from pulpcore.client.pulp_python.models.python_python_distribution import PythonPythonDistribution
|
|
41
39
|
from pulpcore.client.pulp_python.models.python_python_distribution_response import PythonPythonDistributionResponse
|
|
42
|
-
from pulpcore.client.pulp_python.models.python_python_package_content import PythonPythonPackageContent
|
|
43
40
|
from pulpcore.client.pulp_python.models.python_python_package_content_response import PythonPythonPackageContentResponse
|
|
44
41
|
from pulpcore.client.pulp_python.models.python_python_publication import PythonPythonPublication
|
|
45
42
|
from pulpcore.client.pulp_python.models.python_python_publication_response import PythonPythonPublicationResponse
|
|
46
43
|
from pulpcore.client.pulp_python.models.python_python_remote import PythonPythonRemote
|
|
47
44
|
from pulpcore.client.pulp_python.models.python_python_remote_response import PythonPythonRemoteResponse
|
|
48
|
-
from pulpcore.client.pulp_python.models.
|
|
45
|
+
from pulpcore.client.pulp_python.models.python_python_remote_response_hidden_fields_inner import PythonPythonRemoteResponseHiddenFieldsInner
|
|
49
46
|
from pulpcore.client.pulp_python.models.python_python_repository import PythonPythonRepository
|
|
50
47
|
from pulpcore.client.pulp_python.models.python_python_repository_response import PythonPythonRepositoryResponse
|
|
51
48
|
from pulpcore.client.pulp_python.models.repair import Repair
|
|
@@ -3,122 +3,86 @@
|
|
|
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
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
class AsyncOperationResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Serializer for asynchronous operations.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
task: StrictStr = Field(description="The href of the task.")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["task"]
|
|
20
32
|
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
21
38
|
|
|
22
|
-
class AsyncOperationResponse(object):
|
|
23
|
-
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
24
|
-
Ref: https://openapi-generator.tech
|
|
25
39
|
|
|
26
|
-
|
|
27
|
-
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
28
43
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
attribute_map (dict): The key is attribute name
|
|
34
|
-
and the value is json key in definition.
|
|
35
|
-
"""
|
|
36
|
-
openapi_types = {
|
|
37
|
-
'task': 'str'
|
|
38
|
-
}
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
39
48
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of AsyncOperationResponse from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
43
53
|
|
|
44
|
-
def
|
|
45
|
-
"""
|
|
46
|
-
if local_vars_configuration is None:
|
|
47
|
-
local_vars_configuration = Configuration()
|
|
48
|
-
self.local_vars_configuration = local_vars_configuration
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
49
56
|
|
|
50
|
-
|
|
51
|
-
self.
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
52
59
|
|
|
53
|
-
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
54
66
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
58
73
|
|
|
59
|
-
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of AsyncOperationResponse from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
60
79
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"""
|
|
64
|
-
return self._task
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
65
82
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"task": obj.get("task")
|
|
85
|
+
})
|
|
86
|
+
return _obj
|
|
69
87
|
|
|
70
|
-
The href of the task. # noqa: E501
|
|
71
88
|
|
|
72
|
-
:param task: The task of this AsyncOperationResponse. # noqa: E501
|
|
73
|
-
:type: str
|
|
74
|
-
"""
|
|
75
|
-
if self.local_vars_configuration.client_side_validation and task is None: # noqa: E501
|
|
76
|
-
raise ValueError("Invalid value for `task`, must not be `None`") # noqa: E501
|
|
77
|
-
|
|
78
|
-
self._task = task
|
|
79
|
-
|
|
80
|
-
def to_dict(self):
|
|
81
|
-
"""Returns the model properties as a dict"""
|
|
82
|
-
result = {}
|
|
83
|
-
|
|
84
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
85
|
-
value = getattr(self, attr)
|
|
86
|
-
if isinstance(value, list):
|
|
87
|
-
result[attr] = list(map(
|
|
88
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
89
|
-
value
|
|
90
|
-
))
|
|
91
|
-
elif hasattr(value, "to_dict"):
|
|
92
|
-
result[attr] = value.to_dict()
|
|
93
|
-
elif isinstance(value, dict):
|
|
94
|
-
result[attr] = dict(map(
|
|
95
|
-
lambda item: (item[0], item[1].to_dict())
|
|
96
|
-
if hasattr(item[1], "to_dict") else item,
|
|
97
|
-
value.items()
|
|
98
|
-
))
|
|
99
|
-
else:
|
|
100
|
-
result[attr] = value
|
|
101
|
-
|
|
102
|
-
return result
|
|
103
|
-
|
|
104
|
-
def to_str(self):
|
|
105
|
-
"""Returns the string representation of the model"""
|
|
106
|
-
return pprint.pformat(self.to_dict())
|
|
107
|
-
|
|
108
|
-
def __repr__(self):
|
|
109
|
-
"""For `print` and `pprint`"""
|
|
110
|
-
return self.to_str()
|
|
111
|
-
|
|
112
|
-
def __eq__(self, other):
|
|
113
|
-
"""Returns true if both objects are equal"""
|
|
114
|
-
if not isinstance(other, AsyncOperationResponse):
|
|
115
|
-
return False
|
|
116
|
-
|
|
117
|
-
return self.to_dict() == other.to_dict()
|
|
118
|
-
|
|
119
|
-
def __ne__(self, other):
|
|
120
|
-
"""Returns true if both objects are not equal"""
|
|
121
|
-
if not isinstance(other, AsyncOperationResponse):
|
|
122
|
-
return True
|
|
123
|
-
|
|
124
|
-
return self.to_dict() != other.to_dict()
|
|
@@ -3,174 +3,90 @@
|
|
|
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
|
|
21
|
+
from pydantic import BaseModel, ConfigDict
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
20
25
|
|
|
21
|
-
|
|
22
|
-
class ContentSummaryResponse(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.
|
|
26
|
+
class ContentSummaryResponse(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
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
|
-
self.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"""Gets the added of this ContentSummaryResponse. # noqa: E501
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
:return: The added of this ContentSummaryResponse. # noqa: E501
|
|
69
|
-
:rtype: dict(str, object)
|
|
70
|
-
"""
|
|
71
|
-
return self._added
|
|
72
|
-
|
|
73
|
-
@added.setter
|
|
74
|
-
def added(self, added):
|
|
75
|
-
"""Sets the added of this ContentSummaryResponse.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
:param added: The added of this ContentSummaryResponse. # noqa: E501
|
|
79
|
-
:type: dict(str, object)
|
|
28
|
+
Serializer for the RepositoryVersion content summary
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
added: Dict[str, Dict[str, Any]]
|
|
31
|
+
removed: Dict[str, Dict[str, Any]]
|
|
32
|
+
present: Dict[str, Dict[str, Any]]
|
|
33
|
+
__properties: ClassVar[List[str]] = ["added", "removed", "present"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of ContentSummaryResponse from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
80
65
|
"""
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
self._added = added
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
85
68
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
89
75
|
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of ContentSummaryResponse from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
90
81
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"""
|
|
94
|
-
return self._removed
|
|
95
|
-
|
|
96
|
-
@removed.setter
|
|
97
|
-
def removed(self, removed):
|
|
98
|
-
"""Sets the removed of this ContentSummaryResponse.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
:param removed: The removed of this ContentSummaryResponse. # noqa: E501
|
|
102
|
-
:type: dict(str, object)
|
|
103
|
-
"""
|
|
104
|
-
if self.local_vars_configuration.client_side_validation and removed is None: # noqa: E501
|
|
105
|
-
raise ValueError("Invalid value for `removed`, must not be `None`") # noqa: E501
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
106
84
|
|
|
107
|
-
|
|
85
|
+
_obj = cls.model_validate({
|
|
86
|
+
"added": obj.get("added"),
|
|
87
|
+
"removed": obj.get("removed"),
|
|
88
|
+
"present": obj.get("present")
|
|
89
|
+
})
|
|
90
|
+
return _obj
|
|
108
91
|
|
|
109
|
-
@property
|
|
110
|
-
def present(self):
|
|
111
|
-
"""Gets the present of this ContentSummaryResponse. # noqa: E501
|
|
112
92
|
|
|
113
|
-
|
|
114
|
-
:return: The present of this ContentSummaryResponse. # noqa: E501
|
|
115
|
-
:rtype: dict(str, object)
|
|
116
|
-
"""
|
|
117
|
-
return self._present
|
|
118
|
-
|
|
119
|
-
@present.setter
|
|
120
|
-
def present(self, present):
|
|
121
|
-
"""Sets the present of this ContentSummaryResponse.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
:param present: The present of this ContentSummaryResponse. # noqa: E501
|
|
125
|
-
:type: dict(str, object)
|
|
126
|
-
"""
|
|
127
|
-
if self.local_vars_configuration.client_side_validation and present is None: # noqa: E501
|
|
128
|
-
raise ValueError("Invalid value for `present`, must not be `None`") # noqa: E501
|
|
129
|
-
|
|
130
|
-
self._present = present
|
|
131
|
-
|
|
132
|
-
def to_dict(self):
|
|
133
|
-
"""Returns the model properties as a dict"""
|
|
134
|
-
result = {}
|
|
135
|
-
|
|
136
|
-
for attr, _ in six.iteritems(self.openapi_types):
|
|
137
|
-
value = getattr(self, attr)
|
|
138
|
-
if isinstance(value, list):
|
|
139
|
-
result[attr] = list(map(
|
|
140
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
141
|
-
value
|
|
142
|
-
))
|
|
143
|
-
elif hasattr(value, "to_dict"):
|
|
144
|
-
result[attr] = value.to_dict()
|
|
145
|
-
elif isinstance(value, dict):
|
|
146
|
-
result[attr] = dict(map(
|
|
147
|
-
lambda item: (item[0], item[1].to_dict())
|
|
148
|
-
if hasattr(item[1], "to_dict") else item,
|
|
149
|
-
value.items()
|
|
150
|
-
))
|
|
151
|
-
else:
|
|
152
|
-
result[attr] = value
|
|
153
|
-
|
|
154
|
-
return result
|
|
155
|
-
|
|
156
|
-
def to_str(self):
|
|
157
|
-
"""Returns the string representation of the model"""
|
|
158
|
-
return pprint.pformat(self.to_dict())
|
|
159
|
-
|
|
160
|
-
def __repr__(self):
|
|
161
|
-
"""For `print` and `pprint`"""
|
|
162
|
-
return self.to_str()
|
|
163
|
-
|
|
164
|
-
def __eq__(self, other):
|
|
165
|
-
"""Returns true if both objects are equal"""
|
|
166
|
-
if not isinstance(other, ContentSummaryResponse):
|
|
167
|
-
return False
|
|
168
|
-
|
|
169
|
-
return self.to_dict() == other.to_dict()
|
|
170
|
-
|
|
171
|
-
def __ne__(self, other):
|
|
172
|
-
"""Returns true if both objects are not equal"""
|
|
173
|
-
if not isinstance(other, ContentSummaryResponse):
|
|
174
|
-
return True
|
|
175
|
-
|
|
176
|
-
return self.to_dict() != other.to_dict()
|