crc-pulpcore-client 20250819.1__py3-none-any.whl → 20250821.1__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (239) hide show
  1. crc-pulpcore-client/api_client.py +1 -1
  2. crc-pulpcore-client/configuration.py +3 -3
  3. crc-pulpcore-client/models/artifact_distribution_response.py +13 -13
  4. {crc_pulpcore_client-20250819.1.dist-info → crc_pulpcore_client-20250821.1.dist-info}/METADATA +1 -1
  5. crc_pulpcore_client-20250821.1.dist-info/RECORD +234 -0
  6. crc_pulpcore_client-20250821.1.dist-info/top_level.txt +1 -0
  7. crc_pulpcore_client-20250819.1.dist-info/RECORD +0 -464
  8. crc_pulpcore_client-20250819.1.dist-info/top_level.txt +0 -2
  9. services-pulpcore-client/__init__.py +0 -2
  10. services-pulpcore-client/api/__init__.py +0 -53
  11. services-pulpcore-client/api/access_policies_api.py +0 -1864
  12. services-pulpcore-client/api/artifacts_api.py +0 -1615
  13. services-pulpcore-client/api/content_api.py +0 -598
  14. services-pulpcore-client/api/content_openpgp_publickey_api.py +0 -1887
  15. services-pulpcore-client/api/content_openpgp_publicsubkey_api.py +0 -1518
  16. services-pulpcore-client/api/content_openpgp_signature_api.py +0 -1518
  17. services-pulpcore-client/api/content_openpgp_userattribute_api.py +0 -1518
  18. services-pulpcore-client/api/content_openpgp_userid_api.py +0 -1655
  19. services-pulpcore-client/api/contentguards_api.py +0 -667
  20. services-pulpcore-client/api/contentguards_composite_api.py +0 -3401
  21. services-pulpcore-client/api/contentguards_content_redirect_api.py +0 -3401
  22. services-pulpcore-client/api/contentguards_header_api.py +0 -3401
  23. services-pulpcore-client/api/contentguards_rbac_api.py +0 -3401
  24. services-pulpcore-client/api/distributions_api.py +0 -822
  25. services-pulpcore-client/api/distributions_artifacts_api.py +0 -1103
  26. services-pulpcore-client/api/distributions_openpgp_api.py +0 -2676
  27. services-pulpcore-client/api/domains_api.py +0 -3106
  28. services-pulpcore-client/api/exporters_filesystem_api.py +0 -2157
  29. services-pulpcore-client/api/exporters_filesystem_exports_api.py +0 -1288
  30. services-pulpcore-client/api/exporters_pulp_api.py +0 -2157
  31. services-pulpcore-client/api/exporters_pulp_exports_api.py +0 -1288
  32. services-pulpcore-client/api/groups_api.py +0 -3368
  33. services-pulpcore-client/api/groups_roles_api.py +0 -1496
  34. services-pulpcore-client/api/groups_users_api.py +0 -972
  35. services-pulpcore-client/api/importers_pulp_api.py +0 -2149
  36. services-pulpcore-client/api/importers_pulp_import_check_api.py +0 -350
  37. services-pulpcore-client/api/importers_pulp_imports_api.py +0 -1288
  38. services-pulpcore-client/api/livez_api.py +0 -329
  39. services-pulpcore-client/api/login_api.py +0 -897
  40. services-pulpcore-client/api/orphans_api.py +0 -319
  41. services-pulpcore-client/api/orphans_cleanup_api.py +0 -350
  42. services-pulpcore-client/api/publications_api.py +0 -765
  43. services-pulpcore-client/api/remotes_api.py +0 -850
  44. services-pulpcore-client/api/repair_api.py +0 -350
  45. services-pulpcore-client/api/repositories_api.py +0 -872
  46. services-pulpcore-client/api/repositories_openpgp_keyring_api.py +0 -4546
  47. services-pulpcore-client/api/repositories_reclaim_space_api.py +0 -350
  48. services-pulpcore-client/api/repository_versions_api.py +0 -764
  49. services-pulpcore-client/api/roles_api.py +0 -2269
  50. services-pulpcore-client/api/signing_services_api.py +0 -811
  51. services-pulpcore-client/api/status_api.py +0 -337
  52. services-pulpcore-client/api/task_groups_api.py +0 -1012
  53. services-pulpcore-client/api/task_schedules_api.py +0 -2114
  54. services-pulpcore-client/api/tasks_api.py +0 -4299
  55. services-pulpcore-client/api/uploads_api.py +0 -3346
  56. services-pulpcore-client/api/upstream_pulps_api.py +0 -4001
  57. services-pulpcore-client/api/users_api.py +0 -2373
  58. services-pulpcore-client/api/users_roles_api.py +0 -1496
  59. services-pulpcore-client/api/workers_api.py +0 -1148
  60. services-pulpcore-client/api_client.py +0 -798
  61. services-pulpcore-client/api_response.py +0 -21
  62. services-pulpcore-client/configuration.py +0 -628
  63. services-pulpcore-client/exceptions.py +0 -200
  64. services-pulpcore-client/models/__init__.py +0 -189
  65. services-pulpcore-client/models/access_policy.py +0 -94
  66. services-pulpcore-client/models/access_policy_response.py +0 -119
  67. services-pulpcore-client/models/api_app_status_response.py +0 -99
  68. services-pulpcore-client/models/artifact_distribution_response.py +0 -126
  69. services-pulpcore-client/models/artifact_response.py +0 -149
  70. services-pulpcore-client/models/async_operation_response.py +0 -88
  71. services-pulpcore-client/models/composite_content_guard.py +0 -98
  72. services-pulpcore-client/models/composite_content_guard_response.py +0 -114
  73. services-pulpcore-client/models/content_app_status_response.py +0 -99
  74. services-pulpcore-client/models/content_guard_response.py +0 -112
  75. services-pulpcore-client/models/content_redirect_content_guard.py +0 -96
  76. services-pulpcore-client/models/content_redirect_content_guard_response.py +0 -112
  77. services-pulpcore-client/models/content_settings_response.py +0 -95
  78. services-pulpcore-client/models/content_summary_response.py +0 -92
  79. services-pulpcore-client/models/database_connection_response.py +0 -88
  80. services-pulpcore-client/models/distribution_response.py +0 -133
  81. services-pulpcore-client/models/domain.py +0 -114
  82. services-pulpcore-client/models/domain_backend_migrator.py +0 -91
  83. services-pulpcore-client/models/domain_response.py +0 -131
  84. services-pulpcore-client/models/evaluation_response.py +0 -92
  85. services-pulpcore-client/models/filesystem_export.py +0 -99
  86. services-pulpcore-client/models/filesystem_export_response.py +0 -118
  87. services-pulpcore-client/models/filesystem_exporter.py +0 -94
  88. services-pulpcore-client/models/filesystem_exporter_response.py +0 -110
  89. services-pulpcore-client/models/generic_remote_response.py +0 -199
  90. services-pulpcore-client/models/generic_remote_response_hidden_fields_inner.py +0 -90
  91. services-pulpcore-client/models/generic_remote_response_policy_enum.py +0 -39
  92. services-pulpcore-client/models/group.py +0 -89
  93. services-pulpcore-client/models/group_progress_report_response.py +0 -111
  94. services-pulpcore-client/models/group_response.py +0 -101
  95. services-pulpcore-client/models/group_role.py +0 -110
  96. services-pulpcore-client/models/group_role_response.py +0 -134
  97. services-pulpcore-client/models/group_user.py +0 -89
  98. services-pulpcore-client/models/group_user_response.py +0 -97
  99. services-pulpcore-client/models/header_content_guard.py +0 -107
  100. services-pulpcore-client/models/header_content_guard_response.py +0 -123
  101. services-pulpcore-client/models/import_response.py +0 -107
  102. services-pulpcore-client/models/login_response.py +0 -98
  103. services-pulpcore-client/models/method_enum.py +0 -39
  104. services-pulpcore-client/models/minimal_task_response.py +0 -125
  105. services-pulpcore-client/models/multiple_artifact_content_response.py +0 -107
  106. services-pulpcore-client/models/my_permissions_response.py +0 -88
  107. services-pulpcore-client/models/nested_open_pgp_public_subkey.py +0 -92
  108. services-pulpcore-client/models/nested_open_pgp_public_subkey_response.py +0 -104
  109. services-pulpcore-client/models/nested_open_pgp_signature.py +0 -120
  110. services-pulpcore-client/models/nested_open_pgp_signature_response.py +0 -124
  111. services-pulpcore-client/models/nested_open_pgp_user_attribute.py +0 -89
  112. services-pulpcore-client/models/nested_open_pgp_user_attribute_response.py +0 -101
  113. services-pulpcore-client/models/nested_open_pgp_user_id.py +0 -89
  114. services-pulpcore-client/models/nested_open_pgp_user_id_response.py +0 -100
  115. services-pulpcore-client/models/nested_role.py +0 -93
  116. services-pulpcore-client/models/nested_role_response.py +0 -92
  117. services-pulpcore-client/models/object_roles_response.py +0 -96
  118. services-pulpcore-client/models/open_pgp_distribution.py +0 -116
  119. services-pulpcore-client/models/open_pgp_distribution_response.py +0 -140
  120. services-pulpcore-client/models/open_pgp_keyring.py +0 -112
  121. services-pulpcore-client/models/open_pgp_keyring_response.py +0 -137
  122. services-pulpcore-client/models/open_pgp_public_key_response.py +0 -150
  123. services-pulpcore-client/models/open_pgp_public_subkey_response.py +0 -126
  124. services-pulpcore-client/models/open_pgp_signature_response.py +0 -146
  125. services-pulpcore-client/models/open_pgp_user_attribute_response.py +0 -124
  126. services-pulpcore-client/models/open_pgp_user_id_response.py +0 -123
  127. services-pulpcore-client/models/orphans_cleanup.py +0 -96
  128. services-pulpcore-client/models/paginated_access_policy_response_list.py +0 -112
  129. services-pulpcore-client/models/paginated_artifact_distribution_response_list.py +0 -112
  130. services-pulpcore-client/models/paginated_artifact_response_list.py +0 -112
  131. services-pulpcore-client/models/paginated_composite_content_guard_response_list.py +0 -112
  132. services-pulpcore-client/models/paginated_content_guard_response_list.py +0 -112
  133. services-pulpcore-client/models/paginated_content_redirect_content_guard_response_list.py +0 -112
  134. services-pulpcore-client/models/paginated_distribution_response_list.py +0 -112
  135. services-pulpcore-client/models/paginated_domain_response_list.py +0 -112
  136. services-pulpcore-client/models/paginated_filesystem_export_response_list.py +0 -112
  137. services-pulpcore-client/models/paginated_filesystem_exporter_response_list.py +0 -112
  138. services-pulpcore-client/models/paginated_generic_remote_response_list.py +0 -112
  139. services-pulpcore-client/models/paginated_group_response_list.py +0 -112
  140. services-pulpcore-client/models/paginated_group_role_response_list.py +0 -112
  141. services-pulpcore-client/models/paginated_group_user_response_list.py +0 -112
  142. services-pulpcore-client/models/paginated_header_content_guard_response_list.py +0 -112
  143. services-pulpcore-client/models/paginated_import_response_list.py +0 -112
  144. services-pulpcore-client/models/paginated_multiple_artifact_content_response_list.py +0 -112
  145. services-pulpcore-client/models/paginated_open_pgp_distribution_response_list.py +0 -112
  146. services-pulpcore-client/models/paginated_open_pgp_keyring_response_list.py +0 -112
  147. services-pulpcore-client/models/paginated_open_pgp_public_key_response_list.py +0 -112
  148. services-pulpcore-client/models/paginated_open_pgp_public_subkey_response_list.py +0 -112
  149. services-pulpcore-client/models/paginated_open_pgp_signature_response_list.py +0 -112
  150. services-pulpcore-client/models/paginated_open_pgp_user_attribute_response_list.py +0 -112
  151. services-pulpcore-client/models/paginated_open_pgp_user_id_response_list.py +0 -112
  152. services-pulpcore-client/models/paginated_publication_response_list.py +0 -112
  153. services-pulpcore-client/models/paginated_pulp_export_response_list.py +0 -112
  154. services-pulpcore-client/models/paginated_pulp_exporter_response_list.py +0 -112
  155. services-pulpcore-client/models/paginated_pulp_importer_response_list.py +0 -112
  156. services-pulpcore-client/models/paginated_rbac_content_guard_response_list.py +0 -112
  157. services-pulpcore-client/models/paginated_repository_response_list.py +0 -112
  158. services-pulpcore-client/models/paginated_repository_version_response_list.py +0 -112
  159. services-pulpcore-client/models/paginated_role_response_list.py +0 -112
  160. services-pulpcore-client/models/paginated_signing_service_response_list.py +0 -112
  161. services-pulpcore-client/models/paginated_task_group_response_list.py +0 -112
  162. services-pulpcore-client/models/paginated_task_response_list.py +0 -112
  163. services-pulpcore-client/models/paginated_task_schedule_response_list.py +0 -112
  164. services-pulpcore-client/models/paginated_upload_response_list.py +0 -112
  165. services-pulpcore-client/models/paginated_upstream_pulp_response_list.py +0 -112
  166. services-pulpcore-client/models/paginated_user_response_list.py +0 -112
  167. services-pulpcore-client/models/paginated_user_role_response_list.py +0 -112
  168. services-pulpcore-client/models/paginated_worker_response_list.py +0 -112
  169. services-pulpcore-client/models/patched_access_policy.py +0 -94
  170. services-pulpcore-client/models/patched_composite_content_guard.py +0 -98
  171. services-pulpcore-client/models/patched_content_redirect_content_guard.py +0 -96
  172. services-pulpcore-client/models/patched_domain.py +0 -117
  173. services-pulpcore-client/models/patched_filesystem_exporter.py +0 -94
  174. services-pulpcore-client/models/patched_group.py +0 -89
  175. services-pulpcore-client/models/patched_header_content_guard.py +0 -107
  176. services-pulpcore-client/models/patched_open_pgp_distribution.py +0 -116
  177. services-pulpcore-client/models/patched_open_pgp_keyring.py +0 -112
  178. services-pulpcore-client/models/patched_pulp_exporter.py +0 -100
  179. services-pulpcore-client/models/patched_pulp_importer.py +0 -91
  180. services-pulpcore-client/models/patched_rbac_content_guard.py +0 -96
  181. services-pulpcore-client/models/patched_role.py +0 -98
  182. services-pulpcore-client/models/patched_task_cancel.py +0 -89
  183. services-pulpcore-client/models/patched_upstream_pulp.py +0 -147
  184. services-pulpcore-client/models/patched_user.py +0 -106
  185. services-pulpcore-client/models/policy357_enum.py +0 -39
  186. services-pulpcore-client/models/profile_artifact_response.py +0 -88
  187. services-pulpcore-client/models/progress_report_response.py +0 -115
  188. services-pulpcore-client/models/publication_response.py +0 -107
  189. services-pulpcore-client/models/pulp_export.py +0 -104
  190. services-pulpcore-client/models/pulp_export_response.py +0 -126
  191. services-pulpcore-client/models/pulp_exporter.py +0 -100
  192. services-pulpcore-client/models/pulp_exporter_response.py +0 -116
  193. services-pulpcore-client/models/pulp_import.py +0 -93
  194. services-pulpcore-client/models/pulp_import_check.py +0 -93
  195. services-pulpcore-client/models/pulp_import_check_response.py +0 -102
  196. services-pulpcore-client/models/pulp_importer.py +0 -91
  197. services-pulpcore-client/models/pulp_importer_response.py +0 -107
  198. services-pulpcore-client/models/purge.py +0 -92
  199. services-pulpcore-client/models/rbac_content_guard.py +0 -96
  200. services-pulpcore-client/models/rbac_content_guard_response.py +0 -136
  201. services-pulpcore-client/models/reclaim_space.py +0 -90
  202. services-pulpcore-client/models/redis_connection_response.py +0 -88
  203. services-pulpcore-client/models/repair.py +0 -88
  204. services-pulpcore-client/models/repository_add_remove_content.py +0 -93
  205. services-pulpcore-client/models/repository_response.py +0 -137
  206. services-pulpcore-client/models/repository_version_response.py +0 -121
  207. services-pulpcore-client/models/role.py +0 -98
  208. services-pulpcore-client/models/role_response.py +0 -118
  209. services-pulpcore-client/models/set_label.py +0 -103
  210. services-pulpcore-client/models/set_label_response.py +0 -103
  211. services-pulpcore-client/models/signing_service_response.py +0 -111
  212. services-pulpcore-client/models/states_enum.py +0 -40
  213. services-pulpcore-client/models/status_response.py +0 -152
  214. services-pulpcore-client/models/storage_class_enum.py +0 -40
  215. services-pulpcore-client/models/storage_response.py +0 -108
  216. services-pulpcore-client/models/task_group_operation_response.py +0 -88
  217. services-pulpcore-client/models/task_group_response.py +0 -150
  218. services-pulpcore-client/models/task_response.py +0 -167
  219. services-pulpcore-client/models/task_schedule_response.py +0 -127
  220. services-pulpcore-client/models/unset_label.py +0 -96
  221. services-pulpcore-client/models/unset_label_response.py +0 -100
  222. services-pulpcore-client/models/upload.py +0 -88
  223. services-pulpcore-client/models/upload_chunk_response.py +0 -94
  224. services-pulpcore-client/models/upload_commit.py +0 -89
  225. services-pulpcore-client/models/upload_detail_response.py +0 -121
  226. services-pulpcore-client/models/upload_response.py +0 -109
  227. services-pulpcore-client/models/upstream_pulp.py +0 -147
  228. services-pulpcore-client/models/upstream_pulp_response.py +0 -158
  229. services-pulpcore-client/models/user.py +0 -106
  230. services-pulpcore-client/models/user_group.py +0 -89
  231. services-pulpcore-client/models/user_group_response.py +0 -97
  232. services-pulpcore-client/models/user_response.py +0 -140
  233. services-pulpcore-client/models/user_role.py +0 -110
  234. services-pulpcore-client/models/user_role_response.py +0 -134
  235. services-pulpcore-client/models/version_response.py +0 -96
  236. services-pulpcore-client/models/worker_response.py +0 -119
  237. services-pulpcore-client/py.typed +0 -0
  238. services-pulpcore-client/rest.py +0 -258
  239. {crc_pulpcore_client-20250819.1.dist-info → crc_pulpcore_client-20250821.1.dist-info}/WHEEL +0 -0
