crc-pulpcore-client 20250819.1__py3-none-any.whl → 20250820.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 +17 -17
- {crc_pulpcore_client-20250819.1.dist-info → crc_pulpcore_client-20250820.1.dist-info}/METADATA +1 -1
- crc_pulpcore_client-20250820.1.dist-info/RECORD +234 -0
- crc_pulpcore_client-20250820.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-20250820.1.dist-info}/WHEEL +0 -0
|
@@ -1,150 +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, StrictStr
|
|
23
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
-
from typing_extensions import Annotated
|
|
25
|
-
from services-pulpcore-client.models.nested_open_pgp_public_subkey_response import NestedOpenPGPPublicSubkeyResponse
|
|
26
|
-
from services-pulpcore-client.models.nested_open_pgp_user_attribute_response import NestedOpenPGPUserAttributeResponse
|
|
27
|
-
from services-pulpcore-client.models.nested_open_pgp_user_id_response import NestedOpenPGPUserIDResponse
|
|
28
|
-
from typing import Optional, Set
|
|
29
|
-
from typing_extensions import Self
|
|
30
|
-
|
|
31
|
-
class OpenPGPPublicKeyResponse(BaseModel):
|
|
32
|
-
"""
|
|
33
|
-
A serializer for content types with no Artifact.
|
|
34
|
-
""" # noqa: E501
|
|
35
|
-
pulp_href: Optional[StrictStr] = None
|
|
36
|
-
prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
|
|
37
|
-
pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
|
|
38
|
-
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.")
|
|
39
|
-
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")
|
|
40
|
-
fingerprint: Optional[Annotated[str, Field(strict=True, max_length=64)]] = None
|
|
41
|
-
created: Optional[datetime] = None
|
|
42
|
-
user_ids: Optional[List[NestedOpenPGPUserIDResponse]] = None
|
|
43
|
-
user_attributes: Optional[List[NestedOpenPGPUserAttributeResponse]] = None
|
|
44
|
-
public_subkeys: Optional[List[NestedOpenPGPPublicSubkeyResponse]] = None
|
|
45
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "pulp_labels", "fingerprint", "created", "user_ids", "user_attributes", "public_subkeys"]
|
|
46
|
-
|
|
47
|
-
model_config = ConfigDict(
|
|
48
|
-
populate_by_name=True,
|
|
49
|
-
validate_assignment=True,
|
|
50
|
-
protected_namespaces=(),
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def to_str(self) -> str:
|
|
55
|
-
"""Returns the string representation of the model using alias"""
|
|
56
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
57
|
-
|
|
58
|
-
def to_json(self) -> str:
|
|
59
|
-
"""Returns the JSON representation of the model using alias"""
|
|
60
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
61
|
-
return json.dumps(self.to_dict())
|
|
62
|
-
|
|
63
|
-
@classmethod
|
|
64
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
65
|
-
"""Create an instance of OpenPGPPublicKeyResponse from a JSON string"""
|
|
66
|
-
return cls.from_dict(json.loads(json_str))
|
|
67
|
-
|
|
68
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
69
|
-
"""Return the dictionary representation of the model using alias.
|
|
70
|
-
|
|
71
|
-
This has the following differences from calling pydantic's
|
|
72
|
-
`self.model_dump(by_alias=True)`:
|
|
73
|
-
|
|
74
|
-
* `None` is only added to the output dict for nullable fields that
|
|
75
|
-
were set at model initialization. Other fields with value `None`
|
|
76
|
-
are ignored.
|
|
77
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
78
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
79
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
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
|
-
"fingerprint",
|
|
93
|
-
"created",
|
|
94
|
-
"user_ids",
|
|
95
|
-
"user_attributes",
|
|
96
|
-
"public_subkeys",
|
|
97
|
-
])
|
|
98
|
-
|
|
99
|
-
_dict = self.model_dump(
|
|
100
|
-
by_alias=True,
|
|
101
|
-
exclude=excluded_fields,
|
|
102
|
-
exclude_none=True,
|
|
103
|
-
)
|
|
104
|
-
# override the default output from pydantic by calling `to_dict()` of each item in user_ids (list)
|
|
105
|
-
_items = []
|
|
106
|
-
if self.user_ids:
|
|
107
|
-
for _item_user_ids in self.user_ids:
|
|
108
|
-
if _item_user_ids:
|
|
109
|
-
_items.append(_item_user_ids.to_dict())
|
|
110
|
-
_dict['user_ids'] = _items
|
|
111
|
-
# override the default output from pydantic by calling `to_dict()` of each item in user_attributes (list)
|
|
112
|
-
_items = []
|
|
113
|
-
if self.user_attributes:
|
|
114
|
-
for _item_user_attributes in self.user_attributes:
|
|
115
|
-
if _item_user_attributes:
|
|
116
|
-
_items.append(_item_user_attributes.to_dict())
|
|
117
|
-
_dict['user_attributes'] = _items
|
|
118
|
-
# override the default output from pydantic by calling `to_dict()` of each item in public_subkeys (list)
|
|
119
|
-
_items = []
|
|
120
|
-
if self.public_subkeys:
|
|
121
|
-
for _item_public_subkeys in self.public_subkeys:
|
|
122
|
-
if _item_public_subkeys:
|
|
123
|
-
_items.append(_item_public_subkeys.to_dict())
|
|
124
|
-
_dict['public_subkeys'] = _items
|
|
125
|
-
return _dict
|
|
126
|
-
|
|
127
|
-
@classmethod
|
|
128
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
129
|
-
"""Create an instance of OpenPGPPublicKeyResponse from a dict"""
|
|
130
|
-
if obj is None:
|
|
131
|
-
return None
|
|
132
|
-
|
|
133
|
-
if not isinstance(obj, dict):
|
|
134
|
-
return cls.model_validate(obj)
|
|
135
|
-
|
|
136
|
-
_obj = cls.model_validate({
|
|
137
|
-
"pulp_href": obj.get("pulp_href"),
|
|
138
|
-
"prn": obj.get("prn"),
|
|
139
|
-
"pulp_created": obj.get("pulp_created"),
|
|
140
|
-
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
141
|
-
"pulp_labels": obj.get("pulp_labels"),
|
|
142
|
-
"fingerprint": obj.get("fingerprint"),
|
|
143
|
-
"created": obj.get("created"),
|
|
144
|
-
"user_ids": [NestedOpenPGPUserIDResponse.from_dict(_item) for _item in obj["user_ids"]] if obj.get("user_ids") is not None else None,
|
|
145
|
-
"user_attributes": [NestedOpenPGPUserAttributeResponse.from_dict(_item) for _item in obj["user_attributes"]] if obj.get("user_attributes") is not None else None,
|
|
146
|
-
"public_subkeys": [NestedOpenPGPPublicSubkeyResponse.from_dict(_item) for _item in obj["public_subkeys"]] if obj.get("public_subkeys") is not None else None
|
|
147
|
-
})
|
|
148
|
-
return _obj
|
|
149
|
-
|
|
150
|
-
|
|
@@ -1,126 +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, StrictStr
|
|
23
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
-
from typing_extensions import Annotated
|
|
25
|
-
from services-pulpcore-client.models.nested_open_pgp_signature_response import NestedOpenPGPSignatureResponse
|
|
26
|
-
from typing import Optional, Set
|
|
27
|
-
from typing_extensions import Self
|
|
28
|
-
|
|
29
|
-
class OpenPGPPublicSubkeyResponse(BaseModel):
|
|
30
|
-
"""
|
|
31
|
-
Base serializer for use with [pulpcore.app.models.Model][] This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
|
|
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 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.")
|
|
37
|
-
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")
|
|
38
|
-
fingerprint: Annotated[str, Field(strict=True, max_length=64)]
|
|
39
|
-
created: datetime
|
|
40
|
-
signatures: Optional[List[NestedOpenPGPSignatureResponse]] = None
|
|
41
|
-
public_key: Optional[StrictStr] = None
|
|
42
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "pulp_labels", "fingerprint", "created", "signatures", "public_key"]
|
|
43
|
-
|
|
44
|
-
model_config = ConfigDict(
|
|
45
|
-
populate_by_name=True,
|
|
46
|
-
validate_assignment=True,
|
|
47
|
-
protected_namespaces=(),
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
def to_str(self) -> str:
|
|
52
|
-
"""Returns the string representation of the model using alias"""
|
|
53
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
54
|
-
|
|
55
|
-
def to_json(self) -> str:
|
|
56
|
-
"""Returns the JSON representation of the model using alias"""
|
|
57
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
58
|
-
return json.dumps(self.to_dict())
|
|
59
|
-
|
|
60
|
-
@classmethod
|
|
61
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
62
|
-
"""Create an instance of OpenPGPPublicSubkeyResponse from a JSON string"""
|
|
63
|
-
return cls.from_dict(json.loads(json_str))
|
|
64
|
-
|
|
65
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
-
"""Return the dictionary representation of the model using alias.
|
|
67
|
-
|
|
68
|
-
This has the following differences from calling pydantic's
|
|
69
|
-
`self.model_dump(by_alias=True)`:
|
|
70
|
-
|
|
71
|
-
* `None` is only added to the output dict for nullable fields that
|
|
72
|
-
were set at model initialization. Other fields with value `None`
|
|
73
|
-
are ignored.
|
|
74
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
75
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
76
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
77
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
78
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
79
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
80
|
-
"""
|
|
81
|
-
excluded_fields: Set[str] = set([
|
|
82
|
-
"pulp_href",
|
|
83
|
-
"prn",
|
|
84
|
-
"pulp_created",
|
|
85
|
-
"pulp_last_updated",
|
|
86
|
-
"signatures",
|
|
87
|
-
"public_key",
|
|
88
|
-
])
|
|
89
|
-
|
|
90
|
-
_dict = self.model_dump(
|
|
91
|
-
by_alias=True,
|
|
92
|
-
exclude=excluded_fields,
|
|
93
|
-
exclude_none=True,
|
|
94
|
-
)
|
|
95
|
-
# override the default output from pydantic by calling `to_dict()` of each item in signatures (list)
|
|
96
|
-
_items = []
|
|
97
|
-
if self.signatures:
|
|
98
|
-
for _item_signatures in self.signatures:
|
|
99
|
-
if _item_signatures:
|
|
100
|
-
_items.append(_item_signatures.to_dict())
|
|
101
|
-
_dict['signatures'] = _items
|
|
102
|
-
return _dict
|
|
103
|
-
|
|
104
|
-
@classmethod
|
|
105
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
106
|
-
"""Create an instance of OpenPGPPublicSubkeyResponse from a dict"""
|
|
107
|
-
if obj is None:
|
|
108
|
-
return None
|
|
109
|
-
|
|
110
|
-
if not isinstance(obj, dict):
|
|
111
|
-
return cls.model_validate(obj)
|
|
112
|
-
|
|
113
|
-
_obj = cls.model_validate({
|
|
114
|
-
"pulp_href": obj.get("pulp_href"),
|
|
115
|
-
"prn": obj.get("prn"),
|
|
116
|
-
"pulp_created": obj.get("pulp_created"),
|
|
117
|
-
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
118
|
-
"pulp_labels": obj.get("pulp_labels"),
|
|
119
|
-
"fingerprint": obj.get("fingerprint"),
|
|
120
|
-
"created": obj.get("created"),
|
|
121
|
-
"signatures": [NestedOpenPGPSignatureResponse.from_dict(_item) for _item in obj["signatures"]] if obj.get("signatures") is not None else None,
|
|
122
|
-
"public_key": obj.get("public_key")
|
|
123
|
-
})
|
|
124
|
-
return _obj
|
|
125
|
-
|
|
126
|
-
|
|
@@ -1,146 +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 typing_extensions import Annotated
|
|
25
|
-
from typing import Optional, Set
|
|
26
|
-
from typing_extensions import Self
|
|
27
|
-
|
|
28
|
-
class OpenPGPSignatureResponse(BaseModel):
|
|
29
|
-
"""
|
|
30
|
-
Base serializer for use with [pulpcore.app.models.Model][] This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
|
|
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
|
-
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")
|
|
37
|
-
issuer: Optional[Annotated[str, Field(strict=True, max_length=16)]] = None
|
|
38
|
-
created: datetime
|
|
39
|
-
expiration_time: Optional[StrictStr] = None
|
|
40
|
-
signers_user_id: Optional[StrictStr] = None
|
|
41
|
-
key_expiration_time: Optional[StrictStr] = None
|
|
42
|
-
expired: StrictBool
|
|
43
|
-
key_expired: Optional[StrictStr] = None
|
|
44
|
-
signed_content: Optional[StrictStr] = None
|
|
45
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "pulp_labels", "issuer", "created", "expiration_time", "signers_user_id", "key_expiration_time", "expired", "key_expired", "signed_content"]
|
|
46
|
-
|
|
47
|
-
model_config = ConfigDict(
|
|
48
|
-
populate_by_name=True,
|
|
49
|
-
validate_assignment=True,
|
|
50
|
-
protected_namespaces=(),
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def to_str(self) -> str:
|
|
55
|
-
"""Returns the string representation of the model using alias"""
|
|
56
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
57
|
-
|
|
58
|
-
def to_json(self) -> str:
|
|
59
|
-
"""Returns the JSON representation of the model using alias"""
|
|
60
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
61
|
-
return json.dumps(self.to_dict())
|
|
62
|
-
|
|
63
|
-
@classmethod
|
|
64
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
65
|
-
"""Create an instance of OpenPGPSignatureResponse from a JSON string"""
|
|
66
|
-
return cls.from_dict(json.loads(json_str))
|
|
67
|
-
|
|
68
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
69
|
-
"""Return the dictionary representation of the model using alias.
|
|
70
|
-
|
|
71
|
-
This has the following differences from calling pydantic's
|
|
72
|
-
`self.model_dump(by_alias=True)`:
|
|
73
|
-
|
|
74
|
-
* `None` is only added to the output dict for nullable fields that
|
|
75
|
-
were set at model initialization. Other fields with value `None`
|
|
76
|
-
are ignored.
|
|
77
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
78
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
79
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
80
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
81
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
82
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
83
|
-
"""
|
|
84
|
-
excluded_fields: Set[str] = set([
|
|
85
|
-
"pulp_href",
|
|
86
|
-
"prn",
|
|
87
|
-
"pulp_created",
|
|
88
|
-
"pulp_last_updated",
|
|
89
|
-
"key_expired",
|
|
90
|
-
"signed_content",
|
|
91
|
-
])
|
|
92
|
-
|
|
93
|
-
_dict = self.model_dump(
|
|
94
|
-
by_alias=True,
|
|
95
|
-
exclude=excluded_fields,
|
|
96
|
-
exclude_none=True,
|
|
97
|
-
)
|
|
98
|
-
# set to None if issuer (nullable) is None
|
|
99
|
-
# and model_fields_set contains the field
|
|
100
|
-
if self.issuer is None and "issuer" in self.model_fields_set:
|
|
101
|
-
_dict['issuer'] = None
|
|
102
|
-
|
|
103
|
-
# set to None if expiration_time (nullable) is None
|
|
104
|
-
# and model_fields_set contains the field
|
|
105
|
-
if self.expiration_time is None and "expiration_time" in self.model_fields_set:
|
|
106
|
-
_dict['expiration_time'] = None
|
|
107
|
-
|
|
108
|
-
# set to None if signers_user_id (nullable) is None
|
|
109
|
-
# and model_fields_set contains the field
|
|
110
|
-
if self.signers_user_id is None and "signers_user_id" in self.model_fields_set:
|
|
111
|
-
_dict['signers_user_id'] = None
|
|
112
|
-
|
|
113
|
-
# set to None if key_expiration_time (nullable) is None
|
|
114
|
-
# and model_fields_set contains the field
|
|
115
|
-
if self.key_expiration_time is None and "key_expiration_time" in self.model_fields_set:
|
|
116
|
-
_dict['key_expiration_time'] = None
|
|
117
|
-
|
|
118
|
-
return _dict
|
|
119
|
-
|
|
120
|
-
@classmethod
|
|
121
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
122
|
-
"""Create an instance of OpenPGPSignatureResponse from a dict"""
|
|
123
|
-
if obj is None:
|
|
124
|
-
return None
|
|
125
|
-
|
|
126
|
-
if not isinstance(obj, dict):
|
|
127
|
-
return cls.model_validate(obj)
|
|
128
|
-
|
|
129
|
-
_obj = cls.model_validate({
|
|
130
|
-
"pulp_href": obj.get("pulp_href"),
|
|
131
|
-
"prn": obj.get("prn"),
|
|
132
|
-
"pulp_created": obj.get("pulp_created"),
|
|
133
|
-
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
134
|
-
"pulp_labels": obj.get("pulp_labels"),
|
|
135
|
-
"issuer": obj.get("issuer"),
|
|
136
|
-
"created": obj.get("created"),
|
|
137
|
-
"expiration_time": obj.get("expiration_time"),
|
|
138
|
-
"signers_user_id": obj.get("signers_user_id"),
|
|
139
|
-
"key_expiration_time": obj.get("key_expiration_time"),
|
|
140
|
-
"expired": obj.get("expired"),
|
|
141
|
-
"key_expired": obj.get("key_expired"),
|
|
142
|
-
"signed_content": obj.get("signed_content")
|
|
143
|
-
})
|
|
144
|
-
return _obj
|
|
145
|
-
|
|
146
|
-
|
|
@@ -1,124 +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, StrictStr
|
|
23
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
-
from typing_extensions import Annotated
|
|
25
|
-
from services-pulpcore-client.models.nested_open_pgp_signature_response import NestedOpenPGPSignatureResponse
|
|
26
|
-
from typing import Optional, Set
|
|
27
|
-
from typing_extensions import Self
|
|
28
|
-
|
|
29
|
-
class OpenPGPUserAttributeResponse(BaseModel):
|
|
30
|
-
"""
|
|
31
|
-
Base serializer for use with [pulpcore.app.models.Model][] This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
|
|
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 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.")
|
|
37
|
-
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")
|
|
38
|
-
sha256: Annotated[str, Field(strict=True, max_length=128)]
|
|
39
|
-
signatures: Optional[List[NestedOpenPGPSignatureResponse]] = None
|
|
40
|
-
public_key: Optional[StrictStr] = None
|
|
41
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "pulp_labels", "sha256", "signatures", "public_key"]
|
|
42
|
-
|
|
43
|
-
model_config = ConfigDict(
|
|
44
|
-
populate_by_name=True,
|
|
45
|
-
validate_assignment=True,
|
|
46
|
-
protected_namespaces=(),
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
def to_str(self) -> str:
|
|
51
|
-
"""Returns the string representation of the model using alias"""
|
|
52
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
53
|
-
|
|
54
|
-
def to_json(self) -> str:
|
|
55
|
-
"""Returns the JSON representation of the model using alias"""
|
|
56
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
57
|
-
return json.dumps(self.to_dict())
|
|
58
|
-
|
|
59
|
-
@classmethod
|
|
60
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
-
"""Create an instance of OpenPGPUserAttributeResponse from a JSON string"""
|
|
62
|
-
return cls.from_dict(json.loads(json_str))
|
|
63
|
-
|
|
64
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
65
|
-
"""Return the dictionary representation of the model using alias.
|
|
66
|
-
|
|
67
|
-
This has the following differences from calling pydantic's
|
|
68
|
-
`self.model_dump(by_alias=True)`:
|
|
69
|
-
|
|
70
|
-
* `None` is only added to the output dict for nullable fields that
|
|
71
|
-
were set at model initialization. Other fields with value `None`
|
|
72
|
-
are ignored.
|
|
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
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
78
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
79
|
-
"""
|
|
80
|
-
excluded_fields: Set[str] = set([
|
|
81
|
-
"pulp_href",
|
|
82
|
-
"prn",
|
|
83
|
-
"pulp_created",
|
|
84
|
-
"pulp_last_updated",
|
|
85
|
-
"signatures",
|
|
86
|
-
"public_key",
|
|
87
|
-
])
|
|
88
|
-
|
|
89
|
-
_dict = self.model_dump(
|
|
90
|
-
by_alias=True,
|
|
91
|
-
exclude=excluded_fields,
|
|
92
|
-
exclude_none=True,
|
|
93
|
-
)
|
|
94
|
-
# override the default output from pydantic by calling `to_dict()` of each item in signatures (list)
|
|
95
|
-
_items = []
|
|
96
|
-
if self.signatures:
|
|
97
|
-
for _item_signatures in self.signatures:
|
|
98
|
-
if _item_signatures:
|
|
99
|
-
_items.append(_item_signatures.to_dict())
|
|
100
|
-
_dict['signatures'] = _items
|
|
101
|
-
return _dict
|
|
102
|
-
|
|
103
|
-
@classmethod
|
|
104
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
105
|
-
"""Create an instance of OpenPGPUserAttributeResponse 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
|
-
"pulp_href": obj.get("pulp_href"),
|
|
114
|
-
"prn": obj.get("prn"),
|
|
115
|
-
"pulp_created": obj.get("pulp_created"),
|
|
116
|
-
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
117
|
-
"pulp_labels": obj.get("pulp_labels"),
|
|
118
|
-
"sha256": obj.get("sha256"),
|
|
119
|
-
"signatures": [NestedOpenPGPSignatureResponse.from_dict(_item) for _item in obj["signatures"]] if obj.get("signatures") is not None else None,
|
|
120
|
-
"public_key": obj.get("public_key")
|
|
121
|
-
})
|
|
122
|
-
return _obj
|
|
123
|
-
|
|
124
|
-
|
|
@@ -1,123 +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, StrictStr
|
|
23
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
-
from services-pulpcore-client.models.nested_open_pgp_signature_response import NestedOpenPGPSignatureResponse
|
|
25
|
-
from typing import Optional, Set
|
|
26
|
-
from typing_extensions import Self
|
|
27
|
-
|
|
28
|
-
class OpenPGPUserIDResponse(BaseModel):
|
|
29
|
-
"""
|
|
30
|
-
Base serializer for use with [pulpcore.app.models.Model][] This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
|
|
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
|
-
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")
|
|
37
|
-
user_id: StrictStr
|
|
38
|
-
signatures: Optional[List[NestedOpenPGPSignatureResponse]] = None
|
|
39
|
-
public_key: Optional[StrictStr] = None
|
|
40
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "pulp_labels", "user_id", "signatures", "public_key"]
|
|
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 OpenPGPUserIDResponse 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
|
-
* 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
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
78
|
-
"""
|
|
79
|
-
excluded_fields: Set[str] = set([
|
|
80
|
-
"pulp_href",
|
|
81
|
-
"prn",
|
|
82
|
-
"pulp_created",
|
|
83
|
-
"pulp_last_updated",
|
|
84
|
-
"signatures",
|
|
85
|
-
"public_key",
|
|
86
|
-
])
|
|
87
|
-
|
|
88
|
-
_dict = self.model_dump(
|
|
89
|
-
by_alias=True,
|
|
90
|
-
exclude=excluded_fields,
|
|
91
|
-
exclude_none=True,
|
|
92
|
-
)
|
|
93
|
-
# override the default output from pydantic by calling `to_dict()` of each item in signatures (list)
|
|
94
|
-
_items = []
|
|
95
|
-
if self.signatures:
|
|
96
|
-
for _item_signatures in self.signatures:
|
|
97
|
-
if _item_signatures:
|
|
98
|
-
_items.append(_item_signatures.to_dict())
|
|
99
|
-
_dict['signatures'] = _items
|
|
100
|
-
return _dict
|
|
101
|
-
|
|
102
|
-
@classmethod
|
|
103
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
104
|
-
"""Create an instance of OpenPGPUserIDResponse from a dict"""
|
|
105
|
-
if obj is None:
|
|
106
|
-
return None
|
|
107
|
-
|
|
108
|
-
if not isinstance(obj, dict):
|
|
109
|
-
return cls.model_validate(obj)
|
|
110
|
-
|
|
111
|
-
_obj = cls.model_validate({
|
|
112
|
-
"pulp_href": obj.get("pulp_href"),
|
|
113
|
-
"prn": obj.get("prn"),
|
|
114
|
-
"pulp_created": obj.get("pulp_created"),
|
|
115
|
-
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
116
|
-
"pulp_labels": obj.get("pulp_labels"),
|
|
117
|
-
"user_id": obj.get("user_id"),
|
|
118
|
-
"signatures": [NestedOpenPGPSignatureResponse.from_dict(_item) for _item in obj["signatures"]] if obj.get("signatures") is not None else None,
|
|
119
|
-
"public_key": obj.get("public_key")
|
|
120
|
-
})
|
|
121
|
-
return _obj
|
|
122
|
-
|
|
123
|
-
|