crc-pulp-python-client 20250819.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 crc-pulp-python-client might be problematic. Click here for more details.
- crc-pulp_python-client/__init__.py +2 -0
- crc-pulp_python-client/api/__init__.py +14 -0
- crc-pulp_python-client/api/api_pypi_api.py +370 -0
- crc-pulp_python-client/api/api_pypi_legacy_api.py +393 -0
- crc-pulp_python-client/api/api_pypi_simple_api.py +1045 -0
- crc-pulp_python-client/api/content_packages_api.py +2594 -0
- crc-pulp_python-client/api/distributions_pypi_api.py +4186 -0
- crc-pulp_python-client/api/publications_pypi_api.py +2881 -0
- crc-pulp_python-client/api/pypi_metadata_api.py +385 -0
- crc-pulp_python-client/api/remotes_python_api.py +4552 -0
- crc-pulp_python-client/api/repositories_python_api.py +4856 -0
- crc-pulp_python-client/api/repositories_python_versions_api.py +1670 -0
- crc-pulp_python-client/api_client.py +798 -0
- crc-pulp_python-client/api_response.py +21 -0
- crc-pulp_python-client/configuration.py +628 -0
- crc-pulp_python-client/exceptions.py +200 -0
- crc-pulp_python-client/models/__init__.py +56 -0
- crc-pulp_python-client/models/async_operation_response.py +88 -0
- crc-pulp_python-client/models/content_summary_response.py +92 -0
- crc-pulp_python-client/models/exclude_platforms_enum.py +40 -0
- crc-pulp_python-client/models/my_permissions_response.py +88 -0
- crc-pulp_python-client/models/nested_role.py +93 -0
- crc-pulp_python-client/models/nested_role_response.py +92 -0
- crc-pulp_python-client/models/object_roles_response.py +96 -0
- crc-pulp_python-client/models/package_metadata_response.py +109 -0
- crc-pulp_python-client/models/package_types_enum.py +44 -0
- crc-pulp_python-client/models/package_upload_task_response.py +103 -0
- crc-pulp_python-client/models/paginated_repository_version_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_distribution_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_package_content_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_publication_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_remote_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_repository_response_list.py +112 -0
- crc-pulp_python-client/models/patchedpython_python_distribution.py +125 -0
- crc-pulp_python-client/models/patchedpython_python_remote.py +219 -0
- crc-pulp_python-client/models/patchedpython_python_repository.py +114 -0
- crc-pulp_python-client/models/policy_enum.py +39 -0
- crc-pulp_python-client/models/python_python_distribution.py +125 -0
- crc-pulp_python-client/models/python_python_distribution_response.py +149 -0
- crc-pulp_python-client/models/python_python_package_content_response.py +201 -0
- crc-pulp_python-client/models/python_python_publication.py +90 -0
- crc-pulp_python-client/models/python_python_publication_response.py +111 -0
- crc-pulp_python-client/models/python_python_remote.py +219 -0
- crc-pulp_python-client/models/python_python_remote_response.py +213 -0
- crc-pulp_python-client/models/python_python_remote_response_hidden_fields_inner.py +90 -0
- crc-pulp_python-client/models/python_python_repository.py +114 -0
- crc-pulp_python-client/models/python_python_repository_response.py +139 -0
- crc-pulp_python-client/models/repair.py +88 -0
- crc-pulp_python-client/models/repository_add_remove_content.py +93 -0
- crc-pulp_python-client/models/repository_sync_url.py +90 -0
- crc-pulp_python-client/models/repository_version_response.py +121 -0
- crc-pulp_python-client/models/set_label.py +103 -0
- crc-pulp_python-client/models/set_label_response.py +103 -0
- crc-pulp_python-client/models/summary_response.py +92 -0
- crc-pulp_python-client/models/unset_label.py +96 -0
- crc-pulp_python-client/models/unset_label_response.py +100 -0
- crc-pulp_python-client/py.typed +0 -0
- crc-pulp_python-client/rest.py +258 -0
- crc_pulp_python_client-20250819.1.dist-info/METADATA +25 -0
- crc_pulp_python_client-20250819.1.dist-info/RECORD +120 -0
- crc_pulp_python_client-20250819.1.dist-info/WHEEL +5 -0
- crc_pulp_python_client-20250819.1.dist-info/top_level.txt +2 -0
- services-pulp_python-client/__init__.py +2 -0
- services-pulp_python-client/api/__init__.py +14 -0
- services-pulp_python-client/api/api_pypi_api.py +370 -0
- services-pulp_python-client/api/api_pypi_legacy_api.py +393 -0
- services-pulp_python-client/api/api_pypi_simple_api.py +1045 -0
- services-pulp_python-client/api/content_packages_api.py +2594 -0
- services-pulp_python-client/api/distributions_pypi_api.py +4186 -0
- services-pulp_python-client/api/publications_pypi_api.py +2881 -0
- services-pulp_python-client/api/pypi_metadata_api.py +385 -0
- services-pulp_python-client/api/remotes_python_api.py +4552 -0
- services-pulp_python-client/api/repositories_python_api.py +4856 -0
- services-pulp_python-client/api/repositories_python_versions_api.py +1670 -0
- services-pulp_python-client/api_client.py +798 -0
- services-pulp_python-client/api_response.py +21 -0
- services-pulp_python-client/configuration.py +628 -0
- services-pulp_python-client/exceptions.py +200 -0
- services-pulp_python-client/models/__init__.py +56 -0
- services-pulp_python-client/models/async_operation_response.py +88 -0
- services-pulp_python-client/models/content_summary_response.py +92 -0
- services-pulp_python-client/models/exclude_platforms_enum.py +40 -0
- services-pulp_python-client/models/my_permissions_response.py +88 -0
- services-pulp_python-client/models/nested_role.py +93 -0
- services-pulp_python-client/models/nested_role_response.py +92 -0
- services-pulp_python-client/models/object_roles_response.py +96 -0
- services-pulp_python-client/models/package_metadata_response.py +109 -0
- services-pulp_python-client/models/package_types_enum.py +44 -0
- services-pulp_python-client/models/package_upload_task_response.py +103 -0
- services-pulp_python-client/models/paginated_repository_version_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_distribution_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_package_content_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_publication_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_remote_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_repository_response_list.py +112 -0
- services-pulp_python-client/models/patchedpython_python_distribution.py +125 -0
- services-pulp_python-client/models/patchedpython_python_remote.py +219 -0
- services-pulp_python-client/models/patchedpython_python_repository.py +114 -0
- services-pulp_python-client/models/policy_enum.py +39 -0
- services-pulp_python-client/models/python_python_distribution.py +125 -0
- services-pulp_python-client/models/python_python_distribution_response.py +149 -0
- services-pulp_python-client/models/python_python_package_content_response.py +201 -0
- services-pulp_python-client/models/python_python_publication.py +90 -0
- services-pulp_python-client/models/python_python_publication_response.py +111 -0
- services-pulp_python-client/models/python_python_remote.py +219 -0
- services-pulp_python-client/models/python_python_remote_response.py +213 -0
- services-pulp_python-client/models/python_python_remote_response_hidden_fields_inner.py +90 -0
- services-pulp_python-client/models/python_python_repository.py +114 -0
- services-pulp_python-client/models/python_python_repository_response.py +139 -0
- services-pulp_python-client/models/repair.py +88 -0
- services-pulp_python-client/models/repository_add_remove_content.py +93 -0
- services-pulp_python-client/models/repository_sync_url.py +90 -0
- services-pulp_python-client/models/repository_version_response.py +121 -0
- services-pulp_python-client/models/set_label.py +103 -0
- services-pulp_python-client/models/set_label_response.py +103 -0
- services-pulp_python-client/models/summary_response.py +92 -0
- services-pulp_python-client/models/unset_label.py +96 -0
- services-pulp_python-client/models/unset_label_response.py +100 -0
- services-pulp_python-client/py.typed +0 -0
- services-pulp_python-client/rest.py +258 -0
|
@@ -0,0 +1,112 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from crc-pulp_python-client.models.python_python_package_content_response import PythonPythonPackageContentResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedpythonPythonPackageContentResponseList(BaseModel):
|
|
28
|
+
"""
|
|
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.
|
|
67
|
+
"""
|
|
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
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from crc-pulp_python-client.models.python_python_publication_response import PythonPythonPublicationResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedpythonPythonPublicationResponseList(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedpythonPythonPublicationResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[PythonPythonPublicationResponse]
|
|
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 PaginatedpythonPythonPublicationResponseList 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.
|
|
67
|
+
"""
|
|
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 PaginatedpythonPythonPublicationResponseList 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": [PythonPythonPublicationResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from crc-pulp_python-client.models.python_python_remote_response import PythonPythonRemoteResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedpythonPythonRemoteResponseList(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedpythonPythonRemoteResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[PythonPythonRemoteResponse]
|
|
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 PaginatedpythonPythonRemoteResponseList 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.
|
|
67
|
+
"""
|
|
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 PaginatedpythonPythonRemoteResponseList 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": [PythonPythonRemoteResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from crc-pulp_python-client.models.python_python_repository_response import PythonPythonRepositoryResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedpythonPythonRepositoryResponseList(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedpythonPythonRepositoryResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[PythonPythonRepositoryResponse]
|
|
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 PaginatedpythonPythonRepositoryResponseList 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.
|
|
67
|
+
"""
|
|
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 PaginatedpythonPythonRepositoryResponseList 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": [PythonPythonRepositoryResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,125 @@
|
|
|
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, 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
|
|
26
|
+
|
|
27
|
+
class PatchedpythonPythonDistribution(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Serializer for Pulp distributions for the Python type.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
base_path: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")")
|
|
32
|
+
content_guard: Optional[StrictStr] = Field(default=None, description="An optional content-guard.")
|
|
33
|
+
hidden: Optional[StrictBool] = Field(default=False, description="Whether this distribution should be shown in the content app.")
|
|
34
|
+
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
35
|
+
name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A unique name. Ex, `rawhide` and `stable`.")
|
|
36
|
+
repository: Optional[StrictStr] = Field(default=None, description="The latest RepositoryVersion for this Repository will be served.")
|
|
37
|
+
publication: Optional[StrictStr] = Field(default=None, description="Publication to be served")
|
|
38
|
+
allow_uploads: Optional[StrictBool] = Field(default=True, description="Allow packages to be uploaded to this index.")
|
|
39
|
+
remote: Optional[StrictStr] = Field(default=None, description="Remote that can be used to fetch content when using pull-through caching.")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["base_path", "content_guard", "hidden", "pulp_labels", "name", "repository", "publication", "allow_uploads", "remote"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of PatchedpythonPythonDistribution from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
# set to None if content_guard (nullable) is None
|
|
82
|
+
# and model_fields_set contains the field
|
|
83
|
+
if self.content_guard is None and "content_guard" in self.model_fields_set:
|
|
84
|
+
_dict['content_guard'] = None
|
|
85
|
+
|
|
86
|
+
# set to None if repository (nullable) is None
|
|
87
|
+
# and model_fields_set contains the field
|
|
88
|
+
if self.repository is None and "repository" in self.model_fields_set:
|
|
89
|
+
_dict['repository'] = None
|
|
90
|
+
|
|
91
|
+
# set to None if publication (nullable) is None
|
|
92
|
+
# and model_fields_set contains the field
|
|
93
|
+
if self.publication is None and "publication" in self.model_fields_set:
|
|
94
|
+
_dict['publication'] = None
|
|
95
|
+
|
|
96
|
+
# set to None if remote (nullable) is None
|
|
97
|
+
# and model_fields_set contains the field
|
|
98
|
+
if self.remote is None and "remote" in self.model_fields_set:
|
|
99
|
+
_dict['remote'] = None
|
|
100
|
+
|
|
101
|
+
return _dict
|
|
102
|
+
|
|
103
|
+
@classmethod
|
|
104
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
105
|
+
"""Create an instance of PatchedpythonPythonDistribution from a dict"""
|
|
106
|
+
if obj is None:
|
|
107
|
+
return None
|
|
108
|
+
|
|
109
|
+
if not isinstance(obj, dict):
|
|
110
|
+
return cls.model_validate(obj)
|
|
111
|
+
|
|
112
|
+
_obj = cls.model_validate({
|
|
113
|
+
"base_path": obj.get("base_path"),
|
|
114
|
+
"content_guard": obj.get("content_guard"),
|
|
115
|
+
"hidden": obj.get("hidden") if obj.get("hidden") is not None else False,
|
|
116
|
+
"pulp_labels": obj.get("pulp_labels"),
|
|
117
|
+
"name": obj.get("name"),
|
|
118
|
+
"repository": obj.get("repository"),
|
|
119
|
+
"publication": obj.get("publication"),
|
|
120
|
+
"allow_uploads": obj.get("allow_uploads") if obj.get("allow_uploads") is not None else True,
|
|
121
|
+
"remote": obj.get("remote")
|
|
122
|
+
})
|
|
123
|
+
return _obj
|
|
124
|
+
|
|
125
|
+
|