@@ -1,3346 +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
- import warnings
16
- from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
- from typing import Any, Dict, List, Optional, Tuple, Union
18
- from typing_extensions import Annotated
19
-
20
- from pydantic import Field, StrictBytes, StrictInt, StrictStr, field_validator
21
- from typing import List, Optional, Tuple, Union
22
- from typing_extensions import Annotated
23
- from services-pulpcore-client.models.async_operation_response import AsyncOperationResponse
24
- from services-pulpcore-client.models.my_permissions_response import MyPermissionsResponse
25
- from services-pulpcore-client.models.nested_role_response import NestedRoleResponse
26
- from services-pulpcore-client.models.object_roles_response import ObjectRolesResponse
27
- from services-pulpcore-client.models.paginated_upload_response_list import PaginatedUploadResponseList
28
- from services-pulpcore-client.models.upload import Upload
29
- from services-pulpcore-client.models.upload_commit import UploadCommit
30
- from services-pulpcore-client.models.upload_detail_response import UploadDetailResponse
31
- from services-pulpcore-client.models.upload_response import UploadResponse
32
-
33
- from services-pulpcore-client.api_client import ApiClient, RequestSerialized
34
- from services-pulpcore-client.api_response import ApiResponse
35
- from services-pulpcore-client.rest import RESTResponseType
36
-
37
-
38
- class UploadsApi:
39
- """NOTE: This class is auto generated by OpenAPI Generator
40
- Ref: https://openapi-generator.tech
41
-
42
- Do not edit the class manually.
43
- """
44
-
45
- def __init__(self, api_client=None) -> None:
46
- if api_client is None:
47
- api_client = ApiClient.get_default()
48
- self.api_client = api_client
49
-
50
-
51
- @validate_call
52
- def add_role(
53
- self,
54
- upload_href: StrictStr,
55
- upload: Upload,
56
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
57
- _request_timeout: Union[
58
- None,
59
- Annotated[StrictFloat, Field(gt=0)],
60
- Tuple[
61
- Annotated[StrictFloat, Field(gt=0)],
62
- Annotated[StrictFloat, Field(gt=0)]
63
- ]
64
- ] = None,
65
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
66
- _content_type: Optional[StrictStr] = None,
67
- _headers: Optional[Dict[StrictStr, Any]] = None,
68
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
69
- ) -> NestedRoleResponse:
70
- """Add a role
71
-
72
- Add a role for this object to users/groups.
73
-
74
- :param upload_href: (required)
75
- :type upload_href: str
76
- :param upload: (required)
77
- :type upload: Upload
78
- :param x_task_diagnostics: List of profilers to use on tasks.
79
- :type x_task_diagnostics: List[str]
80
- :param _request_timeout: timeout setting for this request. If one
81
- number provided, it will be total request
82
- timeout. It can also be a pair (tuple) of
83
- (connection, read) timeouts.
84
- :type _request_timeout: int, tuple(int, int), optional
85
- :param _request_auth: set to override the auth_settings for an a single
86
- request; this effectively ignores the
87
- authentication in the spec for a single request.
88
- :type _request_auth: dict, optional
89
- :param _content_type: force content-type for the request.
90
- :type _content_type: str, Optional
91
- :param _headers: set to override the headers for a single
92
- request; this effectively ignores the headers
93
- in the spec for a single request.
94
- :type _headers: dict, optional
95
- :param _host_index: set to override the host_index for a single
96
- request; this effectively ignores the host_index
97
- in the spec for a single request.
98
- :type _host_index: int, optional
99
- :return: Returns the result object.
100
- """ # noqa: E501
101
-
102
- _param = self._add_role_serialize(
103
- upload_href=upload_href,
104
- upload=upload,
105
- x_task_diagnostics=x_task_diagnostics,
106
- _request_auth=_request_auth,
107
- _content_type=_content_type,
108
- _headers=_headers,
109
- _host_index=_host_index
110
- )
111
-
112
- _response_types_map: Dict[str, Optional[str]] = {
113
- '201': "NestedRoleResponse",
114
- }
115
- response_data = self.api_client.call_api(
116
- *_param,
117
- _request_timeout=_request_timeout
118
- )
119
- response_data.read()
120
- return self.api_client.response_deserialize(
121
- response_data=response_data,
122
- response_types_map=_response_types_map,
123
- ).data
124
-
125
-
126
- @validate_call
127
- def add_role_with_http_info(
128
- self,
129
- upload_href: StrictStr,
130
- upload: Upload,
131
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
132
- _request_timeout: Union[
133
- None,
134
- Annotated[StrictFloat, Field(gt=0)],
135
- Tuple[
136
- Annotated[StrictFloat, Field(gt=0)],
137
- Annotated[StrictFloat, Field(gt=0)]
138
- ]
139
- ] = None,
140
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
141
- _content_type: Optional[StrictStr] = None,
142
- _headers: Optional[Dict[StrictStr, Any]] = None,
143
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
144
- ) -> ApiResponse[NestedRoleResponse]:
145
- """Add a role
146
-
147
- Add a role for this object to users/groups.
148
-
149
- :param upload_href: (required)
150
- :type upload_href: str
151
- :param upload: (required)
152
- :type upload: Upload
153
- :param x_task_diagnostics: List of profilers to use on tasks.
154
- :type x_task_diagnostics: List[str]
155
- :param _request_timeout: timeout setting for this request. If one
156
- number provided, it will be total request
157
- timeout. It can also be a pair (tuple) of
158
- (connection, read) timeouts.
159
- :type _request_timeout: int, tuple(int, int), optional
160
- :param _request_auth: set to override the auth_settings for an a single
161
- request; this effectively ignores the
162
- authentication in the spec for a single request.
163
- :type _request_auth: dict, optional
164
- :param _content_type: force content-type for the request.
165
- :type _content_type: str, Optional
166
- :param _headers: set to override the headers for a single
167
- request; this effectively ignores the headers
168
- in the spec for a single request.
169
- :type _headers: dict, optional
170
- :param _host_index: set to override the host_index for a single
171
- request; this effectively ignores the host_index
172
- in the spec for a single request.
173
- :type _host_index: int, optional
174
- :return: Returns the result object.
175
- """ # noqa: E501
176
-
177
- _param = self._add_role_serialize(
178
- upload_href=upload_href,
179
- upload=upload,
180
- x_task_diagnostics=x_task_diagnostics,
181
- _request_auth=_request_auth,
182
- _content_type=_content_type,
183
- _headers=_headers,
184
- _host_index=_host_index
185
- )
186
-
187
- _response_types_map: Dict[str, Optional[str]] = {
188
- '201': "NestedRoleResponse",
189
- }
190
- response_data = self.api_client.call_api(
191
- *_param,
192
- _request_timeout=_request_timeout
193
- )
194
- response_data.read()
195
- return self.api_client.response_deserialize(
196
- response_data=response_data,
197
- response_types_map=_response_types_map,
198
- )
199
-
200
-
201
- @validate_call
202
- def add_role_without_preload_content(
203
- self,
204
- upload_href: StrictStr,
205
- upload: Upload,
206
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
207
- _request_timeout: Union[
208
- None,
209
- Annotated[StrictFloat, Field(gt=0)],
210
- Tuple[
211
- Annotated[StrictFloat, Field(gt=0)],
212
- Annotated[StrictFloat, Field(gt=0)]
213
- ]
214
- ] = None,
215
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
216
- _content_type: Optional[StrictStr] = None,
217
- _headers: Optional[Dict[StrictStr, Any]] = None,
218
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
219
- ) -> RESTResponseType:
220
- """Add a role
221
-
222
- Add a role for this object to users/groups.
223
-
224
- :param upload_href: (required)
225
- :type upload_href: str
226
- :param upload: (required)
227
- :type upload: Upload
228
- :param x_task_diagnostics: List of profilers to use on tasks.
229
- :type x_task_diagnostics: List[str]
230
- :param _request_timeout: timeout setting for this request. If one
231
- number provided, it will be total request
232
- timeout. It can also be a pair (tuple) of
233
- (connection, read) timeouts.
234
- :type _request_timeout: int, tuple(int, int), optional
235
- :param _request_auth: set to override the auth_settings for an a single
236
- request; this effectively ignores the
237
- authentication in the spec for a single request.
238
- :type _request_auth: dict, optional
239
- :param _content_type: force content-type for the request.
240
- :type _content_type: str, Optional
241
- :param _headers: set to override the headers for a single
242
- request; this effectively ignores the headers
243
- in the spec for a single request.
244
- :type _headers: dict, optional
245
- :param _host_index: set to override the host_index for a single
246
- request; this effectively ignores the host_index
247
- in the spec for a single request.
248
- :type _host_index: int, optional
249
- :return: Returns the result object.
250
- """ # noqa: E501
251
-
252
- _param = self._add_role_serialize(
253
- upload_href=upload_href,
254
- upload=upload,
255
- x_task_diagnostics=x_task_diagnostics,
256
- _request_auth=_request_auth,
257
- _content_type=_content_type,
258
- _headers=_headers,
259
- _host_index=_host_index
260
- )
261
-
262
- _response_types_map: Dict[str, Optional[str]] = {
263
- '201': "NestedRoleResponse",
264
- }
265
- response_data = self.api_client.call_api(
266
- *_param,
267
- _request_timeout=_request_timeout
268
- )
269
- return response_data.response
270
-
271
-
272
- def _add_role_serialize(
273
- self,
274
- upload_href,
275
- upload,
276
- x_task_diagnostics,
277
- _request_auth,
278
- _content_type,
279
- _headers,
280
- _host_index,
281
- ) -> RequestSerialized:
282
-
283
- _host = None
284
-
285
- _collection_formats: Dict[str, str] = {
286
- 'X-Task-Diagnostics': 'csv',
287
- }
288
-
289
- _path_params: Dict[str, str] = {}
290
- _query_params: List[Tuple[str, str]] = []
291
- _header_params: Dict[str, Optional[str]] = _headers or {}
292
- _form_params: List[Tuple[str, str]] = []
293
- _files: Dict[
294
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
295
- ] = {}
296
- _body_params: Optional[bytes] = None
297
-
298
- # process the path parameters
299
- if upload_href is not None:
300
- _path_params['upload_href'] = upload_href
301
- # process the query parameters
302
- # process the header parameters
303
- if x_task_diagnostics is not None:
304
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
305
- # process the form parameters
306
- # process the body parameter
307
- if upload is not None:
308
- _body_params = upload
309
-
310
-
311
- # set the HTTP header `Accept`
312
- if 'Accept' not in _header_params:
313
- _header_params['Accept'] = self.api_client.select_header_accept(
314
- [
315
- 'application/json'
316
- ]
317
- )
318
-
319
- # set the HTTP header `Content-Type`
320
- if _content_type:
321
- _header_params['Content-Type'] = _content_type
322
- else:
323
- _default_content_type = (
324
- self.api_client.select_header_content_type(
325
- [
326
- 'application/json',
327
- 'application/x-www-form-urlencoded',
328
- 'multipart/form-data'
329
- ]
330
- )
331
- )
332
- if _default_content_type is not None:
333
- _header_params['Content-Type'] = _default_content_type
334
-
335
- # authentication setting
336
- _auth_settings: List[str] = [
337
- 'json_header_remote_authentication',
338
- 'basicAuth',
339
- 'cookieAuth'
340
- ]
341
-
342
- return self.api_client.param_serialize(
343
- method='POST',
344
- resource_path='{upload_href}add_role/',
345
- path_params=_path_params,
346
- query_params=_query_params,
347
- header_params=_header_params,
348
- body=_body_params,
349
- post_params=_form_params,
350
- files=_files,
351
- auth_settings=_auth_settings,
352
- collection_formats=_collection_formats,
353
- _host=_host,
354
- _request_auth=_request_auth
355
- )
356
-
357
-
358
-
359
-
360
- @validate_call
361
- def commit(
362
- self,
363
- upload_href: StrictStr,
364
- upload_commit: UploadCommit,
365
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
366
- _request_timeout: Union[
367
- None,
368
- Annotated[StrictFloat, Field(gt=0)],
369
- Tuple[
370
- Annotated[StrictFloat, Field(gt=0)],
371
- Annotated[StrictFloat, Field(gt=0)]
372
- ]
373
- ] = None,
374
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
375
- _content_type: Optional[StrictStr] = None,
376
- _headers: Optional[Dict[StrictStr, Any]] = None,
377
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
378
- ) -> AsyncOperationResponse:
379
- """Finish an Upload
380
-
381
- Queues a Task that creates an Artifact, and the Upload gets deleted and cannot be re-used.
382
-
383
- :param upload_href: (required)
384
- :type upload_href: str
385
- :param upload_commit: (required)
386
- :type upload_commit: UploadCommit
387
- :param x_task_diagnostics: List of profilers to use on tasks.
388
- :type x_task_diagnostics: List[str]
389
- :param _request_timeout: timeout setting for this request. If one
390
- number provided, it will be total request
391
- timeout. It can also be a pair (tuple) of
392
- (connection, read) timeouts.
393
- :type _request_timeout: int, tuple(int, int), optional
394
- :param _request_auth: set to override the auth_settings for an a single
395
- request; this effectively ignores the
396
- authentication in the spec for a single request.
397
- :type _request_auth: dict, optional
398
- :param _content_type: force content-type for the request.
399
- :type _content_type: str, Optional
400
- :param _headers: set to override the headers for a single
401
- request; this effectively ignores the headers
402
- in the spec for a single request.
403
- :type _headers: dict, optional
404
- :param _host_index: set to override the host_index for a single
405
- request; this effectively ignores the host_index
406
- in the spec for a single request.
407
- :type _host_index: int, optional
408
- :return: Returns the result object.
409
- """ # noqa: E501
410
-
411
- _param = self._commit_serialize(
412
- upload_href=upload_href,
413
- upload_commit=upload_commit,
414
- x_task_diagnostics=x_task_diagnostics,
415
- _request_auth=_request_auth,
416
- _content_type=_content_type,
417
- _headers=_headers,
418
- _host_index=_host_index
419
- )
420
-
421
- _response_types_map: Dict[str, Optional[str]] = {
422
- '202': "AsyncOperationResponse",
423
- }
424
- response_data = self.api_client.call_api(
425
- *_param,
426
- _request_timeout=_request_timeout
427
- )
428
- response_data.read()
429
- return self.api_client.response_deserialize(
430
- response_data=response_data,
431
- response_types_map=_response_types_map,
432
- ).data
433
-
434
-
435
- @validate_call
436
- def commit_with_http_info(
437
- self,
438
- upload_href: StrictStr,
439
- upload_commit: UploadCommit,
440
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
441
- _request_timeout: Union[
442
- None,
443
- Annotated[StrictFloat, Field(gt=0)],
444
- Tuple[
445
- Annotated[StrictFloat, Field(gt=0)],
446
- Annotated[StrictFloat, Field(gt=0)]
447
- ]
448
- ] = None,
449
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
450
- _content_type: Optional[StrictStr] = None,
451
- _headers: Optional[Dict[StrictStr, Any]] = None,
452
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
453
- ) -> ApiResponse[AsyncOperationResponse]:
454
- """Finish an Upload
455
-
456
- Queues a Task that creates an Artifact, and the Upload gets deleted and cannot be re-used.
457
-
458
- :param upload_href: (required)
459
- :type upload_href: str
460
- :param upload_commit: (required)
461
- :type upload_commit: UploadCommit
462
- :param x_task_diagnostics: List of profilers to use on tasks.
463
- :type x_task_diagnostics: List[str]
464
- :param _request_timeout: timeout setting for this request. If one
465
- number provided, it will be total request
466
- timeout. It can also be a pair (tuple) of
467
- (connection, read) timeouts.
468
- :type _request_timeout: int, tuple(int, int), optional
469
- :param _request_auth: set to override the auth_settings for an a single
470
- request; this effectively ignores the
471
- authentication in the spec for a single request.
472
- :type _request_auth: dict, optional
473
- :param _content_type: force content-type for the request.
474
- :type _content_type: str, Optional
475
- :param _headers: set to override the headers for a single
476
- request; this effectively ignores the headers
477
- in the spec for a single request.
478
- :type _headers: dict, optional
479
- :param _host_index: set to override the host_index for a single
480
- request; this effectively ignores the host_index
481
- in the spec for a single request.
482
- :type _host_index: int, optional
483
- :return: Returns the result object.
484
- """ # noqa: E501
485
-
486
- _param = self._commit_serialize(
487
- upload_href=upload_href,
488
- upload_commit=upload_commit,
489
- x_task_diagnostics=x_task_diagnostics,
490
- _request_auth=_request_auth,
491
- _content_type=_content_type,
492
- _headers=_headers,
493
- _host_index=_host_index
494
- )
495
-
496
- _response_types_map: Dict[str, Optional[str]] = {
497
- '202': "AsyncOperationResponse",
498
- }
499
- response_data = self.api_client.call_api(
500
- *_param,
501
- _request_timeout=_request_timeout
502
- )
503
- response_data.read()
504
- return self.api_client.response_deserialize(
505
- response_data=response_data,
506
- response_types_map=_response_types_map,
507
- )
508
-
509
-
510
- @validate_call
511
- def commit_without_preload_content(
512
- self,
513
- upload_href: StrictStr,
514
- upload_commit: UploadCommit,
515
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
516
- _request_timeout: Union[
517
- None,
518
- Annotated[StrictFloat, Field(gt=0)],
519
- Tuple[
520
- Annotated[StrictFloat, Field(gt=0)],
521
- Annotated[StrictFloat, Field(gt=0)]
522
- ]
523
- ] = None,
524
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
525
- _content_type: Optional[StrictStr] = None,
526
- _headers: Optional[Dict[StrictStr, Any]] = None,
527
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
528
- ) -> RESTResponseType:
529
- """Finish an Upload
530
-
531
- Queues a Task that creates an Artifact, and the Upload gets deleted and cannot be re-used.
532
-
533
- :param upload_href: (required)
534
- :type upload_href: str
535
- :param upload_commit: (required)
536
- :type upload_commit: UploadCommit
537
- :param x_task_diagnostics: List of profilers to use on tasks.
538
- :type x_task_diagnostics: List[str]
539
- :param _request_timeout: timeout setting for this request. If one
540
- number provided, it will be total request
541
- timeout. It can also be a pair (tuple) of
542
- (connection, read) timeouts.
543
- :type _request_timeout: int, tuple(int, int), optional
544
- :param _request_auth: set to override the auth_settings for an a single
545
- request; this effectively ignores the
546
- authentication in the spec for a single request.
547
- :type _request_auth: dict, optional
548
- :param _content_type: force content-type for the request.
549
- :type _content_type: str, Optional
550
- :param _headers: set to override the headers for a single
551
- request; this effectively ignores the headers
552
- in the spec for a single request.
553
- :type _headers: dict, optional
554
- :param _host_index: set to override the host_index for a single
555
- request; this effectively ignores the host_index
556
- in the spec for a single request.
557
- :type _host_index: int, optional
558
- :return: Returns the result object.
559
- """ # noqa: E501
560
-
561
- _param = self._commit_serialize(
562
- upload_href=upload_href,
563
- upload_commit=upload_commit,
564
- x_task_diagnostics=x_task_diagnostics,
565
- _request_auth=_request_auth,
566
- _content_type=_content_type,
567
- _headers=_headers,
568
- _host_index=_host_index
569
- )
570
-
571
- _response_types_map: Dict[str, Optional[str]] = {
572
- '202': "AsyncOperationResponse",
573
- }
574
- response_data = self.api_client.call_api(
575
- *_param,
576
- _request_timeout=_request_timeout
577
- )
578
- return response_data.response
579
-
580
-
581
- def _commit_serialize(
582
- self,
583
- upload_href,
584
- upload_commit,
585
- x_task_diagnostics,
586
- _request_auth,
587
- _content_type,
588
- _headers,
589
- _host_index,
590
- ) -> RequestSerialized:
591
-
592
- _host = None
593
-
594
- _collection_formats: Dict[str, str] = {
595
- 'X-Task-Diagnostics': 'csv',
596
- }
597
-
598
- _path_params: Dict[str, str] = {}
599
- _query_params: List[Tuple[str, str]] = []
600
- _header_params: Dict[str, Optional[str]] = _headers or {}
601
- _form_params: List[Tuple[str, str]] = []
602
- _files: Dict[
603
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
604
- ] = {}
605
- _body_params: Optional[bytes] = None
606
-
607
- # process the path parameters
608
- if upload_href is not None:
609
- _path_params['upload_href'] = upload_href
610
- # process the query parameters
611
- # process the header parameters
612
- if x_task_diagnostics is not None:
613
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
614
- # process the form parameters
615
- # process the body parameter
616
- if upload_commit is not None:
617
- _body_params = upload_commit
618
-
619
-
620
- # set the HTTP header `Accept`
621
- if 'Accept' not in _header_params:
622
- _header_params['Accept'] = self.api_client.select_header_accept(
623
- [
624
- 'application/json'
625
- ]
626
- )
627
-
628
- # set the HTTP header `Content-Type`
629
- if _content_type:
630
- _header_params['Content-Type'] = _content_type
631
- else:
632
- _default_content_type = (
633
- self.api_client.select_header_content_type(
634
- [
635
- 'application/json',
636
- 'application/x-www-form-urlencoded',
637
- 'multipart/form-data'
638
- ]
639
- )
640
- )
641
- if _default_content_type is not None:
642
- _header_params['Content-Type'] = _default_content_type
643
-
644
- # authentication setting
645
- _auth_settings: List[str] = [
646
- 'json_header_remote_authentication',
647
- 'basicAuth',
648
- 'cookieAuth'
649
- ]
650
-
651
- return self.api_client.param_serialize(
652
- method='POST',
653
- resource_path='{upload_href}commit/',
654
- path_params=_path_params,
655
- query_params=_query_params,
656
- header_params=_header_params,
657
- body=_body_params,
658
- post_params=_form_params,
659
- files=_files,
660
- auth_settings=_auth_settings,
661
- collection_formats=_collection_formats,
662
- _host=_host,
663
- _request_auth=_request_auth
664
- )
665
-
666
-
667
-
668
-
669
- @validate_call
670
- def create(
671
- self,
672
- upload: Upload,
673
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
674
- pulp_domain: StrictStr = "default",
675
- _request_timeout: Union[
676
- None,
677
- Annotated[StrictFloat, Field(gt=0)],
678
- Tuple[
679
- Annotated[StrictFloat, Field(gt=0)],
680
- Annotated[StrictFloat, Field(gt=0)]
681
- ]
682
- ] = None,
683
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
684
- _content_type: Optional[StrictStr] = None,
685
- _headers: Optional[Dict[StrictStr, Any]] = None,
686
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
687
- ) -> UploadResponse:
688
- """Create an upload
689
-
690
- View for chunked uploads.
691
-
692
- :param pulp_domain: (required)
693
- :type pulp_domain: str
694
- :param upload: (required)
695
- :type upload: Upload
696
- :param x_task_diagnostics: List of profilers to use on tasks.
697
- :type x_task_diagnostics: List[str]
698
- :param _request_timeout: timeout setting for this request. If one
699
- number provided, it will be total request
700
- timeout. It can also be a pair (tuple) of
701
- (connection, read) timeouts.
702
- :type _request_timeout: int, tuple(int, int), optional
703
- :param _request_auth: set to override the auth_settings for an a single
704
- request; this effectively ignores the
705
- authentication in the spec for a single request.
706
- :type _request_auth: dict, optional
707
- :param _content_type: force content-type for the request.
708
- :type _content_type: str, Optional
709
- :param _headers: set to override the headers for a single
710
- request; this effectively ignores the headers
711
- in the spec for a single request.
712
- :type _headers: dict, optional
713
- :param _host_index: set to override the host_index for a single
714
- request; this effectively ignores the host_index
715
- in the spec for a single request.
716
- :type _host_index: int, optional
717
- :return: Returns the result object.
718
- """ # noqa: E501
719
-
720
- _param = self._create_serialize(
721
- pulp_domain=pulp_domain,
722
- upload=upload,
723
- x_task_diagnostics=x_task_diagnostics,
724
- _request_auth=_request_auth,
725
- _content_type=_content_type,
726
- _headers=_headers,
727
- _host_index=_host_index
728
- )
729
-
730
- _response_types_map: Dict[str, Optional[str]] = {
731
- '201': "UploadResponse",
732
- }
733
- response_data = self.api_client.call_api(
734
- *_param,
735
- _request_timeout=_request_timeout
736
- )
737
- response_data.read()
738
- return self.api_client.response_deserialize(
739
- response_data=response_data,
740
- response_types_map=_response_types_map,
741
- ).data
742
-
743
-
744
- @validate_call
745
- def create_with_http_info(
746
- self,
747
- upload: Upload,
748
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
749
- pulp_domain: StrictStr = "default",
750
- _request_timeout: Union[
751
- None,
752
- Annotated[StrictFloat, Field(gt=0)],
753
- Tuple[
754
- Annotated[StrictFloat, Field(gt=0)],
755
- Annotated[StrictFloat, Field(gt=0)]
756
- ]
757
- ] = None,
758
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
759
- _content_type: Optional[StrictStr] = None,
760
- _headers: Optional[Dict[StrictStr, Any]] = None,
761
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
762
- ) -> ApiResponse[UploadResponse]:
763
- """Create an upload
764
-
765
- View for chunked uploads.
766
-
767
- :param pulp_domain: (required)
768
- :type pulp_domain: str
769
- :param upload: (required)
770
- :type upload: Upload
771
- :param x_task_diagnostics: List of profilers to use on tasks.
772
- :type x_task_diagnostics: List[str]
773
- :param _request_timeout: timeout setting for this request. If one
774
- number provided, it will be total request
775
- timeout. It can also be a pair (tuple) of
776
- (connection, read) timeouts.
777
- :type _request_timeout: int, tuple(int, int), optional
778
- :param _request_auth: set to override the auth_settings for an a single
779
- request; this effectively ignores the
780
- authentication in the spec for a single request.
781
- :type _request_auth: dict, optional
782
- :param _content_type: force content-type for the request.
783
- :type _content_type: str, Optional
784
- :param _headers: set to override the headers for a single
785
- request; this effectively ignores the headers
786
- in the spec for a single request.
787
- :type _headers: dict, optional
788
- :param _host_index: set to override the host_index for a single
789
- request; this effectively ignores the host_index
790
- in the spec for a single request.
791
- :type _host_index: int, optional
792
- :return: Returns the result object.
793
- """ # noqa: E501
794
-
795
- _param = self._create_serialize(
796
- pulp_domain=pulp_domain,
797
- upload=upload,
798
- x_task_diagnostics=x_task_diagnostics,
799
- _request_auth=_request_auth,
800
- _content_type=_content_type,
801
- _headers=_headers,
802
- _host_index=_host_index
803
- )
804
-
805
- _response_types_map: Dict[str, Optional[str]] = {
806
- '201': "UploadResponse",
807
- }
808
- response_data = self.api_client.call_api(
809
- *_param,
810
- _request_timeout=_request_timeout
811
- )
812
- response_data.read()
813
- return self.api_client.response_deserialize(
814
- response_data=response_data,
815
- response_types_map=_response_types_map,
816
- )
817
-
818
-
819
- @validate_call
820
- def create_without_preload_content(
821
- self,
822
- upload: Upload,
823
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
824
- pulp_domain: StrictStr = "default",
825
- _request_timeout: Union[
826
- None,
827
- Annotated[StrictFloat, Field(gt=0)],
828
- Tuple[
829
- Annotated[StrictFloat, Field(gt=0)],
830
- Annotated[StrictFloat, Field(gt=0)]
831
- ]
832
- ] = None,
833
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
834
- _content_type: Optional[StrictStr] = None,
835
- _headers: Optional[Dict[StrictStr, Any]] = None,
836
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
837
- ) -> RESTResponseType:
838
- """Create an upload
839
-
840
- View for chunked uploads.
841
-
842
- :param pulp_domain: (required)
843
- :type pulp_domain: str
844
- :param upload: (required)
845
- :type upload: Upload
846
- :param x_task_diagnostics: List of profilers to use on tasks.
847
- :type x_task_diagnostics: List[str]
848
- :param _request_timeout: timeout setting for this request. If one
849
- number provided, it will be total request
850
- timeout. It can also be a pair (tuple) of
851
- (connection, read) timeouts.
852
- :type _request_timeout: int, tuple(int, int), optional
853
- :param _request_auth: set to override the auth_settings for an a single
854
- request; this effectively ignores the
855
- authentication in the spec for a single request.
856
- :type _request_auth: dict, optional
857
- :param _content_type: force content-type for the request.
858
- :type _content_type: str, Optional
859
- :param _headers: set to override the headers for a single
860
- request; this effectively ignores the headers
861
- in the spec for a single request.
862
- :type _headers: dict, optional
863
- :param _host_index: set to override the host_index for a single
864
- request; this effectively ignores the host_index
865
- in the spec for a single request.
866
- :type _host_index: int, optional
867
- :return: Returns the result object.
868
- """ # noqa: E501
869
-
870
- _param = self._create_serialize(
871
- pulp_domain=pulp_domain,
872
- upload=upload,
873
- x_task_diagnostics=x_task_diagnostics,
874
- _request_auth=_request_auth,
875
- _content_type=_content_type,
876
- _headers=_headers,
877
- _host_index=_host_index
878
- )
879
-
880
- _response_types_map: Dict[str, Optional[str]] = {
881
- '201': "UploadResponse",
882
- }
883
- response_data = self.api_client.call_api(
884
- *_param,
885
- _request_timeout=_request_timeout
886
- )
887
- return response_data.response
888
-
889
-
890
- def _create_serialize(
891
- self,
892
- pulp_domain,
893
- upload,
894
- x_task_diagnostics,
895
- _request_auth,
896
- _content_type,
897
- _headers,
898
- _host_index,
899
- ) -> RequestSerialized:
900
-
901
- _host = None
902
-
903
- _collection_formats: Dict[str, str] = {
904
- 'X-Task-Diagnostics': 'csv',
905
- }
906
-
907
- _path_params: Dict[str, str] = {}
908
- _query_params: List[Tuple[str, str]] = []
909
- _header_params: Dict[str, Optional[str]] = _headers or {}
910
- _form_params: List[Tuple[str, str]] = []
911
- _files: Dict[
912
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
913
- ] = {}
914
- _body_params: Optional[bytes] = None
915
-
916
- # process the path parameters
917
- if pulp_domain is not None:
918
- _path_params['pulp_domain'] = pulp_domain
919
- # process the query parameters
920
- # process the header parameters
921
- if x_task_diagnostics is not None:
922
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
923
- # process the form parameters
924
- # process the body parameter
925
- if upload is not None:
926
- _body_params = upload
927
-
928
-
929
- # set the HTTP header `Accept`
930
- if 'Accept' not in _header_params:
931
- _header_params['Accept'] = self.api_client.select_header_accept(
932
- [
933
- 'application/json'
934
- ]
935
- )
936
-
937
- # set the HTTP header `Content-Type`
938
- if _content_type:
939
- _header_params['Content-Type'] = _content_type
940
- else:
941
- _default_content_type = (
942
- self.api_client.select_header_content_type(
943
- [
944
- 'application/json',
945
- 'application/x-www-form-urlencoded',
946
- 'multipart/form-data'
947
- ]
948
- )
949
- )
950
- if _default_content_type is not None:
951
- _header_params['Content-Type'] = _default_content_type
952
-
953
- # authentication setting
954
- _auth_settings: List[str] = [
955
- 'json_header_remote_authentication',
956
- 'basicAuth',
957
- 'cookieAuth'
958
- ]
959
-
960
- return self.api_client.param_serialize(
961
- method='POST',
962
- resource_path='/api/pulp/{pulp_domain}/api/v3/uploads/',
963
- path_params=_path_params,
964
- query_params=_query_params,
965
- header_params=_header_params,
966
- body=_body_params,
967
- post_params=_form_params,
968
- files=_files,
969
- auth_settings=_auth_settings,
970
- collection_formats=_collection_formats,
971
- _host=_host,
972
- _request_auth=_request_auth
973
- )
974
-
975
-
976
-
977
-
978
- @validate_call
979
- def delete(
980
- self,
981
- upload_href: StrictStr,
982
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
983
- _request_timeout: Union[
984
- None,
985
- Annotated[StrictFloat, Field(gt=0)],
986
- Tuple[
987
- Annotated[StrictFloat, Field(gt=0)],
988
- Annotated[StrictFloat, Field(gt=0)]
989
- ]
990
- ] = None,
991
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
992
- _content_type: Optional[StrictStr] = None,
993
- _headers: Optional[Dict[StrictStr, Any]] = None,
994
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
995
- ) -> None:
996
- """Delete an upload
997
-
998
- View for chunked uploads.
999
-
1000
- :param upload_href: (required)
1001
- :type upload_href: str
1002
- :param x_task_diagnostics: List of profilers to use on tasks.
1003
- :type x_task_diagnostics: List[str]
1004
- :param _request_timeout: timeout setting for this request. If one
1005
- number provided, it will be total request
1006
- timeout. It can also be a pair (tuple) of
1007
- (connection, read) timeouts.
1008
- :type _request_timeout: int, tuple(int, int), optional
1009
- :param _request_auth: set to override the auth_settings for an a single
1010
- request; this effectively ignores the
1011
- authentication in the spec for a single request.
1012
- :type _request_auth: dict, optional
1013
- :param _content_type: force content-type for the request.
1014
- :type _content_type: str, Optional
1015
- :param _headers: set to override the headers for a single
1016
- request; this effectively ignores the headers
1017
- in the spec for a single request.
1018
- :type _headers: dict, optional
1019
- :param _host_index: set to override the host_index for a single
1020
- request; this effectively ignores the host_index
1021
- in the spec for a single request.
1022
- :type _host_index: int, optional
1023
- :return: Returns the result object.
1024
- """ # noqa: E501
1025
-
1026
- _param = self._delete_serialize(
1027
- upload_href=upload_href,
1028
- x_task_diagnostics=x_task_diagnostics,
1029
- _request_auth=_request_auth,
1030
- _content_type=_content_type,
1031
- _headers=_headers,
1032
- _host_index=_host_index
1033
- )
1034
-
1035
- _response_types_map: Dict[str, Optional[str]] = {
1036
- '204': None,
1037
- }
1038
- response_data = self.api_client.call_api(
1039
- *_param,
1040
- _request_timeout=_request_timeout
1041
- )
1042
- response_data.read()
1043
- return self.api_client.response_deserialize(
1044
- response_data=response_data,
1045
- response_types_map=_response_types_map,
1046
- ).data
1047
-
1048
-
1049
- @validate_call
1050
- def delete_with_http_info(
1051
- self,
1052
- upload_href: StrictStr,
1053
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1054
- _request_timeout: Union[
1055
- None,
1056
- Annotated[StrictFloat, Field(gt=0)],
1057
- Tuple[
1058
- Annotated[StrictFloat, Field(gt=0)],
1059
- Annotated[StrictFloat, Field(gt=0)]
1060
- ]
1061
- ] = None,
1062
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1063
- _content_type: Optional[StrictStr] = None,
1064
- _headers: Optional[Dict[StrictStr, Any]] = None,
1065
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1066
- ) -> ApiResponse[None]:
1067
- """Delete an upload
1068
-
1069
- View for chunked uploads.
1070
-
1071
- :param upload_href: (required)
1072
- :type upload_href: str
1073
- :param x_task_diagnostics: List of profilers to use on tasks.
1074
- :type x_task_diagnostics: List[str]
1075
- :param _request_timeout: timeout setting for this request. If one
1076
- number provided, it will be total request
1077
- timeout. It can also be a pair (tuple) of
1078
- (connection, read) timeouts.
1079
- :type _request_timeout: int, tuple(int, int), optional
1080
- :param _request_auth: set to override the auth_settings for an a single
1081
- request; this effectively ignores the
1082
- authentication in the spec for a single request.
1083
- :type _request_auth: dict, optional
1084
- :param _content_type: force content-type for the request.
1085
- :type _content_type: str, Optional
1086
- :param _headers: set to override the headers for a single
1087
- request; this effectively ignores the headers
1088
- in the spec for a single request.
1089
- :type _headers: dict, optional
1090
- :param _host_index: set to override the host_index for a single
1091
- request; this effectively ignores the host_index
1092
- in the spec for a single request.
1093
- :type _host_index: int, optional
1094
- :return: Returns the result object.
1095
- """ # noqa: E501
1096
-
1097
- _param = self._delete_serialize(
1098
- upload_href=upload_href,
1099
- x_task_diagnostics=x_task_diagnostics,
1100
- _request_auth=_request_auth,
1101
- _content_type=_content_type,
1102
- _headers=_headers,
1103
- _host_index=_host_index
1104
- )
1105
-
1106
- _response_types_map: Dict[str, Optional[str]] = {
1107
- '204': None,
1108
- }
1109
- response_data = self.api_client.call_api(
1110
- *_param,
1111
- _request_timeout=_request_timeout
1112
- )
1113
- response_data.read()
1114
- return self.api_client.response_deserialize(
1115
- response_data=response_data,
1116
- response_types_map=_response_types_map,
1117
- )
1118
-
1119
-
1120
- @validate_call
1121
- def delete_without_preload_content(
1122
- self,
1123
- upload_href: StrictStr,
1124
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1125
- _request_timeout: Union[
1126
- None,
1127
- Annotated[StrictFloat, Field(gt=0)],
1128
- Tuple[
1129
- Annotated[StrictFloat, Field(gt=0)],
1130
- Annotated[StrictFloat, Field(gt=0)]
1131
- ]
1132
- ] = None,
1133
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1134
- _content_type: Optional[StrictStr] = None,
1135
- _headers: Optional[Dict[StrictStr, Any]] = None,
1136
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1137
- ) -> RESTResponseType:
1138
- """Delete an upload
1139
-
1140
- View for chunked uploads.
1141
-
1142
- :param upload_href: (required)
1143
- :type upload_href: str
1144
- :param x_task_diagnostics: List of profilers to use on tasks.
1145
- :type x_task_diagnostics: List[str]
1146
- :param _request_timeout: timeout setting for this request. If one
1147
- number provided, it will be total request
1148
- timeout. It can also be a pair (tuple) of
1149
- (connection, read) timeouts.
1150
- :type _request_timeout: int, tuple(int, int), optional
1151
- :param _request_auth: set to override the auth_settings for an a single
1152
- request; this effectively ignores the
1153
- authentication in the spec for a single request.
1154
- :type _request_auth: dict, optional
1155
- :param _content_type: force content-type for the request.
1156
- :type _content_type: str, Optional
1157
- :param _headers: set to override the headers for a single
1158
- request; this effectively ignores the headers
1159
- in the spec for a single request.
1160
- :type _headers: dict, optional
1161
- :param _host_index: set to override the host_index for a single
1162
- request; this effectively ignores the host_index
1163
- in the spec for a single request.
1164
- :type _host_index: int, optional
1165
- :return: Returns the result object.
1166
- """ # noqa: E501
1167
-
1168
- _param = self._delete_serialize(
1169
- upload_href=upload_href,
1170
- x_task_diagnostics=x_task_diagnostics,
1171
- _request_auth=_request_auth,
1172
- _content_type=_content_type,
1173
- _headers=_headers,
1174
- _host_index=_host_index
1175
- )
1176
-
1177
- _response_types_map: Dict[str, Optional[str]] = {
1178
- '204': None,
1179
- }
1180
- response_data = self.api_client.call_api(
1181
- *_param,
1182
- _request_timeout=_request_timeout
1183
- )
1184
- return response_data.response
1185
-
1186
-
1187
- def _delete_serialize(
1188
- self,
1189
- upload_href,
1190
- x_task_diagnostics,
1191
- _request_auth,
1192
- _content_type,
1193
- _headers,
1194
- _host_index,
1195
- ) -> RequestSerialized:
1196
-
1197
- _host = None
1198
-
1199
- _collection_formats: Dict[str, str] = {
1200
- 'X-Task-Diagnostics': 'csv',
1201
- }
1202
-
1203
- _path_params: Dict[str, str] = {}
1204
- _query_params: List[Tuple[str, str]] = []
1205
- _header_params: Dict[str, Optional[str]] = _headers or {}
1206
- _form_params: List[Tuple[str, str]] = []
1207
- _files: Dict[
1208
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1209
- ] = {}
1210
- _body_params: Optional[bytes] = None
1211
-
1212
- # process the path parameters
1213
- if upload_href is not None:
1214
- _path_params['upload_href'] = upload_href
1215
- # process the query parameters
1216
- # process the header parameters
1217
- if x_task_diagnostics is not None:
1218
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1219
- # process the form parameters
1220
- # process the body parameter
1221
-
1222
-
1223
-
1224
-
1225
- # authentication setting
1226
- _auth_settings: List[str] = [
1227
- 'json_header_remote_authentication',
1228
- 'basicAuth',
1229
- 'cookieAuth'
1230
- ]
1231
-
1232
- return self.api_client.param_serialize(
1233
- method='DELETE',
1234
- resource_path='{upload_href}',
1235
- path_params=_path_params,
1236
- query_params=_query_params,
1237
- header_params=_header_params,
1238
- body=_body_params,
1239
- post_params=_form_params,
1240
- files=_files,
1241
- auth_settings=_auth_settings,
1242
- collection_formats=_collection_formats,
1243
- _host=_host,
1244
- _request_auth=_request_auth
1245
- )
1246
-
1247
-
1248
-
1249
-
1250
- @validate_call
1251
- def list(
1252
- self,
1253
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1254
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1255
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
1256
- ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `size` - Size * `-size` - Size (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
1257
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1258
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1259
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1260
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
1261
- size: Annotated[Optional[StrictInt], Field(description="Filter results where size matches value")] = None,
1262
- size__gt: Annotated[Optional[StrictInt], Field(description="Filter results where size is greater than value")] = None,
1263
- size__lt: Annotated[Optional[StrictInt], Field(description="Filter results where size is less than value")] = None,
1264
- size__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where size is between two comma separated values")] = None,
1265
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1266
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1267
- pulp_domain: StrictStr = "default",
1268
- _request_timeout: Union[
1269
- None,
1270
- Annotated[StrictFloat, Field(gt=0)],
1271
- Tuple[
1272
- Annotated[StrictFloat, Field(gt=0)],
1273
- Annotated[StrictFloat, Field(gt=0)]
1274
- ]
1275
- ] = None,
1276
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1277
- _content_type: Optional[StrictStr] = None,
1278
- _headers: Optional[Dict[StrictStr, Any]] = None,
1279
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1280
- ) -> PaginatedUploadResponseList:
1281
- """List uploads
1282
-
1283
- View for chunked uploads.
1284
-
1285
- :param pulp_domain: (required)
1286
- :type pulp_domain: str
1287
- :param x_task_diagnostics: List of profilers to use on tasks.
1288
- :type x_task_diagnostics: List[str]
1289
- :param limit: Number of results to return per page.
1290
- :type limit: int
1291
- :param offset: The initial index from which to return the results.
1292
- :type offset: int
1293
- :param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `size` - Size * `-size` - Size (descending) * `pk` - Pk * `-pk` - Pk (descending)
1294
- :type ordering: List[str]
1295
- :param prn__in: Multiple values may be separated by commas.
1296
- :type prn__in: List[str]
1297
- :param pulp_href__in: Multiple values may be separated by commas.
1298
- :type pulp_href__in: List[str]
1299
- :param pulp_id__in: Multiple values may be separated by commas.
1300
- :type pulp_id__in: List[str]
1301
- :param q: Filter results by using NOT, AND and OR operations on other filters
1302
- :type q: str
1303
- :param size: Filter results where size matches value
1304
- :type size: int
1305
- :param size__gt: Filter results where size is greater than value
1306
- :type size__gt: int
1307
- :param size__lt: Filter results where size is less than value
1308
- :type size__lt: int
1309
- :param size__range: Filter results where size is between two comma separated values
1310
- :type size__range: List[int]
1311
- :param fields: A list of fields to include in the response.
1312
- :type fields: List[str]
1313
- :param exclude_fields: A list of fields to exclude from the response.
1314
- :type exclude_fields: List[str]
1315
- :param _request_timeout: timeout setting for this request. If one
1316
- number provided, it will be total request
1317
- timeout. It can also be a pair (tuple) of
1318
- (connection, read) timeouts.
1319
- :type _request_timeout: int, tuple(int, int), optional
1320
- :param _request_auth: set to override the auth_settings for an a single
1321
- request; this effectively ignores the
1322
- authentication in the spec for a single request.
1323
- :type _request_auth: dict, optional
1324
- :param _content_type: force content-type for the request.
1325
- :type _content_type: str, Optional
1326
- :param _headers: set to override the headers for a single
1327
- request; this effectively ignores the headers
1328
- in the spec for a single request.
1329
- :type _headers: dict, optional
1330
- :param _host_index: set to override the host_index for a single
1331
- request; this effectively ignores the host_index
1332
- in the spec for a single request.
1333
- :type _host_index: int, optional
1334
- :return: Returns the result object.
1335
- """ # noqa: E501
1336
-
1337
- _param = self._list_serialize(
1338
- pulp_domain=pulp_domain,
1339
- x_task_diagnostics=x_task_diagnostics,
1340
- limit=limit,
1341
- offset=offset,
1342
- ordering=ordering,
1343
- prn__in=prn__in,
1344
- pulp_href__in=pulp_href__in,
1345
- pulp_id__in=pulp_id__in,
1346
- q=q,
1347
- size=size,
1348
- size__gt=size__gt,
1349
- size__lt=size__lt,
1350
- size__range=size__range,
1351
- fields=fields,
1352
- exclude_fields=exclude_fields,
1353
- _request_auth=_request_auth,
1354
- _content_type=_content_type,
1355
- _headers=_headers,
1356
- _host_index=_host_index
1357
- )
1358
-
1359
- _response_types_map: Dict[str, Optional[str]] = {
1360
- '200': "PaginatedUploadResponseList",
1361
- }
1362
- response_data = self.api_client.call_api(
1363
- *_param,
1364
- _request_timeout=_request_timeout
1365
- )
1366
- response_data.read()
1367
- return self.api_client.response_deserialize(
1368
- response_data=response_data,
1369
- response_types_map=_response_types_map,
1370
- ).data
1371
-
1372
-
1373
- @validate_call
1374
- def list_with_http_info(
1375
- self,
1376
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1377
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1378
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
1379
- ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `size` - Size * `-size` - Size (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
1380
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1381
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1382
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1383
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
1384
- size: Annotated[Optional[StrictInt], Field(description="Filter results where size matches value")] = None,
1385
- size__gt: Annotated[Optional[StrictInt], Field(description="Filter results where size is greater than value")] = None,
1386
- size__lt: Annotated[Optional[StrictInt], Field(description="Filter results where size is less than value")] = None,
1387
- size__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where size is between two comma separated values")] = None,
1388
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1389
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1390
- pulp_domain: StrictStr = "default",
1391
- _request_timeout: Union[
1392
- None,
1393
- Annotated[StrictFloat, Field(gt=0)],
1394
- Tuple[
1395
- Annotated[StrictFloat, Field(gt=0)],
1396
- Annotated[StrictFloat, Field(gt=0)]
1397
- ]
1398
- ] = None,
1399
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1400
- _content_type: Optional[StrictStr] = None,
1401
- _headers: Optional[Dict[StrictStr, Any]] = None,
1402
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1403
- ) -> ApiResponse[PaginatedUploadResponseList]:
1404
- """List uploads
1405
-
1406
- View for chunked uploads.
1407
-
1408
- :param pulp_domain: (required)
1409
- :type pulp_domain: str
1410
- :param x_task_diagnostics: List of profilers to use on tasks.
1411
- :type x_task_diagnostics: List[str]
1412
- :param limit: Number of results to return per page.
1413
- :type limit: int
1414
- :param offset: The initial index from which to return the results.
1415
- :type offset: int
1416
- :param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `size` - Size * `-size` - Size (descending) * `pk` - Pk * `-pk` - Pk (descending)
1417
- :type ordering: List[str]
1418
- :param prn__in: Multiple values may be separated by commas.
1419
- :type prn__in: List[str]
1420
- :param pulp_href__in: Multiple values may be separated by commas.
1421
- :type pulp_href__in: List[str]
1422
- :param pulp_id__in: Multiple values may be separated by commas.
1423
- :type pulp_id__in: List[str]
1424
- :param q: Filter results by using NOT, AND and OR operations on other filters
1425
- :type q: str
1426
- :param size: Filter results where size matches value
1427
- :type size: int
1428
- :param size__gt: Filter results where size is greater than value
1429
- :type size__gt: int
1430
- :param size__lt: Filter results where size is less than value
1431
- :type size__lt: int
1432
- :param size__range: Filter results where size is between two comma separated values
1433
- :type size__range: List[int]
1434
- :param fields: A list of fields to include in the response.
1435
- :type fields: List[str]
1436
- :param exclude_fields: A list of fields to exclude from the response.
1437
- :type exclude_fields: List[str]
1438
- :param _request_timeout: timeout setting for this request. If one
1439
- number provided, it will be total request
1440
- timeout. It can also be a pair (tuple) of
1441
- (connection, read) timeouts.
1442
- :type _request_timeout: int, tuple(int, int), optional
1443
- :param _request_auth: set to override the auth_settings for an a single
1444
- request; this effectively ignores the
1445
- authentication in the spec for a single request.
1446
- :type _request_auth: dict, optional
1447
- :param _content_type: force content-type for the request.
1448
- :type _content_type: str, Optional
1449
- :param _headers: set to override the headers for a single
1450
- request; this effectively ignores the headers
1451
- in the spec for a single request.
1452
- :type _headers: dict, optional
1453
- :param _host_index: set to override the host_index for a single
1454
- request; this effectively ignores the host_index
1455
- in the spec for a single request.
1456
- :type _host_index: int, optional
1457
- :return: Returns the result object.
1458
- """ # noqa: E501
1459
-
1460
- _param = self._list_serialize(
1461
- pulp_domain=pulp_domain,
1462
- x_task_diagnostics=x_task_diagnostics,
1463
- limit=limit,
1464
- offset=offset,
1465
- ordering=ordering,
1466
- prn__in=prn__in,
1467
- pulp_href__in=pulp_href__in,
1468
- pulp_id__in=pulp_id__in,
1469
- q=q,
1470
- size=size,
1471
- size__gt=size__gt,
1472
- size__lt=size__lt,
1473
- size__range=size__range,
1474
- fields=fields,
1475
- exclude_fields=exclude_fields,
1476
- _request_auth=_request_auth,
1477
- _content_type=_content_type,
1478
- _headers=_headers,
1479
- _host_index=_host_index
1480
- )
1481
-
1482
- _response_types_map: Dict[str, Optional[str]] = {
1483
- '200': "PaginatedUploadResponseList",
1484
- }
1485
- response_data = self.api_client.call_api(
1486
- *_param,
1487
- _request_timeout=_request_timeout
1488
- )
1489
- response_data.read()
1490
- return self.api_client.response_deserialize(
1491
- response_data=response_data,
1492
- response_types_map=_response_types_map,
1493
- )
1494
-
1495
-
1496
- @validate_call
1497
- def list_without_preload_content(
1498
- self,
1499
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1500
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
1501
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
1502
- ordering: Annotated[Optional[List[StrictStr]], Field(description="Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `size` - Size * `-size` - Size (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
1503
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1504
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1505
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
1506
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
1507
- size: Annotated[Optional[StrictInt], Field(description="Filter results where size matches value")] = None,
1508
- size__gt: Annotated[Optional[StrictInt], Field(description="Filter results where size is greater than value")] = None,
1509
- size__lt: Annotated[Optional[StrictInt], Field(description="Filter results where size is less than value")] = None,
1510
- size__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where size is between two comma separated values")] = None,
1511
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1512
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1513
- pulp_domain: StrictStr = "default",
1514
- _request_timeout: Union[
1515
- None,
1516
- Annotated[StrictFloat, Field(gt=0)],
1517
- Tuple[
1518
- Annotated[StrictFloat, Field(gt=0)],
1519
- Annotated[StrictFloat, Field(gt=0)]
1520
- ]
1521
- ] = None,
1522
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1523
- _content_type: Optional[StrictStr] = None,
1524
- _headers: Optional[Dict[StrictStr, Any]] = None,
1525
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1526
- ) -> RESTResponseType:
1527
- """List uploads
1528
-
1529
- View for chunked uploads.
1530
-
1531
- :param pulp_domain: (required)
1532
- :type pulp_domain: str
1533
- :param x_task_diagnostics: List of profilers to use on tasks.
1534
- :type x_task_diagnostics: List[str]
1535
- :param limit: Number of results to return per page.
1536
- :type limit: int
1537
- :param offset: The initial index from which to return the results.
1538
- :type offset: int
1539
- :param ordering: Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `size` - Size * `-size` - Size (descending) * `pk` - Pk * `-pk` - Pk (descending)
1540
- :type ordering: List[str]
1541
- :param prn__in: Multiple values may be separated by commas.
1542
- :type prn__in: List[str]
1543
- :param pulp_href__in: Multiple values may be separated by commas.
1544
- :type pulp_href__in: List[str]
1545
- :param pulp_id__in: Multiple values may be separated by commas.
1546
- :type pulp_id__in: List[str]
1547
- :param q: Filter results by using NOT, AND and OR operations on other filters
1548
- :type q: str
1549
- :param size: Filter results where size matches value
1550
- :type size: int
1551
- :param size__gt: Filter results where size is greater than value
1552
- :type size__gt: int
1553
- :param size__lt: Filter results where size is less than value
1554
- :type size__lt: int
1555
- :param size__range: Filter results where size is between two comma separated values
1556
- :type size__range: List[int]
1557
- :param fields: A list of fields to include in the response.
1558
- :type fields: List[str]
1559
- :param exclude_fields: A list of fields to exclude from the response.
1560
- :type exclude_fields: List[str]
1561
- :param _request_timeout: timeout setting for this request. If one
1562
- number provided, it will be total request
1563
- timeout. It can also be a pair (tuple) of
1564
- (connection, read) timeouts.
1565
- :type _request_timeout: int, tuple(int, int), optional
1566
- :param _request_auth: set to override the auth_settings for an a single
1567
- request; this effectively ignores the
1568
- authentication in the spec for a single request.
1569
- :type _request_auth: dict, optional
1570
- :param _content_type: force content-type for the request.
1571
- :type _content_type: str, Optional
1572
- :param _headers: set to override the headers for a single
1573
- request; this effectively ignores the headers
1574
- in the spec for a single request.
1575
- :type _headers: dict, optional
1576
- :param _host_index: set to override the host_index for a single
1577
- request; this effectively ignores the host_index
1578
- in the spec for a single request.
1579
- :type _host_index: int, optional
1580
- :return: Returns the result object.
1581
- """ # noqa: E501
1582
-
1583
- _param = self._list_serialize(
1584
- pulp_domain=pulp_domain,
1585
- x_task_diagnostics=x_task_diagnostics,
1586
- limit=limit,
1587
- offset=offset,
1588
- ordering=ordering,
1589
- prn__in=prn__in,
1590
- pulp_href__in=pulp_href__in,
1591
- pulp_id__in=pulp_id__in,
1592
- q=q,
1593
- size=size,
1594
- size__gt=size__gt,
1595
- size__lt=size__lt,
1596
- size__range=size__range,
1597
- fields=fields,
1598
- exclude_fields=exclude_fields,
1599
- _request_auth=_request_auth,
1600
- _content_type=_content_type,
1601
- _headers=_headers,
1602
- _host_index=_host_index
1603
- )
1604
-
1605
- _response_types_map: Dict[str, Optional[str]] = {
1606
- '200': "PaginatedUploadResponseList",
1607
- }
1608
- response_data = self.api_client.call_api(
1609
- *_param,
1610
- _request_timeout=_request_timeout
1611
- )
1612
- return response_data.response
1613
-
1614
-
1615
- def _list_serialize(
1616
- self,
1617
- pulp_domain,
1618
- x_task_diagnostics,
1619
- limit,
1620
- offset,
1621
- ordering,
1622
- prn__in,
1623
- pulp_href__in,
1624
- pulp_id__in,
1625
- q,
1626
- size,
1627
- size__gt,
1628
- size__lt,
1629
- size__range,
1630
- fields,
1631
- exclude_fields,
1632
- _request_auth,
1633
- _content_type,
1634
- _headers,
1635
- _host_index,
1636
- ) -> RequestSerialized:
1637
-
1638
- _host = None
1639
-
1640
- _collection_formats: Dict[str, str] = {
1641
- 'X-Task-Diagnostics': 'csv',
1642
- 'ordering': 'csv',
1643
- 'prn__in': 'csv',
1644
- 'pulp_href__in': 'csv',
1645
- 'pulp_id__in': 'csv',
1646
- 'size__range': 'csv',
1647
- 'fields': 'multi',
1648
- 'exclude_fields': 'multi',
1649
- }
1650
-
1651
- _path_params: Dict[str, str] = {}
1652
- _query_params: List[Tuple[str, str]] = []
1653
- _header_params: Dict[str, Optional[str]] = _headers or {}
1654
- _form_params: List[Tuple[str, str]] = []
1655
- _files: Dict[
1656
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1657
- ] = {}
1658
- _body_params: Optional[bytes] = None
1659
-
1660
- # process the path parameters
1661
- if pulp_domain is not None:
1662
- _path_params['pulp_domain'] = pulp_domain
1663
- # process the query parameters
1664
- if limit is not None:
1665
-
1666
- _query_params.append(('limit', limit))
1667
-
1668
- if offset is not None:
1669
-
1670
- _query_params.append(('offset', offset))
1671
-
1672
- if ordering is not None:
1673
-
1674
- _query_params.append(('ordering', ordering))
1675
-
1676
- if prn__in is not None:
1677
-
1678
- _query_params.append(('prn__in', prn__in))
1679
-
1680
- if pulp_href__in is not None:
1681
-
1682
- _query_params.append(('pulp_href__in', pulp_href__in))
1683
-
1684
- if pulp_id__in is not None:
1685
-
1686
- _query_params.append(('pulp_id__in', pulp_id__in))
1687
-
1688
- if q is not None:
1689
-
1690
- _query_params.append(('q', q))
1691
-
1692
- if size is not None:
1693
-
1694
- _query_params.append(('size', size))
1695
-
1696
- if size__gt is not None:
1697
-
1698
- _query_params.append(('size__gt', size__gt))
1699
-
1700
- if size__lt is not None:
1701
-
1702
- _query_params.append(('size__lt', size__lt))
1703
-
1704
- if size__range is not None:
1705
-
1706
- _query_params.append(('size__range', size__range))
1707
-
1708
- if fields is not None:
1709
-
1710
- _query_params.append(('fields', fields))
1711
-
1712
- if exclude_fields is not None:
1713
-
1714
- _query_params.append(('exclude_fields', exclude_fields))
1715
-
1716
- # process the header parameters
1717
- if x_task_diagnostics is not None:
1718
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1719
- # process the form parameters
1720
- # process the body parameter
1721
-
1722
-
1723
- # set the HTTP header `Accept`
1724
- if 'Accept' not in _header_params:
1725
- _header_params['Accept'] = self.api_client.select_header_accept(
1726
- [
1727
- 'application/json'
1728
- ]
1729
- )
1730
-
1731
-
1732
- # authentication setting
1733
- _auth_settings: List[str] = [
1734
- 'json_header_remote_authentication',
1735
- 'basicAuth',
1736
- 'cookieAuth'
1737
- ]
1738
-
1739
- return self.api_client.param_serialize(
1740
- method='GET',
1741
- resource_path='/api/pulp/{pulp_domain}/api/v3/uploads/',
1742
- path_params=_path_params,
1743
- query_params=_query_params,
1744
- header_params=_header_params,
1745
- body=_body_params,
1746
- post_params=_form_params,
1747
- files=_files,
1748
- auth_settings=_auth_settings,
1749
- collection_formats=_collection_formats,
1750
- _host=_host,
1751
- _request_auth=_request_auth
1752
- )
1753
-
1754
-
1755
-
1756
-
1757
- @validate_call
1758
- def list_roles(
1759
- self,
1760
- upload_href: StrictStr,
1761
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1762
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1763
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1764
- _request_timeout: Union[
1765
- None,
1766
- Annotated[StrictFloat, Field(gt=0)],
1767
- Tuple[
1768
- Annotated[StrictFloat, Field(gt=0)],
1769
- Annotated[StrictFloat, Field(gt=0)]
1770
- ]
1771
- ] = None,
1772
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1773
- _content_type: Optional[StrictStr] = None,
1774
- _headers: Optional[Dict[StrictStr, Any]] = None,
1775
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1776
- ) -> ObjectRolesResponse:
1777
- """List roles
1778
-
1779
- List roles assigned to this object.
1780
-
1781
- :param upload_href: (required)
1782
- :type upload_href: str
1783
- :param x_task_diagnostics: List of profilers to use on tasks.
1784
- :type x_task_diagnostics: List[str]
1785
- :param fields: A list of fields to include in the response.
1786
- :type fields: List[str]
1787
- :param exclude_fields: A list of fields to exclude from the response.
1788
- :type exclude_fields: List[str]
1789
- :param _request_timeout: timeout setting for this request. If one
1790
- number provided, it will be total request
1791
- timeout. It can also be a pair (tuple) of
1792
- (connection, read) timeouts.
1793
- :type _request_timeout: int, tuple(int, int), optional
1794
- :param _request_auth: set to override the auth_settings for an a single
1795
- request; this effectively ignores the
1796
- authentication in the spec for a single request.
1797
- :type _request_auth: dict, optional
1798
- :param _content_type: force content-type for the request.
1799
- :type _content_type: str, Optional
1800
- :param _headers: set to override the headers for a single
1801
- request; this effectively ignores the headers
1802
- in the spec for a single request.
1803
- :type _headers: dict, optional
1804
- :param _host_index: set to override the host_index for a single
1805
- request; this effectively ignores the host_index
1806
- in the spec for a single request.
1807
- :type _host_index: int, optional
1808
- :return: Returns the result object.
1809
- """ # noqa: E501
1810
-
1811
- _param = self._list_roles_serialize(
1812
- upload_href=upload_href,
1813
- x_task_diagnostics=x_task_diagnostics,
1814
- fields=fields,
1815
- exclude_fields=exclude_fields,
1816
- _request_auth=_request_auth,
1817
- _content_type=_content_type,
1818
- _headers=_headers,
1819
- _host_index=_host_index
1820
- )
1821
-
1822
- _response_types_map: Dict[str, Optional[str]] = {
1823
- '200': "ObjectRolesResponse",
1824
- }
1825
- response_data = self.api_client.call_api(
1826
- *_param,
1827
- _request_timeout=_request_timeout
1828
- )
1829
- response_data.read()
1830
- return self.api_client.response_deserialize(
1831
- response_data=response_data,
1832
- response_types_map=_response_types_map,
1833
- ).data
1834
-
1835
-
1836
- @validate_call
1837
- def list_roles_with_http_info(
1838
- self,
1839
- upload_href: StrictStr,
1840
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1841
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1842
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1843
- _request_timeout: Union[
1844
- None,
1845
- Annotated[StrictFloat, Field(gt=0)],
1846
- Tuple[
1847
- Annotated[StrictFloat, Field(gt=0)],
1848
- Annotated[StrictFloat, Field(gt=0)]
1849
- ]
1850
- ] = None,
1851
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1852
- _content_type: Optional[StrictStr] = None,
1853
- _headers: Optional[Dict[StrictStr, Any]] = None,
1854
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1855
- ) -> ApiResponse[ObjectRolesResponse]:
1856
- """List roles
1857
-
1858
- List roles assigned to this object.
1859
-
1860
- :param upload_href: (required)
1861
- :type upload_href: str
1862
- :param x_task_diagnostics: List of profilers to use on tasks.
1863
- :type x_task_diagnostics: List[str]
1864
- :param fields: A list of fields to include in the response.
1865
- :type fields: List[str]
1866
- :param exclude_fields: A list of fields to exclude from the response.
1867
- :type exclude_fields: List[str]
1868
- :param _request_timeout: timeout setting for this request. If one
1869
- number provided, it will be total request
1870
- timeout. It can also be a pair (tuple) of
1871
- (connection, read) timeouts.
1872
- :type _request_timeout: int, tuple(int, int), optional
1873
- :param _request_auth: set to override the auth_settings for an a single
1874
- request; this effectively ignores the
1875
- authentication in the spec for a single request.
1876
- :type _request_auth: dict, optional
1877
- :param _content_type: force content-type for the request.
1878
- :type _content_type: str, Optional
1879
- :param _headers: set to override the headers for a single
1880
- request; this effectively ignores the headers
1881
- in the spec for a single request.
1882
- :type _headers: dict, optional
1883
- :param _host_index: set to override the host_index for a single
1884
- request; this effectively ignores the host_index
1885
- in the spec for a single request.
1886
- :type _host_index: int, optional
1887
- :return: Returns the result object.
1888
- """ # noqa: E501
1889
-
1890
- _param = self._list_roles_serialize(
1891
- upload_href=upload_href,
1892
- x_task_diagnostics=x_task_diagnostics,
1893
- fields=fields,
1894
- exclude_fields=exclude_fields,
1895
- _request_auth=_request_auth,
1896
- _content_type=_content_type,
1897
- _headers=_headers,
1898
- _host_index=_host_index
1899
- )
1900
-
1901
- _response_types_map: Dict[str, Optional[str]] = {
1902
- '200': "ObjectRolesResponse",
1903
- }
1904
- response_data = self.api_client.call_api(
1905
- *_param,
1906
- _request_timeout=_request_timeout
1907
- )
1908
- response_data.read()
1909
- return self.api_client.response_deserialize(
1910
- response_data=response_data,
1911
- response_types_map=_response_types_map,
1912
- )
1913
-
1914
-
1915
- @validate_call
1916
- def list_roles_without_preload_content(
1917
- self,
1918
- upload_href: StrictStr,
1919
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1920
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1921
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1922
- _request_timeout: Union[
1923
- None,
1924
- Annotated[StrictFloat, Field(gt=0)],
1925
- Tuple[
1926
- Annotated[StrictFloat, Field(gt=0)],
1927
- Annotated[StrictFloat, Field(gt=0)]
1928
- ]
1929
- ] = None,
1930
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1931
- _content_type: Optional[StrictStr] = None,
1932
- _headers: Optional[Dict[StrictStr, Any]] = None,
1933
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1934
- ) -> RESTResponseType:
1935
- """List roles
1936
-
1937
- List roles assigned to this object.
1938
-
1939
- :param upload_href: (required)
1940
- :type upload_href: str
1941
- :param x_task_diagnostics: List of profilers to use on tasks.
1942
- :type x_task_diagnostics: List[str]
1943
- :param fields: A list of fields to include in the response.
1944
- :type fields: List[str]
1945
- :param exclude_fields: A list of fields to exclude from the response.
1946
- :type exclude_fields: List[str]
1947
- :param _request_timeout: timeout setting for this request. If one
1948
- number provided, it will be total request
1949
- timeout. It can also be a pair (tuple) of
1950
- (connection, read) timeouts.
1951
- :type _request_timeout: int, tuple(int, int), optional
1952
- :param _request_auth: set to override the auth_settings for an a single
1953
- request; this effectively ignores the
1954
- authentication in the spec for a single request.
1955
- :type _request_auth: dict, optional
1956
- :param _content_type: force content-type for the request.
1957
- :type _content_type: str, Optional
1958
- :param _headers: set to override the headers for a single
1959
- request; this effectively ignores the headers
1960
- in the spec for a single request.
1961
- :type _headers: dict, optional
1962
- :param _host_index: set to override the host_index for a single
1963
- request; this effectively ignores the host_index
1964
- in the spec for a single request.
1965
- :type _host_index: int, optional
1966
- :return: Returns the result object.
1967
- """ # noqa: E501
1968
-
1969
- _param = self._list_roles_serialize(
1970
- upload_href=upload_href,
1971
- x_task_diagnostics=x_task_diagnostics,
1972
- fields=fields,
1973
- exclude_fields=exclude_fields,
1974
- _request_auth=_request_auth,
1975
- _content_type=_content_type,
1976
- _headers=_headers,
1977
- _host_index=_host_index
1978
- )
1979
-
1980
- _response_types_map: Dict[str, Optional[str]] = {
1981
- '200': "ObjectRolesResponse",
1982
- }
1983
- response_data = self.api_client.call_api(
1984
- *_param,
1985
- _request_timeout=_request_timeout
1986
- )
1987
- return response_data.response
1988
-
1989
-
1990
- def _list_roles_serialize(
1991
- self,
1992
- upload_href,
1993
- x_task_diagnostics,
1994
- fields,
1995
- exclude_fields,
1996
- _request_auth,
1997
- _content_type,
1998
- _headers,
1999
- _host_index,
2000
- ) -> RequestSerialized:
2001
-
2002
- _host = None
2003
-
2004
- _collection_formats: Dict[str, str] = {
2005
- 'X-Task-Diagnostics': 'csv',
2006
- 'fields': 'multi',
2007
- 'exclude_fields': 'multi',
2008
- }
2009
-
2010
- _path_params: Dict[str, str] = {}
2011
- _query_params: List[Tuple[str, str]] = []
2012
- _header_params: Dict[str, Optional[str]] = _headers or {}
2013
- _form_params: List[Tuple[str, str]] = []
2014
- _files: Dict[
2015
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2016
- ] = {}
2017
- _body_params: Optional[bytes] = None
2018
-
2019
- # process the path parameters
2020
- if upload_href is not None:
2021
- _path_params['upload_href'] = upload_href
2022
- # process the query parameters
2023
- if fields is not None:
2024
-
2025
- _query_params.append(('fields', fields))
2026
-
2027
- if exclude_fields is not None:
2028
-
2029
- _query_params.append(('exclude_fields', exclude_fields))
2030
-
2031
- # process the header parameters
2032
- if x_task_diagnostics is not None:
2033
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2034
- # process the form parameters
2035
- # process the body parameter
2036
-
2037
-
2038
- # set the HTTP header `Accept`
2039
- if 'Accept' not in _header_params:
2040
- _header_params['Accept'] = self.api_client.select_header_accept(
2041
- [
2042
- 'application/json'
2043
- ]
2044
- )
2045
-
2046
-
2047
- # authentication setting
2048
- _auth_settings: List[str] = [
2049
- 'json_header_remote_authentication',
2050
- 'basicAuth',
2051
- 'cookieAuth'
2052
- ]
2053
-
2054
- return self.api_client.param_serialize(
2055
- method='GET',
2056
- resource_path='{upload_href}list_roles/',
2057
- path_params=_path_params,
2058
- query_params=_query_params,
2059
- header_params=_header_params,
2060
- body=_body_params,
2061
- post_params=_form_params,
2062
- files=_files,
2063
- auth_settings=_auth_settings,
2064
- collection_formats=_collection_formats,
2065
- _host=_host,
2066
- _request_auth=_request_auth
2067
- )
2068
-
2069
-
2070
-
2071
-
2072
- @validate_call
2073
- def my_permissions(
2074
- self,
2075
- upload_href: StrictStr,
2076
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2077
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2078
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2079
- _request_timeout: Union[
2080
- None,
2081
- Annotated[StrictFloat, Field(gt=0)],
2082
- Tuple[
2083
- Annotated[StrictFloat, Field(gt=0)],
2084
- Annotated[StrictFloat, Field(gt=0)]
2085
- ]
2086
- ] = None,
2087
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2088
- _content_type: Optional[StrictStr] = None,
2089
- _headers: Optional[Dict[StrictStr, Any]] = None,
2090
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2091
- ) -> MyPermissionsResponse:
2092
- """List user permissions
2093
-
2094
- List permissions available to the current user on this object.
2095
-
2096
- :param upload_href: (required)
2097
- :type upload_href: str
2098
- :param x_task_diagnostics: List of profilers to use on tasks.
2099
- :type x_task_diagnostics: List[str]
2100
- :param fields: A list of fields to include in the response.
2101
- :type fields: List[str]
2102
- :param exclude_fields: A list of fields to exclude from the response.
2103
- :type exclude_fields: List[str]
2104
- :param _request_timeout: timeout setting for this request. If one
2105
- number provided, it will be total request
2106
- timeout. It can also be a pair (tuple) of
2107
- (connection, read) timeouts.
2108
- :type _request_timeout: int, tuple(int, int), optional
2109
- :param _request_auth: set to override the auth_settings for an a single
2110
- request; this effectively ignores the
2111
- authentication in the spec for a single request.
2112
- :type _request_auth: dict, optional
2113
- :param _content_type: force content-type for the request.
2114
- :type _content_type: str, Optional
2115
- :param _headers: set to override the headers for a single
2116
- request; this effectively ignores the headers
2117
- in the spec for a single request.
2118
- :type _headers: dict, optional
2119
- :param _host_index: set to override the host_index for a single
2120
- request; this effectively ignores the host_index
2121
- in the spec for a single request.
2122
- :type _host_index: int, optional
2123
- :return: Returns the result object.
2124
- """ # noqa: E501
2125
-
2126
- _param = self._my_permissions_serialize(
2127
- upload_href=upload_href,
2128
- x_task_diagnostics=x_task_diagnostics,
2129
- fields=fields,
2130
- exclude_fields=exclude_fields,
2131
- _request_auth=_request_auth,
2132
- _content_type=_content_type,
2133
- _headers=_headers,
2134
- _host_index=_host_index
2135
- )
2136
-
2137
- _response_types_map: Dict[str, Optional[str]] = {
2138
- '200': "MyPermissionsResponse",
2139
- }
2140
- response_data = self.api_client.call_api(
2141
- *_param,
2142
- _request_timeout=_request_timeout
2143
- )
2144
- response_data.read()
2145
- return self.api_client.response_deserialize(
2146
- response_data=response_data,
2147
- response_types_map=_response_types_map,
2148
- ).data
2149
-
2150
-
2151
- @validate_call
2152
- def my_permissions_with_http_info(
2153
- self,
2154
- upload_href: StrictStr,
2155
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2156
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2157
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2158
- _request_timeout: Union[
2159
- None,
2160
- Annotated[StrictFloat, Field(gt=0)],
2161
- Tuple[
2162
- Annotated[StrictFloat, Field(gt=0)],
2163
- Annotated[StrictFloat, Field(gt=0)]
2164
- ]
2165
- ] = None,
2166
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2167
- _content_type: Optional[StrictStr] = None,
2168
- _headers: Optional[Dict[StrictStr, Any]] = None,
2169
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2170
- ) -> ApiResponse[MyPermissionsResponse]:
2171
- """List user permissions
2172
-
2173
- List permissions available to the current user on this object.
2174
-
2175
- :param upload_href: (required)
2176
- :type upload_href: str
2177
- :param x_task_diagnostics: List of profilers to use on tasks.
2178
- :type x_task_diagnostics: List[str]
2179
- :param fields: A list of fields to include in the response.
2180
- :type fields: List[str]
2181
- :param exclude_fields: A list of fields to exclude from the response.
2182
- :type exclude_fields: List[str]
2183
- :param _request_timeout: timeout setting for this request. If one
2184
- number provided, it will be total request
2185
- timeout. It can also be a pair (tuple) of
2186
- (connection, read) timeouts.
2187
- :type _request_timeout: int, tuple(int, int), optional
2188
- :param _request_auth: set to override the auth_settings for an a single
2189
- request; this effectively ignores the
2190
- authentication in the spec for a single request.
2191
- :type _request_auth: dict, optional
2192
- :param _content_type: force content-type for the request.
2193
- :type _content_type: str, Optional
2194
- :param _headers: set to override the headers for a single
2195
- request; this effectively ignores the headers
2196
- in the spec for a single request.
2197
- :type _headers: dict, optional
2198
- :param _host_index: set to override the host_index for a single
2199
- request; this effectively ignores the host_index
2200
- in the spec for a single request.
2201
- :type _host_index: int, optional
2202
- :return: Returns the result object.
2203
- """ # noqa: E501
2204
-
2205
- _param = self._my_permissions_serialize(
2206
- upload_href=upload_href,
2207
- x_task_diagnostics=x_task_diagnostics,
2208
- fields=fields,
2209
- exclude_fields=exclude_fields,
2210
- _request_auth=_request_auth,
2211
- _content_type=_content_type,
2212
- _headers=_headers,
2213
- _host_index=_host_index
2214
- )
2215
-
2216
- _response_types_map: Dict[str, Optional[str]] = {
2217
- '200': "MyPermissionsResponse",
2218
- }
2219
- response_data = self.api_client.call_api(
2220
- *_param,
2221
- _request_timeout=_request_timeout
2222
- )
2223
- response_data.read()
2224
- return self.api_client.response_deserialize(
2225
- response_data=response_data,
2226
- response_types_map=_response_types_map,
2227
- )
2228
-
2229
-
2230
- @validate_call
2231
- def my_permissions_without_preload_content(
2232
- self,
2233
- upload_href: StrictStr,
2234
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2235
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2236
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2237
- _request_timeout: Union[
2238
- None,
2239
- Annotated[StrictFloat, Field(gt=0)],
2240
- Tuple[
2241
- Annotated[StrictFloat, Field(gt=0)],
2242
- Annotated[StrictFloat, Field(gt=0)]
2243
- ]
2244
- ] = None,
2245
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2246
- _content_type: Optional[StrictStr] = None,
2247
- _headers: Optional[Dict[StrictStr, Any]] = None,
2248
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2249
- ) -> RESTResponseType:
2250
- """List user permissions
2251
-
2252
- List permissions available to the current user on this object.
2253
-
2254
- :param upload_href: (required)
2255
- :type upload_href: str
2256
- :param x_task_diagnostics: List of profilers to use on tasks.
2257
- :type x_task_diagnostics: List[str]
2258
- :param fields: A list of fields to include in the response.
2259
- :type fields: List[str]
2260
- :param exclude_fields: A list of fields to exclude from the response.
2261
- :type exclude_fields: List[str]
2262
- :param _request_timeout: timeout setting for this request. If one
2263
- number provided, it will be total request
2264
- timeout. It can also be a pair (tuple) of
2265
- (connection, read) timeouts.
2266
- :type _request_timeout: int, tuple(int, int), optional
2267
- :param _request_auth: set to override the auth_settings for an a single
2268
- request; this effectively ignores the
2269
- authentication in the spec for a single request.
2270
- :type _request_auth: dict, optional
2271
- :param _content_type: force content-type for the request.
2272
- :type _content_type: str, Optional
2273
- :param _headers: set to override the headers for a single
2274
- request; this effectively ignores the headers
2275
- in the spec for a single request.
2276
- :type _headers: dict, optional
2277
- :param _host_index: set to override the host_index for a single
2278
- request; this effectively ignores the host_index
2279
- in the spec for a single request.
2280
- :type _host_index: int, optional
2281
- :return: Returns the result object.
2282
- """ # noqa: E501
2283
-
2284
- _param = self._my_permissions_serialize(
2285
- upload_href=upload_href,
2286
- x_task_diagnostics=x_task_diagnostics,
2287
- fields=fields,
2288
- exclude_fields=exclude_fields,
2289
- _request_auth=_request_auth,
2290
- _content_type=_content_type,
2291
- _headers=_headers,
2292
- _host_index=_host_index
2293
- )
2294
-
2295
- _response_types_map: Dict[str, Optional[str]] = {
2296
- '200': "MyPermissionsResponse",
2297
- }
2298
- response_data = self.api_client.call_api(
2299
- *_param,
2300
- _request_timeout=_request_timeout
2301
- )
2302
- return response_data.response
2303
-
2304
-
2305
- def _my_permissions_serialize(
2306
- self,
2307
- upload_href,
2308
- x_task_diagnostics,
2309
- fields,
2310
- exclude_fields,
2311
- _request_auth,
2312
- _content_type,
2313
- _headers,
2314
- _host_index,
2315
- ) -> RequestSerialized:
2316
-
2317
- _host = None
2318
-
2319
- _collection_formats: Dict[str, str] = {
2320
- 'X-Task-Diagnostics': 'csv',
2321
- 'fields': 'multi',
2322
- 'exclude_fields': 'multi',
2323
- }
2324
-
2325
- _path_params: Dict[str, str] = {}
2326
- _query_params: List[Tuple[str, str]] = []
2327
- _header_params: Dict[str, Optional[str]] = _headers or {}
2328
- _form_params: List[Tuple[str, str]] = []
2329
- _files: Dict[
2330
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2331
- ] = {}
2332
- _body_params: Optional[bytes] = None
2333
-
2334
- # process the path parameters
2335
- if upload_href is not None:
2336
- _path_params['upload_href'] = upload_href
2337
- # process the query parameters
2338
- if fields is not None:
2339
-
2340
- _query_params.append(('fields', fields))
2341
-
2342
- if exclude_fields is not None:
2343
-
2344
- _query_params.append(('exclude_fields', exclude_fields))
2345
-
2346
- # process the header parameters
2347
- if x_task_diagnostics is not None:
2348
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2349
- # process the form parameters
2350
- # process the body parameter
2351
-
2352
-
2353
- # set the HTTP header `Accept`
2354
- if 'Accept' not in _header_params:
2355
- _header_params['Accept'] = self.api_client.select_header_accept(
2356
- [
2357
- 'application/json'
2358
- ]
2359
- )
2360
-
2361
-
2362
- # authentication setting
2363
- _auth_settings: List[str] = [
2364
- 'json_header_remote_authentication',
2365
- 'basicAuth',
2366
- 'cookieAuth'
2367
- ]
2368
-
2369
- return self.api_client.param_serialize(
2370
- method='GET',
2371
- resource_path='{upload_href}my_permissions/',
2372
- path_params=_path_params,
2373
- query_params=_query_params,
2374
- header_params=_header_params,
2375
- body=_body_params,
2376
- post_params=_form_params,
2377
- files=_files,
2378
- auth_settings=_auth_settings,
2379
- collection_formats=_collection_formats,
2380
- _host=_host,
2381
- _request_auth=_request_auth
2382
- )
2383
-
2384
-
2385
-
2386
-
2387
- @validate_call
2388
- def read(
2389
- self,
2390
- upload_href: StrictStr,
2391
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2392
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2393
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2394
- _request_timeout: Union[
2395
- None,
2396
- Annotated[StrictFloat, Field(gt=0)],
2397
- Tuple[
2398
- Annotated[StrictFloat, Field(gt=0)],
2399
- Annotated[StrictFloat, Field(gt=0)]
2400
- ]
2401
- ] = None,
2402
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2403
- _content_type: Optional[StrictStr] = None,
2404
- _headers: Optional[Dict[StrictStr, Any]] = None,
2405
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2406
- ) -> UploadDetailResponse:
2407
- """Inspect an upload
2408
-
2409
- View for chunked uploads.
2410
-
2411
- :param upload_href: (required)
2412
- :type upload_href: str
2413
- :param x_task_diagnostics: List of profilers to use on tasks.
2414
- :type x_task_diagnostics: List[str]
2415
- :param fields: A list of fields to include in the response.
2416
- :type fields: List[str]
2417
- :param exclude_fields: A list of fields to exclude from the response.
2418
- :type exclude_fields: List[str]
2419
- :param _request_timeout: timeout setting for this request. If one
2420
- number provided, it will be total request
2421
- timeout. It can also be a pair (tuple) of
2422
- (connection, read) timeouts.
2423
- :type _request_timeout: int, tuple(int, int), optional
2424
- :param _request_auth: set to override the auth_settings for an a single
2425
- request; this effectively ignores the
2426
- authentication in the spec for a single request.
2427
- :type _request_auth: dict, optional
2428
- :param _content_type: force content-type for the request.
2429
- :type _content_type: str, Optional
2430
- :param _headers: set to override the headers for a single
2431
- request; this effectively ignores the headers
2432
- in the spec for a single request.
2433
- :type _headers: dict, optional
2434
- :param _host_index: set to override the host_index for a single
2435
- request; this effectively ignores the host_index
2436
- in the spec for a single request.
2437
- :type _host_index: int, optional
2438
- :return: Returns the result object.
2439
- """ # noqa: E501
2440
-
2441
- _param = self._read_serialize(
2442
- upload_href=upload_href,
2443
- x_task_diagnostics=x_task_diagnostics,
2444
- fields=fields,
2445
- exclude_fields=exclude_fields,
2446
- _request_auth=_request_auth,
2447
- _content_type=_content_type,
2448
- _headers=_headers,
2449
- _host_index=_host_index
2450
- )
2451
-
2452
- _response_types_map: Dict[str, Optional[str]] = {
2453
- '200': "UploadDetailResponse",
2454
- }
2455
- response_data = self.api_client.call_api(
2456
- *_param,
2457
- _request_timeout=_request_timeout
2458
- )
2459
- response_data.read()
2460
- return self.api_client.response_deserialize(
2461
- response_data=response_data,
2462
- response_types_map=_response_types_map,
2463
- ).data
2464
-
2465
-
2466
- @validate_call
2467
- def read_with_http_info(
2468
- self,
2469
- upload_href: StrictStr,
2470
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2471
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2472
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2473
- _request_timeout: Union[
2474
- None,
2475
- Annotated[StrictFloat, Field(gt=0)],
2476
- Tuple[
2477
- Annotated[StrictFloat, Field(gt=0)],
2478
- Annotated[StrictFloat, Field(gt=0)]
2479
- ]
2480
- ] = None,
2481
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2482
- _content_type: Optional[StrictStr] = None,
2483
- _headers: Optional[Dict[StrictStr, Any]] = None,
2484
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2485
- ) -> ApiResponse[UploadDetailResponse]:
2486
- """Inspect an upload
2487
-
2488
- View for chunked uploads.
2489
-
2490
- :param upload_href: (required)
2491
- :type upload_href: str
2492
- :param x_task_diagnostics: List of profilers to use on tasks.
2493
- :type x_task_diagnostics: List[str]
2494
- :param fields: A list of fields to include in the response.
2495
- :type fields: List[str]
2496
- :param exclude_fields: A list of fields to exclude from the response.
2497
- :type exclude_fields: List[str]
2498
- :param _request_timeout: timeout setting for this request. If one
2499
- number provided, it will be total request
2500
- timeout. It can also be a pair (tuple) of
2501
- (connection, read) timeouts.
2502
- :type _request_timeout: int, tuple(int, int), optional
2503
- :param _request_auth: set to override the auth_settings for an a single
2504
- request; this effectively ignores the
2505
- authentication in the spec for a single request.
2506
- :type _request_auth: dict, optional
2507
- :param _content_type: force content-type for the request.
2508
- :type _content_type: str, Optional
2509
- :param _headers: set to override the headers for a single
2510
- request; this effectively ignores the headers
2511
- in the spec for a single request.
2512
- :type _headers: dict, optional
2513
- :param _host_index: set to override the host_index for a single
2514
- request; this effectively ignores the host_index
2515
- in the spec for a single request.
2516
- :type _host_index: int, optional
2517
- :return: Returns the result object.
2518
- """ # noqa: E501
2519
-
2520
- _param = self._read_serialize(
2521
- upload_href=upload_href,
2522
- x_task_diagnostics=x_task_diagnostics,
2523
- fields=fields,
2524
- exclude_fields=exclude_fields,
2525
- _request_auth=_request_auth,
2526
- _content_type=_content_type,
2527
- _headers=_headers,
2528
- _host_index=_host_index
2529
- )
2530
-
2531
- _response_types_map: Dict[str, Optional[str]] = {
2532
- '200': "UploadDetailResponse",
2533
- }
2534
- response_data = self.api_client.call_api(
2535
- *_param,
2536
- _request_timeout=_request_timeout
2537
- )
2538
- response_data.read()
2539
- return self.api_client.response_deserialize(
2540
- response_data=response_data,
2541
- response_types_map=_response_types_map,
2542
- )
2543
-
2544
-
2545
- @validate_call
2546
- def read_without_preload_content(
2547
- self,
2548
- upload_href: StrictStr,
2549
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2550
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
2551
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
2552
- _request_timeout: Union[
2553
- None,
2554
- Annotated[StrictFloat, Field(gt=0)],
2555
- Tuple[
2556
- Annotated[StrictFloat, Field(gt=0)],
2557
- Annotated[StrictFloat, Field(gt=0)]
2558
- ]
2559
- ] = None,
2560
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2561
- _content_type: Optional[StrictStr] = None,
2562
- _headers: Optional[Dict[StrictStr, Any]] = None,
2563
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2564
- ) -> RESTResponseType:
2565
- """Inspect an upload
2566
-
2567
- View for chunked uploads.
2568
-
2569
- :param upload_href: (required)
2570
- :type upload_href: str
2571
- :param x_task_diagnostics: List of profilers to use on tasks.
2572
- :type x_task_diagnostics: List[str]
2573
- :param fields: A list of fields to include in the response.
2574
- :type fields: List[str]
2575
- :param exclude_fields: A list of fields to exclude from the response.
2576
- :type exclude_fields: List[str]
2577
- :param _request_timeout: timeout setting for this request. If one
2578
- number provided, it will be total request
2579
- timeout. It can also be a pair (tuple) of
2580
- (connection, read) timeouts.
2581
- :type _request_timeout: int, tuple(int, int), optional
2582
- :param _request_auth: set to override the auth_settings for an a single
2583
- request; this effectively ignores the
2584
- authentication in the spec for a single request.
2585
- :type _request_auth: dict, optional
2586
- :param _content_type: force content-type for the request.
2587
- :type _content_type: str, Optional
2588
- :param _headers: set to override the headers for a single
2589
- request; this effectively ignores the headers
2590
- in the spec for a single request.
2591
- :type _headers: dict, optional
2592
- :param _host_index: set to override the host_index for a single
2593
- request; this effectively ignores the host_index
2594
- in the spec for a single request.
2595
- :type _host_index: int, optional
2596
- :return: Returns the result object.
2597
- """ # noqa: E501
2598
-
2599
- _param = self._read_serialize(
2600
- upload_href=upload_href,
2601
- x_task_diagnostics=x_task_diagnostics,
2602
- fields=fields,
2603
- exclude_fields=exclude_fields,
2604
- _request_auth=_request_auth,
2605
- _content_type=_content_type,
2606
- _headers=_headers,
2607
- _host_index=_host_index
2608
- )
2609
-
2610
- _response_types_map: Dict[str, Optional[str]] = {
2611
- '200': "UploadDetailResponse",
2612
- }
2613
- response_data = self.api_client.call_api(
2614
- *_param,
2615
- _request_timeout=_request_timeout
2616
- )
2617
- return response_data.response
2618
-
2619
-
2620
- def _read_serialize(
2621
- self,
2622
- upload_href,
2623
- x_task_diagnostics,
2624
- fields,
2625
- exclude_fields,
2626
- _request_auth,
2627
- _content_type,
2628
- _headers,
2629
- _host_index,
2630
- ) -> RequestSerialized:
2631
-
2632
- _host = None
2633
-
2634
- _collection_formats: Dict[str, str] = {
2635
- 'X-Task-Diagnostics': 'csv',
2636
- 'fields': 'multi',
2637
- 'exclude_fields': 'multi',
2638
- }
2639
-
2640
- _path_params: Dict[str, str] = {}
2641
- _query_params: List[Tuple[str, str]] = []
2642
- _header_params: Dict[str, Optional[str]] = _headers or {}
2643
- _form_params: List[Tuple[str, str]] = []
2644
- _files: Dict[
2645
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2646
- ] = {}
2647
- _body_params: Optional[bytes] = None
2648
-
2649
- # process the path parameters
2650
- if upload_href is not None:
2651
- _path_params['upload_href'] = upload_href
2652
- # process the query parameters
2653
- if fields is not None:
2654
-
2655
- _query_params.append(('fields', fields))
2656
-
2657
- if exclude_fields is not None:
2658
-
2659
- _query_params.append(('exclude_fields', exclude_fields))
2660
-
2661
- # process the header parameters
2662
- if x_task_diagnostics is not None:
2663
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2664
- # process the form parameters
2665
- # process the body parameter
2666
-
2667
-
2668
- # set the HTTP header `Accept`
2669
- if 'Accept' not in _header_params:
2670
- _header_params['Accept'] = self.api_client.select_header_accept(
2671
- [
2672
- 'application/json'
2673
- ]
2674
- )
2675
-
2676
-
2677
- # authentication setting
2678
- _auth_settings: List[str] = [
2679
- 'json_header_remote_authentication',
2680
- 'basicAuth',
2681
- 'cookieAuth'
2682
- ]
2683
-
2684
- return self.api_client.param_serialize(
2685
- method='GET',
2686
- resource_path='{upload_href}',
2687
- path_params=_path_params,
2688
- query_params=_query_params,
2689
- header_params=_header_params,
2690
- body=_body_params,
2691
- post_params=_form_params,
2692
- files=_files,
2693
- auth_settings=_auth_settings,
2694
- collection_formats=_collection_formats,
2695
- _host=_host,
2696
- _request_auth=_request_auth
2697
- )
2698
-
2699
-
2700
-
2701
-
2702
- @validate_call
2703
- def remove_role(
2704
- self,
2705
- upload_href: StrictStr,
2706
- upload: Upload,
2707
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2708
- _request_timeout: Union[
2709
- None,
2710
- Annotated[StrictFloat, Field(gt=0)],
2711
- Tuple[
2712
- Annotated[StrictFloat, Field(gt=0)],
2713
- Annotated[StrictFloat, Field(gt=0)]
2714
- ]
2715
- ] = None,
2716
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2717
- _content_type: Optional[StrictStr] = None,
2718
- _headers: Optional[Dict[StrictStr, Any]] = None,
2719
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2720
- ) -> NestedRoleResponse:
2721
- """Remove a role
2722
-
2723
- Remove a role for this object from users/groups.
2724
-
2725
- :param upload_href: (required)
2726
- :type upload_href: str
2727
- :param upload: (required)
2728
- :type upload: Upload
2729
- :param x_task_diagnostics: List of profilers to use on tasks.
2730
- :type x_task_diagnostics: List[str]
2731
- :param _request_timeout: timeout setting for this request. If one
2732
- number provided, it will be total request
2733
- timeout. It can also be a pair (tuple) of
2734
- (connection, read) timeouts.
2735
- :type _request_timeout: int, tuple(int, int), optional
2736
- :param _request_auth: set to override the auth_settings for an a single
2737
- request; this effectively ignores the
2738
- authentication in the spec for a single request.
2739
- :type _request_auth: dict, optional
2740
- :param _content_type: force content-type for the request.
2741
- :type _content_type: str, Optional
2742
- :param _headers: set to override the headers for a single
2743
- request; this effectively ignores the headers
2744
- in the spec for a single request.
2745
- :type _headers: dict, optional
2746
- :param _host_index: set to override the host_index for a single
2747
- request; this effectively ignores the host_index
2748
- in the spec for a single request.
2749
- :type _host_index: int, optional
2750
- :return: Returns the result object.
2751
- """ # noqa: E501
2752
-
2753
- _param = self._remove_role_serialize(
2754
- upload_href=upload_href,
2755
- upload=upload,
2756
- x_task_diagnostics=x_task_diagnostics,
2757
- _request_auth=_request_auth,
2758
- _content_type=_content_type,
2759
- _headers=_headers,
2760
- _host_index=_host_index
2761
- )
2762
-
2763
- _response_types_map: Dict[str, Optional[str]] = {
2764
- '201': "NestedRoleResponse",
2765
- }
2766
- response_data = self.api_client.call_api(
2767
- *_param,
2768
- _request_timeout=_request_timeout
2769
- )
2770
- response_data.read()
2771
- return self.api_client.response_deserialize(
2772
- response_data=response_data,
2773
- response_types_map=_response_types_map,
2774
- ).data
2775
-
2776
-
2777
- @validate_call
2778
- def remove_role_with_http_info(
2779
- self,
2780
- upload_href: StrictStr,
2781
- upload: Upload,
2782
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2783
- _request_timeout: Union[
2784
- None,
2785
- Annotated[StrictFloat, Field(gt=0)],
2786
- Tuple[
2787
- Annotated[StrictFloat, Field(gt=0)],
2788
- Annotated[StrictFloat, Field(gt=0)]
2789
- ]
2790
- ] = None,
2791
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2792
- _content_type: Optional[StrictStr] = None,
2793
- _headers: Optional[Dict[StrictStr, Any]] = None,
2794
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2795
- ) -> ApiResponse[NestedRoleResponse]:
2796
- """Remove a role
2797
-
2798
- Remove a role for this object from users/groups.
2799
-
2800
- :param upload_href: (required)
2801
- :type upload_href: str
2802
- :param upload: (required)
2803
- :type upload: Upload
2804
- :param x_task_diagnostics: List of profilers to use on tasks.
2805
- :type x_task_diagnostics: List[str]
2806
- :param _request_timeout: timeout setting for this request. If one
2807
- number provided, it will be total request
2808
- timeout. It can also be a pair (tuple) of
2809
- (connection, read) timeouts.
2810
- :type _request_timeout: int, tuple(int, int), optional
2811
- :param _request_auth: set to override the auth_settings for an a single
2812
- request; this effectively ignores the
2813
- authentication in the spec for a single request.
2814
- :type _request_auth: dict, optional
2815
- :param _content_type: force content-type for the request.
2816
- :type _content_type: str, Optional
2817
- :param _headers: set to override the headers for a single
2818
- request; this effectively ignores the headers
2819
- in the spec for a single request.
2820
- :type _headers: dict, optional
2821
- :param _host_index: set to override the host_index for a single
2822
- request; this effectively ignores the host_index
2823
- in the spec for a single request.
2824
- :type _host_index: int, optional
2825
- :return: Returns the result object.
2826
- """ # noqa: E501
2827
-
2828
- _param = self._remove_role_serialize(
2829
- upload_href=upload_href,
2830
- upload=upload,
2831
- x_task_diagnostics=x_task_diagnostics,
2832
- _request_auth=_request_auth,
2833
- _content_type=_content_type,
2834
- _headers=_headers,
2835
- _host_index=_host_index
2836
- )
2837
-
2838
- _response_types_map: Dict[str, Optional[str]] = {
2839
- '201': "NestedRoleResponse",
2840
- }
2841
- response_data = self.api_client.call_api(
2842
- *_param,
2843
- _request_timeout=_request_timeout
2844
- )
2845
- response_data.read()
2846
- return self.api_client.response_deserialize(
2847
- response_data=response_data,
2848
- response_types_map=_response_types_map,
2849
- )
2850
-
2851
-
2852
- @validate_call
2853
- def remove_role_without_preload_content(
2854
- self,
2855
- upload_href: StrictStr,
2856
- upload: Upload,
2857
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2858
- _request_timeout: Union[
2859
- None,
2860
- Annotated[StrictFloat, Field(gt=0)],
2861
- Tuple[
2862
- Annotated[StrictFloat, Field(gt=0)],
2863
- Annotated[StrictFloat, Field(gt=0)]
2864
- ]
2865
- ] = None,
2866
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2867
- _content_type: Optional[StrictStr] = None,
2868
- _headers: Optional[Dict[StrictStr, Any]] = None,
2869
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2870
- ) -> RESTResponseType:
2871
- """Remove a role
2872
-
2873
- Remove a role for this object from users/groups.
2874
-
2875
- :param upload_href: (required)
2876
- :type upload_href: str
2877
- :param upload: (required)
2878
- :type upload: Upload
2879
- :param x_task_diagnostics: List of profilers to use on tasks.
2880
- :type x_task_diagnostics: List[str]
2881
- :param _request_timeout: timeout setting for this request. If one
2882
- number provided, it will be total request
2883
- timeout. It can also be a pair (tuple) of
2884
- (connection, read) timeouts.
2885
- :type _request_timeout: int, tuple(int, int), optional
2886
- :param _request_auth: set to override the auth_settings for an a single
2887
- request; this effectively ignores the
2888
- authentication in the spec for a single request.
2889
- :type _request_auth: dict, optional
2890
- :param _content_type: force content-type for the request.
2891
- :type _content_type: str, Optional
2892
- :param _headers: set to override the headers for a single
2893
- request; this effectively ignores the headers
2894
- in the spec for a single request.
2895
- :type _headers: dict, optional
2896
- :param _host_index: set to override the host_index for a single
2897
- request; this effectively ignores the host_index
2898
- in the spec for a single request.
2899
- :type _host_index: int, optional
2900
- :return: Returns the result object.
2901
- """ # noqa: E501
2902
-
2903
- _param = self._remove_role_serialize(
2904
- upload_href=upload_href,
2905
- upload=upload,
2906
- x_task_diagnostics=x_task_diagnostics,
2907
- _request_auth=_request_auth,
2908
- _content_type=_content_type,
2909
- _headers=_headers,
2910
- _host_index=_host_index
2911
- )
2912
-
2913
- _response_types_map: Dict[str, Optional[str]] = {
2914
- '201': "NestedRoleResponse",
2915
- }
2916
- response_data = self.api_client.call_api(
2917
- *_param,
2918
- _request_timeout=_request_timeout
2919
- )
2920
- return response_data.response
2921
-
2922
-
2923
- def _remove_role_serialize(
2924
- self,
2925
- upload_href,
2926
- upload,
2927
- x_task_diagnostics,
2928
- _request_auth,
2929
- _content_type,
2930
- _headers,
2931
- _host_index,
2932
- ) -> RequestSerialized:
2933
-
2934
- _host = None
2935
-
2936
- _collection_formats: Dict[str, str] = {
2937
- 'X-Task-Diagnostics': 'csv',
2938
- }
2939
-
2940
- _path_params: Dict[str, str] = {}
2941
- _query_params: List[Tuple[str, str]] = []
2942
- _header_params: Dict[str, Optional[str]] = _headers or {}
2943
- _form_params: List[Tuple[str, str]] = []
2944
- _files: Dict[
2945
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2946
- ] = {}
2947
- _body_params: Optional[bytes] = None
2948
-
2949
- # process the path parameters
2950
- if upload_href is not None:
2951
- _path_params['upload_href'] = upload_href
2952
- # process the query parameters
2953
- # process the header parameters
2954
- if x_task_diagnostics is not None:
2955
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2956
- # process the form parameters
2957
- # process the body parameter
2958
- if upload is not None:
2959
- _body_params = upload
2960
-
2961
-
2962
- # set the HTTP header `Accept`
2963
- if 'Accept' not in _header_params:
2964
- _header_params['Accept'] = self.api_client.select_header_accept(
2965
- [
2966
- 'application/json'
2967
- ]
2968
- )
2969
-
2970
- # set the HTTP header `Content-Type`
2971
- if _content_type:
2972
- _header_params['Content-Type'] = _content_type
2973
- else:
2974
- _default_content_type = (
2975
- self.api_client.select_header_content_type(
2976
- [
2977
- 'application/json',
2978
- 'application/x-www-form-urlencoded',
2979
- 'multipart/form-data'
2980
- ]
2981
- )
2982
- )
2983
- if _default_content_type is not None:
2984
- _header_params['Content-Type'] = _default_content_type
2985
-
2986
- # authentication setting
2987
- _auth_settings: List[str] = [
2988
- 'json_header_remote_authentication',
2989
- 'basicAuth',
2990
- 'cookieAuth'
2991
- ]
2992
-
2993
- return self.api_client.param_serialize(
2994
- method='POST',
2995
- resource_path='{upload_href}remove_role/',
2996
- path_params=_path_params,
2997
- query_params=_query_params,
2998
- header_params=_header_params,
2999
- body=_body_params,
3000
- post_params=_form_params,
3001
- files=_files,
3002
- auth_settings=_auth_settings,
3003
- collection_formats=_collection_formats,
3004
- _host=_host,
3005
- _request_auth=_request_auth
3006
- )
3007
-
3008
-
3009
-
3010
-
3011
- @validate_call
3012
- def update(
3013
- self,
3014
- content_range: Annotated[StrictStr, Field(description="The Content-Range header specifies the location of the file chunk within the file.")],
3015
- upload_href: StrictStr,
3016
- file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="A chunk of the uploaded file.")],
3017
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3018
- sha256: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="The SHA-256 checksum of the chunk if available.")] = None,
3019
- _request_timeout: Union[
3020
- None,
3021
- Annotated[StrictFloat, Field(gt=0)],
3022
- Tuple[
3023
- Annotated[StrictFloat, Field(gt=0)],
3024
- Annotated[StrictFloat, Field(gt=0)]
3025
- ]
3026
- ] = None,
3027
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3028
- _content_type: Optional[StrictStr] = None,
3029
- _headers: Optional[Dict[StrictStr, Any]] = None,
3030
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3031
- ) -> UploadResponse:
3032
- """Upload a file chunk
3033
-
3034
- Upload a chunk for an upload.
3035
-
3036
- :param content_range: The Content-Range header specifies the location of the file chunk within the file. (required)
3037
- :type content_range: str
3038
- :param upload_href: (required)
3039
- :type upload_href: str
3040
- :param file: A chunk of the uploaded file. (required)
3041
- :type file: bytearray
3042
- :param x_task_diagnostics: List of profilers to use on tasks.
3043
- :type x_task_diagnostics: List[str]
3044
- :param sha256: The SHA-256 checksum of the chunk if available.
3045
- :type sha256: str
3046
- :param _request_timeout: timeout setting for this request. If one
3047
- number provided, it will be total request
3048
- timeout. It can also be a pair (tuple) of
3049
- (connection, read) timeouts.
3050
- :type _request_timeout: int, tuple(int, int), optional
3051
- :param _request_auth: set to override the auth_settings for an a single
3052
- request; this effectively ignores the
3053
- authentication in the spec for a single request.
3054
- :type _request_auth: dict, optional
3055
- :param _content_type: force content-type for the request.
3056
- :type _content_type: str, Optional
3057
- :param _headers: set to override the headers for a single
3058
- request; this effectively ignores the headers
3059
- in the spec for a single request.
3060
- :type _headers: dict, optional
3061
- :param _host_index: set to override the host_index for a single
3062
- request; this effectively ignores the host_index
3063
- in the spec for a single request.
3064
- :type _host_index: int, optional
3065
- :return: Returns the result object.
3066
- """ # noqa: E501
3067
-
3068
- _param = self._update_serialize(
3069
- content_range=content_range,
3070
- upload_href=upload_href,
3071
- file=file,
3072
- x_task_diagnostics=x_task_diagnostics,
3073
- sha256=sha256,
3074
- _request_auth=_request_auth,
3075
- _content_type=_content_type,
3076
- _headers=_headers,
3077
- _host_index=_host_index
3078
- )
3079
-
3080
- _response_types_map: Dict[str, Optional[str]] = {
3081
- '200': "UploadResponse",
3082
- }
3083
- response_data = self.api_client.call_api(
3084
- *_param,
3085
- _request_timeout=_request_timeout
3086
- )
3087
- response_data.read()
3088
- return self.api_client.response_deserialize(
3089
- response_data=response_data,
3090
- response_types_map=_response_types_map,
3091
- ).data
3092
-
3093
-
3094
- @validate_call
3095
- def update_with_http_info(
3096
- self,
3097
- content_range: Annotated[StrictStr, Field(description="The Content-Range header specifies the location of the file chunk within the file.")],
3098
- upload_href: StrictStr,
3099
- file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="A chunk of the uploaded file.")],
3100
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3101
- sha256: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="The SHA-256 checksum of the chunk if available.")] = None,
3102
- _request_timeout: Union[
3103
- None,
3104
- Annotated[StrictFloat, Field(gt=0)],
3105
- Tuple[
3106
- Annotated[StrictFloat, Field(gt=0)],
3107
- Annotated[StrictFloat, Field(gt=0)]
3108
- ]
3109
- ] = None,
3110
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3111
- _content_type: Optional[StrictStr] = None,
3112
- _headers: Optional[Dict[StrictStr, Any]] = None,
3113
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3114
- ) -> ApiResponse[UploadResponse]:
3115
- """Upload a file chunk
3116
-
3117
- Upload a chunk for an upload.
3118
-
3119
- :param content_range: The Content-Range header specifies the location of the file chunk within the file. (required)
3120
- :type content_range: str
3121
- :param upload_href: (required)
3122
- :type upload_href: str
3123
- :param file: A chunk of the uploaded file. (required)
3124
- :type file: bytearray
3125
- :param x_task_diagnostics: List of profilers to use on tasks.
3126
- :type x_task_diagnostics: List[str]
3127
- :param sha256: The SHA-256 checksum of the chunk if available.
3128
- :type sha256: str
3129
- :param _request_timeout: timeout setting for this request. If one
3130
- number provided, it will be total request
3131
- timeout. It can also be a pair (tuple) of
3132
- (connection, read) timeouts.
3133
- :type _request_timeout: int, tuple(int, int), optional
3134
- :param _request_auth: set to override the auth_settings for an a single
3135
- request; this effectively ignores the
3136
- authentication in the spec for a single request.
3137
- :type _request_auth: dict, optional
3138
- :param _content_type: force content-type for the request.
3139
- :type _content_type: str, Optional
3140
- :param _headers: set to override the headers for a single
3141
- request; this effectively ignores the headers
3142
- in the spec for a single request.
3143
- :type _headers: dict, optional
3144
- :param _host_index: set to override the host_index for a single
3145
- request; this effectively ignores the host_index
3146
- in the spec for a single request.
3147
- :type _host_index: int, optional
3148
- :return: Returns the result object.
3149
- """ # noqa: E501
3150
-
3151
- _param = self._update_serialize(
3152
- content_range=content_range,
3153
- upload_href=upload_href,
3154
- file=file,
3155
- x_task_diagnostics=x_task_diagnostics,
3156
- sha256=sha256,
3157
- _request_auth=_request_auth,
3158
- _content_type=_content_type,
3159
- _headers=_headers,
3160
- _host_index=_host_index
3161
- )
3162
-
3163
- _response_types_map: Dict[str, Optional[str]] = {
3164
- '200': "UploadResponse",
3165
- }
3166
- response_data = self.api_client.call_api(
3167
- *_param,
3168
- _request_timeout=_request_timeout
3169
- )
3170
- response_data.read()
3171
- return self.api_client.response_deserialize(
3172
- response_data=response_data,
3173
- response_types_map=_response_types_map,
3174
- )
3175
-
3176
-
3177
- @validate_call
3178
- def update_without_preload_content(
3179
- self,
3180
- content_range: Annotated[StrictStr, Field(description="The Content-Range header specifies the location of the file chunk within the file.")],
3181
- upload_href: StrictStr,
3182
- file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="A chunk of the uploaded file.")],
3183
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
3184
- sha256: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="The SHA-256 checksum of the chunk if available.")] = None,
3185
- _request_timeout: Union[
3186
- None,
3187
- Annotated[StrictFloat, Field(gt=0)],
3188
- Tuple[
3189
- Annotated[StrictFloat, Field(gt=0)],
3190
- Annotated[StrictFloat, Field(gt=0)]
3191
- ]
3192
- ] = None,
3193
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3194
- _content_type: Optional[StrictStr] = None,
3195
- _headers: Optional[Dict[StrictStr, Any]] = None,
3196
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3197
- ) -> RESTResponseType:
3198
- """Upload a file chunk
3199
-
3200
- Upload a chunk for an upload.
3201
-
3202
- :param content_range: The Content-Range header specifies the location of the file chunk within the file. (required)
3203
- :type content_range: str
3204
- :param upload_href: (required)
3205
- :type upload_href: str
3206
- :param file: A chunk of the uploaded file. (required)
3207
- :type file: bytearray
3208
- :param x_task_diagnostics: List of profilers to use on tasks.
3209
- :type x_task_diagnostics: List[str]
3210
- :param sha256: The SHA-256 checksum of the chunk if available.
3211
- :type sha256: str
3212
- :param _request_timeout: timeout setting for this request. If one
3213
- number provided, it will be total request
3214
- timeout. It can also be a pair (tuple) of
3215
- (connection, read) timeouts.
3216
- :type _request_timeout: int, tuple(int, int), optional
3217
- :param _request_auth: set to override the auth_settings for an a single
3218
- request; this effectively ignores the
3219
- authentication in the spec for a single request.
3220
- :type _request_auth: dict, optional
3221
- :param _content_type: force content-type for the request.
3222
- :type _content_type: str, Optional
3223
- :param _headers: set to override the headers for a single
3224
- request; this effectively ignores the headers
3225
- in the spec for a single request.
3226
- :type _headers: dict, optional
3227
- :param _host_index: set to override the host_index for a single
3228
- request; this effectively ignores the host_index
3229
- in the spec for a single request.
3230
- :type _host_index: int, optional
3231
- :return: Returns the result object.
3232
- """ # noqa: E501
3233
-
3234
- _param = self._update_serialize(
3235
- content_range=content_range,
3236
- upload_href=upload_href,
3237
- file=file,
3238
- x_task_diagnostics=x_task_diagnostics,
3239
- sha256=sha256,
3240
- _request_auth=_request_auth,
3241
- _content_type=_content_type,
3242
- _headers=_headers,
3243
- _host_index=_host_index
3244
- )
3245
-
3246
- _response_types_map: Dict[str, Optional[str]] = {
3247
- '200': "UploadResponse",
3248
- }
3249
- response_data = self.api_client.call_api(
3250
- *_param,
3251
- _request_timeout=_request_timeout
3252
- )
3253
- return response_data.response
3254
-
3255
-
3256
- def _update_serialize(
3257
- self,
3258
- content_range,
3259
- upload_href,
3260
- file,
3261
- x_task_diagnostics,
3262
- sha256,
3263
- _request_auth,
3264
- _content_type,
3265
- _headers,
3266
- _host_index,
3267
- ) -> RequestSerialized:
3268
-
3269
- _host = None
3270
-
3271
- _collection_formats: Dict[str, str] = {
3272
- 'X-Task-Diagnostics': 'csv',
3273
- }
3274
-
3275
- _path_params: Dict[str, str] = {}
3276
- _query_params: List[Tuple[str, str]] = []
3277
- _header_params: Dict[str, Optional[str]] = _headers or {}
3278
- _form_params: List[Tuple[str, str]] = []
3279
- _files: Dict[
3280
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3281
- ] = {}
3282
- _body_params: Optional[bytes] = None
3283
-
3284
- # process the path parameters
3285
- if upload_href is not None:
3286
- _path_params['upload_href'] = upload_href
3287
- # process the query parameters
3288
- # process the header parameters
3289
- if content_range is not None:
3290
- _header_params['Content-Range'] = content_range
3291
- if x_task_diagnostics is not None:
3292
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
3293
- # process the form parameters
3294
- if file is not None:
3295
- _files['file'] = file
3296
- if sha256 is not None:
3297
- _form_params.append(('sha256', sha256))
3298
- # process the body parameter
3299
-
3300
-
3301
- # set the HTTP header `Accept`
3302
- if 'Accept' not in _header_params:
3303
- _header_params['Accept'] = self.api_client.select_header_accept(
3304
- [
3305
- 'application/json'
3306
- ]
3307
- )
3308
-
3309
- # set the HTTP header `Content-Type`
3310
- if _content_type:
3311
- _header_params['Content-Type'] = _content_type
3312
- else:
3313
- _default_content_type = (
3314
- self.api_client.select_header_content_type(
3315
- [
3316
- 'multipart/form-data',
3317
- 'application/x-www-form-urlencoded'
3318
- ]
3319
- )
3320
- )
3321
- if _default_content_type is not None:
3322
- _header_params['Content-Type'] = _default_content_type
3323
-
3324
- # authentication setting
3325
- _auth_settings: List[str] = [
3326
- 'json_header_remote_authentication',
3327
- 'basicAuth',
3328
- 'cookieAuth'
3329
- ]
3330
-
3331
- return self.api_client.param_serialize(
3332
- method='PUT',
3333
- resource_path='{upload_href}',
3334
- path_params=_path_params,
3335
- query_params=_query_params,
3336
- header_params=_header_params,
3337
- body=_body_params,
3338
- post_params=_form_params,
3339
- files=_files,
3340
- auth_settings=_auth_settings,
3341
- collection_formats=_collection_formats,
3342
- _host=_host,
3343
- _request_auth=_request_auth
3344
- )
3345
-
3346
-