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,200 +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
- from typing import Any, Optional
16
- from typing_extensions import Self
17
-
18
- class OpenApiException(Exception):
19
- """The base exception class for all OpenAPIExceptions"""
20
-
21
-
22
- class ApiTypeError(OpenApiException, TypeError):
23
- def __init__(self, msg, path_to_item=None, valid_classes=None,
24
- key_type=None) -> None:
25
- """ Raises an exception for TypeErrors
26
-
27
- Args:
28
- msg (str): the exception message
29
-
30
- Keyword Args:
31
- path_to_item (list): a list of keys an indices to get to the
32
- current_item
33
- None if unset
34
- valid_classes (tuple): the primitive classes that current item
35
- should be an instance of
36
- None if unset
37
- key_type (bool): False if our value is a value in a dict
38
- True if it is a key in a dict
39
- False if our item is an item in a list
40
- None if unset
41
- """
42
- self.path_to_item = path_to_item
43
- self.valid_classes = valid_classes
44
- self.key_type = key_type
45
- full_msg = msg
46
- if path_to_item:
47
- full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
48
- super(ApiTypeError, self).__init__(full_msg)
49
-
50
-
51
- class ApiValueError(OpenApiException, ValueError):
52
- def __init__(self, msg, path_to_item=None) -> None:
53
- """
54
- Args:
55
- msg (str): the exception message
56
-
57
- Keyword Args:
58
- path_to_item (list) the path to the exception in the
59
- received_data dict. None if unset
60
- """
61
-
62
- self.path_to_item = path_to_item
63
- full_msg = msg
64
- if path_to_item:
65
- full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
66
- super(ApiValueError, self).__init__(full_msg)
67
-
68
-
69
- class ApiAttributeError(OpenApiException, AttributeError):
70
- def __init__(self, msg, path_to_item=None) -> None:
71
- """
72
- Raised when an attribute reference or assignment fails.
73
-
74
- Args:
75
- msg (str): the exception message
76
-
77
- Keyword Args:
78
- path_to_item (None/list) the path to the exception in the
79
- received_data dict
80
- """
81
- self.path_to_item = path_to_item
82
- full_msg = msg
83
- if path_to_item:
84
- full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
85
- super(ApiAttributeError, self).__init__(full_msg)
86
-
87
-
88
- class ApiKeyError(OpenApiException, KeyError):
89
- def __init__(self, msg, path_to_item=None) -> None:
90
- """
91
- Args:
92
- msg (str): the exception message
93
-
94
- Keyword Args:
95
- path_to_item (None/list) the path to the exception in the
96
- received_data dict
97
- """
98
- self.path_to_item = path_to_item
99
- full_msg = msg
100
- if path_to_item:
101
- full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
102
- super(ApiKeyError, self).__init__(full_msg)
103
-
104
-
105
- class ApiException(OpenApiException):
106
-
107
- def __init__(
108
- self,
109
- status=None,
110
- reason=None,
111
- http_resp=None,
112
- *,
113
- body: Optional[str] = None,
114
- data: Optional[Any] = None,
115
- ) -> None:
116
- self.status = status
117
- self.reason = reason
118
- self.body = body
119
- self.data = data
120
- self.headers = None
121
-
122
- if http_resp:
123
- if self.status is None:
124
- self.status = http_resp.status
125
- if self.reason is None:
126
- self.reason = http_resp.reason
127
- if self.body is None:
128
- try:
129
- self.body = http_resp.data.decode('utf-8')
130
- except Exception:
131
- pass
132
- self.headers = http_resp.getheaders()
133
-
134
- @classmethod
135
- def from_response(
136
- cls,
137
- *,
138
- http_resp,
139
- body: Optional[str],
140
- data: Optional[Any],
141
- ) -> Self:
142
- if http_resp.status == 400:
143
- raise BadRequestException(http_resp=http_resp, body=body, data=data)
144
-
145
- if http_resp.status == 401:
146
- raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
147
-
148
- if http_resp.status == 403:
149
- raise ForbiddenException(http_resp=http_resp, body=body, data=data)
150
-
151
- if http_resp.status == 404:
152
- raise NotFoundException(http_resp=http_resp, body=body, data=data)
153
-
154
- if 500 <= http_resp.status <= 599:
155
- raise ServiceException(http_resp=http_resp, body=body, data=data)
156
- raise ApiException(http_resp=http_resp, body=body, data=data)
157
-
158
- def __str__(self):
159
- """Custom error messages for exception"""
160
- error_message = "({0})\n"\
161
- "Reason: {1}\n".format(self.status, self.reason)
162
- if self.headers:
163
- error_message += "HTTP response headers: {0}\n".format(
164
- self.headers)
165
-
166
- if self.data or self.body:
167
- error_message += "HTTP response body: {0}\n".format(self.data or self.body)
168
-
169
- return error_message
170
-
171
-
172
- class BadRequestException(ApiException):
173
- pass
174
-
175
-
176
- class NotFoundException(ApiException):
177
- pass
178
-
179
-
180
- class UnauthorizedException(ApiException):
181
- pass
182
-
183
-
184
- class ForbiddenException(ApiException):
185
- pass
186
-
187
-
188
- class ServiceException(ApiException):
189
- pass
190
-
191
-
192
- def render_path(path_to_item):
193
- """Returns a string representation of a path"""
194
- result = ""
195
- for pth in path_to_item:
196
- if isinstance(pth, int):
197
- result += "[{0}]".format(pth)
198
- else:
199
- result += "['{0}']".format(pth)
200
- return result
@@ -1,56 +0,0 @@
1
- # coding: utf-8
2
-
3
- # flake8: noqa
4
- """
5
- Pulp 3 API
6
-
7
- Fetch, Upload, Organize, and Distribute Software Packages
8
-
9
- The version of the OpenAPI document: v3
10
- Contact: pulp-list@redhat.com
11
- Generated by OpenAPI Generator (https://openapi-generator.tech)
12
-
13
- Do not edit the class manually.
14
- """ # noqa: E501
15
-
16
-
17
- # import models into model package
18
- from services-pulp_file-client.models.async_operation_response import AsyncOperationResponse
19
- from services-pulp_file-client.models.content_summary_response import ContentSummaryResponse
20
- from services-pulp_file-client.models.file_file_alternate_content_source import FileFileAlternateContentSource
21
- from services-pulp_file-client.models.file_file_alternate_content_source_response import FileFileAlternateContentSourceResponse
22
- from services-pulp_file-client.models.file_file_content_response import FileFileContentResponse
23
- from services-pulp_file-client.models.file_file_distribution import FileFileDistribution
24
- from services-pulp_file-client.models.file_file_distribution_response import FileFileDistributionResponse
25
- from services-pulp_file-client.models.file_file_publication import FileFilePublication
26
- from services-pulp_file-client.models.file_file_publication_response import FileFilePublicationResponse
27
- from services-pulp_file-client.models.file_file_remote import FileFileRemote
28
- from services-pulp_file-client.models.file_file_remote_response import FileFileRemoteResponse
29
- from services-pulp_file-client.models.file_file_remote_response_hidden_fields_inner import FileFileRemoteResponseHiddenFieldsInner
30
- from services-pulp_file-client.models.file_file_repository import FileFileRepository
31
- from services-pulp_file-client.models.file_file_repository_response import FileFileRepositoryResponse
32
- from services-pulp_file-client.models.my_permissions_response import MyPermissionsResponse
33
- from services-pulp_file-client.models.nested_role import NestedRole
34
- from services-pulp_file-client.models.nested_role_response import NestedRoleResponse
35
- from services-pulp_file-client.models.object_roles_response import ObjectRolesResponse
36
- from services-pulp_file-client.models.paginated_repository_version_response_list import PaginatedRepositoryVersionResponseList
37
- from services-pulp_file-client.models.paginatedfile_file_alternate_content_source_response_list import PaginatedfileFileAlternateContentSourceResponseList
38
- from services-pulp_file-client.models.paginatedfile_file_content_response_list import PaginatedfileFileContentResponseList
39
- from services-pulp_file-client.models.paginatedfile_file_distribution_response_list import PaginatedfileFileDistributionResponseList
40
- from services-pulp_file-client.models.paginatedfile_file_publication_response_list import PaginatedfileFilePublicationResponseList
41
- from services-pulp_file-client.models.paginatedfile_file_remote_response_list import PaginatedfileFileRemoteResponseList
42
- from services-pulp_file-client.models.paginatedfile_file_repository_response_list import PaginatedfileFileRepositoryResponseList
43
- from services-pulp_file-client.models.patchedfile_file_alternate_content_source import PatchedfileFileAlternateContentSource
44
- from services-pulp_file-client.models.patchedfile_file_distribution import PatchedfileFileDistribution
45
- from services-pulp_file-client.models.patchedfile_file_remote import PatchedfileFileRemote
46
- from services-pulp_file-client.models.patchedfile_file_repository import PatchedfileFileRepository
47
- from services-pulp_file-client.models.policy_enum import PolicyEnum
48
- from services-pulp_file-client.models.repair import Repair
49
- from services-pulp_file-client.models.repository_add_remove_content import RepositoryAddRemoveContent
50
- from services-pulp_file-client.models.repository_sync_url import RepositorySyncURL
51
- from services-pulp_file-client.models.repository_version_response import RepositoryVersionResponse
52
- from services-pulp_file-client.models.set_label import SetLabel
53
- from services-pulp_file-client.models.set_label_response import SetLabelResponse
54
- from services-pulp_file-client.models.task_group_operation_response import TaskGroupOperationResponse
55
- from services-pulp_file-client.models.unset_label import UnsetLabel
56
- from services-pulp_file-client.models.unset_label_response import UnsetLabelResponse
@@ -1,88 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
- from typing import Any, ClassVar, Dict, List
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
- class AsyncOperationResponse(BaseModel):
27
- """
28
- Serializer for asynchronous operations.
29
- """ # noqa: E501
30
- task: StrictStr = Field(description="The href of the task.")
31
- __properties: ClassVar[List[str]] = ["task"]
32
-
33
- model_config = ConfigDict(
34
- populate_by_name=True,
35
- validate_assignment=True,
36
- protected_namespaces=(),
37
- )
38
-
39
-
40
- def to_str(self) -> str:
41
- """Returns the string representation of the model using alias"""
42
- return pprint.pformat(self.model_dump(by_alias=True))
43
-
44
- def to_json(self) -> str:
45
- """Returns the JSON representation of the model using alias"""
46
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
- return json.dumps(self.to_dict())
48
-
49
- @classmethod
50
- def from_json(cls, json_str: str) -> Optional[Self]:
51
- """Create an instance of AsyncOperationResponse from a JSON string"""
52
- return cls.from_dict(json.loads(json_str))
53
-
54
- def to_dict(self) -> Dict[str, Any]:
55
- """Return the dictionary representation of the model using alias.
56
-
57
- This has the following differences from calling pydantic's
58
- `self.model_dump(by_alias=True)`:
59
-
60
- * `None` is only added to the output dict for nullable fields that
61
- were set at model initialization. Other fields with value `None`
62
- are ignored.
63
- """
64
- excluded_fields: Set[str] = set([
65
- ])
66
-
67
- _dict = self.model_dump(
68
- by_alias=True,
69
- exclude=excluded_fields,
70
- exclude_none=True,
71
- )
72
- return _dict
73
-
74
- @classmethod
75
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of AsyncOperationResponse from a dict"""
77
- if obj is None:
78
- return None
79
-
80
- if not isinstance(obj, dict):
81
- return cls.model_validate(obj)
82
-
83
- _obj = cls.model_validate({
84
- "task": obj.get("task")
85
- })
86
- return _obj
87
-
88
-
@@ -1,92 +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
22
- from typing import Any, ClassVar, Dict, List
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
- class ContentSummaryResponse(BaseModel):
27
- """
28
- Serializer for the RepositoryVersion content summary
29
- """ # noqa: E501
30
- added: Dict[str, Dict[str, Any]]
31
- removed: Dict[str, Dict[str, Any]]
32
- present: Dict[str, Dict[str, Any]]
33
- __properties: ClassVar[List[str]] = ["added", "removed", "present"]
34
-
35
- model_config = ConfigDict(
36
- populate_by_name=True,
37
- validate_assignment=True,
38
- protected_namespaces=(),
39
- )
40
-
41
-
42
- def to_str(self) -> str:
43
- """Returns the string representation of the model using alias"""
44
- return pprint.pformat(self.model_dump(by_alias=True))
45
-
46
- def to_json(self) -> str:
47
- """Returns the JSON representation of the model using alias"""
48
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
- return json.dumps(self.to_dict())
50
-
51
- @classmethod
52
- def from_json(cls, json_str: str) -> Optional[Self]:
53
- """Create an instance of ContentSummaryResponse from a JSON string"""
54
- return cls.from_dict(json.loads(json_str))
55
-
56
- def to_dict(self) -> Dict[str, Any]:
57
- """Return the dictionary representation of the model using alias.
58
-
59
- This has the following differences from calling pydantic's
60
- `self.model_dump(by_alias=True)`:
61
-
62
- * `None` is only added to the output dict for nullable fields that
63
- were set at model initialization. Other fields with value `None`
64
- are ignored.
65
- """
66
- excluded_fields: Set[str] = set([
67
- ])
68
-
69
- _dict = self.model_dump(
70
- by_alias=True,
71
- exclude=excluded_fields,
72
- exclude_none=True,
73
- )
74
- return _dict
75
-
76
- @classmethod
77
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
- """Create an instance of ContentSummaryResponse from a dict"""
79
- if obj is None:
80
- return None
81
-
82
- if not isinstance(obj, dict):
83
- return cls.model_validate(obj)
84
-
85
- _obj = cls.model_validate({
86
- "added": obj.get("added"),
87
- "removed": obj.get("removed"),
88
- "present": obj.get("present")
89
- })
90
- return _obj
91
-
92
-
@@ -1,101 +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_extensions import Annotated
25
- from typing import Optional, Set
26
- from typing_extensions import Self
27
-
28
- class FileFileAlternateContentSource(BaseModel):
29
- """
30
- Serializer for File alternate content source.
31
- """ # noqa: E501
32
- name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Name of Alternate Content Source.")
33
- last_refreshed: Optional[datetime] = Field(default=None, description="Date of last refresh of AlternateContentSource.")
34
- paths: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = Field(default=None, description="List of paths that will be appended to the Remote url when searching for content.")
35
- remote: StrictStr = Field(description="The remote to provide alternate content source.")
36
- __properties: ClassVar[List[str]] = ["name", "last_refreshed", "paths", "remote"]
37
-
38
- model_config = ConfigDict(
39
- populate_by_name=True,
40
- validate_assignment=True,
41
- protected_namespaces=(),
42
- )
43
-
44
-
45
- def to_str(self) -> str:
46
- """Returns the string representation of the model using alias"""
47
- return pprint.pformat(self.model_dump(by_alias=True))
48
-
49
- def to_json(self) -> str:
50
- """Returns the JSON representation of the model using alias"""
51
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
- return json.dumps(self.to_dict())
53
-
54
- @classmethod
55
- def from_json(cls, json_str: str) -> Optional[Self]:
56
- """Create an instance of FileFileAlternateContentSource from a JSON string"""
57
- return cls.from_dict(json.loads(json_str))
58
-
59
- def to_dict(self) -> Dict[str, Any]:
60
- """Return the dictionary representation of the model using alias.
61
-
62
- This has the following differences from calling pydantic's
63
- `self.model_dump(by_alias=True)`:
64
-
65
- * `None` is only added to the output dict for nullable fields that
66
- were set at model initialization. Other fields with value `None`
67
- are ignored.
68
- """
69
- excluded_fields: Set[str] = set([
70
- ])
71
-
72
- _dict = self.model_dump(
73
- by_alias=True,
74
- exclude=excluded_fields,
75
- exclude_none=True,
76
- )
77
- # set to None if last_refreshed (nullable) is None
78
- # and model_fields_set contains the field
79
- if self.last_refreshed is None and "last_refreshed" in self.model_fields_set:
80
- _dict['last_refreshed'] = None
81
-
82
- return _dict
83
-
84
- @classmethod
85
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
- """Create an instance of FileFileAlternateContentSource from a dict"""
87
- if obj is None:
88
- return None
89
-
90
- if not isinstance(obj, dict):
91
- return cls.model_validate(obj)
92
-
93
- _obj = cls.model_validate({
94
- "name": obj.get("name"),
95
- "last_refreshed": obj.get("last_refreshed"),
96
- "paths": obj.get("paths"),
97
- "remote": obj.get("remote")
98
- })
99
- return _obj
100
-
101
-
@@ -1,116 +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 FileFileAlternateContentSourceResponse(BaseModel):
28
- """
29
- Serializer for File alternate content source.
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
- name: StrictStr = Field(description="Name of Alternate Content Source.")
36
- last_refreshed: Optional[datetime] = Field(default=None, description="Date of last refresh of AlternateContentSource.")
37
- paths: Optional[List[StrictStr]] = Field(default=None, description="List of paths that will be appended to the Remote url when searching for content.")
38
- remote: StrictStr = Field(description="The remote to provide alternate content source.")
39
- __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "name", "last_refreshed", "paths", "remote"]
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 FileFileAlternateContentSourceResponse 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
- * OpenAPI `readOnly` fields are excluded.
72
- * OpenAPI `readOnly` fields are excluded.
73
- * OpenAPI `readOnly` fields are excluded.
74
- * OpenAPI `readOnly` fields are excluded.
75
- """
76
- excluded_fields: Set[str] = set([
77
- "pulp_href",
78
- "prn",
79
- "pulp_created",
80
- "pulp_last_updated",
81
- ])
82
-
83
- _dict = self.model_dump(
84
- by_alias=True,
85
- exclude=excluded_fields,
86
- exclude_none=True,
87
- )
88
- # set to None if last_refreshed (nullable) is None
89
- # and model_fields_set contains the field
90
- if self.last_refreshed is None and "last_refreshed" in self.model_fields_set:
91
- _dict['last_refreshed'] = 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 FileFileAlternateContentSourceResponse from a dict"""
98
- if obj is None:
99
- return None
100
-
101
- if not isinstance(obj, dict):
102
- return cls.model_validate(obj)
103
-
104
- _obj = cls.model_validate({
105
- "pulp_href": obj.get("pulp_href"),
106
- "prn": obj.get("prn"),
107
- "pulp_created": obj.get("pulp_created"),
108
- "pulp_last_updated": obj.get("pulp_last_updated"),
109
- "name": obj.get("name"),
110
- "last_refreshed": obj.get("last_refreshed"),
111
- "paths": obj.get("paths"),
112
- "remote": obj.get("remote")
113
- })
114
- return _obj
115
-
116
-