crc-pulp-npm-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-pulp-npm-client might be problematic. Click here for more details.

Files changed (49) hide show
  1. crc-pulp_npm-client/api_client.py +1 -1
  2. crc-pulp_npm-client/configuration.py +3 -3
  3. {crc_pulp_npm_client-20250819.1.dist-info → crc_pulp_npm_client-20250821.1.dist-info}/METADATA +1 -1
  4. crc_pulp_npm_client-20250821.1.dist-info/RECORD +45 -0
  5. crc_pulp_npm_client-20250821.1.dist-info/top_level.txt +1 -0
  6. crc_pulp_npm_client-20250819.1.dist-info/RECORD +0 -86
  7. crc_pulp_npm_client-20250819.1.dist-info/top_level.txt +0 -2
  8. services-pulp_npm-client/__init__.py +0 -2
  9. services-pulp_npm-client/api/__init__.py +0 -9
  10. services-pulp_npm-client/api/content_packages_api.py +0 -1964
  11. services-pulp_npm-client/api/distributions_npm_api.py +0 -2934
  12. services-pulp_npm-client/api/remotes_npm_api.py +0 -2962
  13. services-pulp_npm-client/api/repositories_npm_api.py +0 -3604
  14. services-pulp_npm-client/api/repositories_npm_versions_api.py +0 -1670
  15. services-pulp_npm-client/api_client.py +0 -798
  16. services-pulp_npm-client/api_response.py +0 -21
  17. services-pulp_npm-client/configuration.py +0 -628
  18. services-pulp_npm-client/exceptions.py +0 -200
  19. services-pulp_npm-client/models/__init__.py +0 -44
  20. services-pulp_npm-client/models/async_operation_response.py +0 -88
  21. services-pulp_npm-client/models/content_summary_response.py +0 -92
  22. services-pulp_npm-client/models/npm_npm_distribution.py +0 -116
  23. services-pulp_npm-client/models/npm_npm_distribution_response.py +0 -140
  24. services-pulp_npm-client/models/npm_npm_remote.py +0 -205
  25. services-pulp_npm-client/models/npm_npm_remote_response.py +0 -199
  26. services-pulp_npm-client/models/npm_npm_remote_response_hidden_fields_inner.py +0 -90
  27. services-pulp_npm-client/models/npm_npm_repository.py +0 -112
  28. services-pulp_npm-client/models/npm_npm_repository_response.py +0 -137
  29. services-pulp_npm-client/models/npm_package_response.py +0 -113
  30. services-pulp_npm-client/models/paginated_repository_version_response_list.py +0 -112
  31. services-pulp_npm-client/models/paginatednpm_npm_distribution_response_list.py +0 -112
  32. services-pulp_npm-client/models/paginatednpm_npm_remote_response_list.py +0 -112
  33. services-pulp_npm-client/models/paginatednpm_npm_repository_response_list.py +0 -112
  34. services-pulp_npm-client/models/paginatednpm_package_response_list.py +0 -112
  35. services-pulp_npm-client/models/patchednpm_npm_distribution.py +0 -116
  36. services-pulp_npm-client/models/patchednpm_npm_remote.py +0 -205
  37. services-pulp_npm-client/models/patchednpm_npm_repository.py +0 -112
  38. services-pulp_npm-client/models/policy_enum.py +0 -39
  39. services-pulp_npm-client/models/repair.py +0 -88
  40. services-pulp_npm-client/models/repository_add_remove_content.py +0 -93
  41. services-pulp_npm-client/models/repository_sync_url.py +0 -90
  42. services-pulp_npm-client/models/repository_version_response.py +0 -121
  43. services-pulp_npm-client/models/set_label.py +0 -103
  44. services-pulp_npm-client/models/set_label_response.py +0 -103
  45. services-pulp_npm-client/models/unset_label.py +0 -96
  46. services-pulp_npm-client/models/unset_label_response.py +0 -100
  47. services-pulp_npm-client/py.typed +0 -0
  48. services-pulp_npm-client/rest.py +0 -258
  49. {crc_pulp_npm_client-20250819.1.dist-info → crc_pulp_npm_client-20250821.1.dist-info}/WHEEL +0 -0
