crc-pulp-file-client 20250819.1__py3-none-any.whl → 20250820.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of crc-pulp-file-client might be problematic. Click here for more details.

Files changed (63) hide show
  1. crc-pulp_file-client/api_client.py +1 -1
  2. crc-pulp_file-client/configuration.py +3 -3
  3. {crc_pulp_file_client-20250819.1.dist-info → crc_pulp_file_client-20250820.1.dist-info}/METADATA +1 -1
  4. crc_pulp_file_client-20250820.1.dist-info/RECORD +59 -0
  5. crc_pulp_file_client-20250820.1.dist-info/top_level.txt +1 -0
  6. crc_pulp_file_client-20250819.1.dist-info/RECORD +0 -114
  7. crc_pulp_file_client-20250819.1.dist-info/top_level.txt +0 -2
  8. services-pulp_file-client/__init__.py +0 -2
  9. services-pulp_file-client/api/__init__.py +0 -11
  10. services-pulp_file-client/api/acs_file_api.py +0 -3689
  11. services-pulp_file-client/api/content_files_api.py +0 -2088
  12. services-pulp_file-client/api/distributions_file_api.py +0 -4186
  13. services-pulp_file-client/api/publications_file_api.py +0 -2881
  14. services-pulp_file-client/api/remotes_file_api.py +0 -4214
  15. services-pulp_file-client/api/repositories_file_api.py +0 -4856
  16. services-pulp_file-client/api/repositories_file_versions_api.py +0 -1670
  17. services-pulp_file-client/api_client.py +0 -798
  18. services-pulp_file-client/api_response.py +0 -21
  19. services-pulp_file-client/configuration.py +0 -628
  20. services-pulp_file-client/exceptions.py +0 -200
  21. services-pulp_file-client/models/__init__.py +0 -56
  22. services-pulp_file-client/models/async_operation_response.py +0 -88
  23. services-pulp_file-client/models/content_summary_response.py +0 -92
  24. services-pulp_file-client/models/file_file_alternate_content_source.py +0 -101
  25. services-pulp_file-client/models/file_file_alternate_content_source_response.py +0 -116
  26. services-pulp_file-client/models/file_file_content_response.py +0 -133
  27. services-pulp_file-client/models/file_file_distribution.py +0 -118
  28. services-pulp_file-client/models/file_file_distribution_response.py +0 -142
  29. services-pulp_file-client/models/file_file_publication.py +0 -100
  30. services-pulp_file-client/models/file_file_publication_response.py +0 -120
  31. services-pulp_file-client/models/file_file_remote.py +0 -205
  32. services-pulp_file-client/models/file_file_remote_response.py +0 -199
  33. services-pulp_file-client/models/file_file_remote_response_hidden_fields_inner.py +0 -90
  34. services-pulp_file-client/models/file_file_repository.py +0 -121
  35. services-pulp_file-client/models/file_file_repository_response.py +0 -146
  36. services-pulp_file-client/models/my_permissions_response.py +0 -88
  37. services-pulp_file-client/models/nested_role.py +0 -93
  38. services-pulp_file-client/models/nested_role_response.py +0 -92
  39. services-pulp_file-client/models/object_roles_response.py +0 -96
  40. services-pulp_file-client/models/paginated_repository_version_response_list.py +0 -112
  41. services-pulp_file-client/models/paginatedfile_file_alternate_content_source_response_list.py +0 -112
  42. services-pulp_file-client/models/paginatedfile_file_content_response_list.py +0 -112
  43. services-pulp_file-client/models/paginatedfile_file_distribution_response_list.py +0 -112
  44. services-pulp_file-client/models/paginatedfile_file_publication_response_list.py +0 -112
  45. services-pulp_file-client/models/paginatedfile_file_remote_response_list.py +0 -112
  46. services-pulp_file-client/models/paginatedfile_file_repository_response_list.py +0 -112
  47. services-pulp_file-client/models/patchedfile_file_alternate_content_source.py +0 -101
  48. services-pulp_file-client/models/patchedfile_file_distribution.py +0 -118
  49. services-pulp_file-client/models/patchedfile_file_remote.py +0 -205
  50. services-pulp_file-client/models/patchedfile_file_repository.py +0 -121
  51. services-pulp_file-client/models/policy_enum.py +0 -39
  52. services-pulp_file-client/models/repair.py +0 -88
  53. services-pulp_file-client/models/repository_add_remove_content.py +0 -93
  54. services-pulp_file-client/models/repository_sync_url.py +0 -90
  55. services-pulp_file-client/models/repository_version_response.py +0 -121
  56. services-pulp_file-client/models/set_label.py +0 -103
  57. services-pulp_file-client/models/set_label_response.py +0 -103
  58. services-pulp_file-client/models/task_group_operation_response.py +0 -88
  59. services-pulp_file-client/models/unset_label.py +0 -96
  60. services-pulp_file-client/models/unset_label_response.py +0 -100
  61. services-pulp_file-client/py.typed +0 -0
  62. services-pulp_file-client/rest.py +0 -258
  63. {crc_pulp_file_client-20250819.1.dist-info → crc_pulp_file_client-20250820.1.dist-info}/WHEEL +0 -0
