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
@@ -20,17 +20,18 @@ from typing_extensions import Annotated
20
20
  from pydantic import Field, StrictBytes, StrictFloat, StrictInt, StrictStr, field_validator
21
21
  from typing import Dict, List, Optional, Tuple, Union
22
22
  from typing_extensions import Annotated
23
- from services-pulp_file-client.models.async_operation_response import AsyncOperationResponse
24
- from services-pulp_file-client.models.file_file_content_response import FileFileContentResponse
25
- from services-pulp_file-client.models.paginatedfile_file_content_response_list import PaginatedfileFileContentResponseList
26
- from services-pulp_file-client.models.set_label import SetLabel
27
- from services-pulp_file-client.models.set_label_response import SetLabelResponse
28
- from services-pulp_file-client.models.unset_label import UnsetLabel
29
- from services-pulp_file-client.models.unset_label_response import UnsetLabelResponse
23
+ from pulpcore.client.pulp_file.models.async_operation_response import AsyncOperationResponse
24
+ from pulpcore.client.pulp_file.models.file_content_upload_response import FileContentUploadResponse
25
+ from pulpcore.client.pulp_file.models.file_file_content_response import FileFileContentResponse
26
+ from pulpcore.client.pulp_file.models.paginatedfile_file_content_response_list import PaginatedfileFileContentResponseList
27
+ from pulpcore.client.pulp_file.models.set_label import SetLabel
28
+ from pulpcore.client.pulp_file.models.set_label_response import SetLabelResponse
29
+ from pulpcore.client.pulp_file.models.unset_label import UnsetLabel
30
+ from pulpcore.client.pulp_file.models.unset_label_response import UnsetLabelResponse
30
31
 
31
- from services-pulp_file-client.api_client import ApiClient, RequestSerialized
32
- from services-pulp_file-client.api_response import ApiResponse
33
- from services-pulp_file-client.rest import RESTResponseType
32
+ from pulpcore.client.pulp_file.api_client import ApiClient, RequestSerialized
33
+ from pulpcore.client.pulp_file.api_response import ApiResponse
34
+ from pulpcore.client.pulp_file.rest import RESTResponseType
34
35
 
35
36
 
36
37
  class ContentFilesApi:
@@ -2086,3 +2087,386 @@ class ContentFilesApi:
2086
2087
  )
2087
2088
 
2088
2089
 
