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,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, 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 NestedOpenPGPSignatureResponse(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
|
-
issuer: Optional[Annotated[str, Field(strict=True, max_length=16)]] = None
|
|
33
|
-
created: datetime
|
|
34
|
-
expiration_time: Optional[StrictStr] = None
|
|
35
|
-
signers_user_id: Optional[StrictStr] = None
|
|
36
|
-
key_expiration_time: Optional[StrictStr] = None
|
|
37
|
-
expired: StrictBool
|
|
38
|
-
key_expired: Optional[StrictStr] = None
|
|
39
|
-
__properties: ClassVar[List[str]] = ["issuer", "created", "expiration_time", "signers_user_id", "key_expiration_time", "expired", "key_expired"]
|
|
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 NestedOpenPGPSignatureResponse 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
|
-
"""
|
|
73
|
-
excluded_fields: Set[str] = set([
|
|
74
|
-
"key_expired",
|
|
75
|
-
])
|
|
76
|
-
|
|
77
|
-
_dict = self.model_dump(
|
|
78
|
-
by_alias=True,
|
|
79
|
-
exclude=excluded_fields,
|
|
80
|
-
exclude_none=True,
|
|
81
|
-
)
|
|
82
|
-
# set to None if issuer (nullable) is None
|
|
83
|
-
# and model_fields_set contains the field
|
|
84
|
-
if self.issuer is None and "issuer" in self.model_fields_set:
|
|
85
|
-
_dict['issuer'] = None
|
|
86
|
-
|
|
87
|
-
# set to None if expiration_time (nullable) is None
|
|
88
|
-
# and model_fields_set contains the field
|
|
89
|
-
if self.expiration_time is None and "expiration_time" in self.model_fields_set:
|
|
90
|
-
_dict['expiration_time'] = None
|
|
91
|
-
|
|
92
|
-
# set to None if signers_user_id (nullable) is None
|
|
93
|
-
# and model_fields_set contains the field
|
|
94
|
-
if self.signers_user_id is None and "signers_user_id" in self.model_fields_set:
|
|
95
|
-
_dict['signers_user_id'] = None
|
|
96
|
-
|
|
97
|
-
# set to None if key_expiration_time (nullable) is None
|
|
98
|
-
# and model_fields_set contains the field
|
|
99
|
-
if self.key_expiration_time is None and "key_expiration_time" in self.model_fields_set:
|
|
100
|
-
_dict['key_expiration_time'] = None
|
|
101
|
-
|
|
102
|
-
return _dict
|
|
103
|
-
|
|
104
|
-
@classmethod
|
|
105
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
106
|
-
"""Create an instance of NestedOpenPGPSignatureResponse 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
|
-
"issuer": obj.get("issuer"),
|
|
115
|
-
"created": obj.get("created"),
|
|
116
|
-
"expiration_time": obj.get("expiration_time"),
|
|
117
|
-
"signers_user_id": obj.get("signers_user_id"),
|
|
118
|
-
"key_expiration_time": obj.get("key_expiration_time"),
|
|
119
|
-
"expired": obj.get("expired"),
|
|
120
|
-
"key_expired": obj.get("key_expired")
|
|
121
|
-
})
|
|
122
|
-
return _obj
|
|
123
|
-
|
|
124
|
-
|
|
@@ -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 NestedOpenPGPUserAttribute(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
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.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
sha256: Annotated[str, Field(min_length=1, strict=True, max_length=128)]
|
|
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 NestedOpenPGPUserAttribute 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 NestedOpenPGPUserAttribute 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,101 +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, Optional
|
|
23
|
-
from typing_extensions import Annotated
|
|
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 NestedOpenPGPUserAttributeResponse(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
|
-
sha256: Annotated[str, Field(strict=True, max_length=128)]
|
|
33
|
-
signatures: Optional[List[NestedOpenPGPSignatureResponse]] = None
|
|
34
|
-
__properties: ClassVar[List[str]] = ["sha256", "signatures"]
|
|
35
|
-
|
|
36
|
-
model_config = ConfigDict(
|
|
37
|
-
populate_by_name=True,
|
|
38
|
-
validate_assignment=True,
|
|
39
|
-
protected_namespaces=(),
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def to_str(self) -> str:
|
|
44
|
-
"""Returns the string representation of the model using alias"""
|
|
45
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
-
|
|
47
|
-
def to_json(self) -> str:
|
|
48
|
-
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
51
|
-
|
|
52
|
-
@classmethod
|
|
53
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
-
"""Create an instance of NestedOpenPGPUserAttributeResponse from a JSON string"""
|
|
55
|
-
return cls.from_dict(json.loads(json_str))
|
|
56
|
-
|
|
57
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
-
"""Return the dictionary representation of the model using alias.
|
|
59
|
-
|
|
60
|
-
This has the following differences from calling pydantic's
|
|
61
|
-
`self.model_dump(by_alias=True)`:
|
|
62
|
-
|
|
63
|
-
* `None` is only added to the output dict for nullable fields that
|
|
64
|
-
were set at model initialization. Other fields with value `None`
|
|
65
|
-
are ignored.
|
|
66
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
67
|
-
"""
|
|
68
|
-
excluded_fields: Set[str] = set([
|
|
69
|
-
"signatures",
|
|
70
|
-
])
|
|
71
|
-
|
|
72
|
-
_dict = self.model_dump(
|
|
73
|
-
by_alias=True,
|
|
74
|
-
exclude=excluded_fields,
|
|
75
|
-
exclude_none=True,
|
|
76
|
-
)
|
|
77
|
-
# override the default output from pydantic by calling `to_dict()` of each item in signatures (list)
|
|
78
|
-
_items = []
|
|
79
|
-
if self.signatures:
|
|
80
|
-
for _item_signatures in self.signatures:
|
|
81
|
-
if _item_signatures:
|
|
82
|
-
_items.append(_item_signatures.to_dict())
|
|
83
|
-
_dict['signatures'] = _items
|
|
84
|
-
return _dict
|
|
85
|
-
|
|
86
|
-
@classmethod
|
|
87
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
-
"""Create an instance of NestedOpenPGPUserAttributeResponse from a dict"""
|
|
89
|
-
if obj is None:
|
|
90
|
-
return None
|
|
91
|
-
|
|
92
|
-
if not isinstance(obj, dict):
|
|
93
|
-
return cls.model_validate(obj)
|
|
94
|
-
|
|
95
|
-
_obj = cls.model_validate({
|
|
96
|
-
"sha256": obj.get("sha256"),
|
|
97
|
-
"signatures": [NestedOpenPGPSignatureResponse.from_dict(_item) for _item in obj["signatures"]] if obj.get("signatures") is not None else None
|
|
98
|
-
})
|
|
99
|
-
return _obj
|
|
100
|
-
|
|
101
|
-
|
|
@@ -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 NestedOpenPGPUserID(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
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.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
user_id: Annotated[str, Field(min_length=1, strict=True)]
|
|
32
|
-
__properties: ClassVar[List[str]] = ["user_id"]
|
|
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 NestedOpenPGPUserID 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 NestedOpenPGPUserID 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
|
-
"user_id": obj.get("user_id")
|
|
86
|
-
})
|
|
87
|
-
return _obj
|
|
88
|
-
|
|
89
|
-
|
|
@@ -1,100 +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, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from services-pulpcore-client.models.nested_open_pgp_signature_response import NestedOpenPGPSignatureResponse
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class NestedOpenPGPUserIDResponse(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
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.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
user_id: StrictStr
|
|
32
|
-
signatures: Optional[List[NestedOpenPGPSignatureResponse]] = None
|
|
33
|
-
__properties: ClassVar[List[str]] = ["user_id", "signatures"]
|
|
34
|
-
|
|
35
|
-
model_config = ConfigDict(
|
|
36
|
-
populate_by_name=True,
|
|
37
|
-
validate_assignment=True,
|
|
38
|
-
protected_namespaces=(),
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def to_str(self) -> str:
|
|
43
|
-
"""Returns the string representation of the model using alias"""
|
|
44
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
-
|
|
46
|
-
def to_json(self) -> str:
|
|
47
|
-
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
50
|
-
|
|
51
|
-
@classmethod
|
|
52
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
-
"""Create an instance of NestedOpenPGPUserIDResponse from a JSON string"""
|
|
54
|
-
return cls.from_dict(json.loads(json_str))
|
|
55
|
-
|
|
56
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
-
"""Return the dictionary representation of the model using alias.
|
|
58
|
-
|
|
59
|
-
This has the following differences from calling pydantic's
|
|
60
|
-
`self.model_dump(by_alias=True)`:
|
|
61
|
-
|
|
62
|
-
* `None` is only added to the output dict for nullable fields that
|
|
63
|
-
were set at model initialization. Other fields with value `None`
|
|
64
|
-
are ignored.
|
|
65
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
66
|
-
"""
|
|
67
|
-
excluded_fields: Set[str] = set([
|
|
68
|
-
"signatures",
|
|
69
|
-
])
|
|
70
|
-
|
|
71
|
-
_dict = self.model_dump(
|
|
72
|
-
by_alias=True,
|
|
73
|
-
exclude=excluded_fields,
|
|
74
|
-
exclude_none=True,
|
|
75
|
-
)
|
|
76
|
-
# override the default output from pydantic by calling `to_dict()` of each item in signatures (list)
|
|
77
|
-
_items = []
|
|
78
|
-
if self.signatures:
|
|
79
|
-
for _item_signatures in self.signatures:
|
|
80
|
-
if _item_signatures:
|
|
81
|
-
_items.append(_item_signatures.to_dict())
|
|
82
|
-
_dict['signatures'] = _items
|
|
83
|
-
return _dict
|
|
84
|
-
|
|
85
|
-
@classmethod
|
|
86
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
-
"""Create an instance of NestedOpenPGPUserIDResponse from a dict"""
|
|
88
|
-
if obj is None:
|
|
89
|
-
return None
|
|
90
|
-
|
|
91
|
-
if not isinstance(obj, dict):
|
|
92
|
-
return cls.model_validate(obj)
|
|
93
|
-
|
|
94
|
-
_obj = cls.model_validate({
|
|
95
|
-
"user_id": obj.get("user_id"),
|
|
96
|
-
"signatures": [NestedOpenPGPSignatureResponse.from_dict(_item) for _item in obj["signatures"]] if obj.get("signatures") is not None else None
|
|
97
|
-
})
|
|
98
|
-
return _obj
|
|
99
|
-
|
|
100
|
-
|
|
@@ -1,93 +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, Optional
|
|
23
|
-
from typing_extensions import Annotated
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class NestedRole(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
Serializer to add/remove object roles to/from users/groups. This is used in conjunction with ``pulpcore.app.viewsets.base.RolesMixin`` and requires the underlying object to be passed as ``content_object`` in the context.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
users: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = None
|
|
32
|
-
groups: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = None
|
|
33
|
-
role: Annotated[str, Field(min_length=1, strict=True)]
|
|
34
|
-
__properties: ClassVar[List[str]] = ["users", "groups", "role"]
|
|
35
|
-
|
|
36
|
-
model_config = ConfigDict(
|
|
37
|
-
populate_by_name=True,
|
|
38
|
-
validate_assignment=True,
|
|
39
|
-
protected_namespaces=(),
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def to_str(self) -> str:
|
|
44
|
-
"""Returns the string representation of the model using alias"""
|
|
45
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
-
|
|
47
|
-
def to_json(self) -> str:
|
|
48
|
-
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
51
|
-
|
|
52
|
-
@classmethod
|
|
53
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
-
"""Create an instance of NestedRole from a JSON string"""
|
|
55
|
-
return cls.from_dict(json.loads(json_str))
|
|
56
|
-
|
|
57
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
-
"""Return the dictionary representation of the model using alias.
|
|
59
|
-
|
|
60
|
-
This has the following differences from calling pydantic's
|
|
61
|
-
`self.model_dump(by_alias=True)`:
|
|
62
|
-
|
|
63
|
-
* `None` is only added to the output dict for nullable fields that
|
|
64
|
-
were set at model initialization. Other fields with value `None`
|
|
65
|
-
are ignored.
|
|
66
|
-
"""
|
|
67
|
-
excluded_fields: Set[str] = set([
|
|
68
|
-
])
|
|
69
|
-
|
|
70
|
-
_dict = self.model_dump(
|
|
71
|
-
by_alias=True,
|
|
72
|
-
exclude=excluded_fields,
|
|
73
|
-
exclude_none=True,
|
|
74
|
-
)
|
|
75
|
-
return _dict
|
|
76
|
-
|
|
77
|
-
@classmethod
|
|
78
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
-
"""Create an instance of NestedRole from a dict"""
|
|
80
|
-
if obj is None:
|
|
81
|
-
return None
|
|
82
|
-
|
|
83
|
-
if not isinstance(obj, dict):
|
|
84
|
-
return cls.model_validate(obj)
|
|
85
|
-
|
|
86
|
-
_obj = cls.model_validate({
|
|
87
|
-
"users": obj.get("users"),
|
|
88
|
-
"groups": obj.get("groups"),
|
|
89
|
-
"role": obj.get("role")
|
|
90
|
-
})
|
|
91
|
-
return _obj
|
|
92
|
-
|
|
93
|
-
|
|
@@ -1,92 +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, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class NestedRoleResponse(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
Serializer to add/remove object roles to/from users/groups. This is used in conjunction with ``pulpcore.app.viewsets.base.RolesMixin`` and requires the underlying object to be passed as ``content_object`` in the context.
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
users: Optional[List[StrictStr]] = None
|
|
31
|
-
groups: Optional[List[StrictStr]] = None
|
|
32
|
-
role: StrictStr
|
|
33
|
-
__properties: ClassVar[List[str]] = ["users", "groups", "role"]
|
|
34
|
-
|
|
35
|
-
model_config = ConfigDict(
|
|
36
|
-
populate_by_name=True,
|
|
37
|
-
validate_assignment=True,
|
|
38
|
-
protected_namespaces=(),
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def to_str(self) -> str:
|
|
43
|
-
"""Returns the string representation of the model using alias"""
|
|
44
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
-
|
|
46
|
-
def to_json(self) -> str:
|
|
47
|
-
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
50
|
-
|
|
51
|
-
@classmethod
|
|
52
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
-
"""Create an instance of NestedRoleResponse from a JSON string"""
|
|
54
|
-
return cls.from_dict(json.loads(json_str))
|
|
55
|
-
|
|
56
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
-
"""Return the dictionary representation of the model using alias.
|
|
58
|
-
|
|
59
|
-
This has the following differences from calling pydantic's
|
|
60
|
-
`self.model_dump(by_alias=True)`:
|
|
61
|
-
|
|
62
|
-
* `None` is only added to the output dict for nullable fields that
|
|
63
|
-
were set at model initialization. Other fields with value `None`
|
|
64
|
-
are ignored.
|
|
65
|
-
"""
|
|
66
|
-
excluded_fields: Set[str] = set([
|
|
67
|
-
])
|
|
68
|
-
|
|
69
|
-
_dict = self.model_dump(
|
|
70
|
-
by_alias=True,
|
|
71
|
-
exclude=excluded_fields,
|
|
72
|
-
exclude_none=True,
|
|
73
|
-
)
|
|
74
|
-
return _dict
|
|
75
|
-
|
|
76
|
-
@classmethod
|
|
77
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
-
"""Create an instance of NestedRoleResponse from a dict"""
|
|
79
|
-
if obj is None:
|
|
80
|
-
return None
|
|
81
|
-
|
|
82
|
-
if not isinstance(obj, dict):
|
|
83
|
-
return cls.model_validate(obj)
|
|
84
|
-
|
|
85
|
-
_obj = cls.model_validate({
|
|
86
|
-
"users": obj.get("users"),
|
|
87
|
-
"groups": obj.get("groups"),
|
|
88
|
-
"role": obj.get("role")
|
|
89
|
-
})
|
|
90
|
-
return _obj
|
|
91
|
-
|
|
92
|
-
|