crc-pulp-python-client 20250819.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-pulp-python-client might be problematic. Click here for more details.
- crc-pulp_python-client/__init__.py +2 -0
- crc-pulp_python-client/api/__init__.py +14 -0
- crc-pulp_python-client/api/api_pypi_api.py +370 -0
- crc-pulp_python-client/api/api_pypi_legacy_api.py +393 -0
- crc-pulp_python-client/api/api_pypi_simple_api.py +1045 -0
- crc-pulp_python-client/api/content_packages_api.py +2594 -0
- crc-pulp_python-client/api/distributions_pypi_api.py +4186 -0
- crc-pulp_python-client/api/publications_pypi_api.py +2881 -0
- crc-pulp_python-client/api/pypi_metadata_api.py +385 -0
- crc-pulp_python-client/api/remotes_python_api.py +4552 -0
- crc-pulp_python-client/api/repositories_python_api.py +4856 -0
- crc-pulp_python-client/api/repositories_python_versions_api.py +1670 -0
- crc-pulp_python-client/api_client.py +798 -0
- crc-pulp_python-client/api_response.py +21 -0
- crc-pulp_python-client/configuration.py +628 -0
- crc-pulp_python-client/exceptions.py +200 -0
- crc-pulp_python-client/models/__init__.py +56 -0
- crc-pulp_python-client/models/async_operation_response.py +88 -0
- crc-pulp_python-client/models/content_summary_response.py +92 -0
- crc-pulp_python-client/models/exclude_platforms_enum.py +40 -0
- crc-pulp_python-client/models/my_permissions_response.py +88 -0
- crc-pulp_python-client/models/nested_role.py +93 -0
- crc-pulp_python-client/models/nested_role_response.py +92 -0
- crc-pulp_python-client/models/object_roles_response.py +96 -0
- crc-pulp_python-client/models/package_metadata_response.py +109 -0
- crc-pulp_python-client/models/package_types_enum.py +44 -0
- crc-pulp_python-client/models/package_upload_task_response.py +103 -0
- crc-pulp_python-client/models/paginated_repository_version_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_distribution_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_package_content_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_publication_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_remote_response_list.py +112 -0
- crc-pulp_python-client/models/paginatedpython_python_repository_response_list.py +112 -0
- crc-pulp_python-client/models/patchedpython_python_distribution.py +125 -0
- crc-pulp_python-client/models/patchedpython_python_remote.py +219 -0
- crc-pulp_python-client/models/patchedpython_python_repository.py +114 -0
- crc-pulp_python-client/models/policy_enum.py +39 -0
- crc-pulp_python-client/models/python_python_distribution.py +125 -0
- crc-pulp_python-client/models/python_python_distribution_response.py +149 -0
- crc-pulp_python-client/models/python_python_package_content_response.py +201 -0
- crc-pulp_python-client/models/python_python_publication.py +90 -0
- crc-pulp_python-client/models/python_python_publication_response.py +111 -0
- crc-pulp_python-client/models/python_python_remote.py +219 -0
- crc-pulp_python-client/models/python_python_remote_response.py +213 -0
- crc-pulp_python-client/models/python_python_remote_response_hidden_fields_inner.py +90 -0
- crc-pulp_python-client/models/python_python_repository.py +114 -0
- crc-pulp_python-client/models/python_python_repository_response.py +139 -0
- crc-pulp_python-client/models/repair.py +88 -0
- crc-pulp_python-client/models/repository_add_remove_content.py +93 -0
- crc-pulp_python-client/models/repository_sync_url.py +90 -0
- crc-pulp_python-client/models/repository_version_response.py +121 -0
- crc-pulp_python-client/models/set_label.py +103 -0
- crc-pulp_python-client/models/set_label_response.py +103 -0
- crc-pulp_python-client/models/summary_response.py +92 -0
- crc-pulp_python-client/models/unset_label.py +96 -0
- crc-pulp_python-client/models/unset_label_response.py +100 -0
- crc-pulp_python-client/py.typed +0 -0
- crc-pulp_python-client/rest.py +258 -0
- crc_pulp_python_client-20250819.1.dist-info/METADATA +25 -0
- crc_pulp_python_client-20250819.1.dist-info/RECORD +120 -0
- crc_pulp_python_client-20250819.1.dist-info/WHEEL +5 -0
- crc_pulp_python_client-20250819.1.dist-info/top_level.txt +2 -0
- services-pulp_python-client/__init__.py +2 -0
- services-pulp_python-client/api/__init__.py +14 -0
- services-pulp_python-client/api/api_pypi_api.py +370 -0
- services-pulp_python-client/api/api_pypi_legacy_api.py +393 -0
- services-pulp_python-client/api/api_pypi_simple_api.py +1045 -0
- services-pulp_python-client/api/content_packages_api.py +2594 -0
- services-pulp_python-client/api/distributions_pypi_api.py +4186 -0
- services-pulp_python-client/api/publications_pypi_api.py +2881 -0
- services-pulp_python-client/api/pypi_metadata_api.py +385 -0
- services-pulp_python-client/api/remotes_python_api.py +4552 -0
- services-pulp_python-client/api/repositories_python_api.py +4856 -0
- services-pulp_python-client/api/repositories_python_versions_api.py +1670 -0
- services-pulp_python-client/api_client.py +798 -0
- services-pulp_python-client/api_response.py +21 -0
- services-pulp_python-client/configuration.py +628 -0
- services-pulp_python-client/exceptions.py +200 -0
- services-pulp_python-client/models/__init__.py +56 -0
- services-pulp_python-client/models/async_operation_response.py +88 -0
- services-pulp_python-client/models/content_summary_response.py +92 -0
- services-pulp_python-client/models/exclude_platforms_enum.py +40 -0
- services-pulp_python-client/models/my_permissions_response.py +88 -0
- services-pulp_python-client/models/nested_role.py +93 -0
- services-pulp_python-client/models/nested_role_response.py +92 -0
- services-pulp_python-client/models/object_roles_response.py +96 -0
- services-pulp_python-client/models/package_metadata_response.py +109 -0
- services-pulp_python-client/models/package_types_enum.py +44 -0
- services-pulp_python-client/models/package_upload_task_response.py +103 -0
- services-pulp_python-client/models/paginated_repository_version_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_distribution_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_package_content_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_publication_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_remote_response_list.py +112 -0
- services-pulp_python-client/models/paginatedpython_python_repository_response_list.py +112 -0
- services-pulp_python-client/models/patchedpython_python_distribution.py +125 -0
- services-pulp_python-client/models/patchedpython_python_remote.py +219 -0
- services-pulp_python-client/models/patchedpython_python_repository.py +114 -0
- services-pulp_python-client/models/policy_enum.py +39 -0
- services-pulp_python-client/models/python_python_distribution.py +125 -0
- services-pulp_python-client/models/python_python_distribution_response.py +149 -0
- services-pulp_python-client/models/python_python_package_content_response.py +201 -0
- services-pulp_python-client/models/python_python_publication.py +90 -0
- services-pulp_python-client/models/python_python_publication_response.py +111 -0
- services-pulp_python-client/models/python_python_remote.py +219 -0
- services-pulp_python-client/models/python_python_remote_response.py +213 -0
- services-pulp_python-client/models/python_python_remote_response_hidden_fields_inner.py +90 -0
- services-pulp_python-client/models/python_python_repository.py +114 -0
- services-pulp_python-client/models/python_python_repository_response.py +139 -0
- services-pulp_python-client/models/repair.py +88 -0
- services-pulp_python-client/models/repository_add_remove_content.py +93 -0
- services-pulp_python-client/models/repository_sync_url.py +90 -0
- services-pulp_python-client/models/repository_version_response.py +121 -0
- services-pulp_python-client/models/set_label.py +103 -0
- services-pulp_python-client/models/set_label_response.py +103 -0
- services-pulp_python-client/models/summary_response.py +92 -0
- services-pulp_python-client/models/unset_label.py +96 -0
- services-pulp_python-client/models/unset_label_response.py +100 -0
- services-pulp_python-client/py.typed +0 -0
- services-pulp_python-client/rest.py +258 -0
|
@@ -0,0 +1,219 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from services-pulp_python-client.models.exclude_platforms_enum import ExcludePlatformsEnum
|
|
25
|
+
from services-pulp_python-client.models.package_types_enum import PackageTypesEnum
|
|
26
|
+
from services-pulp_python-client.models.policy_enum import PolicyEnum
|
|
27
|
+
from typing import Optional, Set
|
|
28
|
+
from typing_extensions import Self
|
|
29
|
+
|
|
30
|
+
class PatchedpythonPythonRemote(BaseModel):
|
|
31
|
+
"""
|
|
32
|
+
A Serializer for PythonRemote.
|
|
33
|
+
""" # noqa: E501
|
|
34
|
+
name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A unique name for this remote.")
|
|
35
|
+
url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The URL of an external content source.")
|
|
36
|
+
ca_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded CA certificate used to validate the server certificate presented by the remote server.")
|
|
37
|
+
client_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
|
|
38
|
+
client_key: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded private key used for authentication.")
|
|
39
|
+
tls_validation: Optional[StrictBool] = Field(default=None, description="If True, TLS peer validation must be performed.")
|
|
40
|
+
proxy_url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The proxy URL. Format: scheme://host:port")
|
|
41
|
+
proxy_username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to authenticte to the proxy.")
|
|
42
|
+
proxy_password: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed.")
|
|
43
|
+
username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to be used for authentication when syncing.")
|
|
44
|
+
password: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed.")
|
|
45
|
+
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
46
|
+
download_concurrency: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Total number of simultaneous connections. If not set then the default value will be used.")
|
|
47
|
+
max_retries: Optional[StrictInt] = Field(default=None, description="Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.")
|
|
48
|
+
policy: Optional[PolicyEnum] = Field(default=None, description="The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'on_demand' is the default. * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.")
|
|
49
|
+
total_timeout: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.")
|
|
50
|
+
connect_timeout: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.")
|
|
51
|
+
sock_connect_timeout: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.")
|
|
52
|
+
sock_read_timeout: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.")
|
|
53
|
+
headers: Optional[List[Dict[str, Any]]] = Field(default=None, description="Headers for aiohttp.Clientsession")
|
|
54
|
+
rate_limit: Optional[StrictInt] = Field(default=None, description="Limits requests per second for each concurrent downloader")
|
|
55
|
+
includes: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = Field(default=None, description="A list containing project specifiers for Python packages to include.")
|
|
56
|
+
excludes: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = Field(default=None, description="A list containing project specifiers for Python packages to exclude.")
|
|
57
|
+
prereleases: Optional[StrictBool] = Field(default=None, description="Whether or not to include pre-release packages in the sync.")
|
|
58
|
+
package_types: Optional[List[PackageTypesEnum]] = Field(default=None, description="The package types to sync for Python content. Leave blank to get everypackage type.")
|
|
59
|
+
keep_latest_packages: Optional[StrictInt] = Field(default=0, description="The amount of latest versions of a package to keep on sync, includespre-releases if synced. Default 0 keeps all versions.")
|
|
60
|
+
exclude_platforms: Optional[List[ExcludePlatformsEnum]] = Field(default=None, description="List of platforms to exclude syncing Python packages for. Possible valuesinclude: windows, macos, freebsd, and linux.")
|
|
61
|
+
__properties: ClassVar[List[str]] = ["name", "url", "ca_cert", "client_cert", "client_key", "tls_validation", "proxy_url", "proxy_username", "proxy_password", "username", "password", "pulp_labels", "download_concurrency", "max_retries", "policy", "total_timeout", "connect_timeout", "sock_connect_timeout", "sock_read_timeout", "headers", "rate_limit", "includes", "excludes", "prereleases", "package_types", "keep_latest_packages", "exclude_platforms"]
|
|
62
|
+
|
|
63
|
+
model_config = ConfigDict(
|
|
64
|
+
populate_by_name=True,
|
|
65
|
+
validate_assignment=True,
|
|
66
|
+
protected_namespaces=(),
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def to_str(self) -> str:
|
|
71
|
+
"""Returns the string representation of the model using alias"""
|
|
72
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
73
|
+
|
|
74
|
+
def to_json(self) -> str:
|
|
75
|
+
"""Returns the JSON representation of the model using alias"""
|
|
76
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
77
|
+
return json.dumps(self.to_dict())
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of PatchedpythonPythonRemote from a JSON string"""
|
|
82
|
+
return cls.from_dict(json.loads(json_str))
|
|
83
|
+
|
|
84
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
85
|
+
"""Return the dictionary representation of the model using alias.
|
|
86
|
+
|
|
87
|
+
This has the following differences from calling pydantic's
|
|
88
|
+
`self.model_dump(by_alias=True)`:
|
|
89
|
+
|
|
90
|
+
* `None` is only added to the output dict for nullable fields that
|
|
91
|
+
were set at model initialization. Other fields with value `None`
|
|
92
|
+
are ignored.
|
|
93
|
+
"""
|
|
94
|
+
excluded_fields: Set[str] = set([
|
|
95
|
+
])
|
|
96
|
+
|
|
97
|
+
_dict = self.model_dump(
|
|
98
|
+
by_alias=True,
|
|
99
|
+
exclude=excluded_fields,
|
|
100
|
+
exclude_none=True,
|
|
101
|
+
)
|
|
102
|
+
# set to None if ca_cert (nullable) is None
|
|
103
|
+
# and model_fields_set contains the field
|
|
104
|
+
if self.ca_cert is None and "ca_cert" in self.model_fields_set:
|
|
105
|
+
_dict['ca_cert'] = None
|
|
106
|
+
|
|
107
|
+
# set to None if client_cert (nullable) is None
|
|
108
|
+
# and model_fields_set contains the field
|
|
109
|
+
if self.client_cert is None and "client_cert" in self.model_fields_set:
|
|
110
|
+
_dict['client_cert'] = None
|
|
111
|
+
|
|
112
|
+
# set to None if client_key (nullable) is None
|
|
113
|
+
# and model_fields_set contains the field
|
|
114
|
+
if self.client_key is None and "client_key" in self.model_fields_set:
|
|
115
|
+
_dict['client_key'] = None
|
|
116
|
+
|
|
117
|
+
# set to None if proxy_url (nullable) is None
|
|
118
|
+
# and model_fields_set contains the field
|
|
119
|
+
if self.proxy_url is None and "proxy_url" in self.model_fields_set:
|
|
120
|
+
_dict['proxy_url'] = None
|
|
121
|
+
|
|
122
|
+
# set to None if proxy_username (nullable) is None
|
|
123
|
+
# and model_fields_set contains the field
|
|
124
|
+
if self.proxy_username is None and "proxy_username" in self.model_fields_set:
|
|
125
|
+
_dict['proxy_username'] = None
|
|
126
|
+
|
|
127
|
+
# set to None if proxy_password (nullable) is None
|
|
128
|
+
# and model_fields_set contains the field
|
|
129
|
+
if self.proxy_password is None and "proxy_password" in self.model_fields_set:
|
|
130
|
+
_dict['proxy_password'] = None
|
|
131
|
+
|
|
132
|
+
# set to None if username (nullable) is None
|
|
133
|
+
# and model_fields_set contains the field
|
|
134
|
+
if self.username is None and "username" in self.model_fields_set:
|
|
135
|
+
_dict['username'] = None
|
|
136
|
+
|
|
137
|
+
# set to None if password (nullable) is None
|
|
138
|
+
# and model_fields_set contains the field
|
|
139
|
+
if self.password is None and "password" in self.model_fields_set:
|
|
140
|
+
_dict['password'] = None
|
|
141
|
+
|
|
142
|
+
# set to None if download_concurrency (nullable) is None
|
|
143
|
+
# and model_fields_set contains the field
|
|
144
|
+
if self.download_concurrency is None and "download_concurrency" in self.model_fields_set:
|
|
145
|
+
_dict['download_concurrency'] = None
|
|
146
|
+
|
|
147
|
+
# set to None if max_retries (nullable) is None
|
|
148
|
+
# and model_fields_set contains the field
|
|
149
|
+
if self.max_retries is None and "max_retries" in self.model_fields_set:
|
|
150
|
+
_dict['max_retries'] = None
|
|
151
|
+
|
|
152
|
+
# set to None if total_timeout (nullable) is None
|
|
153
|
+
# and model_fields_set contains the field
|
|
154
|
+
if self.total_timeout is None and "total_timeout" in self.model_fields_set:
|
|
155
|
+
_dict['total_timeout'] = None
|
|
156
|
+
|
|
157
|
+
# set to None if connect_timeout (nullable) is None
|
|
158
|
+
# and model_fields_set contains the field
|
|
159
|
+
if self.connect_timeout is None and "connect_timeout" in self.model_fields_set:
|
|
160
|
+
_dict['connect_timeout'] = None
|
|
161
|
+
|
|
162
|
+
# set to None if sock_connect_timeout (nullable) is None
|
|
163
|
+
# and model_fields_set contains the field
|
|
164
|
+
if self.sock_connect_timeout is None and "sock_connect_timeout" in self.model_fields_set:
|
|
165
|
+
_dict['sock_connect_timeout'] = None
|
|
166
|
+
|
|
167
|
+
# set to None if sock_read_timeout (nullable) is None
|
|
168
|
+
# and model_fields_set contains the field
|
|
169
|
+
if self.sock_read_timeout is None and "sock_read_timeout" in self.model_fields_set:
|
|
170
|
+
_dict['sock_read_timeout'] = None
|
|
171
|
+
|
|
172
|
+
# set to None if rate_limit (nullable) is None
|
|
173
|
+
# and model_fields_set contains the field
|
|
174
|
+
if self.rate_limit is None and "rate_limit" in self.model_fields_set:
|
|
175
|
+
_dict['rate_limit'] = None
|
|
176
|
+
|
|
177
|
+
return _dict
|
|
178
|
+
|
|
179
|
+
@classmethod
|
|
180
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
181
|
+
"""Create an instance of PatchedpythonPythonRemote from a dict"""
|
|
182
|
+
if obj is None:
|
|
183
|
+
return None
|
|
184
|
+
|
|
185
|
+
if not isinstance(obj, dict):
|
|
186
|
+
return cls.model_validate(obj)
|
|
187
|
+
|
|
188
|
+
_obj = cls.model_validate({
|
|
189
|
+
"name": obj.get("name"),
|
|
190
|
+
"url": obj.get("url"),
|
|
191
|
+
"ca_cert": obj.get("ca_cert"),
|
|
192
|
+
"client_cert": obj.get("client_cert"),
|
|
193
|
+
"client_key": obj.get("client_key"),
|
|
194
|
+
"tls_validation": obj.get("tls_validation"),
|
|
195
|
+
"proxy_url": obj.get("proxy_url"),
|
|
196
|
+
"proxy_username": obj.get("proxy_username"),
|
|
197
|
+
"proxy_password": obj.get("proxy_password"),
|
|
198
|
+
"username": obj.get("username"),
|
|
199
|
+
"password": obj.get("password"),
|
|
200
|
+
"pulp_labels": obj.get("pulp_labels"),
|
|
201
|
+
"download_concurrency": obj.get("download_concurrency"),
|
|
202
|
+
"max_retries": obj.get("max_retries"),
|
|
203
|
+
"policy": obj.get("policy"),
|
|
204
|
+
"total_timeout": obj.get("total_timeout"),
|
|
205
|
+
"connect_timeout": obj.get("connect_timeout"),
|
|
206
|
+
"sock_connect_timeout": obj.get("sock_connect_timeout"),
|
|
207
|
+
"sock_read_timeout": obj.get("sock_read_timeout"),
|
|
208
|
+
"headers": obj.get("headers"),
|
|
209
|
+
"rate_limit": obj.get("rate_limit"),
|
|
210
|
+
"includes": obj.get("includes"),
|
|
211
|
+
"excludes": obj.get("excludes"),
|
|
212
|
+
"prereleases": obj.get("prereleases"),
|
|
213
|
+
"package_types": obj.get("package_types"),
|
|
214
|
+
"keep_latest_packages": obj.get("keep_latest_packages") if obj.get("keep_latest_packages") is not None else 0,
|
|
215
|
+
"exclude_platforms": obj.get("exclude_platforms")
|
|
216
|
+
})
|
|
217
|
+
return _obj
|
|
218
|
+
|
|
219
|
+
|
|
@@ -0,0 +1,114 @@
|
|
|
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 PatchedpythonPythonRepository(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Serializer for Python Repositories.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
32
|
+
name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A unique name for this repository.")
|
|
33
|
+
description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="An optional description.")
|
|
34
|
+
retain_repo_versions: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Retain X versions of the repository. Default is null which retains all versions.")
|
|
35
|
+
remote: Optional[StrictStr] = Field(default=None, description="An optional remote to use by default when syncing.")
|
|
36
|
+
autopublish: Optional[StrictBool] = Field(default=False, description="Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository.")
|
|
37
|
+
__properties: ClassVar[List[str]] = ["pulp_labels", "name", "description", "retain_repo_versions", "remote", "autopublish"]
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of PatchedpythonPythonRepository from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
])
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
# set to None if description (nullable) is None
|
|
79
|
+
# and model_fields_set contains the field
|
|
80
|
+
if self.description is None and "description" in self.model_fields_set:
|
|
81
|
+
_dict['description'] = None
|
|
82
|
+
|
|
83
|
+
# set to None if retain_repo_versions (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.retain_repo_versions is None and "retain_repo_versions" in self.model_fields_set:
|
|
86
|
+
_dict['retain_repo_versions'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if remote (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.remote is None and "remote" in self.model_fields_set:
|
|
91
|
+
_dict['remote'] = None
|
|
92
|
+
|
|
93
|
+
return _dict
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
97
|
+
"""Create an instance of PatchedpythonPythonRepository from a dict"""
|
|
98
|
+
if obj is None:
|
|
99
|
+
return None
|
|
100
|
+
|
|
101
|
+
if not isinstance(obj, dict):
|
|
102
|
+
return cls.model_validate(obj)
|
|
103
|
+
|
|
104
|
+
_obj = cls.model_validate({
|
|
105
|
+
"pulp_labels": obj.get("pulp_labels"),
|
|
106
|
+
"name": obj.get("name"),
|
|
107
|
+
"description": obj.get("description"),
|
|
108
|
+
"retain_repo_versions": obj.get("retain_repo_versions"),
|
|
109
|
+
"remote": obj.get("remote"),
|
|
110
|
+
"autopublish": obj.get("autopublish") if obj.get("autopublish") is not None else False
|
|
111
|
+
})
|
|
112
|
+
return _obj
|
|
113
|
+
|
|
114
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
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 json
|
|
18
|
+
from enum import Enum
|
|
19
|
+
from typing_extensions import Self
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class PolicyEnum(str, Enum):
|
|
23
|
+
"""
|
|
24
|
+
* `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
allowed enum values
|
|
29
|
+
"""
|
|
30
|
+
IMMEDIATE = 'immediate'
|
|
31
|
+
ON_DEMAND = 'on_demand'
|
|
32
|
+
STREAMED = 'streamed'
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_json(cls, json_str: str) -> Self:
|
|
36
|
+
"""Create an instance of PolicyEnum from a JSON string"""
|
|
37
|
+
return cls(json.loads(json_str))
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,125 @@
|
|
|
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 PythonPythonDistribution(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Serializer for Pulp distributions for the Python type.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
base_path: Annotated[str, Field(min_length=1, strict=True)] = 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\")")
|
|
32
|
+
content_guard: Optional[StrictStr] = Field(default=None, description="An optional content-guard.")
|
|
33
|
+
hidden: Optional[StrictBool] = Field(default=False, description="Whether this distribution should be shown in the content app.")
|
|
34
|
+
pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
|
|
35
|
+
name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A unique name. Ex, `rawhide` and `stable`.")
|
|
36
|
+
repository: Optional[StrictStr] = Field(default=None, description="The latest RepositoryVersion for this Repository will be served.")
|
|
37
|
+
publication: Optional[StrictStr] = Field(default=None, description="Publication to be served")
|
|
38
|
+
allow_uploads: Optional[StrictBool] = Field(default=True, description="Allow packages to be uploaded to this index.")
|
|
39
|
+
remote: Optional[StrictStr] = Field(default=None, description="Remote that can be used to fetch content when using pull-through caching.")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["base_path", "content_guard", "hidden", "pulp_labels", "name", "repository", "publication", "allow_uploads", "remote"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of PythonPythonDistribution from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
# set to None if content_guard (nullable) is None
|
|
82
|
+
# and model_fields_set contains the field
|
|
83
|
+
if self.content_guard is None and "content_guard" in self.model_fields_set:
|
|
84
|
+
_dict['content_guard'] = None
|
|
85
|
+
|
|
86
|
+
# set to None if repository (nullable) is None
|
|
87
|
+
# and model_fields_set contains the field
|
|
88
|
+
if self.repository is None and "repository" in self.model_fields_set:
|
|
89
|
+
_dict['repository'] = None
|
|
90
|
+
|
|
91
|
+
# set to None if publication (nullable) is None
|
|
92
|
+
# and model_fields_set contains the field
|
|
93
|
+
if self.publication is None and "publication" in self.model_fields_set:
|
|
94
|
+
_dict['publication'] = None
|
|
95
|
+
|
|
96
|
+
# set to None if remote (nullable) is None
|
|
97
|
+
# and model_fields_set contains the field
|
|
98
|
+
if self.remote is None and "remote" in self.model_fields_set:
|
|
99
|
+
_dict['remote'] = None
|
|
100
|
+
|
|
101
|
+
return _dict
|
|
102
|
+
|
|
103
|
+
@classmethod
|
|
104
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
105
|
+
"""Create an instance of PythonPythonDistribution from a dict"""
|
|
106
|
+
if obj is None:
|
|
107
|
+
return None
|
|
108
|
+
|
|
109
|
+
if not isinstance(obj, dict):
|
|
110
|
+
return cls.model_validate(obj)
|
|
111
|
+
|
|
112
|
+
_obj = cls.model_validate({
|
|
113
|
+
"base_path": obj.get("base_path"),
|
|
114
|
+
"content_guard": obj.get("content_guard"),
|
|
115
|
+
"hidden": obj.get("hidden") if obj.get("hidden") is not None else False,
|
|
116
|
+
"pulp_labels": obj.get("pulp_labels"),
|
|
117
|
+
"name": obj.get("name"),
|
|
118
|
+
"repository": obj.get("repository"),
|
|
119
|
+
"publication": obj.get("publication"),
|
|
120
|
+
"allow_uploads": obj.get("allow_uploads") if obj.get("allow_uploads") is not None else True,
|
|
121
|
+
"remote": obj.get("remote")
|
|
122
|
+
})
|
|
123
|
+
return _obj
|
|
124
|
+
|
|
125
|
+
|
|
@@ -0,0 +1,149 @@
|
|
|
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 PythonPythonDistributionResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Serializer for Pulp distributions for the Python type.
|
|
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] = None
|
|
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
|
+
publication: Optional[StrictStr] = Field(default=None, description="Publication to be served")
|
|
44
|
+
allow_uploads: Optional[StrictBool] = Field(default=True, description="Allow packages to be uploaded to this index.")
|
|
45
|
+
remote: Optional[StrictStr] = Field(default=None, description="Remote that can be used to fetch content when using pull-through caching.")
|
|
46
|
+
__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", "publication", "allow_uploads", "remote"]
|
|
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 PythonPythonDistributionResponse 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
|
+
"pulp_created",
|
|
89
|
+
"pulp_last_updated",
|
|
90
|
+
"base_url",
|
|
91
|
+
"no_content_change_since",
|
|
92
|
+
])
|
|
93
|
+
|
|
94
|
+
_dict = self.model_dump(
|
|
95
|
+
by_alias=True,
|
|
96
|
+
exclude=excluded_fields,
|
|
97
|
+
exclude_none=True,
|
|
98
|
+
)
|
|
99
|
+
# set to None if content_guard (nullable) is None
|
|
100
|
+
# and model_fields_set contains the field
|
|
101
|
+
if self.content_guard is None and "content_guard" in self.model_fields_set:
|
|
102
|
+
_dict['content_guard'] = None
|
|
103
|
+
|
|
104
|
+
# set to None if repository (nullable) is None
|
|
105
|
+
# and model_fields_set contains the field
|
|
106
|
+
if self.repository is None and "repository" in self.model_fields_set:
|
|
107
|
+
_dict['repository'] = None
|
|
108
|
+
|
|
109
|
+
# set to None if publication (nullable) is None
|
|
110
|
+
# and model_fields_set contains the field
|
|
111
|
+
if self.publication is None and "publication" in self.model_fields_set:
|
|
112
|
+
_dict['publication'] = None
|
|
113
|
+
|
|
114
|
+
# set to None if remote (nullable) is None
|
|
115
|
+
# and model_fields_set contains the field
|
|
116
|
+
if self.remote is None and "remote" in self.model_fields_set:
|
|
117
|
+
_dict['remote'] = None
|
|
118
|
+
|
|
119
|
+
return _dict
|
|
120
|
+
|
|
121
|
+
@classmethod
|
|
122
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
123
|
+
"""Create an instance of PythonPythonDistributionResponse from a dict"""
|
|
124
|
+
if obj is None:
|
|
125
|
+
return None
|
|
126
|
+
|
|
127
|
+
if not isinstance(obj, dict):
|
|
128
|
+
return cls.model_validate(obj)
|
|
129
|
+
|
|
130
|
+
_obj = cls.model_validate({
|
|
131
|
+
"pulp_href": obj.get("pulp_href"),
|
|
132
|
+
"prn": obj.get("prn"),
|
|
133
|
+
"pulp_created": obj.get("pulp_created"),
|
|
134
|
+
"pulp_last_updated": obj.get("pulp_last_updated"),
|
|
135
|
+
"base_path": obj.get("base_path"),
|
|
136
|
+
"base_url": obj.get("base_url"),
|
|
137
|
+
"content_guard": obj.get("content_guard"),
|
|
138
|
+
"no_content_change_since": obj.get("no_content_change_since"),
|
|
139
|
+
"hidden": obj.get("hidden") if obj.get("hidden") is not None else False,
|
|
140
|
+
"pulp_labels": obj.get("pulp_labels"),
|
|
141
|
+
"name": obj.get("name"),
|
|
142
|
+
"repository": obj.get("repository"),
|
|
143
|
+
"publication": obj.get("publication"),
|
|
144
|
+
"allow_uploads": obj.get("allow_uploads") if obj.get("allow_uploads") is not None else True,
|
|
145
|
+
"remote": obj.get("remote")
|
|
146
|
+
})
|
|
147
|
+
return _obj
|
|
148
|
+
|
|
149
|
+
|