2090
+
2091
+
2092
+ @validate_call
2093
+ def upload(
2094
+ self,
2095
+ relative_path: Annotated[str, Field(min_length=1, strict=True, description="Path where the artifact is located relative to distributions base_path")],
2096
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2097
+ pulp_labels: Annotated[Optional[Dict[str, Optional[StrictStr]]], Field(description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")] = None,
2098
+ artifact: Annotated[Optional[StrictStr], Field(description="Artifact file representing the physical content")] = None,
2099
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="An uploaded file that may be turned into the content unit.")] = None,
2100
+ upload: Annotated[Optional[StrictStr], Field(description="An uncommitted upload that may be turned into the content unit.")] = None,
2101
+ file_url: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="A url that Pulp can download and turn into the content unit.")] = None,
2102
+ pulp_domain: StrictStr = "default",
2103
+ _request_timeout: Union[
2104
+ None,
2105
+ Annotated[StrictFloat, Field(gt=0)],
2106
+ Tuple[
2107
+ Annotated[StrictFloat, Field(gt=0)],
2108
+ Annotated[StrictFloat, Field(gt=0)]
2109
+ ]
2110
+ ] = None,
2111
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2112
+ _content_type: Optional[StrictStr] = None,
2113
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2114
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2115
+ ) -> FileContentUploadResponse:
2116
+ """Upload a File synchronously.
2117
+
2118
+ Synchronously upload a File.
2119
+
2120
+ :param pulp_domain: (required)
2121
+ :type pulp_domain: str
2122
+ :param relative_path: Path where the artifact is located relative to distributions base_path (required)
2123
+ :type relative_path: str
2124
+ :param x_task_diagnostics: List of profilers to use on tasks.
2125
+ :type x_task_diagnostics: List[str]
2126
+ :param pulp_labels: A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
2127
+ :type pulp_labels: Dict[str, Optional[str]]
2128
+ :param artifact: Artifact file representing the physical content
2129
+ :type artifact: str
2130
+ :param file: An uploaded file that may be turned into the content unit.
2131
+ :type file: bytearray
2132
+ :param upload: An uncommitted upload that may be turned into the content unit.
2133
+ :type upload: str
2134
+ :param file_url: A url that Pulp can download and turn into the content unit.
2135
+ :type file_url: str
2136
+ :param _request_timeout: timeout setting for this request. If one
2137
+ number provided, it will be total request
2138
+ timeout. It can also be a pair (tuple) of
2139
+ (connection, read) timeouts.
2140
+ :type _request_timeout: int, tuple(int, int), optional
2141
+ :param _request_auth: set to override the auth_settings for an a single
2142
+ request; this effectively ignores the
2143
+ authentication in the spec for a single request.
2144
+ :type _request_auth: dict, optional
2145
+ :param _content_type: force content-type for the request.
2146
+ :type _content_type: str, Optional
2147
+ :param _headers: set to override the headers for a single
2148
+ request; this effectively ignores the headers
2149
+ in the spec for a single request.
2150
+ :type _headers: dict, optional
2151
+ :param _host_index: set to override the host_index for a single
2152
+ request; this effectively ignores the host_index
2153
+ in the spec for a single request.
2154
+ :type _host_index: int, optional
2155
+ :return: Returns the result object.
2156
+ """ # noqa: E501
2157
+
2158
+ _param = self._upload_serialize(
2159
+ pulp_domain=pulp_domain,
2160
+ relative_path=relative_path,
2161
+ x_task_diagnostics=x_task_diagnostics,
2162
+ pulp_labels=pulp_labels,
2163
+ artifact=artifact,
2164
+ file=file,
2165
+ upload=upload,
2166
+ file_url=file_url,
2167
+ _request_auth=_request_auth,
2168
+ _content_type=_content_type,
2169
+ _headers=_headers,
2170
+ _host_index=_host_index
2171
+ )
2172
+
2173
+ _response_types_map: Dict[str, Optional[str]] = {
2174
+ '201': "FileContentUploadResponse",
2175
+ }
2176
+ response_data = self.api_client.call_api(
2177
+ *_param,
2178
+ _request_timeout=_request_timeout
2179
+ )
2180
+ response_data.read()
2181
+ return self.api_client.response_deserialize(
2182
+ response_data=response_data,
2183
+ response_types_map=_response_types_map,
2184
+ ).data
2185
+
2186
+
2187
+ @validate_call
2188
+ def upload_with_http_info(
2189
+ self,
2190
+ relative_path: Annotated[str, Field(min_length=1, strict=True, description="Path where the artifact is located relative to distributions base_path")],
2191
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2192
+ pulp_labels: Annotated[Optional[Dict[str, Optional[StrictStr]]], Field(description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")] = None,
2193
+ artifact: Annotated[Optional[StrictStr], Field(description="Artifact file representing the physical content")] = None,
2194
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="An uploaded file that may be turned into the content unit.")] = None,
2195
+ upload: Annotated[Optional[StrictStr], Field(description="An uncommitted upload that may be turned into the content unit.")] = None,
2196
+ file_url: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="A url that Pulp can download and turn into the content unit.")] = None,
2197
+ pulp_domain: StrictStr = "default",
2198
+ _request_timeout: Union[
2199
+ None,
2200
+ Annotated[StrictFloat, Field(gt=0)],
2201
+ Tuple[
2202
+ Annotated[StrictFloat, Field(gt=0)],
2203
+ Annotated[StrictFloat, Field(gt=0)]
2204
+ ]
2205
+ ] = None,
2206
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2207
+ _content_type: Optional[StrictStr] = None,
2208
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2209
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2210
+ ) -> ApiResponse[FileContentUploadResponse]:
2211
+ """Upload a File synchronously.
2212
+
2213
+ Synchronously upload a File.
2214
+
2215
+ :param pulp_domain: (required)
2216
+ :type pulp_domain: str
2217
+ :param relative_path: Path where the artifact is located relative to distributions base_path (required)
2218
+ :type relative_path: str
2219
+ :param x_task_diagnostics: List of profilers to use on tasks.
2220
+ :type x_task_diagnostics: List[str]
2221
+ :param pulp_labels: A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
2222
+ :type pulp_labels: Dict[str, Optional[str]]
2223
+ :param artifact: Artifact file representing the physical content
2224
+ :type artifact: str
2225
+ :param file: An uploaded file that may be turned into the content unit.
2226
+ :type file: bytearray
2227
+ :param upload: An uncommitted upload that may be turned into the content unit.
2228
+ :type upload: str
2229
+ :param file_url: A url that Pulp can download and turn into the content unit.
2230
+ :type file_url: str
2231
+ :param _request_timeout: timeout setting for this request. If one
2232
+ number provided, it will be total request
2233
+ timeout. It can also be a pair (tuple) of
2234
+ (connection, read) timeouts.
2235
+ :type _request_timeout: int, tuple(int, int), optional
2236
+ :param _request_auth: set to override the auth_settings for an a single
2237
+ request; this effectively ignores the
2238
+ authentication in the spec for a single request.
2239
+ :type _request_auth: dict, optional
2240
+ :param _content_type: force content-type for the request.
2241
+ :type _content_type: str, Optional
2242
+ :param _headers: set to override the headers for a single
2243
+ request; this effectively ignores the headers
2244
+ in the spec for a single request.
2245
+ :type _headers: dict, optional
2246
+ :param _host_index: set to override the host_index for a single
2247
+ request; this effectively ignores the host_index
2248
+ in the spec for a single request.
2249
+ :type _host_index: int, optional
2250
+ :return: Returns the result object.
2251
+ """ # noqa: E501
2252
+
2253
+ _param = self._upload_serialize(
2254
+ pulp_domain=pulp_domain,
2255
+ relative_path=relative_path,
2256
+ x_task_diagnostics=x_task_diagnostics,
2257
+ pulp_labels=pulp_labels,
2258
+ artifact=artifact,
2259
+ file=file,
2260
+ upload=upload,
2261
+ file_url=file_url,
2262
+ _request_auth=_request_auth,
2263
+ _content_type=_content_type,
2264
+ _headers=_headers,
2265
+ _host_index=_host_index
2266
+ )
2267
+
2268
+ _response_types_map: Dict[str, Optional[str]] = {
2269
+ '201': "FileContentUploadResponse",
2270
+ }
2271
+ response_data = self.api_client.call_api(
2272
+ *_param,
2273
+ _request_timeout=_request_timeout
2274
+ )
2275
+ response_data.read()
2276
+ return self.api_client.response_deserialize(
2277
+ response_data=response_data,
2278
+ response_types_map=_response_types_map,
2279
+ )
2280
+
2281
+
2282
+ @validate_call
2283
+ def upload_without_preload_content(
2284
+ self,
2285
+ relative_path: Annotated[str, Field(min_length=1, strict=True, description="Path where the artifact is located relative to distributions base_path")],
2286
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2287
+ pulp_labels: Annotated[Optional[Dict[str, Optional[StrictStr]]], Field(description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")] = None,
2288
+ artifact: Annotated[Optional[StrictStr], Field(description="Artifact file representing the physical content")] = None,
2289
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="An uploaded file that may be turned into the content unit.")] = None,
2290
+ upload: Annotated[Optional[StrictStr], Field(description="An uncommitted upload that may be turned into the content unit.")] = None,
2291
+ file_url: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="A url that Pulp can download and turn into the content unit.")] = None,
2292
+ pulp_domain: StrictStr = "default",
2293
+ _request_timeout: Union[
2294
+ None,
2295
+ Annotated[StrictFloat, Field(gt=0)],
2296
+ Tuple[
2297
+ Annotated[StrictFloat, Field(gt=0)],
2298
+ Annotated[StrictFloat, Field(gt=0)]
2299
+ ]
2300
+ ] = None,
2301
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2302
+ _content_type: Optional[StrictStr] = None,
2303
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2304
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2305
+ ) -> RESTResponseType:
2306
+ """Upload a File synchronously.
2307
+
2308
+ Synchronously upload a File.
2309
+
2310
+ :param pulp_domain: (required)
2311
+ :type pulp_domain: str
2312
+ :param relative_path: Path where the artifact is located relative to distributions base_path (required)
2313
+ :type relative_path: str
2314
+ :param x_task_diagnostics: List of profilers to use on tasks.
2315
+ :type x_task_diagnostics: List[str]
2316
+ :param pulp_labels: A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
2317
+ :type pulp_labels: Dict[str, Optional[str]]
2318
+ :param artifact: Artifact file representing the physical content
2319
+ :type artifact: str
2320
+ :param file: An uploaded file that may be turned into the content unit.
2321
+ :type file: bytearray
2322
+ :param upload: An uncommitted upload that may be turned into the content unit.
2323
+ :type upload: str
2324
+ :param file_url: A url that Pulp can download and turn into the content unit.
2325
+ :type file_url: str
2326
+ :param _request_timeout: timeout setting for this request. If one
2327
+ number provided, it will be total request
2328
+ timeout. It can also be a pair (tuple) of
2329
+ (connection, read) timeouts.
2330
+ :type _request_timeout: int, tuple(int, int), optional
2331
+ :param _request_auth: set to override the auth_settings for an a single
2332
+ request; this effectively ignores the
2333
+ authentication in the spec for a single request.
2334
+ :type _request_auth: dict, optional
2335
+ :param _content_type: force content-type for the request.
2336
+ :type _content_type: str, Optional
2337
+ :param _headers: set to override the headers for a single
2338
+ request; this effectively ignores the headers
2339
+ in the spec for a single request.
2340
+ :type _headers: dict, optional
2341
+ :param _host_index: set to override the host_index for a single
2342
+ request; this effectively ignores the host_index
2343
+ in the spec for a single request.
2344
+ :type _host_index: int, optional
2345
+ :return: Returns the result object.
2346
+ """ # noqa: E501
2347
+
2348
+ _param = self._upload_serialize(
2349
+ pulp_domain=pulp_domain,
2350
+ relative_path=relative_path,
2351
+ x_task_diagnostics=x_task_diagnostics,
2352
+ pulp_labels=pulp_labels,
2353
+ artifact=artifact,
2354
+ file=file,
2355
+ upload=upload,
2356
+ file_url=file_url,
2357
+ _request_auth=_request_auth,
2358
+ _content_type=_content_type,
2359
+ _headers=_headers,
2360
+ _host_index=_host_index
2361
+ )
2362
+
2363
+ _response_types_map: Dict[str, Optional[str]] = {
2364
+ '201': "FileContentUploadResponse",
2365
+ }
2366
+ response_data = self.api_client.call_api(
2367
+ *_param,
2368
+ _request_timeout=_request_timeout
2369
+ )
2370
+ return response_data.response
2371
+
2372
+
2373
+ def _upload_serialize(
2374
+ self,
2375
+ pulp_domain,
2376
+ relative_path,
2377
+ x_task_diagnostics,
2378
+ pulp_labels,
2379
+ artifact,
2380
+ file,
2381
+ upload,
2382
+ file_url,
2383
+ _request_auth,
2384
+ _content_type,
2385
+ _headers,
2386
+ _host_index,
2387
+ ) -> RequestSerialized:
2388
+
2389
+ _host = None
2390
+
2391
+ _collection_formats: Dict[str, str] = {
2392
+ 'X-Task-Diagnostics': 'csv',
2393
+ }
2394
+
2395
+ _path_params: Dict[str, str] = {}
2396
+ _query_params: List[Tuple[str, str]] = []
2397
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2398
+ _form_params: List[Tuple[str, str]] = []
2399
+ _files: Dict[
2400
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2401
+ ] = {}
2402
+ _body_params: Optional[bytes] = None
2403
+
2404
+ # process the path parameters
2405
+ if pulp_domain is not None:
2406
+ _path_params['pulp_domain'] = pulp_domain
2407
+ # process the query parameters
2408
+ # process the header parameters
2409
+ if x_task_diagnostics is not None:
2410
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2411
+ # process the form parameters
2412
+ if pulp_labels is not None:
2413
+ _form_params.append(('pulp_labels', pulp_labels))
2414
+ if artifact is not None:
2415
+ _form_params.append(('artifact', artifact))
2416
+ if relative_path is not None:
2417
+ _form_params.append(('relative_path', relative_path))
2418
+ if file is not None:
2419
+ _files['file'] = file
2420
+ if upload is not None:
2421
+ _form_params.append(('upload', upload))
2422
+ if file_url is not None:
2423
+ _form_params.append(('file_url', file_url))
2424
+ # process the body parameter
2425
+
2426
+
2427
+ # set the HTTP header `Accept`
2428
+ if 'Accept' not in _header_params:
2429
+ _header_params['Accept'] = self.api_client.select_header_accept(
2430
+ [
2431
+ 'application/json'
2432
+ ]
2433
+ )
2434
+
2435
+ # set the HTTP header `Content-Type`
2436
+ if _content_type:
2437
+ _header_params['Content-Type'] = _content_type
2438
+ else:
2439
+ _default_content_type = (
2440
+ self.api_client.select_header_content_type(
2441
+ [
2442
+ 'multipart/form-data',
2443
+ 'application/x-www-form-urlencoded'
2444
+ ]
2445
+ )
2446
+ )
2447
+ if _default_content_type is not None:
2448
+ _header_params['Content-Type'] = _default_content_type
2449
+
2450
+ # authentication setting
2451
+ _auth_settings: List[str] = [
2452
+ 'json_header_remote_authentication',
2453
+ 'basicAuth',
2454
+ 'cookieAuth'
2455
+ ]
2456
+
2457
+ return self.api_client.param_serialize(
2458
+ method='POST',
2459
+ resource_path='/api/pulp/{pulp_domain}/api/v3/content/file/files/upload/',
2460
+ path_params=_path_params,
2461
+ query_params=_query_params,
2462
+ header_params=_header_params,
2463
+ body=_body_params,
2464
+ post_params=_form_params,
2465
+ files=_files,
2466
+ auth_settings=_auth_settings,
2467
+ collection_formats=_collection_formats,
2468
+ _host=_host,
2469
+ _request_auth=_request_auth
2470
+ )
2471
+
2472
+
@@ -20,23 +20,23 @@ from typing_extensions import Annotated
20
20
  from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
