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,92 @@
|
|
|
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, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class NestedRoleResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Serializer to add/remove object roles to/from users/groups. This is used in conjunction with ``pulpcore.app.viewsets.base.RolesMixin`` and requires the underlying object to be passed as ``content_object`` in the context.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
users: Optional[List[StrictStr]] = None
|
|
31
|
+
groups: Optional[List[StrictStr]] = None
|
|
32
|
+
role: StrictStr
|
|
33
|
+
__properties: ClassVar[List[str]] = ["users", "groups", "role"]
|
|
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 NestedRoleResponse 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.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of NestedRoleResponse from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate({
|
|
86
|
+
"users": obj.get("users"),
|
|
87
|
+
"groups": obj.get("groups"),
|
|
88
|
+
"role": obj.get("role")
|
|
89
|
+
})
|
|
90
|
+
return _obj
|
|
91
|
+
|
|
92
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from crc-pulp_python-client.models.nested_role_response import NestedRoleResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class ObjectRolesResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ObjectRolesResponse
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
roles: List[NestedRoleResponse]
|
|
32
|
+
__properties: ClassVar[List[str]] = ["roles"]
|
|
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 ObjectRolesResponse 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
|
+
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
|
|
74
|
+
_items = []
|
|
75
|
+
if self.roles:
|
|
76
|
+
for _item_roles in self.roles:
|
|
77
|
+
if _item_roles:
|
|
78
|
+
_items.append(_item_roles.to_dict())
|
|
79
|
+
_dict['roles'] = _items
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of ObjectRolesResponse from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"roles": [NestedRoleResponse.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|
|
@@ -0,0 +1,109 @@
|
|
|
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, StrictInt
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class PackageMetadataResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
A Serializer for a package's metadata.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
last_serial: StrictInt = Field(description="Cache value from last PyPI sync")
|
|
31
|
+
info: Optional[Any] = Field(description="Core metadata of the package")
|
|
32
|
+
releases: Optional[Any] = Field(description="List of all the releases of the package")
|
|
33
|
+
urls: Optional[Any]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["last_serial", "info", "releases", "urls"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of PackageMetadataResponse from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# set to None if info (nullable) is None
|
|
76
|
+
# and model_fields_set contains the field
|
|
77
|
+
if self.info is None and "info" in self.model_fields_set:
|
|
78
|
+
_dict['info'] = None
|
|
79
|
+
|
|
80
|
+
# set to None if releases (nullable) is None
|
|
81
|
+
# and model_fields_set contains the field
|
|
82
|
+
if self.releases is None and "releases" in self.model_fields_set:
|
|
83
|
+
_dict['releases'] = None
|
|
84
|
+
|
|
85
|
+
# set to None if urls (nullable) is None
|
|
86
|
+
# and model_fields_set contains the field
|
|
87
|
+
if self.urls is None and "urls" in self.model_fields_set:
|
|
88
|
+
_dict['urls'] = None
|
|
89
|
+
|
|
90
|
+
return _dict
|
|
91
|
+
|
|
92
|
+
@classmethod
|
|
93
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
94
|
+
"""Create an instance of PackageMetadataResponse from a dict"""
|
|
95
|
+
if obj is None:
|
|
96
|
+
return None
|
|
97
|
+
|
|
98
|
+
if not isinstance(obj, dict):
|
|
99
|
+
return cls.model_validate(obj)
|
|
100
|
+
|
|
101
|
+
_obj = cls.model_validate({
|
|
102
|
+
"last_serial": obj.get("last_serial"),
|
|
103
|
+
"info": obj.get("info"),
|
|
104
|
+
"releases": obj.get("releases"),
|
|
105
|
+
"urls": obj.get("urls")
|
|
106
|
+
})
|
|
107
|
+
return _obj
|
|
108
|
+
|
|
109
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
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 json
|
|
18
|
+
from enum import Enum
|
|
19
|
+
from typing_extensions import Self
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class PackageTypesEnum(str, Enum):
|
|
23
|
+
"""
|
|
24
|
+
* `bdist_dmg` - bdist_dmg * `bdist_dumb` - bdist_dumb * `bdist_egg` - bdist_egg * `bdist_msi` - bdist_msi * `bdist_rpm` - bdist_rpm * `bdist_wheel` - bdist_wheel * `bdist_wininst` - bdist_wininst * `sdist` - sdist
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
allowed enum values
|
|
29
|
+
"""
|
|
30
|
+
BDIST_DMG = 'bdist_dmg'
|
|
31
|
+
BDIST_DUMB = 'bdist_dumb'
|
|
32
|
+
BDIST_EGG = 'bdist_egg'
|
|
33
|
+
BDIST_MSI = 'bdist_msi'
|
|
34
|
+
BDIST_RPM = 'bdist_rpm'
|
|
35
|
+
BDIST_WHEEL = 'bdist_wheel'
|
|
36
|
+
BDIST_WININST = 'bdist_wininst'
|
|
37
|
+
SDIST = 'sdist'
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_json(cls, json_str: str) -> Self:
|
|
41
|
+
"""Create an instance of PackageTypesEnum from a JSON string"""
|
|
42
|
+
return cls(json.loads(json_str))
|
|
43
|
+
|
|
44
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
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 datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PackageUploadTaskResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
A Serializer for responding to a package upload task.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
session: Optional[StrictStr]
|
|
32
|
+
task: StrictStr
|
|
33
|
+
task_start_time: Optional[datetime]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["session", "task", "task_start_time"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of PackageUploadTaskResponse from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# set to None if session (nullable) is None
|
|
76
|
+
# and model_fields_set contains the field
|
|
77
|
+
if self.session is None and "session" in self.model_fields_set:
|
|
78
|
+
_dict['session'] = None
|
|
79
|
+
|
|
80
|
+
# set to None if task_start_time (nullable) is None
|
|
81
|
+
# and model_fields_set contains the field
|
|
82
|
+
if self.task_start_time is None and "task_start_time" in self.model_fields_set:
|
|
83
|
+
_dict['task_start_time'] = None
|
|
84
|
+
|
|
85
|
+
return _dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
+
"""Create an instance of PackageUploadTaskResponse from a dict"""
|
|
90
|
+
if obj is None:
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
if not isinstance(obj, dict):
|
|
94
|
+
return cls.model_validate(obj)
|
|
95
|
+
|
|
96
|
+
_obj = cls.model_validate({
|
|
97
|
+
"session": obj.get("session"),
|
|
98
|
+
"task": obj.get("task"),
|
|
99
|
+
"task_start_time": obj.get("task_start_time")
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|
|
@@ -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.repository_version_response import RepositoryVersionResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedRepositoryVersionResponseList(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedRepositoryVersionResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[RepositoryVersionResponse]
|
|
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 PaginatedRepositoryVersionResponseList 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 PaginatedRepositoryVersionResponseList 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": [RepositoryVersionResponse.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_distribution_response import PythonPythonDistributionResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedpythonPythonDistributionResponseList(BaseModel):
|
|
28
|
+
"""
|
|
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.
|
|
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 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
|
|
111
|
+
|
|
112
|
+
|