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,106 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Pulp 3 API
|
|
5
|
-
|
|
6
|
-
Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: v3
|
|
9
|
-
Contact: pulp-list@redhat.com
|
|
10
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
-
|
|
12
|
-
Do not edit the class manually.
|
|
13
|
-
""" # noqa: E501
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
from __future__ import annotations
|
|
17
|
-
import pprint
|
|
18
|
-
import re # noqa: F401
|
|
19
|
-
import json
|
|
20
|
-
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from typing_extensions import Annotated
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class User(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
Serializer for User.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
username: Annotated[str, Field(min_length=1, strict=True, max_length=150)] = Field(description="Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.")
|
|
32
|
-
password: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="Users password. Set to ``null`` to disable password authentication.")
|
|
33
|
-
first_name: Optional[Annotated[str, Field(strict=True, max_length=150)]] = Field(default=None, description="First name")
|
|
34
|
-
last_name: Optional[Annotated[str, Field(strict=True, max_length=150)]] = Field(default=None, description="Last name")
|
|
35
|
-
email: Optional[StrictStr] = Field(default=None, description="Email address")
|
|
36
|
-
is_staff: Optional[StrictBool] = Field(default=False, description="Designates whether the user can log into this admin site.")
|
|
37
|
-
is_active: Optional[StrictBool] = Field(default=True, description="Designates whether this user should be treated as active.")
|
|
38
|
-
__properties: ClassVar[List[str]] = ["username", "password", "first_name", "last_name", "email", "is_staff", "is_active"]
|
|
39
|
-
|
|
40
|
-
model_config = ConfigDict(
|
|
41
|
-
populate_by_name=True,
|
|
42
|
-
validate_assignment=True,
|
|
43
|
-
protected_namespaces=(),
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
def to_str(self) -> str:
|
|
48
|
-
"""Returns the string representation of the model using alias"""
|
|
49
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
-
|
|
51
|
-
def to_json(self) -> str:
|
|
52
|
-
"""Returns the JSON representation of the model using alias"""
|
|
53
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
-
return json.dumps(self.to_dict())
|
|
55
|
-
|
|
56
|
-
@classmethod
|
|
57
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
-
"""Create an instance of User from a JSON string"""
|
|
59
|
-
return cls.from_dict(json.loads(json_str))
|
|
60
|
-
|
|
61
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
-
"""Return the dictionary representation of the model using alias.
|
|
63
|
-
|
|
64
|
-
This has the following differences from calling pydantic's
|
|
65
|
-
`self.model_dump(by_alias=True)`:
|
|
66
|
-
|
|
67
|
-
* `None` is only added to the output dict for nullable fields that
|
|
68
|
-
were set at model initialization. Other fields with value `None`
|
|
69
|
-
are ignored.
|
|
70
|
-
"""
|
|
71
|
-
excluded_fields: Set[str] = set([
|
|
72
|
-
])
|
|
73
|
-
|
|
74
|
-
_dict = self.model_dump(
|
|
75
|
-
by_alias=True,
|
|
76
|
-
exclude=excluded_fields,
|
|
77
|
-
exclude_none=True,
|
|
78
|
-
)
|
|
79
|
-
# set to None if password (nullable) is None
|
|
80
|
-
# and model_fields_set contains the field
|
|
81
|
-
if self.password is None and "password" in self.model_fields_set:
|
|
82
|
-
_dict['password'] = None
|
|
83
|
-
|
|
84
|
-
return _dict
|
|
85
|
-
|
|
86
|
-
@classmethod
|
|
87
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
-
"""Create an instance of User 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
|
-
"username": obj.get("username"),
|
|
97
|
-
"password": obj.get("password"),
|
|
98
|
-
"first_name": obj.get("first_name"),
|
|
99
|
-
"last_name": obj.get("last_name"),
|
|
100
|
-
"email": obj.get("email"),
|
|
101
|
-
"is_staff": obj.get("is_staff") if obj.get("is_staff") is not None else False,
|
|
102
|
-
"is_active": obj.get("is_active") if obj.get("is_active") is not None else True
|
|
103
|
-
})
|
|
104
|
-
return _obj
|
|
105
|
-
|
|
106
|
-
|
|
@@ -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 UserGroup(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
Serializer for Groups that belong to an User.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
name: Annotated[str, Field(min_length=1, strict=True, max_length=150)] = Field(description="Name.")
|
|
32
|
-
__properties: ClassVar[List[str]] = ["name"]
|
|
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 UserGroup 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 UserGroup 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
|
-
"name": obj.get("name")
|
|
86
|
-
})
|
|
87
|
-
return _obj
|
|
88
|
-
|
|
89
|
-
|
|
@@ -1,97 +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, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from typing_extensions import Annotated
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class UserGroupResponse(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
Serializer for Groups that belong to an User.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
name: Annotated[str, Field(strict=True, max_length=150)] = Field(description="Name.")
|
|
32
|
-
pulp_href: Optional[StrictStr] = None
|
|
33
|
-
prn: Optional[StrictStr] = None
|
|
34
|
-
__properties: ClassVar[List[str]] = ["name", "pulp_href", "prn"]
|
|
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 UserGroupResponse 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
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
68
|
-
"""
|
|
69
|
-
excluded_fields: Set[str] = set([
|
|
70
|
-
"pulp_href",
|
|
71
|
-
"prn",
|
|
72
|
-
])
|
|
73
|
-
|
|
74
|
-
_dict = self.model_dump(
|
|
75
|
-
by_alias=True,
|
|
76
|
-
exclude=excluded_fields,
|
|
77
|
-
exclude_none=True,
|
|
78
|
-
)
|
|
79
|
-
return _dict
|
|
80
|
-
|
|
81
|
-
@classmethod
|
|
82
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
-
"""Create an instance of UserGroupResponse from a dict"""
|
|
84
|
-
if obj is None:
|
|
85
|
-
return None
|
|
86
|
-
|
|
87
|
-
if not isinstance(obj, dict):
|
|
88
|
-
return cls.model_validate(obj)
|
|
89
|
-
|
|
90
|
-
_obj = cls.model_validate({
|
|
91
|
-
"name": obj.get("name"),
|
|
92
|
-
"pulp_href": obj.get("pulp_href"),
|
|
93
|
-
"prn": obj.get("prn")
|
|
94
|
-
})
|
|
95
|
-
return _obj
|
|
96
|
-
|
|
97
|
-
|
|
@@ -1,140 +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, StrictInt, StrictStr
|
|
23
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
-
from typing_extensions import Annotated
|
|
25
|
-
from services-pulpcore-client.models.generic_remote_response_hidden_fields_inner import GenericRemoteResponseHiddenFieldsInner
|
|
26
|
-
from services-pulpcore-client.models.user_group_response import UserGroupResponse
|
|
27
|
-
from typing import Optional, Set
|
|
28
|
-
from typing_extensions import Self
|
|
29
|
-
|
|
30
|
-
class UserResponse(BaseModel):
|
|
31
|
-
"""
|
|
32
|
-
Serializer for User.
|
|
33
|
-
""" # noqa: E501
|
|
34
|
-
pulp_href: Optional[StrictStr] = None
|
|
35
|
-
prn: Optional[StrictStr] = None
|
|
36
|
-
id: Optional[StrictInt] = None
|
|
37
|
-
username: Annotated[str, Field(strict=True, max_length=150)] = Field(description="Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.")
|
|
38
|
-
first_name: Optional[Annotated[str, Field(strict=True, max_length=150)]] = Field(default=None, description="First name")
|
|
39
|
-
last_name: Optional[Annotated[str, Field(strict=True, max_length=150)]] = Field(default=None, description="Last name")
|
|
40
|
-
email: Optional[StrictStr] = Field(default=None, description="Email address")
|
|
41
|
-
is_staff: Optional[StrictBool] = Field(default=False, description="Designates whether the user can log into this admin site.")
|
|
42
|
-
is_active: Optional[StrictBool] = Field(default=True, description="Designates whether this user should be treated as active.")
|
|
43
|
-
date_joined: Optional[datetime] = Field(default=None, description="Date joined")
|
|
44
|
-
groups: Optional[List[UserGroupResponse]] = None
|
|
45
|
-
hidden_fields: Optional[List[GenericRemoteResponseHiddenFieldsInner]] = Field(default=None, description="List of hidden (write only) fields")
|
|
46
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "id", "username", "first_name", "last_name", "email", "is_staff", "is_active", "date_joined", "groups", "hidden_fields"]
|
|
47
|
-
|
|
48
|
-
model_config = ConfigDict(
|
|
49
|
-
populate_by_name=True,
|
|
50
|
-
validate_assignment=True,
|
|
51
|
-
protected_namespaces=(),
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
def to_str(self) -> str:
|
|
56
|
-
"""Returns the string representation of the model using alias"""
|
|
57
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
58
|
-
|
|
59
|
-
def to_json(self) -> str:
|
|
60
|
-
"""Returns the JSON representation of the model using alias"""
|
|
61
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
62
|
-
return json.dumps(self.to_dict())
|
|
63
|
-
|
|
64
|
-
@classmethod
|
|
65
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
66
|
-
"""Create an instance of UserResponse from a JSON string"""
|
|
67
|
-
return cls.from_dict(json.loads(json_str))
|
|
68
|
-
|
|
69
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
70
|
-
"""Return the dictionary representation of the model using alias.
|
|
71
|
-
|
|
72
|
-
This has the following differences from calling pydantic's
|
|
73
|
-
`self.model_dump(by_alias=True)`:
|
|
74
|
-
|
|
75
|
-
* `None` is only added to the output dict for nullable fields that
|
|
76
|
-
were set at model initialization. Other fields with value `None`
|
|
77
|
-
are ignored.
|
|
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
|
-
"""
|
|
85
|
-
excluded_fields: Set[str] = set([
|
|
86
|
-
"pulp_href",
|
|
87
|
-
"prn",
|
|
88
|
-
"id",
|
|
89
|
-
"date_joined",
|
|
90
|
-
"groups",
|
|
91
|
-
"hidden_fields",
|
|
92
|
-
])
|
|
93
|
-
|
|
94
|
-
_dict = self.model_dump(
|
|
95
|
-
by_alias=True,
|
|
96
|
-
exclude=excluded_fields,
|
|
97
|
-
exclude_none=True,
|
|
98
|
-
)
|
|
99
|
-
# override the default output from pydantic by calling `to_dict()` of each item in groups (list)
|
|
100
|
-
_items = []
|
|
101
|
-
if self.groups:
|
|
102
|
-
for _item_groups in self.groups:
|
|
103
|
-
if _item_groups:
|
|
104
|
-
_items.append(_item_groups.to_dict())
|
|
105
|
-
_dict['groups'] = _items
|
|
106
|
-
# override the default output from pydantic by calling `to_dict()` of each item in hidden_fields (list)
|
|
107
|
-
_items = []
|
|
108
|
-
if self.hidden_fields:
|
|
109
|
-
for _item_hidden_fields in self.hidden_fields:
|
|
110
|
-
if _item_hidden_fields:
|
|
111
|
-
_items.append(_item_hidden_fields.to_dict())
|
|
112
|
-
_dict['hidden_fields'] = _items
|
|
113
|
-
return _dict
|
|
114
|
-
|
|
115
|
-
@classmethod
|
|
116
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
117
|
-
"""Create an instance of UserResponse from a dict"""
|
|
118
|
-
if obj is None:
|
|
119
|
-
return None
|
|
120
|
-
|
|
121
|
-
if not isinstance(obj, dict):
|
|
122
|
-
return cls.model_validate(obj)
|
|
123
|
-
|
|
124
|
-
_obj = cls.model_validate({
|
|
125
|
-
"pulp_href": obj.get("pulp_href"),
|
|
126
|
-
"prn": obj.get("prn"),
|
|
127
|
-
"id": obj.get("id"),
|
|
128
|
-
"username": obj.get("username"),
|
|
129
|
-
"first_name": obj.get("first_name"),
|
|
130
|
-
"last_name": obj.get("last_name"),
|
|
131
|
-
"email": obj.get("email"),
|
|
132
|
-
"is_staff": obj.get("is_staff") if obj.get("is_staff") is not None else False,
|
|
133
|
-
"is_active": obj.get("is_active") if obj.get("is_active") is not None else True,
|
|
134
|
-
"date_joined": obj.get("date_joined"),
|
|
135
|
-
"groups": [UserGroupResponse.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None,
|
|
136
|
-
"hidden_fields": [GenericRemoteResponseHiddenFieldsInner.from_dict(_item) for _item in obj["hidden_fields"]] if obj.get("hidden_fields") is not None else None
|
|
137
|
-
})
|
|
138
|
-
return _obj
|
|
139
|
-
|
|
140
|
-
|
|
@@ -1,110 +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, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from typing_extensions import Annotated
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class UserRole(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
Serializer for UserRole.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
role: Annotated[str, Field(min_length=1, strict=True)]
|
|
32
|
-
content_object: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="pulp_href of the object for which role permissions should be asserted. If set to 'null', permissions will act on either domain or model-level.")
|
|
33
|
-
content_object_prn: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="prn of the object for which role permissions should be asserted. If set to 'null', permissions will act on either domain or model-level.")
|
|
34
|
-
domain: Optional[StrictStr] = Field(default=None, description="Domain this role should be applied on, mutually exclusive with content_object.")
|
|
35
|
-
__properties: ClassVar[List[str]] = ["role", "content_object", "content_object_prn", "domain"]
|
|
36
|
-
|
|
37
|
-
model_config = ConfigDict(
|
|
38
|
-
populate_by_name=True,
|
|
39
|
-
validate_assignment=True,
|
|
40
|
-
protected_namespaces=(),
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def to_str(self) -> str:
|
|
45
|
-
"""Returns the string representation of the model using alias"""
|
|
46
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
-
|
|
48
|
-
def to_json(self) -> str:
|
|
49
|
-
"""Returns the JSON representation of the model using alias"""
|
|
50
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
-
return json.dumps(self.to_dict())
|
|
52
|
-
|
|
53
|
-
@classmethod
|
|
54
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
-
"""Create an instance of UserRole from a JSON string"""
|
|
56
|
-
return cls.from_dict(json.loads(json_str))
|
|
57
|
-
|
|
58
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
-
"""Return the dictionary representation of the model using alias.
|
|
60
|
-
|
|
61
|
-
This has the following differences from calling pydantic's
|
|
62
|
-
`self.model_dump(by_alias=True)`:
|
|
63
|
-
|
|
64
|
-
* `None` is only added to the output dict for nullable fields that
|
|
65
|
-
were set at model initialization. Other fields with value `None`
|
|
66
|
-
are ignored.
|
|
67
|
-
"""
|
|
68
|
-
excluded_fields: Set[str] = set([
|
|
69
|
-
])
|
|
70
|
-
|
|
71
|
-
_dict = self.model_dump(
|
|
72
|
-
by_alias=True,
|
|
73
|
-
exclude=excluded_fields,
|
|
74
|
-
exclude_none=True,
|
|
75
|
-
)
|
|
76
|
-
# set to None if content_object (nullable) is None
|
|
77
|
-
# and model_fields_set contains the field
|
|
78
|
-
if self.content_object is None and "content_object" in self.model_fields_set:
|
|
79
|
-
_dict['content_object'] = None
|
|
80
|
-
|
|
81
|
-
# set to None if content_object_prn (nullable) is None
|
|
82
|
-
# and model_fields_set contains the field
|
|
83
|
-
if self.content_object_prn is None and "content_object_prn" in self.model_fields_set:
|
|
84
|
-
_dict['content_object_prn'] = None
|
|
85
|
-
|
|
86
|
-
# set to None if domain (nullable) is None
|
|
87
|
-
# and model_fields_set contains the field
|
|
88
|
-
if self.domain is None and "domain" in self.model_fields_set:
|
|
89
|
-
_dict['domain'] = None
|
|
90
|
-
|
|
91
|
-
return _dict
|
|
92
|
-
|
|
93
|
-
@classmethod
|
|
94
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
95
|
-
"""Create an instance of UserRole from a dict"""
|
|
96
|
-
if obj is None:
|
|
97
|
-
return None
|
|
98
|
-
|
|
99
|
-
if not isinstance(obj, dict):
|
|
100
|
-
return cls.model_validate(obj)
|
|
101
|
-
|
|
102
|
-
_obj = cls.model_validate({
|
|
103
|
-
"role": obj.get("role"),
|
|
104
|
-
"content_object": obj.get("content_object"),
|
|
105
|
-
"content_object_prn": obj.get("content_object_prn"),
|
|
106
|
-
"domain": obj.get("domain")
|
|
107
|
-
})
|
|
108
|
-
return _obj
|
|
109
|
-
|
|
110
|
-
|
|
@@ -1,134 +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 import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class UserRoleResponse(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
Serializer for UserRole.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
pulp_href: Optional[StrictStr] = None
|
|
32
|
-
prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
|
|
33
|
-
pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
|
|
34
|
-
pulp_last_updated: Optional[datetime] = Field(default=None, description="Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.")
|
|
35
|
-
role: StrictStr
|
|
36
|
-
content_object: Optional[StrictStr] = Field(default=None, description="pulp_href of the object for which role permissions should be asserted. If set to 'null', permissions will act on either domain or model-level.")
|
|
37
|
-
content_object_prn: Optional[StrictStr] = Field(default=None, description="prn of the object for which role permissions should be asserted. If set to 'null', permissions will act on either domain or model-level.")
|
|
38
|
-
description: Optional[StrictStr] = None
|
|
39
|
-
permissions: Optional[List[StrictStr]] = None
|
|
40
|
-
domain: Optional[StrictStr] = Field(default=None, description="Domain this role should be applied on, mutually exclusive with content_object.")
|
|
41
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "role", "content_object", "content_object_prn", "description", "permissions", "domain"]
|
|
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 UserRoleResponse 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
|
-
"description",
|
|
86
|
-
"permissions",
|
|
87
|
-
])
|
|
88
|
-
|
|
89
|
-
_dict = self.model_dump(
|
|
90
|
-
by_alias=True,
|
|
91
|
-
exclude=excluded_fields,
|
|
92
|
-
exclude_none=True,
|
|
93
|
-
)
|
|
94
|
-
# set to None if content_object (nullable) is None
|
|
95
|
-
# and model_fields_set contains the field
|
|
96
|
-
if self.content_object is None and "content_object" in self.model_fields_set:
|
|
97
|
-
_dict['content_object'] = None
|
|
98
|
-
|
|
99
|
-
# set to None if content_object_prn (nullable) is None
|
|
100
|
-
# and model_fields_set contains the field
|
|
101
|
-
if self.content_object_prn is None and "content_object_prn" in self.model_fields_set:
|
|
102
|
-
_dict['content_object_prn'] = None
|
|
103
|
-
|
|
104
|
-
# set to None if domain (nullable) is None
|
|
105
|
-
# and model_fields_set contains the field
|
|
106
|
-
if self.domain is None and "domain" in self.model_fields_set:
|
|
107
|
-
_dict['domain'] = None
|
|
108
|
-
|
|
109
|
-
return _dict
|
|
110
|
-
|
|
111
|
-
@classmethod
|
|
112
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
113
|
-
"""Create an instance of UserRoleResponse from a dict"""
|
|
114
|
-
if obj is None:
|
|
115
|
-
return None
|
|
116
|
-
|
|
117
|
-
if not isinstance(obj, dict):
|
|
118
|
-
return cls.model_validate(obj)
|
|
119
|
-
|
|
120
|
-
_obj = cls.model_validate({
|
|
121
|
-
"pulp_href": obj.get("pulp_href"),
|
|
122
|
-
"prn": obj.get("prn"),
|
|
123
|
-
"pulp_created": obj.get("pulp_created"),
|
|
124
|
-
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
125
|
-
"role": obj.get("role"),
|
|
126
|
-
"content_object": obj.get("content_object"),
|
|
127
|
-
"content_object_prn": obj.get("content_object_prn"),
|
|
128
|
-
"description": obj.get("description"),
|
|
129
|
-
"permissions": obj.get("permissions"),
|
|
130
|
-
"domain": obj.get("domain")
|
|
131
|
-
})
|
|
132
|
-
return _obj
|
|
133
|
-
|
|
134
|
-
|