21
21
  from typing import List, Optional
22
22
  from typing_extensions import Annotated
23
- from services-pulp_file-client.models.async_operation_response import AsyncOperationResponse
24
- from services-pulp_file-client.models.file_file_distribution import FileFileDistribution
25
- from services-pulp_file-client.models.file_file_distribution_response import FileFileDistributionResponse
26
- from services-pulp_file-client.models.my_permissions_response import MyPermissionsResponse
27
- from services-pulp_file-client.models.nested_role import NestedRole
28
- from services-pulp_file-client.models.nested_role_response import NestedRoleResponse
29
- from services-pulp_file-client.models.object_roles_response import ObjectRolesResponse
30
- from services-pulp_file-client.models.paginatedfile_file_distribution_response_list import PaginatedfileFileDistributionResponseList
31
- from services-pulp_file-client.models.patchedfile_file_distribution import PatchedfileFileDistribution
32
- from services-pulp_file-client.models.set_label import SetLabel
33
- from services-pulp_file-client.models.set_label_response import SetLabelResponse
34
- from services-pulp_file-client.models.unset_label import UnsetLabel
35
- from services-pulp_file-client.models.unset_label_response import UnsetLabelResponse
36
-
37
- from services-pulp_file-client.api_client import ApiClient, RequestSerialized
38
- from services-pulp_file-client.api_response import ApiResponse
39
- from services-pulp_file-client.rest import RESTResponseType
23
+ from pulpcore.client.pulp_file.models.async_operation_response import AsyncOperationResponse
24
+ from pulpcore.client.pulp_file.models.file_file_distribution import FileFileDistribution
25
+ from pulpcore.client.pulp_file.models.file_file_distribution_response import FileFileDistributionResponse
26
+ from pulpcore.client.pulp_file.models.my_permissions_response import MyPermissionsResponse
27
+ from pulpcore.client.pulp_file.models.nested_role import NestedRole
28
+ from pulpcore.client.pulp_file.models.nested_role_response import NestedRoleResponse
29
+ from pulpcore.client.pulp_file.models.object_roles_response import ObjectRolesResponse
30
+ from pulpcore.client.pulp_file.models.paginatedfile_file_distribution_response_list import PaginatedfileFileDistributionResponseList
31
+ from pulpcore.client.pulp_file.models.patchedfile_file_distribution import PatchedfileFileDistribution
32
+ from pulpcore.client.pulp_file.models.set_label import SetLabel
33
+ from pulpcore.client.pulp_file.models.set_label_response import SetLabelResponse
34
+ from pulpcore.client.pulp_file.models.unset_label import UnsetLabel
35
+ from pulpcore.client.pulp_file.models.unset_label_response import UnsetLabelResponse
36
+
37
+ from pulpcore.client.pulp_file.api_client import ApiClient, RequestSerialized
38
+ from pulpcore.client.pulp_file.api_response import ApiResponse
39
+ from pulpcore.client.pulp_file.rest import RESTResponseType
40
40
 
