crc-pulp-file-client 20251209.2__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-file-client might be problematic. Click here for more details.
- crc_pulp_file_client-20251209.2.dist-info/METADATA +8160 -0
- crc_pulp_file_client-20251209.2.dist-info/RECORD +62 -0
- crc_pulp_file_client-20251209.2.dist-info/WHEEL +5 -0
- crc_pulp_file_client-20251209.2.dist-info/top_level.txt +1 -0
- pulpcore/__init__.py +2 -0
- pulpcore/client/__init__.py +2 -0
- pulpcore/client/pulp_file/__init__.py +80 -0
- pulpcore/client/pulp_file/api/__init__.py +11 -0
- pulpcore/client/pulp_file/api/acs_file_api.py +3695 -0
- pulpcore/client/pulp_file/api/content_files_api.py +2472 -0
- pulpcore/client/pulp_file/api/distributions_file_api.py +4192 -0
- pulpcore/client/pulp_file/api/publications_file_api.py +2881 -0
- pulpcore/client/pulp_file/api/remotes_file_api.py +4220 -0
- pulpcore/client/pulp_file/api/repositories_file_api.py +4862 -0
- pulpcore/client/pulp_file/api/repositories_file_versions_api.py +1670 -0
- pulpcore/client/pulp_file/api_client.py +798 -0
- pulpcore/client/pulp_file/api_response.py +21 -0
- pulpcore/client/pulp_file/configuration.py +628 -0
- pulpcore/client/pulp_file/exceptions.py +200 -0
- pulpcore/client/pulp_file/models/__init__.py +57 -0
- pulpcore/client/pulp_file/models/async_operation_response.py +88 -0
- pulpcore/client/pulp_file/models/content_summary_response.py +92 -0
- pulpcore/client/pulp_file/models/file_content_upload_response.py +137 -0
- pulpcore/client/pulp_file/models/file_file_alternate_content_source.py +101 -0
- pulpcore/client/pulp_file/models/file_file_alternate_content_source_response.py +116 -0
- pulpcore/client/pulp_file/models/file_file_content_response.py +137 -0
- pulpcore/client/pulp_file/models/file_file_distribution.py +118 -0
- pulpcore/client/pulp_file/models/file_file_distribution_response.py +142 -0
- pulpcore/client/pulp_file/models/file_file_publication.py +100 -0
- pulpcore/client/pulp_file/models/file_file_publication_response.py +120 -0
- pulpcore/client/pulp_file/models/file_file_remote.py +205 -0
- pulpcore/client/pulp_file/models/file_file_remote_response.py +199 -0
- pulpcore/client/pulp_file/models/file_file_remote_response_hidden_fields_inner.py +90 -0
- pulpcore/client/pulp_file/models/file_file_repository.py +121 -0
- pulpcore/client/pulp_file/models/file_file_repository_response.py +146 -0
- pulpcore/client/pulp_file/models/my_permissions_response.py +88 -0
- pulpcore/client/pulp_file/models/nested_role.py +93 -0
- pulpcore/client/pulp_file/models/nested_role_response.py +92 -0
- pulpcore/client/pulp_file/models/object_roles_response.py +96 -0
- pulpcore/client/pulp_file/models/paginated_repository_version_response_list.py +112 -0
- pulpcore/client/pulp_file/models/paginatedfile_file_alternate_content_source_response_list.py +112 -0
- pulpcore/client/pulp_file/models/paginatedfile_file_content_response_list.py +112 -0
- pulpcore/client/pulp_file/models/paginatedfile_file_distribution_response_list.py +112 -0
- pulpcore/client/pulp_file/models/paginatedfile_file_publication_response_list.py +112 -0
- pulpcore/client/pulp_file/models/paginatedfile_file_remote_response_list.py +112 -0
- pulpcore/client/pulp_file/models/paginatedfile_file_repository_response_list.py +112 -0
- pulpcore/client/pulp_file/models/patchedfile_file_alternate_content_source.py +101 -0
- pulpcore/client/pulp_file/models/patchedfile_file_distribution.py +118 -0
- pulpcore/client/pulp_file/models/patchedfile_file_remote.py +205 -0
- pulpcore/client/pulp_file/models/patchedfile_file_repository.py +121 -0
- pulpcore/client/pulp_file/models/policy_enum.py +39 -0
- pulpcore/client/pulp_file/models/repair.py +88 -0
- pulpcore/client/pulp_file/models/repository_add_remove_content.py +93 -0
- pulpcore/client/pulp_file/models/repository_sync_url.py +90 -0
- pulpcore/client/pulp_file/models/repository_version_response.py +125 -0
- pulpcore/client/pulp_file/models/set_label.py +103 -0
- pulpcore/client/pulp_file/models/set_label_response.py +103 -0
- pulpcore/client/pulp_file/models/task_group_operation_response.py +88 -0
- pulpcore/client/pulp_file/models/unset_label.py +96 -0
- pulpcore/client/pulp_file/models/unset_label_response.py +100 -0
- pulpcore/client/pulp_file/py.typed +0 -0
- pulpcore/client/pulp_file/rest.py +258 -0
|
@@ -0,0 +1,112 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from pulpcore.client.pulp_file.models.repository_version_response import RepositoryVersionResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedRepositoryVersionResponseList(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedRepositoryVersionResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[RepositoryVersionResponse]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["count", "next", "previous", "results"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of PaginatedRepositoryVersionResponseList from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.results:
|
|
79
|
+
for _item_results in self.results:
|
|
80
|
+
if _item_results:
|
|
81
|
+
_items.append(_item_results.to_dict())
|
|
82
|
+
_dict['results'] = _items
|
|
83
|
+
# set to None if next (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.next is None and "next" in self.model_fields_set:
|
|
86
|
+
_dict['next'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if previous (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.previous is None and "previous" in self.model_fields_set:
|
|
91
|
+
_dict['previous'] = 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 PaginatedRepositoryVersionResponseList 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
|
+
"count": obj.get("count"),
|
|
106
|
+
"next": obj.get("next"),
|
|
107
|
+
"previous": obj.get("previous"),
|
|
108
|
+
"results": [RepositoryVersionResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from pulpcore.client.pulp_file.models.file_file_alternate_content_source_response import FileFileAlternateContentSourceResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedfileFileAlternateContentSourceResponseList(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedfileFileAlternateContentSourceResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[FileFileAlternateContentSourceResponse]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["count", "next", "previous", "results"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of PaginatedfileFileAlternateContentSourceResponseList from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.results:
|
|
79
|
+
for _item_results in self.results:
|
|
80
|
+
if _item_results:
|
|
81
|
+
_items.append(_item_results.to_dict())
|
|
82
|
+
_dict['results'] = _items
|
|
83
|
+
# set to None if next (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.next is None and "next" in self.model_fields_set:
|
|
86
|
+
_dict['next'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if previous (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.previous is None and "previous" in self.model_fields_set:
|
|
91
|
+
_dict['previous'] = 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 PaginatedfileFileAlternateContentSourceResponseList 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
|
+
"count": obj.get("count"),
|
|
106
|
+
"next": obj.get("next"),
|
|
107
|
+
"previous": obj.get("previous"),
|
|
108
|
+
"results": [FileFileAlternateContentSourceResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from pulpcore.client.pulp_file.models.file_file_content_response import FileFileContentResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedfileFileContentResponseList(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedfileFileContentResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[FileFileContentResponse]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["count", "next", "previous", "results"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of PaginatedfileFileContentResponseList from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.results:
|
|
79
|
+
for _item_results in self.results:
|
|
80
|
+
if _item_results:
|
|
81
|
+
_items.append(_item_results.to_dict())
|
|
82
|
+
_dict['results'] = _items
|
|
83
|
+
# set to None if next (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.next is None and "next" in self.model_fields_set:
|
|
86
|
+
_dict['next'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if previous (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.previous is None and "previous" in self.model_fields_set:
|
|
91
|
+
_dict['previous'] = 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 PaginatedfileFileContentResponseList 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
|
+
"count": obj.get("count"),
|
|
106
|
+
"next": obj.get("next"),
|
|
107
|
+
"previous": obj.get("previous"),
|
|
108
|
+
"results": [FileFileContentResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from pulpcore.client.pulp_file.models.file_file_distribution_response import FileFileDistributionResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedfileFileDistributionResponseList(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedfileFileDistributionResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[FileFileDistributionResponse]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["count", "next", "previous", "results"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of PaginatedfileFileDistributionResponseList from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.results:
|
|
79
|
+
for _item_results in self.results:
|
|
80
|
+
if _item_results:
|
|
81
|
+
_items.append(_item_results.to_dict())
|
|
82
|
+
_dict['results'] = _items
|
|
83
|
+
# set to None if next (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.next is None and "next" in self.model_fields_set:
|
|
86
|
+
_dict['next'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if previous (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.previous is None and "previous" in self.model_fields_set:
|
|
91
|
+
_dict['previous'] = 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 PaginatedfileFileDistributionResponseList 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
|
+
"count": obj.get("count"),
|
|
106
|
+
"next": obj.get("next"),
|
|
107
|
+
"previous": obj.get("previous"),
|
|
108
|
+
"results": [FileFileDistributionResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from pulpcore.client.pulp_file.models.file_file_publication_response import FileFilePublicationResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedfileFilePublicationResponseList(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedfileFilePublicationResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[FileFilePublicationResponse]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["count", "next", "previous", "results"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of PaginatedfileFilePublicationResponseList from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.results:
|
|
79
|
+
for _item_results in self.results:
|
|
80
|
+
if _item_results:
|
|
81
|
+
_items.append(_item_results.to_dict())
|
|
82
|
+
_dict['results'] = _items
|
|
83
|
+
# set to None if next (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.next is None and "next" in self.model_fields_set:
|
|
86
|
+
_dict['next'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if previous (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.previous is None and "previous" in self.model_fields_set:
|
|
91
|
+
_dict['previous'] = 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 PaginatedfileFilePublicationResponseList 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
|
+
"count": obj.get("count"),
|
|
106
|
+
"next": obj.get("next"),
|
|
107
|
+
"previous": obj.get("previous"),
|
|
108
|
+
"results": [FileFilePublicationResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
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, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from pulpcore.client.pulp_file.models.file_file_remote_response import FileFileRemoteResponse
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PaginatedfileFileRemoteResponseList(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PaginatedfileFileRemoteResponseList
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
count: StrictInt
|
|
32
|
+
next: Optional[StrictStr] = None
|
|
33
|
+
previous: Optional[StrictStr] = None
|
|
34
|
+
results: List[FileFileRemoteResponse]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["count", "next", "previous", "results"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of PaginatedfileFileRemoteResponseList from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
|
77
|
+
_items = []
|
|
78
|
+
if self.results:
|
|
79
|
+
for _item_results in self.results:
|
|
80
|
+
if _item_results:
|
|
81
|
+
_items.append(_item_results.to_dict())
|
|
82
|
+
_dict['results'] = _items
|
|
83
|
+
# set to None if next (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.next is None and "next" in self.model_fields_set:
|
|
86
|
+
_dict['next'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if previous (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.previous is None and "previous" in self.model_fields_set:
|
|
91
|
+
_dict['previous'] = 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 PaginatedfileFileRemoteResponseList 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
|
+
"count": obj.get("count"),
|
|
106
|
+
"next": obj.get("next"),
|
|
107
|
+
"previous": obj.get("previous"),
|
|
108
|
+
"results": [FileFileRemoteResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|