crc-pulp-file-client 20250819.1__py3-none-any.whl → 20260113.4__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.
Files changed (120) hide show
  1. crc_pulp_file_client-20260113.4.dist-info/METADATA +8160 -0
  2. crc_pulp_file_client-20260113.4.dist-info/RECORD +62 -0
  3. crc_pulp_file_client-20260113.4.dist-info/top_level.txt +1 -0
  4. pulpcore/client/pulp_file/__init__.py +80 -0
  5. pulpcore/client/pulp_file/api/__init__.py +11 -0
  6. {services-pulp_file-client → pulpcore/client/pulp_file}/api/acs_file_api.py +30 -24
  7. {services-pulp_file-client → pulpcore/client/pulp_file}/api/content_files_api.py +394 -10
  8. {services-pulp_file-client → pulpcore/client/pulp_file}/api/distributions_file_api.py +33 -27
  9. {services-pulp_file-client → pulpcore/client/pulp_file}/api/publications_file_api.py +12 -12
  10. {services-pulp_file-client → pulpcore/client/pulp_file}/api/remotes_file_api.py +33 -27
  11. {services-pulp_file-client → pulpcore/client/pulp_file}/api/repositories_file_api.py +35 -29
  12. {services-pulp_file-client → pulpcore/client/pulp_file}/api/repositories_file_versions_api.py +8 -8
  13. {services-pulp_file-client → pulpcore/client/pulp_file}/api_client.py +7 -7
  14. {crc-pulp_file-client → pulpcore/client/pulp_file}/configuration.py +6 -6
  15. pulpcore/client/pulp_file/models/__init__.py +57 -0
  16. services-pulp_file-client/models/file_file_content_response.py → pulpcore/client/pulp_file/models/file_content_upload_response.py +8 -4
  17. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_content_response.py +5 -1
  18. {services-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_remote.py +1 -1
  19. {services-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_remote_response.py +2 -2
  20. {services-pulp_file-client → pulpcore/client/pulp_file}/models/object_roles_response.py +1 -1
  21. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginated_repository_version_response_list.py +1 -1
  22. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginatedfile_file_alternate_content_source_response_list.py +1 -1
  23. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginatedfile_file_content_response_list.py +1 -1
  24. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginatedfile_file_distribution_response_list.py +1 -1
  25. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginatedfile_file_publication_response_list.py +1 -1
  26. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginatedfile_file_remote_response_list.py +1 -1
  27. {services-pulp_file-client → pulpcore/client/pulp_file}/models/paginatedfile_file_repository_response_list.py +1 -1
  28. {services-pulp_file-client → pulpcore/client/pulp_file}/models/patchedfile_file_remote.py +1 -1
  29. {services-pulp_file-client → pulpcore/client/pulp_file}/models/repository_version_response.py +7 -3
  30. {services-pulp_file-client → pulpcore/client/pulp_file}/rest.py +1 -1
  31. crc-pulp_file-client/api/__init__.py +0 -11
  32. crc-pulp_file-client/api/acs_file_api.py +0 -3689
  33. crc-pulp_file-client/api/content_files_api.py +0 -2088
  34. crc-pulp_file-client/api/distributions_file_api.py +0 -4186
  35. crc-pulp_file-client/api/publications_file_api.py +0 -2881
  36. crc-pulp_file-client/api/remotes_file_api.py +0 -4214
  37. crc-pulp_file-client/api/repositories_file_api.py +0 -4856
  38. crc-pulp_file-client/api/repositories_file_versions_api.py +0 -1670
  39. crc-pulp_file-client/api_client.py +0 -798
  40. crc-pulp_file-client/models/__init__.py +0 -56
  41. crc-pulp_file-client/models/file_file_remote.py +0 -205
  42. crc-pulp_file-client/models/file_file_remote_response.py +0 -199
  43. crc-pulp_file-client/models/object_roles_response.py +0 -96
  44. crc-pulp_file-client/models/paginated_repository_version_response_list.py +0 -112
  45. crc-pulp_file-client/models/paginatedfile_file_alternate_content_source_response_list.py +0 -112
  46. crc-pulp_file-client/models/paginatedfile_file_content_response_list.py +0 -112
  47. crc-pulp_file-client/models/paginatedfile_file_distribution_response_list.py +0 -112
  48. crc-pulp_file-client/models/paginatedfile_file_publication_response_list.py +0 -112
  49. crc-pulp_file-client/models/paginatedfile_file_remote_response_list.py +0 -112
  50. crc-pulp_file-client/models/paginatedfile_file_repository_response_list.py +0 -112
  51. crc-pulp_file-client/models/patchedfile_file_remote.py +0 -205
  52. crc-pulp_file-client/models/repository_version_response.py +0 -121
  53. crc-pulp_file-client/rest.py +0 -258
  54. crc_pulp_file_client-20250819.1.dist-info/METADATA +0 -25
  55. crc_pulp_file_client-20250819.1.dist-info/RECORD +0 -114
  56. crc_pulp_file_client-20250819.1.dist-info/top_level.txt +0 -2
  57. services-pulp_file-client/api/__init__.py +0 -11
  58. services-pulp_file-client/api_response.py +0 -21
  59. services-pulp_file-client/configuration.py +0 -628
  60. services-pulp_file-client/exceptions.py +0 -200
  61. services-pulp_file-client/models/__init__.py +0 -56
  62. services-pulp_file-client/models/async_operation_response.py +0 -88
  63. services-pulp_file-client/models/content_summary_response.py +0 -92
  64. services-pulp_file-client/models/file_file_alternate_content_source.py +0 -101
  65. services-pulp_file-client/models/file_file_alternate_content_source_response.py +0 -116
  66. services-pulp_file-client/models/file_file_distribution.py +0 -118
  67. services-pulp_file-client/models/file_file_distribution_response.py +0 -142
  68. services-pulp_file-client/models/file_file_publication.py +0 -100
  69. services-pulp_file-client/models/file_file_publication_response.py +0 -120
  70. services-pulp_file-client/models/file_file_remote_response_hidden_fields_inner.py +0 -90
  71. services-pulp_file-client/models/file_file_repository.py +0 -121
  72. services-pulp_file-client/models/file_file_repository_response.py +0 -146
  73. services-pulp_file-client/models/my_permissions_response.py +0 -88
  74. services-pulp_file-client/models/nested_role.py +0 -93
  75. services-pulp_file-client/models/nested_role_response.py +0 -92
  76. services-pulp_file-client/models/patchedfile_file_alternate_content_source.py +0 -101
  77. services-pulp_file-client/models/patchedfile_file_distribution.py +0 -118
  78. services-pulp_file-client/models/patchedfile_file_repository.py +0 -121
  79. services-pulp_file-client/models/policy_enum.py +0 -39
  80. services-pulp_file-client/models/repair.py +0 -88
  81. services-pulp_file-client/models/repository_add_remove_content.py +0 -93
  82. services-pulp_file-client/models/repository_sync_url.py +0 -90
  83. services-pulp_file-client/models/set_label.py +0 -103
  84. services-pulp_file-client/models/set_label_response.py +0 -103
  85. services-pulp_file-client/models/task_group_operation_response.py +0 -88
  86. services-pulp_file-client/models/unset_label.py +0 -96
  87. services-pulp_file-client/models/unset_label_response.py +0 -100
  88. services-pulp_file-client/py.typed +0 -0
  89. {crc_pulp_file_client-20250819.1.dist-info → crc_pulp_file_client-20260113.4.dist-info}/WHEEL +0 -0
  90. {crc-pulp_file-client → pulpcore}/__init__.py +0 -0
  91. {services-pulp_file-client → pulpcore/client}/__init__.py +0 -0
  92. {crc-pulp_file-client → pulpcore/client/pulp_file}/api_response.py +0 -0
  93. {crc-pulp_file-client → pulpcore/client/pulp_file}/exceptions.py +0 -0
  94. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/async_operation_response.py +0 -0
  95. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/content_summary_response.py +0 -0
  96. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_alternate_content_source.py +0 -0
  97. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_alternate_content_source_response.py +0 -0
  98. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_distribution.py +0 -0
  99. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_distribution_response.py +0 -0
  100. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_publication.py +0 -0
  101. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_publication_response.py +0 -0
  102. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_remote_response_hidden_fields_inner.py +0 -0
  103. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_repository.py +0 -0
  104. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/file_file_repository_response.py +0 -0
  105. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/my_permissions_response.py +0 -0
  106. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/nested_role.py +0 -0
  107. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/nested_role_response.py +0 -0
  108. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/patchedfile_file_alternate_content_source.py +0 -0
  109. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/patchedfile_file_distribution.py +0 -0
  110. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/patchedfile_file_repository.py +0 -0
  111. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/policy_enum.py +0 -0
  112. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/repair.py +0 -0
  113. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/repository_add_remove_content.py +0 -0
  114. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/repository_sync_url.py +0 -0
  115. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/set_label.py +0 -0
  116. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/set_label_response.py +0 -0
  117. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/task_group_operation_response.py +0 -0
  118. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/unset_label.py +0 -0
  119. {crc-pulp_file-client → pulpcore/client/pulp_file}/models/unset_label_response.py +0 -0
  120. {crc-pulp_file-client → pulpcore/client/pulp_file}/py.typed +0 -0
@@ -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
-
@@ -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 FileFileRemoteResponseHiddenFieldsInner(BaseModel):
27
- """
28
- FileFileRemoteResponseHiddenFieldsInner
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 FileFileRemoteResponseHiddenFieldsInner 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 FileFileRemoteResponseHiddenFieldsInner 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
-