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,133 +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 import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class DistributionResponse(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
The Serializer for the Distribution model. The serializer deliberately omits the `publication` and `repository_version` field due to plugins typically requiring one or the other but not both. To include the ``publication`` field, it is recommended plugins define the field:: publication = DetailRelatedField( required=False, help_text=_(\"Publication to be served\"), view_name_pattern=r\"publications(-.*/.*)?-detail\", queryset=models.Publication.objects.exclude(complete=False), allow_null=True, ) To include the ``repository_version`` field, it is recommended plugins define the field:: repository_version = RepositoryVersionRelatedField( required=False, help_text=_(\"RepositoryVersion to be served\"), allow_null=True ) Additionally, the serializer omits the ``remote`` field, which is used for pull-through caching feature and only by plugins which use publications. Plugins implementing a pull-through caching should define the field in their derived serializer class like this:: remote = DetailRelatedField( required=False, help_text=_('Remote that can be used to fetch content when using pull-through caching.'), queryset=models.Remote.objects.all(), allow_null=True )
|
|
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
|
-
base_path: StrictStr = Field(description="The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")")
|
|
36
|
-
base_url: Optional[StrictStr] = Field(default=None, description="The URL for accessing the publication as defined by this distribution.")
|
|
37
|
-
content_guard: Optional[StrictStr] = Field(default=None, description="An optional content-guard.")
|
|
38
|
-
no_content_change_since: Optional[StrictStr] = Field(default=None, description="Timestamp since when the distributed content served by this distribution has not changed. If equals to `null`, no guarantee is provided about content changes.")
|
|
39
|
-
hidden: Optional[StrictBool] = Field(default=False, description="Whether this distribution should be shown in the content app.")
|
|
40
|
-
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
41
|
-
name: StrictStr = Field(description="A unique name. Ex, `rawhide` and `stable`.")
|
|
42
|
-
repository: Optional[StrictStr] = Field(default=None, description="The latest RepositoryVersion for this Repository will be served.")
|
|
43
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "base_path", "base_url", "content_guard", "no_content_change_since", "hidden", "pulp_labels", "name", "repository"]
|
|
44
|
-
|
|
45
|
-
model_config = ConfigDict(
|
|
46
|
-
populate_by_name=True,
|
|
47
|
-
validate_assignment=True,
|
|
48
|
-
protected_namespaces=(),
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def to_str(self) -> str:
|
|
53
|
-
"""Returns the string representation of the model using alias"""
|
|
54
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
-
|
|
56
|
-
def to_json(self) -> str:
|
|
57
|
-
"""Returns the JSON representation of the model using alias"""
|
|
58
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
-
return json.dumps(self.to_dict())
|
|
60
|
-
|
|
61
|
-
@classmethod
|
|
62
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
-
"""Create an instance of DistributionResponse from a JSON string"""
|
|
64
|
-
return cls.from_dict(json.loads(json_str))
|
|
65
|
-
|
|
66
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
-
"""Return the dictionary representation of the model using alias.
|
|
68
|
-
|
|
69
|
-
This has the following differences from calling pydantic's
|
|
70
|
-
`self.model_dump(by_alias=True)`:
|
|
71
|
-
|
|
72
|
-
* `None` is only added to the output dict for nullable fields that
|
|
73
|
-
were set at model initialization. Other fields with value `None`
|
|
74
|
-
are ignored.
|
|
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
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
81
|
-
"""
|
|
82
|
-
excluded_fields: Set[str] = set([
|
|
83
|
-
"pulp_href",
|
|
84
|
-
"prn",
|
|
85
|
-
"pulp_created",
|
|
86
|
-
"pulp_last_updated",
|
|
87
|
-
"base_url",
|
|
88
|
-
"no_content_change_since",
|
|
89
|
-
])
|
|
90
|
-
|
|
91
|
-
_dict = self.model_dump(
|
|
92
|
-
by_alias=True,
|
|
93
|
-
exclude=excluded_fields,
|
|
94
|
-
exclude_none=True,
|
|
95
|
-
)
|
|
96
|
-
# set to None if content_guard (nullable) is None
|
|
97
|
-
# and model_fields_set contains the field
|
|
98
|
-
if self.content_guard is None and "content_guard" in self.model_fields_set:
|
|
99
|
-
_dict['content_guard'] = None
|
|
100
|
-
|
|
101
|
-
# set to None if repository (nullable) is None
|
|
102
|
-
# and model_fields_set contains the field
|
|
103
|
-
if self.repository is None and "repository" in self.model_fields_set:
|
|
104
|
-
_dict['repository'] = None
|
|
105
|
-
|
|
106
|
-
return _dict
|
|
107
|
-
|
|
108
|
-
@classmethod
|
|
109
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
110
|
-
"""Create an instance of DistributionResponse from a dict"""
|
|
111
|
-
if obj is None:
|
|
112
|
-
return None
|
|
113
|
-
|
|
114
|
-
if not isinstance(obj, dict):
|
|
115
|
-
return cls.model_validate(obj)
|
|
116
|
-
|
|
117
|
-
_obj = cls.model_validate({
|
|
118
|
-
"pulp_href": obj.get("pulp_href"),
|
|
119
|
-
"prn": obj.get("prn"),
|
|
120
|
-
"pulp_created": obj.get("pulp_created"),
|
|
121
|
-
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
122
|
-
"base_path": obj.get("base_path"),
|
|
123
|
-
"base_url": obj.get("base_url"),
|
|
124
|
-
"content_guard": obj.get("content_guard"),
|
|
125
|
-
"no_content_change_since": obj.get("no_content_change_since"),
|
|
126
|
-
"hidden": obj.get("hidden") if obj.get("hidden") is not None else False,
|
|
127
|
-
"pulp_labels": obj.get("pulp_labels"),
|
|
128
|
-
"name": obj.get("name"),
|
|
129
|
-
"repository": obj.get("repository")
|
|
130
|
-
})
|
|
131
|
-
return _obj
|
|
132
|
-
|
|
133
|
-
|
|
@@ -1,114 +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, field_validator
|
|
22
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from typing_extensions import Annotated
|
|
24
|
-
from services-pulpcore-client.models.storage_class_enum import StorageClassEnum
|
|
25
|
-
from typing import Optional, Set
|
|
26
|
-
from typing_extensions import Self
|
|
27
|
-
|
|
28
|
-
class Domain(BaseModel):
|
|
29
|
-
"""
|
|
30
|
-
Serializer for Domain.
|
|
31
|
-
""" # noqa: E501
|
|
32
|
-
name: Annotated[str, Field(min_length=1, strict=True, max_length=50)] = Field(description="A name for this domain.")
|
|
33
|
-
description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="An optional description.")
|
|
34
|
-
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
35
|
-
storage_class: StorageClassEnum = Field(description="Backend storage class for domain. * `pulpcore.app.models.storage.FileSystem` - Use local filesystem as storage * `storages.backends.s3boto3.S3Boto3Storage` - Use Amazon S3 as storage * `storages.backends.azure_storage.AzureStorage` - Use Azure Blob as storage * `pulp_service.app.storage.OCIStorage` - Use OCI as storage")
|
|
36
|
-
storage_settings: Dict[str, Any] = Field(description="Settings for storage class.")
|
|
37
|
-
redirect_to_object_storage: Optional[StrictBool] = Field(default=True, description="Boolean to have the content app redirect to object storage.")
|
|
38
|
-
hide_guarded_distributions: Optional[StrictBool] = Field(default=False, description="Boolean to hide distributions with a content guard in the content app.")
|
|
39
|
-
__properties: ClassVar[List[str]] = ["name", "description", "pulp_labels", "storage_class", "storage_settings", "redirect_to_object_storage", "hide_guarded_distributions"]
|
|
40
|
-
|
|
41
|
-
@field_validator('name')
|
|
42
|
-
def name_validate_regular_expression(cls, value):
|
|
43
|
-
"""Validates the regular expression"""
|
|
44
|
-
if not re.match(r"^[-a-zA-Z0-9_]+$", value):
|
|
45
|
-
raise ValueError(r"must validate the regular expression /^[-a-zA-Z0-9_]+$/")
|
|
46
|
-
return value
|
|
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 Domain 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
|
-
"""
|
|
79
|
-
excluded_fields: Set[str] = set([
|
|
80
|
-
])
|
|
81
|
-
|
|
82
|
-
_dict = self.model_dump(
|
|
83
|
-
by_alias=True,
|
|
84
|
-
exclude=excluded_fields,
|
|
85
|
-
exclude_none=True,
|
|
86
|
-
)
|
|
87
|
-
# set to None if description (nullable) is None
|
|
88
|
-
# and model_fields_set contains the field
|
|
89
|
-
if self.description is None and "description" in self.model_fields_set:
|
|
90
|
-
_dict['description'] = None
|
|
91
|
-
|
|
92
|
-
return _dict
|
|
93
|
-
|
|
94
|
-
@classmethod
|
|
95
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
96
|
-
"""Create an instance of Domain from a dict"""
|
|
97
|
-
if obj is None:
|
|
98
|
-
return None
|
|
99
|
-
|
|
100
|
-
if not isinstance(obj, dict):
|
|
101
|
-
return cls.model_validate(obj)
|
|
102
|
-
|
|
103
|
-
_obj = cls.model_validate({
|
|
104
|
-
"name": obj.get("name"),
|
|
105
|
-
"description": obj.get("description"),
|
|
106
|
-
"pulp_labels": obj.get("pulp_labels"),
|
|
107
|
-
"storage_class": obj.get("storage_class"),
|
|
108
|
-
"storage_settings": obj.get("storage_settings"),
|
|
109
|
-
"redirect_to_object_storage": obj.get("redirect_to_object_storage") if obj.get("redirect_to_object_storage") is not None else True,
|
|
110
|
-
"hide_guarded_distributions": obj.get("hide_guarded_distributions") if obj.get("hide_guarded_distributions") is not None else False
|
|
111
|
-
})
|
|
112
|
-
return _obj
|
|
113
|
-
|
|
114
|
-
|
|
@@ -1,91 +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 services-pulpcore-client.models.storage_class_enum import StorageClassEnum
|
|
24
|
-
from typing import Optional, Set
|
|
25
|
-
from typing_extensions import Self
|
|
26
|
-
|
|
27
|
-
class DomainBackendMigrator(BaseModel):
|
|
28
|
-
"""
|
|
29
|
-
Special serializer for performing a storage backend migration on a Domain.
|
|
30
|
-
""" # noqa: E501
|
|
31
|
-
storage_class: StorageClassEnum = Field(description="The new backend storage class to migrate to. * `pulpcore.app.models.storage.FileSystem` - Use local filesystem as storage * `storages.backends.s3boto3.S3Boto3Storage` - Use Amazon S3 as storage * `storages.backends.azure_storage.AzureStorage` - Use Azure Blob as storage * `pulp_service.app.storage.OCIStorage` - Use OCI as storage")
|
|
32
|
-
storage_settings: Dict[str, Any] = Field(description="The settings for the new storage class to migrate to.")
|
|
33
|
-
__properties: ClassVar[List[str]] = ["storage_class", "storage_settings"]
|
|
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 DomainBackendMigrator 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 DomainBackendMigrator 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
|
-
"storage_class": obj.get("storage_class"),
|
|
87
|
-
"storage_settings": obj.get("storage_settings")
|
|
88
|
-
})
|
|
89
|
-
return _obj
|
|
90
|
-
|
|
91
|
-
|
|
@@ -1,131 +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, field_validator
|
|
23
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
-
from typing_extensions import Annotated
|
|
25
|
-
from services-pulpcore-client.models.storage_class_enum import StorageClassEnum
|
|
26
|
-
from typing import Optional, Set
|
|
27
|
-
from typing_extensions import Self
|
|
28
|
-
|
|
29
|
-
class DomainResponse(BaseModel):
|
|
30
|
-
"""
|
|
31
|
-
Serializer for Domain.
|
|
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
|
-
name: Annotated[str, Field(strict=True, max_length=50)] = Field(description="A name for this domain.")
|
|
38
|
-
description: Optional[StrictStr] = Field(default=None, description="An optional description.")
|
|
39
|
-
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
40
|
-
storage_class: StorageClassEnum = Field(description="Backend storage class for domain. * `pulpcore.app.models.storage.FileSystem` - Use local filesystem as storage * `storages.backends.s3boto3.S3Boto3Storage` - Use Amazon S3 as storage * `storages.backends.azure_storage.AzureStorage` - Use Azure Blob as storage * `pulp_service.app.storage.OCIStorage` - Use OCI as storage")
|
|
41
|
-
storage_settings: Dict[str, Any] = Field(description="Settings for storage class.")
|
|
42
|
-
redirect_to_object_storage: Optional[StrictBool] = Field(default=True, description="Boolean to have the content app redirect to object storage.")
|
|
43
|
-
hide_guarded_distributions: Optional[StrictBool] = Field(default=False, description="Boolean to hide distributions with a content guard in the content app.")
|
|
44
|
-
__properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "name", "description", "pulp_labels", "storage_class", "storage_settings", "redirect_to_object_storage", "hide_guarded_distributions"]
|
|
45
|
-
|
|
46
|
-
@field_validator('name')
|
|
47
|
-
def name_validate_regular_expression(cls, value):
|
|
48
|
-
"""Validates the regular expression"""
|
|
49
|
-
if not re.match(r"^[-a-zA-Z0-9_]+$", value):
|
|
50
|
-
raise ValueError(r"must validate the regular expression /^[-a-zA-Z0-9_]+$/")
|
|
51
|
-
return value
|
|
52
|
-
|
|
53
|
-
model_config = ConfigDict(
|
|
54
|
-
populate_by_name=True,
|
|
55
|
-
validate_assignment=True,
|
|
56
|
-
protected_namespaces=(),
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
def to_str(self) -> str:
|
|
61
|
-
"""Returns the string representation of the model using alias"""
|
|
62
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
63
|
-
|
|
64
|
-
def to_json(self) -> str:
|
|
65
|
-
"""Returns the JSON representation of the model using alias"""
|
|
66
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
67
|
-
return json.dumps(self.to_dict())
|
|
68
|
-
|
|
69
|
-
@classmethod
|
|
70
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
71
|
-
"""Create an instance of DomainResponse from a JSON string"""
|
|
72
|
-
return cls.from_dict(json.loads(json_str))
|
|
73
|
-
|
|
74
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
75
|
-
"""Return the dictionary representation of the model using alias.
|
|
76
|
-
|
|
77
|
-
This has the following differences from calling pydantic's
|
|
78
|
-
`self.model_dump(by_alias=True)`:
|
|
79
|
-
|
|
80
|
-
* `None` is only added to the output dict for nullable fields that
|
|
81
|
-
were set at model initialization. Other fields with value `None`
|
|
82
|
-
are ignored.
|
|
83
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
84
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
85
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
86
|
-
* OpenAPI `readOnly` fields are excluded.
|
|
87
|
-
"""
|
|
88
|
-
excluded_fields: Set[str] = set([
|
|
89
|
-
"pulp_href",
|
|
90
|
-
"prn",
|
|
91
|
-
"pulp_created",
|
|
92
|
-
"pulp_last_updated",
|
|
93
|
-
])
|
|
94
|
-
|
|
95
|
-
_dict = self.model_dump(
|
|
96
|
-
by_alias=True,
|
|
97
|
-
exclude=excluded_fields,
|
|
98
|
-
exclude_none=True,
|
|
99
|
-
)
|
|
100
|
-
# set to None if description (nullable) is None
|
|
101
|
-
# and model_fields_set contains the field
|
|
102
|
-
if self.description is None and "description" in self.model_fields_set:
|
|
103
|
-
_dict['description'] = None
|
|
104
|
-
|
|
105
|
-
return _dict
|
|
106
|
-
|
|
107
|
-
@classmethod
|
|
108
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
109
|
-
"""Create an instance of DomainResponse from a dict"""
|
|
110
|
-
if obj is None:
|
|
111
|
-
return None
|
|
112
|
-
|
|
113
|
-
if not isinstance(obj, dict):
|
|
114
|
-
return cls.model_validate(obj)
|
|
115
|
-
|
|
116
|
-
_obj = cls.model_validate({
|
|
117
|
-
"pulp_href": obj.get("pulp_href"),
|
|
118
|
-
"prn": obj.get("prn"),
|
|
119
|
-
"pulp_created": obj.get("pulp_created"),
|
|
120
|
-
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
121
|
-
"name": obj.get("name"),
|
|
122
|
-
"description": obj.get("description"),
|
|
123
|
-
"pulp_labels": obj.get("pulp_labels"),
|
|
124
|
-
"storage_class": obj.get("storage_class"),
|
|
125
|
-
"storage_settings": obj.get("storage_settings"),
|
|
126
|
-
"redirect_to_object_storage": obj.get("redirect_to_object_storage") if obj.get("redirect_to_object_storage") is not None else True,
|
|
127
|
-
"hide_guarded_distributions": obj.get("hide_guarded_distributions") if obj.get("hide_guarded_distributions") is not None else False
|
|
128
|
-
})
|
|
129
|
-
return _obj
|
|
130
|
-
|
|
131
|
-
|
|
@@ -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, Field, StrictBool, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
23
|
-
from typing import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class EvaluationResponse(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
Results from evaluating a proposed parameter to a PulpImport call.
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
context: StrictStr = Field(description="Parameter value being evaluated.")
|
|
31
|
-
is_valid: StrictBool = Field(description="True if evaluation passed, false otherwise.")
|
|
32
|
-
messages: List[StrictStr] = Field(description="Messages describing results of all evaluations done. May be an empty list.")
|
|
33
|
-
__properties: ClassVar[List[str]] = ["context", "is_valid", "messages"]
|
|
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 EvaluationResponse 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 EvaluationResponse 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
|
-
"context": obj.get("context"),
|
|
87
|
-
"is_valid": obj.get("is_valid"),
|
|
88
|
-
"messages": obj.get("messages")
|
|
89
|
-
})
|
|
90
|
-
return _obj
|
|
91
|
-
|
|
92
|
-
|
|
@@ -1,99 +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 import Optional, Set
|
|
24
|
-
from typing_extensions import Self
|
|
25
|
-
|
|
26
|
-
class FilesystemExport(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
Serializer for FilesystemExports.
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
task: Optional[StrictStr] = Field(default=None, description="A URI of the task that ran the Export.")
|
|
31
|
-
publication: Optional[StrictStr] = Field(default=None, description="A URI of the publication to be exported.")
|
|
32
|
-
repository_version: Optional[StrictStr] = Field(default=None, description="A URI of the repository version export.")
|
|
33
|
-
start_repository_version: Optional[StrictStr] = Field(default=None, description="The URI of the last-exported-repo-version.")
|
|
34
|
-
__properties: ClassVar[List[str]] = ["task", "publication", "repository_version", "start_repository_version"]
|
|
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 FilesystemExport from a JSON string"""
|
|
55
|
-
return cls.from_dict(json.loads(json_str))
|
|
56
|
-
|
|
57
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
-
"""Return the dictionary representation of the model using alias.
|
|
59
|
-
|
|
60
|
-
This has the following differences from calling pydantic's
|
|
61
|
-
`self.model_dump(by_alias=True)`:
|
|
62
|
-
|
|
63
|
-
* `None` is only added to the output dict for nullable fields that
|
|
64
|
-
were set at model initialization. Other fields with value `None`
|
|
65
|
-
are ignored.
|
|
66
|
-
"""
|
|
67
|
-
excluded_fields: Set[str] = set([
|
|
68
|
-
])
|
|
69
|
-
|
|
70
|
-
_dict = self.model_dump(
|
|
71
|
-
by_alias=True,
|
|
72
|
-
exclude=excluded_fields,
|
|
73
|
-
exclude_none=True,
|
|
74
|
-
)
|
|
75
|
-
# set to None if task (nullable) is None
|
|
76
|
-
# and model_fields_set contains the field
|
|
77
|
-
if self.task is None and "task" in self.model_fields_set:
|
|
78
|
-
_dict['task'] = None
|
|
79
|
-
|
|
80
|
-
return _dict
|
|
81
|
-
|
|
82
|
-
@classmethod
|
|
83
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
-
"""Create an instance of FilesystemExport from a dict"""
|
|
85
|
-
if obj is None:
|
|
86
|
-
return None
|
|
87
|
-
|
|
88
|
-
if not isinstance(obj, dict):
|
|
89
|
-
return cls.model_validate(obj)
|
|
90
|
-
|
|
91
|
-
_obj = cls.model_validate({
|
|
92
|
-
"task": obj.get("task"),
|
|
93
|
-
"publication": obj.get("publication"),
|
|
94
|
-
"repository_version": obj.get("repository_version"),
|
|
95
|
-
"start_repository_version": obj.get("start_repository_version")
|
|
96
|
-
})
|
|
97
|
-
return _obj
|
|
98
|
-
|
|
99
|
-
|