@@ -1,205 +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, StrictInt, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional, Union
23
- from typing_extensions import Annotated
24
- from services-pulp_npm-client.models.policy_enum import PolicyEnum
25
- from typing import Optional, Set
26
- from typing_extensions import Self
27
-
28
- class NpmNpmRemote(BaseModel):
29
- """
30
- A Serializer for NpmRemote. Add any new fields if defined on NpmRemote. Similar to the example above, in PackageSerializer. Additional validators can be added to the parent validators list For example:: class Meta: validators = core_serializers.RemoteSerializer.Meta.validators + [myValidator1, ...] By default the 'policy' field in core_serializers.RemoteSerializer only validates the choice 'immediate'. To add on-demand support for more 'policy' options, e.g. 'streamed' or 'on_demand', re-define the 'policy' option as follows::
31
- """ # noqa: E501
32
- name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A unique name for this remote.")
33
- url: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The URL of an external content source.")
34
- 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.")
35
- client_cert: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
36
- client_key: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A PEM encoded private key used for authentication.")
37
- tls_validation: Optional[StrictBool] = Field(default=None, description="If True, TLS peer validation must be performed.")
38
- proxy_url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The proxy URL. Format: scheme://host:port")
39
- proxy_username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to authenticte to the proxy.")
40
- 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.")
41
- username: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The username to be used for authentication when syncing.")
42
- 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.")
43
- pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
44
- 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.")
45
- 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.")
46
- policy: Optional[PolicyEnum] = Field(default=None, description="The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'immediate' 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.")
47
- 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.")
48
- 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.")
49
- 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.")
50
- 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.")
51
- headers: Optional[List[Dict[str, Any]]] = Field(default=None, description="Headers for aiohttp.Clientsession")
52
- rate_limit: Optional[StrictInt] = Field(default=None, description="Limits requests per second for each concurrent downloader")
53
- __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"]
54
-
55
- model_config = ConfigDict(
56
- populate_by_name=True,
57
- validate_assignment=True,
58
- protected_namespaces=(),
59
- )
60
-
61
-
62
- def to_str(self) -> str:
63
- """Returns the string representation of the model using alias"""
64
- return pprint.pformat(self.model_dump(by_alias=True))
65
-
66
- def to_json(self) -> str:
67
- """Returns the JSON representation of the model using alias"""
68
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
69
- return json.dumps(self.to_dict())
70
-
71
- @classmethod
72
- def from_json(cls, json_str: str) -> Optional[Self]:
73
- """Create an instance of NpmNpmRemote from a JSON string"""
74
- return cls.from_dict(json.loads(json_str))
75
-
76
- def to_dict(self) -> Dict[str, Any]:
77
- """Return the dictionary representation of the model using alias.
78
-
79
- This has the following differences from calling pydantic's
80
- `self.model_dump(by_alias=True)`:
81
-
82
- * `None` is only added to the output dict for nullable fields that
83
- were set at model initialization. Other fields with value `None`
84
- are ignored.
85
- """
86
- excluded_fields: Set[str] = set([
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 ca_cert (nullable) is None
95
- # and model_fields_set contains the field
96
- if self.ca_cert is None and "ca_cert" in self.model_fields_set:
97
- _dict['ca_cert'] = None
98
-
99
- # set to None if client_cert (nullable) is None
100
- # and model_fields_set contains the field
101
- if self.client_cert is None and "client_cert" in self.model_fields_set:
102
- _dict['client_cert'] = None
103
-
104
- # set to None if client_key (nullable) is None
105
- # and model_fields_set contains the field
106
- if self.client_key is None and "client_key" in self.model_fields_set:
107
- _dict['client_key'] = None
108
-
109
- # set to None if proxy_url (nullable) is None
110
- # and model_fields_set contains the field
111
- if self.proxy_url is None and "proxy_url" in self.model_fields_set:
112
- _dict['proxy_url'] = None
113
-
114
- # set to None if proxy_username (nullable) is None
115
- # and model_fields_set contains the field
116
- if self.proxy_username is None and "proxy_username" in self.model_fields_set:
117
- _dict['proxy_username'] = None
118
-
119
- # set to None if proxy_password (nullable) is None
120
- # and model_fields_set contains the field
121
- if self.proxy_password is None and "proxy_password" in self.model_fields_set:
122
- _dict['proxy_password'] = None
123
-
124
- # set to None if username (nullable) is None
125
- # and model_fields_set contains the field
126
- if self.username is None and "username" in self.model_fields_set:
127
- _dict['username'] = None
128
-
129
- # set to None if password (nullable) is None
130
- # and model_fields_set contains the field
131
- if self.password is None and "password" in self.model_fields_set:
132
- _dict['password'] = None
133
-
134
- # set to None if download_concurrency (nullable) is None
135
- # and model_fields_set contains the field
136
- if self.download_concurrency is None and "download_concurrency" in self.model_fields_set:
137
- _dict['download_concurrency'] = None
138
-
139
- # set to None if max_retries (nullable) is None
140
- # and model_fields_set contains the field
141
- if self.max_retries is None and "max_retries" in self.model_fields_set:
142
- _dict['max_retries'] = None
143
-
144
- # set to None if total_timeout (nullable) is None
145
- # and model_fields_set contains the field
146
- if self.total_timeout is None and "total_timeout" in self.model_fields_set:
147
- _dict['total_timeout'] = None
148
-
149
- # set to None if connect_timeout (nullable) is None
150
- # and model_fields_set contains the field
151
- if self.connect_timeout is None and "connect_timeout" in self.model_fields_set:
152
- _dict['connect_timeout'] = None
153
-
154
- # set to None if sock_connect_timeout (nullable) is None
155
- # and model_fields_set contains the field
156
- if self.sock_connect_timeout is None and "sock_connect_timeout" in self.model_fields_set:
157
- _dict['sock_connect_timeout'] = None
158
-
159
- # set to None if sock_read_timeout (nullable) is None
160
- # and model_fields_set contains the field
161
- if self.sock_read_timeout is None and "sock_read_timeout" in self.model_fields_set:
162
- _dict['sock_read_timeout'] = None
163
-
164
- # set to None if rate_limit (nullable) is None
165
- # and model_fields_set contains the field
166
- if self.rate_limit is None and "rate_limit" in self.model_fields_set:
167
- _dict['rate_limit'] = None
168
-
169
- return _dict
170
-
171
- @classmethod
172
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
173
- """Create an instance of NpmNpmRemote from a dict"""
174
- if obj is None:
175
- return None
176
-
177
- if not isinstance(obj, dict):
178
- return cls.model_validate(obj)
179
-
180
- _obj = cls.model_validate({
181
- "name": obj.get("name"),
182
- "url": obj.get("url"),
183
- "ca_cert": obj.get("ca_cert"),
184
- "client_cert": obj.get("client_cert"),
185
- "client_key": obj.get("client_key"),
186
- "tls_validation": obj.get("tls_validation"),
187
- "proxy_url": obj.get("proxy_url"),
188
- "proxy_username": obj.get("proxy_username"),
189
- "proxy_password": obj.get("proxy_password"),
190
- "username": obj.get("username"),
191
- "password": obj.get("password"),
192
- "pulp_labels": obj.get("pulp_labels"),
193
- "download_concurrency": obj.get("download_concurrency"),
194
- "max_retries": obj.get("max_retries"),
195
- "policy": obj.get("policy"),
196
- "total_timeout": obj.get("total_timeout"),
197
- "connect_timeout": obj.get("connect_timeout"),
198
- "sock_connect_timeout": obj.get("sock_connect_timeout"),
199
- "sock_read_timeout": obj.get("sock_read_timeout"),
200
- "headers": obj.get("headers"),
201
- "rate_limit": obj.get("rate_limit")
202
- })
203
- return _obj
204
-
205
-
@@ -1,199 +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, Union
24
- from typing_extensions import Annotated
25
- from services-pulp_npm-client.models.npm_npm_remote_response_hidden_fields_inner import NpmNpmRemoteResponseHiddenFieldsInner
26
- from services-pulp_npm-client.models.policy_enum import PolicyEnum
27
- from typing import Optional, Set
28
- from typing_extensions import Self
29
-
30
- class NpmNpmRemoteResponse(BaseModel):
31
- """
32
- A Serializer for NpmRemote. Add any new fields if defined on NpmRemote. Similar to the example above, in PackageSerializer. Additional validators can be added to the parent validators list For example:: class Meta: validators = core_serializers.RemoteSerializer.Meta.validators + [myValidator1, ...] By default the 'policy' field in core_serializers.RemoteSerializer only validates the choice 'immediate'. To add on-demand support for more 'policy' options, e.g. 'streamed' or 'on_demand', re-define the 'policy' option as follows::
33
- """ # noqa: E501
34
- pulp_href: Optional[StrictStr] = None
35
- prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
36
- pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
37
- pulp_last_updated: Optional[datetime] = Field(default=None, description="Timestamp of the most recent update of the remote.")
38
- name: StrictStr = Field(description="A unique name for this remote.")
39
- url: StrictStr = Field(description="The URL of an external content source.")
40
- ca_cert: Optional[StrictStr] = Field(default=None, description="A PEM encoded CA certificate used to validate the server certificate presented by the remote server.")
41
- client_cert: Optional[StrictStr] = Field(default=None, description="A PEM encoded client certificate used for authentication.")
42
- tls_validation: Optional[StrictBool] = Field(default=None, description="If True, TLS peer validation must be performed.")
43
- proxy_url: Optional[StrictStr] = Field(default=None, description="The proxy URL. Format: scheme://host:port")
44
- pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
45
- 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.")
46
- 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.")
47
- policy: Optional[PolicyEnum] = Field(default=None, description="The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'immediate' 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.")
48
- 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.")
49
- 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.")
50
- 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.")
51
- 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.")
52
- headers: Optional[List[Dict[str, Any]]] = Field(default=None, description="Headers for aiohttp.Clientsession")
53
- rate_limit: Optional[StrictInt] = Field(default=None, description="Limits requests per second for each concurrent downloader")
54
- hidden_fields: Optional[List[NpmNpmRemoteResponseHiddenFieldsInner]] = Field(default=None, description="List of hidden (write only) fields")
55
- __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "name", "url", "ca_cert", "client_cert", "tls_validation", "proxy_url", "pulp_labels", "download_concurrency", "max_retries", "policy", "total_timeout", "connect_timeout", "sock_connect_timeout", "sock_read_timeout", "headers", "rate_limit", "hidden_fields"]
56
-
57
- model_config = ConfigDict(
58
- populate_by_name=True,
59
- validate_assignment=True,
60
- protected_namespaces=(),
61
- )
62
-
63
-
64
- def to_str(self) -> str:
65
- """Returns the string representation of the model using alias"""
66
- return pprint.pformat(self.model_dump(by_alias=True))
67
-
68
- def to_json(self) -> str:
69
- """Returns the JSON representation of the model using alias"""
70
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
71
- return json.dumps(self.to_dict())
72
-
73
- @classmethod
74
- def from_json(cls, json_str: str) -> Optional[Self]:
75
- """Create an instance of NpmNpmRemoteResponse from a JSON string"""
76
- return cls.from_dict(json.loads(json_str))
77
-
78
- def to_dict(self) -> Dict[str, Any]:
79
- """Return the dictionary representation of the model using alias.
80
-
81
- This has the following differences from calling pydantic's
82
- `self.model_dump(by_alias=True)`:
83
-
84
- * `None` is only added to the output dict for nullable fields that
85
- were set at model initialization. Other fields with value `None`
86
- are ignored.
87
- * OpenAPI `readOnly` fields are excluded.
88
- * OpenAPI `readOnly` fields are excluded.
89
- * OpenAPI `readOnly` fields are excluded.
90
- * OpenAPI `readOnly` fields are excluded.
91
- * OpenAPI `readOnly` fields are excluded.
92
- """
93
- excluded_fields: Set[str] = set([
94
- "pulp_href",
95
- "prn",
96
- "pulp_created",
97
- "pulp_last_updated",
98
- "hidden_fields",
99
- ])
100
-
101
- _dict = self.model_dump(
102
- by_alias=True,
103
- exclude=excluded_fields,
104
- exclude_none=True,
105
- )
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
- # set to None if ca_cert (nullable) is None
114
- # and model_fields_set contains the field
115
- if self.ca_cert is None and "ca_cert" in self.model_fields_set:
116
- _dict['ca_cert'] = None
117
-
118
- # set to None if client_cert (nullable) is None
119
- # and model_fields_set contains the field
120
- if self.client_cert is None and "client_cert" in self.model_fields_set:
121
- _dict['client_cert'] = None
122
-
123
- # set to None if proxy_url (nullable) is None
124
- # and model_fields_set contains the field
125
- if self.proxy_url is None and "proxy_url" in self.model_fields_set:
126
- _dict['proxy_url'] = None
127
-
128
- # set to None if download_concurrency (nullable) is None
129
- # and model_fields_set contains the field
130
- if self.download_concurrency is None and "download_concurrency" in self.model_fields_set:
131
- _dict['download_concurrency'] = None
132
-
133
- # set to None if max_retries (nullable) is None
134
- # and model_fields_set contains the field
135
- if self.max_retries is None and "max_retries" in self.model_fields_set:
136
- _dict['max_retries'] = None
137
-
138
- # set to None if total_timeout (nullable) is None
139
- # and model_fields_set contains the field
140
- if self.total_timeout is None and "total_timeout" in self.model_fields_set:
141
- _dict['total_timeout'] = None
142
-
143
- # set to None if connect_timeout (nullable) is None
144
- # and model_fields_set contains the field
145
- if self.connect_timeout is None and "connect_timeout" in self.model_fields_set:
146
- _dict['connect_timeout'] = None
147
-
148
- # set to None if sock_connect_timeout (nullable) is None
149
- # and model_fields_set contains the field
150
- if self.sock_connect_timeout is None and "sock_connect_timeout" in self.model_fields_set:
151
- _dict['sock_connect_timeout'] = None
152
-
153
- # set to None if sock_read_timeout (nullable) is None
154
- # and model_fields_set contains the field
155
- if self.sock_read_timeout is None and "sock_read_timeout" in self.model_fields_set:
156
- _dict['sock_read_timeout'] = None
157
-
158
- # set to None if rate_limit (nullable) is None
159
- # and model_fields_set contains the field
160
- if self.rate_limit is None and "rate_limit" in self.model_fields_set:
161
- _dict['rate_limit'] = None
162
-
163
- return _dict
164
-
165
- @classmethod
166
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
167
- """Create an instance of NpmNpmRemoteResponse from a dict"""
168
- if obj is None:
169
- return None
170
-
171
- if not isinstance(obj, dict):
172
- return cls.model_validate(obj)
173
-
174
- _obj = cls.model_validate({
175
- "pulp_href": obj.get("pulp_href"),
176
- "prn": obj.get("prn"),
177
- "pulp_created": obj.get("pulp_created"),
178
- "pulp_last_updated": obj.get("pulp_last_updated"),
179
- "name": obj.get("name"),
180
- "url": obj.get("url"),
181
- "ca_cert": obj.get("ca_cert"),
182
- "client_cert": obj.get("client_cert"),
183
- "tls_validation": obj.get("tls_validation"),
184
- "proxy_url": obj.get("proxy_url"),
185
- "pulp_labels": obj.get("pulp_labels"),
186
- "download_concurrency": obj.get("download_concurrency"),
187
- "max_retries": obj.get("max_retries"),
188
- "policy": obj.get("policy"),
189
- "total_timeout": obj.get("total_timeout"),
190
- "connect_timeout": obj.get("connect_timeout"),
191
- "sock_connect_timeout": obj.get("sock_connect_timeout"),
192
- "sock_read_timeout": obj.get("sock_read_timeout"),
193
- "headers": obj.get("headers"),
194
- "rate_limit": obj.get("rate_limit"),
195
- "hidden_fields": [NpmNpmRemoteResponseHiddenFieldsInner.from_dict(_item) for _item in obj["hidden_fields"]] if obj.get("hidden_fields") is not None else None
196
- })
197
- return _obj
198
-
199
-
@@ -1,90 +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, 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 NpmNpmRemoteResponseHiddenFieldsInner(BaseModel):
27
- """
28
- NpmNpmRemoteResponseHiddenFieldsInner
29
- """ # noqa: E501
30
- name: StrictStr
31
- is_set: StrictBool
32
- __properties: ClassVar[List[str]] = ["name", "is_set"]
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 NpmNpmRemoteResponseHiddenFieldsInner 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 NpmNpmRemoteResponseHiddenFieldsInner 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
- "is_set": obj.get("is_set")
87
- })
88
- return _obj
89
-
90
-
@@ -1,112 +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 NpmNpmRepository(BaseModel):
28
- """
29
- A Serializer for NpmRepository. Add any new fields if defined on NpmRepository. Similar to the example above, in PackageSerializer. Additional validators can be added to the parent validators list For example:: class Meta: validators = core_serializers.RepositorySerializer.Meta.validators + [myValidator1, ...]
30
- """ # noqa: E501
31
- pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
32
- name: Annotated[str, Field(min_length=1, strict=True)] = Field(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
- __properties: ClassVar[List[str]] = ["pulp_labels", "name", "description", "retain_repo_versions", "remote"]
37
-
38
- model_config = ConfigDict(
39
- populate_by_name=True,
40
- validate_assignment=True,
41
- protected_namespaces=(),
42
- )
43
-
44
-
45
- def to_str(self) -> str:
46
- """Returns the string representation of the model using alias"""
47
- return pprint.pformat(self.model_dump(by_alias=True))
48
-
49
- def to_json(self) -> str:
50
- """Returns the JSON representation of the model using alias"""
51
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
- return json.dumps(self.to_dict())
53
-
54
- @classmethod
55
- def from_json(cls, json_str: str) -> Optional[Self]:
56
- """Create an instance of NpmNpmRepository from a JSON string"""
57
- return cls.from_dict(json.loads(json_str))
58
-
59
- def to_dict(self) -> Dict[str, Any]:
60
- """Return the dictionary representation of the model using alias.
61
-
62
- This has the following differences from calling pydantic's
63
- `self.model_dump(by_alias=True)`:
64
-
65
- * `None` is only added to the output dict for nullable fields that
66
- were set at model initialization. Other fields with value `None`
67
- are ignored.
68
- """
69
- excluded_fields: Set[str] = set([
70
- ])
71
-
72
- _dict = self.model_dump(
73
- by_alias=True,
74
- exclude=excluded_fields,
75
- exclude_none=True,
76
- )
77
- # set to None if description (nullable) is None
78
- # and model_fields_set contains the field
79
- if self.description is None and "description" in self.model_fields_set:
80
- _dict['description'] = None
81
-
82
- # set to None if retain_repo_versions (nullable) is None
83
- # and model_fields_set contains the field
84
- if self.retain_repo_versions is None and "retain_repo_versions" in self.model_fields_set:
85
- _dict['retain_repo_versions'] = None
86
-
87
- # set to None if remote (nullable) is None
88
- # and model_fields_set contains the field
89
- if self.remote is None and "remote" in self.model_fields_set:
90
- _dict['remote'] = 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 NpmNpmRepository 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
- "pulp_labels": obj.get("pulp_labels"),
105
- "name": obj.get("name"),
106
- "description": obj.get("description"),
107
- "retain_repo_versions": obj.get("retain_repo_versions"),
108
- "remote": obj.get("remote")
109
- })
110
- return _obj
111
-
112
-