crc-pulpcore-client 20250819.1__py3-none-any.whl → 20250821.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-pulpcore-client might be problematic. Click here for more details.
- crc-pulpcore-client/api_client.py +1 -1
- crc-pulpcore-client/configuration.py +3 -3
- crc-pulpcore-client/models/artifact_distribution_response.py +13 -13
- {crc_pulpcore_client-20250819.1.dist-info → crc_pulpcore_client-20250821.1.dist-info}/METADATA +1 -1
- crc_pulpcore_client-20250821.1.dist-info/RECORD +234 -0
- crc_pulpcore_client-20250821.1.dist-info/top_level.txt +1 -0
- crc_pulpcore_client-20250819.1.dist-info/RECORD +0 -464
- crc_pulpcore_client-20250819.1.dist-info/top_level.txt +0 -2
- services-pulpcore-client/__init__.py +0 -2
- services-pulpcore-client/api/__init__.py +0 -53
- services-pulpcore-client/api/access_policies_api.py +0 -1864
- services-pulpcore-client/api/artifacts_api.py +0 -1615
- services-pulpcore-client/api/content_api.py +0 -598
- services-pulpcore-client/api/content_openpgp_publickey_api.py +0 -1887
- services-pulpcore-client/api/content_openpgp_publicsubkey_api.py +0 -1518
- services-pulpcore-client/api/content_openpgp_signature_api.py +0 -1518
- services-pulpcore-client/api/content_openpgp_userattribute_api.py +0 -1518
- services-pulpcore-client/api/content_openpgp_userid_api.py +0 -1655
- services-pulpcore-client/api/contentguards_api.py +0 -667
- services-pulpcore-client/api/contentguards_composite_api.py +0 -3401
- services-pulpcore-client/api/contentguards_content_redirect_api.py +0 -3401
- services-pulpcore-client/api/contentguards_header_api.py +0 -3401
- services-pulpcore-client/api/contentguards_rbac_api.py +0 -3401
- services-pulpcore-client/api/distributions_api.py +0 -822
- services-pulpcore-client/api/distributions_artifacts_api.py +0 -1103
- services-pulpcore-client/api/distributions_openpgp_api.py +0 -2676
- services-pulpcore-client/api/domains_api.py +0 -3106
- services-pulpcore-client/api/exporters_filesystem_api.py +0 -2157
- services-pulpcore-client/api/exporters_filesystem_exports_api.py +0 -1288
- services-pulpcore-client/api/exporters_pulp_api.py +0 -2157
- services-pulpcore-client/api/exporters_pulp_exports_api.py +0 -1288
- services-pulpcore-client/api/groups_api.py +0 -3368
- services-pulpcore-client/api/groups_roles_api.py +0 -1496
- services-pulpcore-client/api/groups_users_api.py +0 -972
- services-pulpcore-client/api/importers_pulp_api.py +0 -2149
- services-pulpcore-client/api/importers_pulp_import_check_api.py +0 -350
- services-pulpcore-client/api/importers_pulp_imports_api.py +0 -1288
- services-pulpcore-client/api/livez_api.py +0 -329
- services-pulpcore-client/api/login_api.py +0 -897
- services-pulpcore-client/api/orphans_api.py +0 -319
- services-pulpcore-client/api/orphans_cleanup_api.py +0 -350
- services-pulpcore-client/api/publications_api.py +0 -765
- services-pulpcore-client/api/remotes_api.py +0 -850
- services-pulpcore-client/api/repair_api.py +0 -350
- services-pulpcore-client/api/repositories_api.py +0 -872
- services-pulpcore-client/api/repositories_openpgp_keyring_api.py +0 -4546
- services-pulpcore-client/api/repositories_reclaim_space_api.py +0 -350
- services-pulpcore-client/api/repository_versions_api.py +0 -764
- services-pulpcore-client/api/roles_api.py +0 -2269
- services-pulpcore-client/api/signing_services_api.py +0 -811
- services-pulpcore-client/api/status_api.py +0 -337
- services-pulpcore-client/api/task_groups_api.py +0 -1012
- services-pulpcore-client/api/task_schedules_api.py +0 -2114
- services-pulpcore-client/api/tasks_api.py +0 -4299
- services-pulpcore-client/api/uploads_api.py +0 -3346
- services-pulpcore-client/api/upstream_pulps_api.py +0 -4001
- services-pulpcore-client/api/users_api.py +0 -2373
- services-pulpcore-client/api/users_roles_api.py +0 -1496
- services-pulpcore-client/api/workers_api.py +0 -1148
- services-pulpcore-client/api_client.py +0 -798
- services-pulpcore-client/api_response.py +0 -21
- services-pulpcore-client/configuration.py +0 -628
- services-pulpcore-client/exceptions.py +0 -200
- services-pulpcore-client/models/__init__.py +0 -189
- services-pulpcore-client/models/access_policy.py +0 -94
- services-pulpcore-client/models/access_policy_response.py +0 -119
- services-pulpcore-client/models/api_app_status_response.py +0 -99
- services-pulpcore-client/models/artifact_distribution_response.py +0 -126
- services-pulpcore-client/models/artifact_response.py +0 -149
- services-pulpcore-client/models/async_operation_response.py +0 -88
- services-pulpcore-client/models/composite_content_guard.py +0 -98
- services-pulpcore-client/models/composite_content_guard_response.py +0 -114
- services-pulpcore-client/models/content_app_status_response.py +0 -99
- services-pulpcore-client/models/content_guard_response.py +0 -112
- services-pulpcore-client/models/content_redirect_content_guard.py +0 -96
- services-pulpcore-client/models/content_redirect_content_guard_response.py +0 -112
- services-pulpcore-client/models/content_settings_response.py +0 -95
- services-pulpcore-client/models/content_summary_response.py +0 -92
- services-pulpcore-client/models/database_connection_response.py +0 -88
- services-pulpcore-client/models/distribution_response.py +0 -133
- services-pulpcore-client/models/domain.py +0 -114
- services-pulpcore-client/models/domain_backend_migrator.py +0 -91
- services-pulpcore-client/models/domain_response.py +0 -131
- services-pulpcore-client/models/evaluation_response.py +0 -92
- services-pulpcore-client/models/filesystem_export.py +0 -99
- services-pulpcore-client/models/filesystem_export_response.py +0 -118
- services-pulpcore-client/models/filesystem_exporter.py +0 -94
- services-pulpcore-client/models/filesystem_exporter_response.py +0 -110
- services-pulpcore-client/models/generic_remote_response.py +0 -199
- services-pulpcore-client/models/generic_remote_response_hidden_fields_inner.py +0 -90
- services-pulpcore-client/models/generic_remote_response_policy_enum.py +0 -39
- services-pulpcore-client/models/group.py +0 -89
- services-pulpcore-client/models/group_progress_report_response.py +0 -111
- services-pulpcore-client/models/group_response.py +0 -101
- services-pulpcore-client/models/group_role.py +0 -110
- services-pulpcore-client/models/group_role_response.py +0 -134
- services-pulpcore-client/models/group_user.py +0 -89
- services-pulpcore-client/models/group_user_response.py +0 -97
- services-pulpcore-client/models/header_content_guard.py +0 -107
- services-pulpcore-client/models/header_content_guard_response.py +0 -123
- services-pulpcore-client/models/import_response.py +0 -107
- services-pulpcore-client/models/login_response.py +0 -98
- services-pulpcore-client/models/method_enum.py +0 -39
- services-pulpcore-client/models/minimal_task_response.py +0 -125
- services-pulpcore-client/models/multiple_artifact_content_response.py +0 -107
- services-pulpcore-client/models/my_permissions_response.py +0 -88
- services-pulpcore-client/models/nested_open_pgp_public_subkey.py +0 -92
- services-pulpcore-client/models/nested_open_pgp_public_subkey_response.py +0 -104
- services-pulpcore-client/models/nested_open_pgp_signature.py +0 -120
- services-pulpcore-client/models/nested_open_pgp_signature_response.py +0 -124
- services-pulpcore-client/models/nested_open_pgp_user_attribute.py +0 -89
- services-pulpcore-client/models/nested_open_pgp_user_attribute_response.py +0 -101
- services-pulpcore-client/models/nested_open_pgp_user_id.py +0 -89
- services-pulpcore-client/models/nested_open_pgp_user_id_response.py +0 -100
- services-pulpcore-client/models/nested_role.py +0 -93
- services-pulpcore-client/models/nested_role_response.py +0 -92
- services-pulpcore-client/models/object_roles_response.py +0 -96
- services-pulpcore-client/models/open_pgp_distribution.py +0 -116
- services-pulpcore-client/models/open_pgp_distribution_response.py +0 -140
- services-pulpcore-client/models/open_pgp_keyring.py +0 -112
- services-pulpcore-client/models/open_pgp_keyring_response.py +0 -137
- services-pulpcore-client/models/open_pgp_public_key_response.py +0 -150
- services-pulpcore-client/models/open_pgp_public_subkey_response.py +0 -126
- services-pulpcore-client/models/open_pgp_signature_response.py +0 -146
- services-pulpcore-client/models/open_pgp_user_attribute_response.py +0 -124
- services-pulpcore-client/models/open_pgp_user_id_response.py +0 -123
- services-pulpcore-client/models/orphans_cleanup.py +0 -96
- services-pulpcore-client/models/paginated_access_policy_response_list.py +0 -112
- services-pulpcore-client/models/paginated_artifact_distribution_response_list.py +0 -112
- services-pulpcore-client/models/paginated_artifact_response_list.py +0 -112
- services-pulpcore-client/models/paginated_composite_content_guard_response_list.py +0 -112
- services-pulpcore-client/models/paginated_content_guard_response_list.py +0 -112
- services-pulpcore-client/models/paginated_content_redirect_content_guard_response_list.py +0 -112
- services-pulpcore-client/models/paginated_distribution_response_list.py +0 -112
- services-pulpcore-client/models/paginated_domain_response_list.py +0 -112
- services-pulpcore-client/models/paginated_filesystem_export_response_list.py +0 -112
- services-pulpcore-client/models/paginated_filesystem_exporter_response_list.py +0 -112
- services-pulpcore-client/models/paginated_generic_remote_response_list.py +0 -112
- services-pulpcore-client/models/paginated_group_response_list.py +0 -112
- services-pulpcore-client/models/paginated_group_role_response_list.py +0 -112
- services-pulpcore-client/models/paginated_group_user_response_list.py +0 -112
- services-pulpcore-client/models/paginated_header_content_guard_response_list.py +0 -112
- services-pulpcore-client/models/paginated_import_response_list.py +0 -112
- services-pulpcore-client/models/paginated_multiple_artifact_content_response_list.py +0 -112
- services-pulpcore-client/models/paginated_open_pgp_distribution_response_list.py +0 -112
- services-pulpcore-client/models/paginated_open_pgp_keyring_response_list.py +0 -112
- services-pulpcore-client/models/paginated_open_pgp_public_key_response_list.py +0 -112
- services-pulpcore-client/models/paginated_open_pgp_public_subkey_response_list.py +0 -112
- services-pulpcore-client/models/paginated_open_pgp_signature_response_list.py +0 -112
- services-pulpcore-client/models/paginated_open_pgp_user_attribute_response_list.py +0 -112
- services-pulpcore-client/models/paginated_open_pgp_user_id_response_list.py +0 -112
- services-pulpcore-client/models/paginated_publication_response_list.py +0 -112
- services-pulpcore-client/models/paginated_pulp_export_response_list.py +0 -112
- services-pulpcore-client/models/paginated_pulp_exporter_response_list.py +0 -112
- services-pulpcore-client/models/paginated_pulp_importer_response_list.py +0 -112
- services-pulpcore-client/models/paginated_rbac_content_guard_response_list.py +0 -112
- services-pulpcore-client/models/paginated_repository_response_list.py +0 -112
- services-pulpcore-client/models/paginated_repository_version_response_list.py +0 -112
- services-pulpcore-client/models/paginated_role_response_list.py +0 -112
- services-pulpcore-client/models/paginated_signing_service_response_list.py +0 -112
- services-pulpcore-client/models/paginated_task_group_response_list.py +0 -112
- services-pulpcore-client/models/paginated_task_response_list.py +0 -112
- services-pulpcore-client/models/paginated_task_schedule_response_list.py +0 -112
- services-pulpcore-client/models/paginated_upload_response_list.py +0 -112
- services-pulpcore-client/models/paginated_upstream_pulp_response_list.py +0 -112
- services-pulpcore-client/models/paginated_user_response_list.py +0 -112
- services-pulpcore-client/models/paginated_user_role_response_list.py +0 -112
- services-pulpcore-client/models/paginated_worker_response_list.py +0 -112
- services-pulpcore-client/models/patched_access_policy.py +0 -94
- services-pulpcore-client/models/patched_composite_content_guard.py +0 -98
- services-pulpcore-client/models/patched_content_redirect_content_guard.py +0 -96
- services-pulpcore-client/models/patched_domain.py +0 -117
- services-pulpcore-client/models/patched_filesystem_exporter.py +0 -94
- services-pulpcore-client/models/patched_group.py +0 -89
- services-pulpcore-client/models/patched_header_content_guard.py +0 -107
- services-pulpcore-client/models/patched_open_pgp_distribution.py +0 -116
- services-pulpcore-client/models/patched_open_pgp_keyring.py +0 -112
- services-pulpcore-client/models/patched_pulp_exporter.py +0 -100
- services-pulpcore-client/models/patched_pulp_importer.py +0 -91
- services-pulpcore-client/models/patched_rbac_content_guard.py +0 -96
- services-pulpcore-client/models/patched_role.py +0 -98
- services-pulpcore-client/models/patched_task_cancel.py +0 -89
- services-pulpcore-client/models/patched_upstream_pulp.py +0 -147
- services-pulpcore-client/models/patched_user.py +0 -106
- services-pulpcore-client/models/policy357_enum.py +0 -39
- services-pulpcore-client/models/profile_artifact_response.py +0 -88
- services-pulpcore-client/models/progress_report_response.py +0 -115
- services-pulpcore-client/models/publication_response.py +0 -107
- services-pulpcore-client/models/pulp_export.py +0 -104
- services-pulpcore-client/models/pulp_export_response.py +0 -126
- services-pulpcore-client/models/pulp_exporter.py +0 -100
- services-pulpcore-client/models/pulp_exporter_response.py +0 -116
- services-pulpcore-client/models/pulp_import.py +0 -93
- services-pulpcore-client/models/pulp_import_check.py +0 -93
- services-pulpcore-client/models/pulp_import_check_response.py +0 -102
- services-pulpcore-client/models/pulp_importer.py +0 -91
- services-pulpcore-client/models/pulp_importer_response.py +0 -107
- services-pulpcore-client/models/purge.py +0 -92
- services-pulpcore-client/models/rbac_content_guard.py +0 -96
- services-pulpcore-client/models/rbac_content_guard_response.py +0 -136
- services-pulpcore-client/models/reclaim_space.py +0 -90
- services-pulpcore-client/models/redis_connection_response.py +0 -88
- services-pulpcore-client/models/repair.py +0 -88
- services-pulpcore-client/models/repository_add_remove_content.py +0 -93
- services-pulpcore-client/models/repository_response.py +0 -137
- services-pulpcore-client/models/repository_version_response.py +0 -121
- services-pulpcore-client/models/role.py +0 -98
- services-pulpcore-client/models/role_response.py +0 -118
- services-pulpcore-client/models/set_label.py +0 -103
- services-pulpcore-client/models/set_label_response.py +0 -103
- services-pulpcore-client/models/signing_service_response.py +0 -111
- services-pulpcore-client/models/states_enum.py +0 -40
- services-pulpcore-client/models/status_response.py +0 -152
- services-pulpcore-client/models/storage_class_enum.py +0 -40
- services-pulpcore-client/models/storage_response.py +0 -108
- services-pulpcore-client/models/task_group_operation_response.py +0 -88
- services-pulpcore-client/models/task_group_response.py +0 -150
- services-pulpcore-client/models/task_response.py +0 -167
- services-pulpcore-client/models/task_schedule_response.py +0 -127
- services-pulpcore-client/models/unset_label.py +0 -96
- services-pulpcore-client/models/unset_label_response.py +0 -100
- services-pulpcore-client/models/upload.py +0 -88
- services-pulpcore-client/models/upload_chunk_response.py +0 -94
- services-pulpcore-client/models/upload_commit.py +0 -89
- services-pulpcore-client/models/upload_detail_response.py +0 -121
- services-pulpcore-client/models/upload_response.py +0 -109
- services-pulpcore-client/models/upstream_pulp.py +0 -147
- services-pulpcore-client/models/upstream_pulp_response.py +0 -158
- services-pulpcore-client/models/user.py +0 -106
- services-pulpcore-client/models/user_group.py +0 -89
- services-pulpcore-client/models/user_group_response.py +0 -97
- services-pulpcore-client/models/user_response.py +0 -140
- services-pulpcore-client/models/user_role.py +0 -110
- services-pulpcore-client/models/user_role_response.py +0 -134
- services-pulpcore-client/models/version_response.py +0 -96
- services-pulpcore-client/models/worker_response.py +0 -119
- services-pulpcore-client/py.typed +0 -0
- services-pulpcore-client/rest.py +0 -258
- {crc_pulpcore_client-20250819.1.dist-info → crc_pulpcore_client-20250821.1.dist-info}/WHEEL +0 -0
|
@@ -1,89 +0,0 @@
|
|
|
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
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
23
|
-
from typing_extensions import Annotated
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class UploadCommit(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
A mixin for validating unknown serializers' fields.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
sha256: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The expected sha256 checksum for the file.")
|
|
32
|
-
__properties: ClassVar[List[str]] = ["sha256"]
|
|
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 UploadCommit from a JSON string"""
|
|
53
|
-
return cls.from_dict(json.loads(json_str))
|
|
54
|
-
|
|
55
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
-
"""Return the dictionary representation of the model using alias.
|
|
57
|
-
|
|
58
|
-
This has the following differences from calling pydantic's
|
|
59
|
-
`self.model_dump(by_alias=True)`:
|
|
60
|
-
|
|
61
|
-
* `None` is only added to the output dict for nullable fields that
|
|
62
|
-
were set at model initialization. Other fields with value `None`
|
|
63
|
-
are ignored.
|
|
64
|
-
"""
|
|
65
|
-
excluded_fields: Set[str] = set([
|
|
66
|
-
])
|
|
67
|
-
|
|
68
|
-
_dict = self.model_dump(
|
|
69
|
-
by_alias=True,
|
|
70
|
-
exclude=excluded_fields,
|
|
71
|
-
exclude_none=True,
|
|
72
|
-
)
|
|
73
|
-
return _dict
|
|
74
|
-
|
|
75
|
-
@classmethod
|
|
76
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
-
"""Create an instance of UploadCommit from a dict"""
|
|
78
|
-
if obj is None:
|
|
79
|
-
return None
|
|
80
|
-
|
|
81
|
-
if not isinstance(obj, dict):
|
|
82
|
-
return cls.model_validate(obj)
|
|
83
|
-
|
|
84
|
-
_obj = cls.model_validate({
|
|
85
|
-
"sha256": obj.get("sha256")
|
|
86
|
-
})
|
|
87
|
-
return _obj
|
|
88
|
-
|
|
89
|
-
|
|
@@ -1,121 +0,0 @@
|
|
|
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, Field, StrictInt, StrictStr
|
|
23
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
-
from services-pulpcore-client.models.upload_chunk_response import UploadChunkResponse
|
|
25
|
-
from typing import Optional, Set
|
|
26
|
-
from typing_extensions import Self
|
|
27
|
-
|
|
28
|
-
class UploadDetailResponse(BaseModel):
|
|
29
|
-
"""
|
|
30
|
-
Serializer for chunked uploads.
|
|
31
|
-
""" # noqa: E501
|
|
32
|
-
pulp_href: Optional[StrictStr] = None
|
|
33
|
-
prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
|
|
34
|
-
pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
|
|
35
|
-
pulp_last_updated: Optional[datetime] = Field(default=None, description="Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.")
|
|
36
|
-
size: StrictInt = Field(description="The size of the upload in bytes.")
|
|
37
|
-
completed: Optional[datetime] = Field(default=None, description="Timestamp when upload is committed.")
|
|
38
|
-
chunks: Optional[List[UploadChunkResponse]] = None
|
|
39
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "size", "completed", "chunks"]
|
|
40
|
-
|
|
41
|
-
model_config = ConfigDict(
|
|
42
|
-
populate_by_name=True,
|
|
43
|
-
validate_assignment=True,
|
|
44
|
-
protected_namespaces=(),
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def to_str(self) -> str:
|
|
49
|
-
"""Returns the string representation of the model using alias"""
|
|
50
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
-
|
|
52
|
-
def to_json(self) -> str:
|
|
53
|
-
"""Returns the JSON representation of the model using alias"""
|
|
54
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
-
return json.dumps(self.to_dict())
|
|
56
|
-
|
|
57
|
-
@classmethod
|
|
58
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
-
"""Create an instance of UploadDetailResponse from a JSON string"""
|
|
60
|
-
return cls.from_dict(json.loads(json_str))
|
|
61
|
-
|
|
62
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
-
"""Return the dictionary representation of the model using alias.
|
|
64
|
-
|
|
65
|
-
This has the following differences from calling pydantic's
|
|
66
|
-
`self.model_dump(by_alias=True)`:
|
|
67
|
-
|
|
68
|
-
* `None` is only added to the output dict for nullable fields that
|
|
69
|
-
were set at model initialization. Other fields with value `None`
|
|
70
|
-
are ignored.
|
|
71
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
72
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
73
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
74
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
75
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
76
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
77
|
-
"""
|
|
78
|
-
excluded_fields: Set[str] = set([
|
|
79
|
-
"pulp_href",
|
|
80
|
-
"prn",
|
|
81
|
-
"pulp_created",
|
|
82
|
-
"pulp_last_updated",
|
|
83
|
-
"completed",
|
|
84
|
-
"chunks",
|
|
85
|
-
])
|
|
86
|
-
|
|
87
|
-
_dict = self.model_dump(
|
|
88
|
-
by_alias=True,
|
|
89
|
-
exclude=excluded_fields,
|
|
90
|
-
exclude_none=True,
|
|
91
|
-
)
|
|
92
|
-
# override the default output from pydantic by calling `to_dict()` of each item in chunks (list)
|
|
93
|
-
_items = []
|
|
94
|
-
if self.chunks:
|
|
95
|
-
for _item_chunks in self.chunks:
|
|
96
|
-
if _item_chunks:
|
|
97
|
-
_items.append(_item_chunks.to_dict())
|
|
98
|
-
_dict['chunks'] = _items
|
|
99
|
-
return _dict
|
|
100
|
-
|
|
101
|
-
@classmethod
|
|
102
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
103
|
-
"""Create an instance of UploadDetailResponse from a dict"""
|
|
104
|
-
if obj is None:
|
|
105
|
-
return None
|
|
106
|
-
|
|
107
|
-
if not isinstance(obj, dict):
|
|
108
|
-
return cls.model_validate(obj)
|
|
109
|
-
|
|
110
|
-
_obj = cls.model_validate({
|
|
111
|
-
"pulp_href": obj.get("pulp_href"),
|
|
112
|
-
"prn": obj.get("prn"),
|
|
113
|
-
"pulp_created": obj.get("pulp_created"),
|
|
114
|
-
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
115
|
-
"size": obj.get("size"),
|
|
116
|
-
"completed": obj.get("completed"),
|
|
117
|
-
"chunks": [UploadChunkResponse.from_dict(_item) for _item in obj["chunks"]] if obj.get("chunks") is not None else None
|
|
118
|
-
})
|
|
119
|
-
return _obj
|
|
120
|
-
|
|
121
|
-
|
|
@@ -1,109 +0,0 @@
|
|
|
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, Field, StrictInt, 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 UploadResponse(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
Serializer for chunked uploads.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
pulp_href: Optional[StrictStr] = None
|
|
32
|
-
prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
|
|
33
|
-
pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
|
|
34
|
-
pulp_last_updated: Optional[datetime] = Field(default=None, description="Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.")
|
|
35
|
-
size: StrictInt = Field(description="The size of the upload in bytes.")
|
|
36
|
-
completed: Optional[datetime] = Field(default=None, description="Timestamp when upload is committed.")
|
|
37
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "size", "completed"]
|
|
38
|
-
|
|
39
|
-
model_config = ConfigDict(
|
|
40
|
-
populate_by_name=True,
|
|
41
|
-
validate_assignment=True,
|
|
42
|
-
protected_namespaces=(),
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def to_str(self) -> str:
|
|
47
|
-
"""Returns the string representation of the model using alias"""
|
|
48
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
-
|
|
50
|
-
def to_json(self) -> str:
|
|
51
|
-
"""Returns the JSON representation of the model using alias"""
|
|
52
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
-
return json.dumps(self.to_dict())
|
|
54
|
-
|
|
55
|
-
@classmethod
|
|
56
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
-
"""Create an instance of UploadResponse from a JSON string"""
|
|
58
|
-
return cls.from_dict(json.loads(json_str))
|
|
59
|
-
|
|
60
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
-
"""Return the dictionary representation of the model using alias.
|
|
62
|
-
|
|
63
|
-
This has the following differences from calling pydantic's
|
|
64
|
-
`self.model_dump(by_alias=True)`:
|
|
65
|
-
|
|
66
|
-
* `None` is only added to the output dict for nullable fields that
|
|
67
|
-
were set at model initialization. Other fields with value `None`
|
|
68
|
-
are ignored.
|
|
69
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
70
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
71
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
72
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
73
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
74
|
-
"""
|
|
75
|
-
excluded_fields: Set[str] = set([
|
|
76
|
-
"pulp_href",
|
|
77
|
-
"prn",
|
|
78
|
-
"pulp_created",
|
|
79
|
-
"pulp_last_updated",
|
|
80
|
-
"completed",
|
|
81
|
-
])
|
|
82
|
-
|
|
83
|
-
_dict = self.model_dump(
|
|
84
|
-
by_alias=True,
|
|
85
|
-
exclude=excluded_fields,
|
|
86
|
-
exclude_none=True,
|
|
87
|
-
)
|
|
88
|
-
return _dict
|
|
89
|
-
|
|
90
|
-
@classmethod
|
|
91
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
-
"""Create an instance of UploadResponse from a dict"""
|
|
93
|
-
if obj is None:
|
|
94
|
-
return None
|
|
95
|
-
|
|
96
|
-
if not isinstance(obj, dict):
|
|
97
|
-
return cls.model_validate(obj)
|
|
98
|
-
|
|
99
|
-
_obj = cls.model_validate({
|
|
100
|
-
"pulp_href": obj.get("pulp_href"),
|
|
101
|
-
"prn": obj.get("prn"),
|
|
102
|
-
"pulp_created": obj.get("pulp_created"),
|
|
103
|
-
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
104
|
-
"size": obj.get("size"),
|
|
105
|
-
"completed": obj.get("completed")
|
|
106
|
-
})
|
|
107
|
-
return _obj
|
|
108
|
-
|
|
109
|
-
|
|
@@ -1,147 +0,0 @@
|
|
|
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 services-pulpcore-client.models.policy357_enum import Policy357Enum
|
|
25
|
-
from typing import Optional, Set
|
|
26
|
-
from typing_extensions import Self
|
|
27
|
-
|
|
28
|
-
class UpstreamPulp(BaseModel):
|
|
29
|
-
"""
|
|
30
|
-
Serializer for a Server.
|
|
31
|
-
""" # noqa: E501
|
|
32
|
-
name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A unique name for this Pulp server.")
|
|
33
|
-
base_url: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The transport, hostname, and an optional port of the Pulp server. e.g. https://example.com")
|
|
34
|
-
api_root: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The API root. Defaults to '/pulp/'.")
|
|
35
|
-
domain: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The domain of the Pulp server if enabled.")
|
|
36
|
-
ca_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded CA certificate used to validate the server certificate presented by the remote server.")
|
|
37
|
-
client_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
|
|
38
|
-
client_key: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded private key used for authentication.")
|
|
39
|
-
tls_validation: Optional[StrictBool] = Field(default=None, description="If True, TLS peer validation must be performed.")
|
|
40
|
-
username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to be used for authentication when syncing.")
|
|
41
|
-
password: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed.")
|
|
42
|
-
q_select: Optional[StrictStr] = Field(default=None, description="Filter distributions on the upstream Pulp using complex filtering. E.g. pulp_label_select=\"foo\" OR pulp_label_select=\"key=val\"")
|
|
43
|
-
policy: Optional[Policy357Enum] = Field(default=None, description="Policy for how replicate will manage the local objects within the domain. * `all` - Replicate manages ALL local objects within the domain. * `labeled` - Replicate will only manage the objects created from a previous replication, unlabled local objects will be untouched. * `nodelete` - Replicate will not delete any local object whether they were created by replication or not.")
|
|
44
|
-
__properties: ClassVar[List[str]] = ["name", "base_url", "api_root", "domain", "ca_cert", "client_cert", "client_key", "tls_validation", "username", "password", "q_select", "policy"]
|
|
45
|
-
|
|
46
|
-
model_config = ConfigDict(
|
|
47
|
-
populate_by_name=True,
|
|
48
|
-
validate_assignment=True,
|
|
49
|
-
protected_namespaces=(),
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
def to_str(self) -> str:
|
|
54
|
-
"""Returns the string representation of the model using alias"""
|
|
55
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
56
|
-
|
|
57
|
-
def to_json(self) -> str:
|
|
58
|
-
"""Returns the JSON representation of the model using alias"""
|
|
59
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
60
|
-
return json.dumps(self.to_dict())
|
|
61
|
-
|
|
62
|
-
@classmethod
|
|
63
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
64
|
-
"""Create an instance of UpstreamPulp from a JSON string"""
|
|
65
|
-
return cls.from_dict(json.loads(json_str))
|
|
66
|
-
|
|
67
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
68
|
-
"""Return the dictionary representation of the model using alias.
|
|
69
|
-
|
|
70
|
-
This has the following differences from calling pydantic's
|
|
71
|
-
`self.model_dump(by_alias=True)`:
|
|
72
|
-
|
|
73
|
-
* `None` is only added to the output dict for nullable fields that
|
|
74
|
-
were set at model initialization. Other fields with value `None`
|
|
75
|
-
are ignored.
|
|
76
|
-
"""
|
|
77
|
-
excluded_fields: Set[str] = set([
|
|
78
|
-
])
|
|
79
|
-
|
|
80
|
-
_dict = self.model_dump(
|
|
81
|
-
by_alias=True,
|
|
82
|
-
exclude=excluded_fields,
|
|
83
|
-
exclude_none=True,
|
|
84
|
-
)
|
|
85
|
-
# set to None if domain (nullable) is None
|
|
86
|
-
# and model_fields_set contains the field
|
|
87
|
-
if self.domain is None and "domain" in self.model_fields_set:
|
|
88
|
-
_dict['domain'] = None
|
|
89
|
-
|
|
90
|
-
# set to None if ca_cert (nullable) is None
|
|
91
|
-
# and model_fields_set contains the field
|
|
92
|
-
if self.ca_cert is None and "ca_cert" in self.model_fields_set:
|
|
93
|
-
_dict['ca_cert'] = None
|
|
94
|
-
|
|
95
|
-
# set to None if client_cert (nullable) is None
|
|
96
|
-
# and model_fields_set contains the field
|
|
97
|
-
if self.client_cert is None and "client_cert" in self.model_fields_set:
|
|
98
|
-
_dict['client_cert'] = None
|
|
99
|
-
|
|
100
|
-
# set to None if client_key (nullable) is None
|
|
101
|
-
# and model_fields_set contains the field
|
|
102
|
-
if self.client_key is None and "client_key" in self.model_fields_set:
|
|
103
|
-
_dict['client_key'] = None
|
|
104
|
-
|
|
105
|
-
# set to None if username (nullable) is None
|
|
106
|
-
# and model_fields_set contains the field
|
|
107
|
-
if self.username is None and "username" in self.model_fields_set:
|
|
108
|
-
_dict['username'] = None
|
|
109
|
-
|
|
110
|
-
# set to None if password (nullable) is None
|
|
111
|
-
# and model_fields_set contains the field
|
|
112
|
-
if self.password is None and "password" in self.model_fields_set:
|
|
113
|
-
_dict['password'] = None
|
|
114
|
-
|
|
115
|
-
# set to None if q_select (nullable) is None
|
|
116
|
-
# and model_fields_set contains the field
|
|
117
|
-
if self.q_select is None and "q_select" in self.model_fields_set:
|
|
118
|
-
_dict['q_select'] = None
|
|
119
|
-
|
|
120
|
-
return _dict
|
|
121
|
-
|
|
122
|
-
@classmethod
|
|
123
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
124
|
-
"""Create an instance of UpstreamPulp from a dict"""
|
|
125
|
-
if obj is None:
|
|
126
|
-
return None
|
|
127
|
-
|
|
128
|
-
if not isinstance(obj, dict):
|
|
129
|
-
return cls.model_validate(obj)
|
|
130
|
-
|
|
131
|
-
_obj = cls.model_validate({
|
|
132
|
-
"name": obj.get("name"),
|
|
133
|
-
"base_url": obj.get("base_url"),
|
|
134
|
-
"api_root": obj.get("api_root"),
|
|
135
|
-
"domain": obj.get("domain"),
|
|
136
|
-
"ca_cert": obj.get("ca_cert"),
|
|
137
|
-
"client_cert": obj.get("client_cert"),
|
|
138
|
-
"client_key": obj.get("client_key"),
|
|
139
|
-
"tls_validation": obj.get("tls_validation"),
|
|
140
|
-
"username": obj.get("username"),
|
|
141
|
-
"password": obj.get("password"),
|
|
142
|
-
"q_select": obj.get("q_select"),
|
|
143
|
-
"policy": obj.get("policy")
|
|
144
|
-
})
|
|
145
|
-
return _obj
|
|
146
|
-
|
|
147
|
-
|
|
@@ -1,158 +0,0 @@
|
|
|
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, Field, StrictBool, StrictStr
|
|
23
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
-
from services-pulpcore-client.models.generic_remote_response_hidden_fields_inner import GenericRemoteResponseHiddenFieldsInner
|
|
25
|
-
from services-pulpcore-client.models.policy357_enum import Policy357Enum
|
|
26
|
-
from typing import Optional, Set
|
|
27
|
-
from typing_extensions import Self
|
|
28
|
-
|
|
29
|
-
class UpstreamPulpResponse(BaseModel):
|
|
30
|
-
"""
|
|
31
|
-
Serializer for a Server.
|
|
32
|
-
""" # noqa: E501
|
|
33
|
-
pulp_href: Optional[StrictStr] = None
|
|
34
|
-
prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
|
|
35
|
-
pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
|
|
36
|
-
pulp_last_updated: Optional[datetime] = Field(default=None, description="Timestamp of the most recent update of the remote.")
|
|
37
|
-
name: StrictStr = Field(description="A unique name for this Pulp server.")
|
|
38
|
-
base_url: StrictStr = Field(description="The transport, hostname, and an optional port of the Pulp server. e.g. https://example.com")
|
|
39
|
-
api_root: StrictStr = Field(description="The API root. Defaults to '/pulp/'.")
|
|
40
|
-
domain: Optional[StrictStr] = Field(default=None, description="The domain of the Pulp server if enabled.")
|
|
41
|
-
ca_cert: Optional[StrictStr] = Field(default=None, description="A PEM encoded CA certificate used to validate the server certificate presented by the remote server.")
|
|
42
|
-
client_cert: Optional[StrictStr] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
|
|
43
|
-
tls_validation: Optional[StrictBool] = Field(default=None, description="If True, TLS peer validation must be performed.")
|
|
44
|
-
hidden_fields: Optional[List[GenericRemoteResponseHiddenFieldsInner]] = Field(default=None, description="List of hidden (write only) fields")
|
|
45
|
-
q_select: Optional[StrictStr] = Field(default=None, description="Filter distributions on the upstream Pulp using complex filtering. E.g. pulp_label_select=\"foo\" OR pulp_label_select=\"key=val\"")
|
|
46
|
-
last_replication: Optional[datetime] = Field(default=None, description="Timestamp of the last replication that occurred. Equals to 'null' if no replication task has been executed.")
|
|
47
|
-
policy: Optional[Policy357Enum] = Field(default=None, description="Policy for how replicate will manage the local objects within the domain. * `all` - Replicate manages ALL local objects within the domain. * `labeled` - Replicate will only manage the objects created from a previous replication, unlabled local objects will be untouched. * `nodelete` - Replicate will not delete any local object whether they were created by replication or not.")
|
|
48
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "name", "base_url", "api_root", "domain", "ca_cert", "client_cert", "tls_validation", "hidden_fields", "q_select", "last_replication", "policy"]
|
|
49
|
-
|
|
50
|
-
model_config = ConfigDict(
|
|
51
|
-
populate_by_name=True,
|
|
52
|
-
validate_assignment=True,
|
|
53
|
-
protected_namespaces=(),
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
def to_str(self) -> str:
|
|
58
|
-
"""Returns the string representation of the model using alias"""
|
|
59
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
60
|
-
|
|
61
|
-
def to_json(self) -> str:
|
|
62
|
-
"""Returns the JSON representation of the model using alias"""
|
|
63
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
64
|
-
return json.dumps(self.to_dict())
|
|
65
|
-
|
|
66
|
-
@classmethod
|
|
67
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
68
|
-
"""Create an instance of UpstreamPulpResponse from a JSON string"""
|
|
69
|
-
return cls.from_dict(json.loads(json_str))
|
|
70
|
-
|
|
71
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
72
|
-
"""Return the dictionary representation of the model using alias.
|
|
73
|
-
|
|
74
|
-
This has the following differences from calling pydantic's
|
|
75
|
-
`self.model_dump(by_alias=True)`:
|
|
76
|
-
|
|
77
|
-
* `None` is only added to the output dict for nullable fields that
|
|
78
|
-
were set at model initialization. Other fields with value `None`
|
|
79
|
-
are ignored.
|
|
80
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
81
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
82
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
83
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
84
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
85
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
86
|
-
"""
|
|
87
|
-
excluded_fields: Set[str] = set([
|
|
88
|
-
"pulp_href",
|
|
89
|
-
"prn",
|
|
90
|
-
"pulp_created",
|
|
91
|
-
"pulp_last_updated",
|
|
92
|
-
"hidden_fields",
|
|
93
|
-
"last_replication",
|
|
94
|
-
])
|
|
95
|
-
|
|
96
|
-
_dict = self.model_dump(
|
|
97
|
-
by_alias=True,
|
|
98
|
-
exclude=excluded_fields,
|
|
99
|
-
exclude_none=True,
|
|
100
|
-
)
|
|
101
|
-
# override the default output from pydantic by calling `to_dict()` of each item in hidden_fields (list)
|
|
102
|
-
_items = []
|
|
103
|
-
if self.hidden_fields:
|
|
104
|
-
for _item_hidden_fields in self.hidden_fields:
|
|
105
|
-
if _item_hidden_fields:
|
|
106
|
-
_items.append(_item_hidden_fields.to_dict())
|
|
107
|
-
_dict['hidden_fields'] = _items
|
|
108
|
-
# set to None if domain (nullable) is None
|
|
109
|
-
# and model_fields_set contains the field
|
|
110
|
-
if self.domain is None and "domain" in self.model_fields_set:
|
|
111
|
-
_dict['domain'] = None
|
|
112
|
-
|
|
113
|
-
# set to None if ca_cert (nullable) is None
|
|
114
|
-
# and model_fields_set contains the field
|
|
115
|
-
if self.ca_cert is None and "ca_cert" in self.model_fields_set:
|
|
116
|
-
_dict['ca_cert'] = None
|
|
117
|
-
|
|
118
|
-
# set to None if client_cert (nullable) is None
|
|
119
|
-
# and model_fields_set contains the field
|
|
120
|
-
if self.client_cert is None and "client_cert" in self.model_fields_set:
|
|
121
|
-
_dict['client_cert'] = None
|
|
122
|
-
|
|
123
|
-
# set to None if q_select (nullable) is None
|
|
124
|
-
# and model_fields_set contains the field
|
|
125
|
-
if self.q_select is None and "q_select" in self.model_fields_set:
|
|
126
|
-
_dict['q_select'] = None
|
|
127
|
-
|
|
128
|
-
return _dict
|
|
129
|
-
|
|
130
|
-
@classmethod
|
|
131
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
132
|
-
"""Create an instance of UpstreamPulpResponse from a dict"""
|
|
133
|
-
if obj is None:
|
|
134
|
-
return None
|
|
135
|
-
|
|
136
|
-
if not isinstance(obj, dict):
|
|
137
|
-
return cls.model_validate(obj)
|
|
138
|
-
|
|
139
|
-
_obj = cls.model_validate({
|
|
140
|
-
"pulp_href": obj.get("pulp_href"),
|
|
141
|
-
"prn": obj.get("prn"),
|
|
142
|
-
"pulp_created": obj.get("pulp_created"),
|
|
143
|
-
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
144
|
-
"name": obj.get("name"),
|
|
145
|
-
"base_url": obj.get("base_url"),
|
|
146
|
-
"api_root": obj.get("api_root"),
|
|
147
|
-
"domain": obj.get("domain"),
|
|
148
|
-
"ca_cert": obj.get("ca_cert"),
|
|
149
|
-
"client_cert": obj.get("client_cert"),
|
|
150
|
-
"tls_validation": obj.get("tls_validation"),
|
|
151
|
-
"hidden_fields": [GenericRemoteResponseHiddenFieldsInner.from_dict(_item) for _item in obj["hidden_fields"]] if obj.get("hidden_fields") is not None else None,
|
|
152
|
-
"q_select": obj.get("q_select"),
|
|
153
|
-
"last_replication": obj.get("last_replication"),
|
|
154
|
-
"policy": obj.get("policy")
|
|
155
|
-
})
|
|
156
|
-
return _obj
|
|
157
|
-
|
|
158
|
-
|