41
41
 
42
42
  class DistributionsFileApi:
@@ -2344,10 +2344,10 @@ class DistributionsFileApi:
2344
2344
  _content_type: Optional[StrictStr] = None,
2345
2345
  _headers: Optional[Dict[StrictStr, Any]] = None,
2346
2346
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2347
- ) -> AsyncOperationResponse:
2347
+ ) -> FileFileDistributionResponse:
2348
2348
  """Update a file distribution
2349
2349
 
2350
- Trigger an asynchronous partial update task
2350
+ Update the entity partially and trigger an asynchronous task if necessary
2351
2351
 
2352
2352
  :param file_file_distribution_href: (required)
2353
2353
  :type file_file_distribution_href: str
@@ -2388,6 +2388,7 @@ class DistributionsFileApi:
2388
2388
  )
2389
2389
 
2390
2390
  _response_types_map: Dict[str, Optional[str]] = {
2391
+ '200': "FileFileDistributionResponse",
2391
2392
  '202': "AsyncOperationResponse",
2392
2393
  }
2393
2394
  response_data = self.api_client.call_api(
@@ -2419,10 +2420,10 @@ class DistributionsFileApi:
2419
2420
  _content_type: Optional[StrictStr] = None,
2420
2421
  _headers: Optional[Dict[StrictStr, Any]] = None,
2421
2422
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2422
- ) -> ApiResponse[AsyncOperationResponse]:
2423
+ ) -> ApiResponse[FileFileDistributionResponse]:
2423
2424
  """Update a file distribution