@@ -1,133 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from datetime import datetime
22
- from pydantic import BaseModel, ConfigDict, Field, 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 FileFileContentResponse(BaseModel):
28
- """
29
- Serializer for File Content.
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
- pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")
36
- artifact: Optional[StrictStr] = Field(default=None, description="Artifact file representing the physical content")
37
- relative_path: StrictStr = Field(description="Path where the artifact is located relative to distributions base_path")
38
- md5: Optional[StrictStr] = Field(default=None, description="The MD5 checksum if available.")
39
- sha1: Optional[StrictStr] = Field(default=None, description="The SHA-1 checksum if available.")
40
- sha224: Optional[StrictStr] = Field(default=None, description="The SHA-224 checksum if available.")
41
- sha256: Optional[StrictStr] = Field(default=None, description="The SHA-256 checksum if available.")
42
- sha384: Optional[StrictStr] = Field(default=None, description="The SHA-384 checksum if available.")
43
- sha512: Optional[StrictStr] = Field(default=None, description="The SHA-512 checksum if available.")
44
- __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "pulp_labels", "artifact", "relative_path", "md5", "sha1", "sha224", "sha256", "sha384", "sha512"]
45
-
46
- model_config = ConfigDict(
47
- populate_by_name=True,
48
- validate_assignment=True,
49
- protected_namespaces=(),
50
- )
51
-
52
-
53
- def to_str(self) -> str:
54
- """Returns the string representation of the model using alias"""
55
- return pprint.pformat(self.model_dump(by_alias=True))
56
-
57
- def to_json(self) -> str:
58
- """Returns the JSON representation of the model using alias"""
59
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
60
- return json.dumps(self.to_dict())
61
-
62
- @classmethod
63
- def from_json(cls, json_str: str) -> Optional[Self]:
64
- """Create an instance of FileFileContentResponse from a JSON string"""
65
- return cls.from_dict(json.loads(json_str))
66
-
67
- def to_dict(self) -> Dict[str, Any]:
68
- """Return the dictionary representation of the model using alias.
69
-
70
- This has the following differences from calling pydantic's
71
- `self.model_dump(by_alias=True)`:
72
-
73
- * `None` is only added to the output dict for nullable fields that
74
- were set at model initialization. Other fields with value `None`
75
- are ignored.
76
- * OpenAPI `readOnly` fields are excluded.
77
- * OpenAPI `readOnly` fields are excluded.
78
- * OpenAPI `readOnly` fields are excluded.
79
- * OpenAPI `readOnly` fields are excluded.
80
- * OpenAPI `readOnly` fields are excluded.
81
- * OpenAPI `readOnly` fields are excluded.
82
- * OpenAPI `readOnly` fields are excluded.
83
- * OpenAPI `readOnly` fields are excluded.
84
- * OpenAPI `readOnly` fields are excluded.
85
- * OpenAPI `readOnly` fields are excluded.
86
- """
87
- excluded_fields: Set[str] = set([
88
- "pulp_href",
89
- "prn",
90
- "pulp_created",
91
- "pulp_last_updated",
92
- "md5",
93
- "sha1",
94
- "sha224",
95
- "sha256",
96
- "sha384",
97
- "sha512",
98
- ])
99
-
100
- _dict = self.model_dump(
101
- by_alias=True,
102
- exclude=excluded_fields,
103
- exclude_none=True,
104
- )
105
- return _dict
106
-
107
- @classmethod
108
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
109
- """Create an instance of FileFileContentResponse from a dict"""
110
- if obj is None:
111
- return None
112
-
113
- if not isinstance(obj, dict):
114
- return cls.model_validate(obj)
115
-
116
- _obj = cls.model_validate({
117
- "pulp_href": obj.get("pulp_href"),
118
- "prn": obj.get("prn"),
119
- "pulp_created": obj.get("pulp_created"),
120
- "pulp_last_updated": obj.get("pulp_last_updated"),
121
- "pulp_labels": obj.get("pulp_labels"),
122
- "artifact": obj.get("artifact"),
123
- "relative_path": obj.get("relative_path"),
124
- "md5": obj.get("md5"),
125
- "sha1": obj.get("sha1"),
126
- "sha224": obj.get("sha224"),
127
- "sha256": obj.get("sha256"),
128
- "sha384": obj.get("sha384"),
129
- "sha512": obj.get("sha512")
130
- })
131
- return _obj
132
-
133
-
@@ -1,118 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from typing_extensions import Annotated
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class FileFileDistribution(BaseModel):
28
- """
29
- Serializer for File Distributions.
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
- checkpoint: Optional[StrictBool] = None
39
- __properties: ClassVar[List[str]] = ["base_path", "content_guard", "hidden", "pulp_labels", "name", "repository", "publication", "checkpoint"]
40
-
41
- model_config = ConfigDict(
42
- populate_by_name=True,
43
- validate_assignment=True,
44
- protected_namespaces=(),
45
- )
46
-
47
-
48
- def to_str(self) -> str:
49
- """Returns the string representation of the model using alias"""
50
- return pprint.pformat(self.model_dump(by_alias=True))
51
-
52
- def to_json(self) -> str:
53
- """Returns the JSON representation of the model using alias"""
54
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
- return json.dumps(self.to_dict())
56
-
57
- @classmethod
58
- def from_json(cls, json_str: str) -> Optional[Self]:
59
- """Create an instance of FileFileDistribution from a JSON string"""
60
- return cls.from_dict(json.loads(json_str))
61
-
62
- def to_dict(self) -> Dict[str, Any]:
63
- """Return the dictionary representation of the model using alias.
64
-
65
- This has the following differences from calling pydantic's
66
- `self.model_dump(by_alias=True)`:
67
-
68
- * `None` is only added to the output dict for nullable fields that
69
- were set at model initialization. Other fields with value `None`
70
- are ignored.
71
- """
72
- excluded_fields: Set[str] = set([
73
- ])
74
-
75
- _dict = self.model_dump(
76
- by_alias=True,
77
- exclude=excluded_fields,
78
- exclude_none=True,
79
- )
80
- # set to None if content_guard (nullable) is None
81
- # and model_fields_set contains the field
82
- if self.content_guard is None and "content_guard" in self.model_fields_set:
83
- _dict['content_guard'] = None
84
-
85
- # set to None if repository (nullable) is None
86
- # and model_fields_set contains the field
87
- if self.repository is None and "repository" in self.model_fields_set:
88
- _dict['repository'] = None
89
-
90
- # set to None if publication (nullable) is None
91
- # and model_fields_set contains the field
92
- if self.publication is None and "publication" in self.model_fields_set:
93
- _dict['publication'] = None
94
-
95
- return _dict
96
-
97
- @classmethod
98
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
99
- """Create an instance of FileFileDistribution from a dict"""
100
- if obj is None:
101
- return None
102
-
103
- if not isinstance(obj, dict):
104
- return cls.model_validate(obj)
105
-
106
- _obj = cls.model_validate({
107
- "base_path": obj.get("base_path"),
108
- "content_guard": obj.get("content_guard"),
109
- "hidden": obj.get("hidden") if obj.get("hidden") is not None else False,
110
- "pulp_labels": obj.get("pulp_labels"),
111
- "name": obj.get("name"),
112
- "repository": obj.get("repository"),
113
- "publication": obj.get("publication"),
114
- "checkpoint": obj.get("checkpoint")
115
- })
116
- return _obj
117
-
118
-
@@ -1,142 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from datetime import datetime
22
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
23
- from typing import Any, ClassVar, Dict, List, Optional
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class FileFileDistributionResponse(BaseModel):
28
- """
29
- Serializer for File Distributions.
30
- """ # noqa: E501
31
- pulp_href: Optional[StrictStr] = None
32
- prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
33
- pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
34
- pulp_last_updated: Optional[datetime] = Field(default=None, description="Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.")
35
- base_path: StrictStr = Field(description="The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")")
36
- base_url: Optional[StrictStr] = Field(default=None, description="The URL for accessing the publication as defined by this distribution.")
37
- content_guard: Optional[StrictStr] = Field(default=None, description="An optional content-guard.")
38
- no_content_change_since: Optional[StrictStr] = Field(default=None, description="Timestamp since when the distributed content served by this distribution has not changed. If equals to `null`, no guarantee is provided about content changes.")
39
- hidden: Optional[StrictBool] = Field(default=False, description="Whether this distribution should be shown in the content app.")
40
- pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
41
- name: StrictStr = Field(description="A unique name. Ex, `rawhide` and `stable`.")
42
- repository: Optional[StrictStr] = Field(default=None, description="The latest RepositoryVersion for this Repository will be served.")
43
- publication: Optional[StrictStr] = Field(default=None, description="Publication to be served")
44
- checkpoint: Optional[StrictBool] = None
45
- __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", "checkpoint"]
46
-
47
- model_config = ConfigDict(
48
- populate_by_name=True,
49
- validate_assignment=True,
50
- protected_namespaces=(),
51
- )
52
-
53
-
54
- def to_str(self) -> str:
55
- """Returns the string representation of the model using alias"""
56
- return pprint.pformat(self.model_dump(by_alias=True))
57
-
58
- def to_json(self) -> str:
59
- """Returns the JSON representation of the model using alias"""
60
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
61
- return json.dumps(self.to_dict())
62
-
63
- @classmethod
64
- def from_json(cls, json_str: str) -> Optional[Self]:
65
- """Create an instance of FileFileDistributionResponse from a JSON string"""
66
- return cls.from_dict(json.loads(json_str))
67
-
68
- def to_dict(self) -> Dict[str, Any]:
69
- """Return the dictionary representation of the model using alias.
70
-
71
- This has the following differences from calling pydantic's
72
- `self.model_dump(by_alias=True)`:
73
-
74
- * `None` is only added to the output dict for nullable fields that
75
- were set at model initialization. Other fields with value `None`
76
- are ignored.
77
- * OpenAPI `readOnly` fields are excluded.
78
- * OpenAPI `readOnly` fields are excluded.
79
- * OpenAPI `readOnly` fields are excluded.
80
- * OpenAPI `readOnly` fields are excluded.
81
- * OpenAPI `readOnly` fields are excluded.
82
- * OpenAPI `readOnly` fields are excluded.
83
- """
84
- excluded_fields: Set[str] = set([
85
- "pulp_href",
86
- "prn",
87
- "pulp_created",
88
- "pulp_last_updated",
89
- "base_url",
90
- "no_content_change_since",
91
- ])
92
-
93
- _dict = self.model_dump(
94
- by_alias=True,
95
- exclude=excluded_fields,
96
- exclude_none=True,
97
- )
98
- # set to None if content_guard (nullable) is None
99
- # and model_fields_set contains the field
100
- if self.content_guard is None and "content_guard" in self.model_fields_set:
101
- _dict['content_guard'] = None
102
-
103
- # set to None if repository (nullable) is None
104
- # and model_fields_set contains the field
105
- if self.repository is None and "repository" in self.model_fields_set:
106
- _dict['repository'] = None
107
-
108
- # set to None if publication (nullable) is None
109
- # and model_fields_set contains the field
110
- if self.publication is None and "publication" in self.model_fields_set:
111
- _dict['publication'] = None
112
-
113
- return _dict
114
-
115
- @classmethod
116
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
117
- """Create an instance of FileFileDistributionResponse from a dict"""
118
- if obj is None:
119
- return None
120
-
121
- if not isinstance(obj, dict):
122
- return cls.model_validate(obj)
123
-
124
- _obj = cls.model_validate({
125
- "pulp_href": obj.get("pulp_href"),
126
- "prn": obj.get("prn"),
127
- "pulp_created": obj.get("pulp_created"),
128
- "pulp_last_updated": obj.get("pulp_last_updated"),
129
- "base_path": obj.get("base_path"),
130
- "base_url": obj.get("base_url"),
131
- "content_guard": obj.get("content_guard"),
132
- "no_content_change_since": obj.get("no_content_change_since"),
133
- "hidden": obj.get("hidden") if obj.get("hidden") is not None else False,
134
- "pulp_labels": obj.get("pulp_labels"),
135
- "name": obj.get("name"),
136
- "repository": obj.get("repository"),
137
- "publication": obj.get("publication"),
138
- "checkpoint": obj.get("checkpoint")
139
- })
140
- return _obj
141
-
142
-
@@ -1,100 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from typing_extensions import Annotated
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class FileFilePublication(BaseModel):
28
- """
29
- Serializer for File Publications.
30
- """ # noqa: E501
31
- repository_version: Optional[StrictStr] = None
32
- repository: Optional[StrictStr] = Field(default=None, description="A URI of the repository to be published.")
33
- manifest: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default='PULP_MANIFEST', description="Filename to use for manifest file containing metadata for all the files.")
34
- checkpoint: Optional[StrictBool] = None
35
- __properties: ClassVar[List[str]] = ["repository_version", "repository", "manifest", "checkpoint"]
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 FileFilePublication from a JSON string"""
56
- return cls.from_dict(json.loads(json_str))
57
-
58
- def to_dict(self) -> Dict[str, Any]:
59
- """Return the dictionary representation of the model using alias.
60
-
61
- This has the following differences from calling pydantic's
62
- `self.model_dump(by_alias=True)`:
63
-
64
- * `None` is only added to the output dict for nullable fields that
65
- were set at model initialization. Other fields with value `None`
66
- are ignored.
67
- """
68
- excluded_fields: Set[str] = set([
69
- ])
70
-
71
- _dict = self.model_dump(
72
- by_alias=True,
73
- exclude=excluded_fields,
74
- exclude_none=True,
75
- )
76
- # set to None if manifest (nullable) is None
77
- # and model_fields_set contains the field
78
- if self.manifest is None and "manifest" in self.model_fields_set:
79
- _dict['manifest'] = None
80
-
81
- return _dict
82
-
83
- @classmethod
84
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
- """Create an instance of FileFilePublication from a dict"""
86
- if obj is None:
87
- return None
88
-
89
- if not isinstance(obj, dict):
90
- return cls.model_validate(obj)
91
-
92
- _obj = cls.model_validate({
93
- "repository_version": obj.get("repository_version"),
94
- "repository": obj.get("repository"),
95
- "manifest": obj.get("manifest") if obj.get("manifest") is not None else 'PULP_MANIFEST',
96
- "checkpoint": obj.get("checkpoint")
97
- })
98
- return _obj
99
-
100
-
@@ -1,120 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from datetime import datetime
22
- from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
23
- from typing import Any, ClassVar, Dict, List, Optional
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class FileFilePublicationResponse(BaseModel):
28
- """
29
- Serializer for File Publications.
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
- repository_version: Optional[StrictStr] = None
36
- repository: Optional[StrictStr] = Field(default=None, description="A URI of the repository to be published.")
37
- distributions: Optional[List[StrictStr]] = Field(default=None, description="This publication is currently hosted as defined by these distributions.")
38
- manifest: Optional[StrictStr] = Field(default='PULP_MANIFEST', description="Filename to use for manifest file containing metadata for all the files.")
39
- checkpoint: Optional[StrictBool] = None
40
- __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "repository_version", "repository", "distributions", "manifest", "checkpoint"]
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 FileFilePublicationResponse 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
- * OpenAPI `readOnly` fields are excluded.
73
- * OpenAPI `readOnly` fields are excluded.
74
- * OpenAPI `readOnly` fields are excluded.
75
- * OpenAPI `readOnly` fields are excluded.
76
- * OpenAPI `readOnly` fields are excluded.
77
- """
78
- excluded_fields: Set[str] = set([
79
- "pulp_href",
80
- "prn",
81
- "pulp_created",
82
- "pulp_last_updated",
83
- "distributions",
84
- ])
85
-
86
- _dict = self.model_dump(
87
- by_alias=True,
88
- exclude=excluded_fields,
89
- exclude_none=True,
90
- )
91
- # set to None if manifest (nullable) is None
92
- # and model_fields_set contains the field
93
- if self.manifest is None and "manifest" in self.model_fields_set:
94
- _dict['manifest'] = None
95
-
96
- return _dict
97
-
98
- @classmethod
99
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
100
- """Create an instance of FileFilePublicationResponse from a dict"""
101
- if obj is None:
102
- return None
103
-
104
- if not isinstance(obj, dict):
105
- return cls.model_validate(obj)
106
-
107
- _obj = cls.model_validate({
108
- "pulp_href": obj.get("pulp_href"),
109
- "prn": obj.get("prn"),
110
- "pulp_created": obj.get("pulp_created"),
111
- "pulp_last_updated": obj.get("pulp_last_updated"),
112
- "repository_version": obj.get("repository_version"),
113
- "repository": obj.get("repository"),
114
- "distributions": obj.get("distributions"),
115
- "manifest": obj.get("manifest") if obj.get("manifest") is not None else 'PULP_MANIFEST',
116
- "checkpoint": obj.get("checkpoint")
117
- })
118
- return _obj
119
-
120
-