2424
2425
 
2425
- Trigger an asynchronous partial update task
2426
+ Update the entity partially and trigger an asynchronous task if necessary
2426
2427
 
2427
2428
  :param file_file_distribution_href: (required)
2428
2429
  :type file_file_distribution_href: str
@@ -2463,6 +2464,7 @@ class DistributionsFileApi:
2463
2464
  )
2464
2465
 
2465
2466
  _response_types_map: Dict[str, Optional[str]] = {
2467
+ '200': "FileFileDistributionResponse",
2466
2468
  '202': "AsyncOperationResponse",
2467
2469
  }
2468
2470
  response_data = self.api_client.call_api(
@@ -2497,7 +2499,7 @@ class DistributionsFileApi:
2497
2499
  ) -> RESTResponseType:
2498
2500
  """Update a file distribution
2499
2501
 
2500
- Trigger an asynchronous partial update task
2502
+ Update the entity partially and trigger an asynchronous task if necessary
2501
2503
 
2502
2504
  :param file_file_distribution_href: (required)
2503
2505
  :type file_file_distribution_href: str
@@ -2538,6 +2540,7 @@ class DistributionsFileApi:
2538
2540
  )
2539
2541
 
2540
2542
  _response_types_map: Dict[str, Optional[str]] = {
2543
+ '200': "FileFileDistributionResponse",
2541
2544
  '202': "AsyncOperationResponse",
2542
2545
  }
2543
2546
  response_data = self.api_client.call_api(
@@ -3895,10 +3898,10 @@ class DistributionsFileApi:
3895
3898
  _content_type: Optional[StrictStr] = None,
3896
3899
  _headers: Optional[Dict[StrictStr, Any]] = None,
3897
3900
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3898
- ) -> AsyncOperationResponse:
3901
+ ) -> FileFileDistributionResponse:
3899
3902
  """Update a file distribution
3900
3903
 
3901
- Trigger an asynchronous update task
3904
+ Update the entity and trigger an asynchronous task if necessary
3902
3905
 
3903
3906
  :param file_file_distribution_href: (required)
3904
3907
  :type file_file_distribution_href: str
@@ -3939,6 +3942,7 @@ class DistributionsFileApi:
3939
3942
  )
3940
3943
 
3941
3944
  _response_types_map: Dict[str, Optional[str]] = {
3945
+ '200': "FileFileDistributionResponse",
3942
3946
  '202': "AsyncOperationResponse",
3943
3947
  }
3944
3948
  response_data = self.api_client.call_api(
@@ -3970,10 +3974,10 @@ class DistributionsFileApi:
3970
3974
  _content_type: Optional[StrictStr] = None,
3971
3975
  _headers: Optional[Dict[StrictStr, Any]] = None,
3972
3976
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3973
- ) -> ApiResponse[AsyncOperationResponse]:
3977
+ ) -> ApiResponse[FileFileDistributionResponse]:
3974
3978
  """Update a file distribution
3975
3979
 
3976
- Trigger an asynchronous update task
3980
+ Update the entity and trigger an asynchronous task if necessary
3977
3981
 
3978
3982
  :param file_file_distribution_href: (required)
3979
3983
  :type file_file_distribution_href: str
@@ -4014,6 +4018,7 @@ class DistributionsFileApi:
4014
4018
  )
4015
4019
 
4016
4020
  _response_types_map: Dict[str, Optional[str]] = {
4021
+ '200': "FileFileDistributionResponse",
4017
4022
  '202': "AsyncOperationResponse",
4018
4023
  }
4019
4024
  response_data = self.api_client.call_api(
@@ -4048,7 +4053,7 @@ class DistributionsFileApi:
4048
4053
  ) -> RESTResponseType:
4049
4054
  """Update a file distribution
4050
4055
 
4051
- Trigger an asynchronous update task
4056
+ Update the entity and trigger an asynchronous task if necessary
4052
4057
 
4053
4058
  :param file_file_distribution_href: (required)
4054
4059
  :type file_file_distribution_href: str
@@ -4089,6 +4094,7 @@ class DistributionsFileApi:
4089
4094
  )
4090
4095
 
4091
4096
  _response_types_map: Dict[str, Optional[str]] = {
4097
+ '200': "FileFileDistributionResponse",
4092
4098
  '202': "AsyncOperationResponse",
4093
4099
  }
4094
4100
  response_data = self.api_client.call_api(
@@ -21,18 +21,18 @@ from datetime import datetime
21
21
  from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
22
22
  from typing import List, Optional
23
23
  from typing_extensions import Annotated
24
- from services-pulp_file-client.models.async_operation_response import AsyncOperationResponse
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.my_permissions_response import MyPermissionsResponse
28
- from services-pulp_file-client.models.nested_role import NestedRole
29
- from services-pulp_file-client.models.nested_role_response import NestedRoleResponse
30
- from services-pulp_file-client.models.object_roles_response import ObjectRolesResponse
31
- from services-pulp_file-client.models.paginatedfile_file_publication_response_list import PaginatedfileFilePublicationResponseList
32
-
33
- from services-pulp_file-client.api_client import ApiClient, RequestSerialized
34
- from services-pulp_file-client.api_response import ApiResponse
35
- from services-pulp_file-client.rest import RESTResponseType
24
+ from pulpcore.client.pulp_file.models.async_operation_response import AsyncOperationResponse
25
+ from pulpcore.client.pulp_file.models.file_file_publication import FileFilePublication
26
+ from pulpcore.client.pulp_file.models.file_file_publication_response import FileFilePublicationResponse
27
+ from pulpcore.client.pulp_file.models.my_permissions_response import MyPermissionsResponse
28
+ from pulpcore.client.pulp_file.models.nested_role import NestedRole
29
+ from pulpcore.client.pulp_file.models.nested_role_response import NestedRoleResponse
30
+ from pulpcore.client.pulp_file.models.object_roles_response import ObjectRolesResponse
31
+ from pulpcore.client.pulp_file.models.paginatedfile_file_publication_response_list import PaginatedfileFilePublicationResponseList
32
+
33
+ from pulpcore.client.pulp_file.api_client import ApiClient, RequestSerialized
34
+ from pulpcore.client.pulp_file.api_response import ApiResponse
35
+ from pulpcore.client.pulp_file.rest import RESTResponseType
36
36
 
37
37
 
38
38
  class PublicationsFileApi: