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

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

Potentially problematic release.


This version of crc-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 +17 -17
  4. {crc_pulpcore_client-20250819.1.dist-info → crc_pulpcore_client-20250820.1.dist-info}/METADATA +1 -1
  5. crc_pulpcore_client-20250820.1.dist-info/RECORD +234 -0
  6. crc_pulpcore_client-20250820.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-20250820.1.dist-info}/WHEEL +0 -0
@@ -1,2269 +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, StrictBool, StrictInt, StrictStr, field_validator
21
- from typing import List, Optional
22
- from typing_extensions import Annotated
23
- from services-pulpcore-client.models.paginated_role_response_list import PaginatedRoleResponseList
24
- from services-pulpcore-client.models.patched_role import PatchedRole
25
- from services-pulpcore-client.models.role import Role
26
- from services-pulpcore-client.models.role_response import RoleResponse
27
-
28
- from services-pulpcore-client.api_client import ApiClient, RequestSerialized
29
- from services-pulpcore-client.api_response import ApiResponse
30
- from services-pulpcore-client.rest import RESTResponseType
31
-
32
-
33
- class RolesApi:
34
- """NOTE: This class is auto generated by OpenAPI Generator
35
- Ref: https://openapi-generator.tech
36
-
37
- Do not edit the class manually.
38
- """
39
-
40
- def __init__(self, api_client=None) -> None:
41
- if api_client is None:
42
- api_client = ApiClient.get_default()
43
- self.api_client = api_client
44
-
45
-
46
- @validate_call
47
- def create(
48
- self,
49
- role: Role,
50
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
51
- pulp_domain: StrictStr = "default",
52
- _request_timeout: Union[
53
- None,
54
- Annotated[StrictFloat, Field(gt=0)],
55
- Tuple[
56
- Annotated[StrictFloat, Field(gt=0)],
57
- Annotated[StrictFloat, Field(gt=0)]
58
- ]
59
- ] = None,
60
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
61
- _content_type: Optional[StrictStr] = None,
62
- _headers: Optional[Dict[StrictStr, Any]] = None,
63
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
64
- ) -> RoleResponse:
65
- """Create a role
66
-
67
- ViewSet for Role.
68
-
69
- :param pulp_domain: (required)
70
- :type pulp_domain: str
71
- :param role: (required)
72
- :type role: Role
73
- :param x_task_diagnostics: List of profilers to use on tasks.
74
- :type x_task_diagnostics: List[str]
75
- :param _request_timeout: timeout setting for this request. If one
76
- number provided, it will be total request
77
- timeout. It can also be a pair (tuple) of
78
- (connection, read) timeouts.
79
- :type _request_timeout: int, tuple(int, int), optional
80
- :param _request_auth: set to override the auth_settings for an a single
81
- request; this effectively ignores the
82
- authentication in the spec for a single request.
83
- :type _request_auth: dict, optional
84
- :param _content_type: force content-type for the request.
85
- :type _content_type: str, Optional
86
- :param _headers: set to override the headers for a single
87
- request; this effectively ignores the headers
88
- in the spec for a single request.
89
- :type _headers: dict, optional
90
- :param _host_index: set to override the host_index for a single
91
- request; this effectively ignores the host_index
92
- in the spec for a single request.
93
- :type _host_index: int, optional
94
- :return: Returns the result object.
95
- """ # noqa: E501
96
-
97
- _param = self._create_serialize(
98
- pulp_domain=pulp_domain,
99
- role=role,
100
- x_task_diagnostics=x_task_diagnostics,
101
- _request_auth=_request_auth,
102
- _content_type=_content_type,
103
- _headers=_headers,
104
- _host_index=_host_index
105
- )
106
-
107
- _response_types_map: Dict[str, Optional[str]] = {
108
- '201': "RoleResponse",
109
- }
110
- response_data = self.api_client.call_api(
111
- *_param,
112
- _request_timeout=_request_timeout
113
- )
114
- response_data.read()
115
- return self.api_client.response_deserialize(
116
- response_data=response_data,
117
- response_types_map=_response_types_map,
118
- ).data
119
-
120
-
121
- @validate_call
122
- def create_with_http_info(
123
- self,
124
- role: Role,
125
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
126
- pulp_domain: StrictStr = "default",
127
- _request_timeout: Union[
128
- None,
129
- Annotated[StrictFloat, Field(gt=0)],
130
- Tuple[
131
- Annotated[StrictFloat, Field(gt=0)],
132
- Annotated[StrictFloat, Field(gt=0)]
133
- ]
134
- ] = None,
135
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
136
- _content_type: Optional[StrictStr] = None,
137
- _headers: Optional[Dict[StrictStr, Any]] = None,
138
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
139
- ) -> ApiResponse[RoleResponse]:
140
- """Create a role
141
-
142
- ViewSet for Role.
143
-
144
- :param pulp_domain: (required)
145
- :type pulp_domain: str
146
- :param role: (required)
147
- :type role: Role
148
- :param x_task_diagnostics: List of profilers to use on tasks.
149
- :type x_task_diagnostics: List[str]
150
- :param _request_timeout: timeout setting for this request. If one
151
- number provided, it will be total request
152
- timeout. It can also be a pair (tuple) of
153
- (connection, read) timeouts.
154
- :type _request_timeout: int, tuple(int, int), optional
155
- :param _request_auth: set to override the auth_settings for an a single
156
- request; this effectively ignores the
157
- authentication in the spec for a single request.
158
- :type _request_auth: dict, optional
159
- :param _content_type: force content-type for the request.
160
- :type _content_type: str, Optional
161
- :param _headers: set to override the headers for a single
162
- request; this effectively ignores the headers
163
- in the spec for a single request.
164
- :type _headers: dict, optional
165
- :param _host_index: set to override the host_index for a single
166
- request; this effectively ignores the host_index
167
- in the spec for a single request.
168
- :type _host_index: int, optional
169
- :return: Returns the result object.
170
- """ # noqa: E501
171
-
172
- _param = self._create_serialize(
173
- pulp_domain=pulp_domain,
174
- role=role,
175
- x_task_diagnostics=x_task_diagnostics,
176
- _request_auth=_request_auth,
177
- _content_type=_content_type,
178
- _headers=_headers,
179
- _host_index=_host_index
180
- )
181
-
182
- _response_types_map: Dict[str, Optional[str]] = {
183
- '201': "RoleResponse",
184
- }
185
- response_data = self.api_client.call_api(
186
- *_param,
187
- _request_timeout=_request_timeout
188
- )
189
- response_data.read()
190
- return self.api_client.response_deserialize(
191
- response_data=response_data,
192
- response_types_map=_response_types_map,
193
- )
194
-
195
-
196
- @validate_call
197
- def create_without_preload_content(
198
- self,
199
- role: Role,
200
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
201
- pulp_domain: StrictStr = "default",
202
- _request_timeout: Union[
203
- None,
204
- Annotated[StrictFloat, Field(gt=0)],
205
- Tuple[
206
- Annotated[StrictFloat, Field(gt=0)],
207
- Annotated[StrictFloat, Field(gt=0)]
208
- ]
209
- ] = None,
210
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
211
- _content_type: Optional[StrictStr] = None,
212
- _headers: Optional[Dict[StrictStr, Any]] = None,
213
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
214
- ) -> RESTResponseType:
215
- """Create a role
216
-
217
- ViewSet for Role.
218
-
219
- :param pulp_domain: (required)
220
- :type pulp_domain: str
221
- :param role: (required)
222
- :type role: Role
223
- :param x_task_diagnostics: List of profilers to use on tasks.
224
- :type x_task_diagnostics: List[str]
225
- :param _request_timeout: timeout setting for this request. If one
226
- number provided, it will be total request
227
- timeout. It can also be a pair (tuple) of
228
- (connection, read) timeouts.
229
- :type _request_timeout: int, tuple(int, int), optional
230
- :param _request_auth: set to override the auth_settings for an a single
231
- request; this effectively ignores the
232
- authentication in the spec for a single request.
233
- :type _request_auth: dict, optional
234
- :param _content_type: force content-type for the request.
235
- :type _content_type: str, Optional
236
- :param _headers: set to override the headers for a single
237
- request; this effectively ignores the headers
238
- in the spec for a single request.
239
- :type _headers: dict, optional
240
- :param _host_index: set to override the host_index for a single
241
- request; this effectively ignores the host_index
242
- in the spec for a single request.
243
- :type _host_index: int, optional
244
- :return: Returns the result object.
245
- """ # noqa: E501
246
-
247
- _param = self._create_serialize(
248
- pulp_domain=pulp_domain,
249
- role=role,
250
- x_task_diagnostics=x_task_diagnostics,
251
- _request_auth=_request_auth,
252
- _content_type=_content_type,
253
- _headers=_headers,
254
- _host_index=_host_index
255
- )
256
-
257
- _response_types_map: Dict[str, Optional[str]] = {
258
- '201': "RoleResponse",
259
- }
260
- response_data = self.api_client.call_api(
261
- *_param,
262
- _request_timeout=_request_timeout
263
- )
264
- return response_data.response
265
-
266
-
267
- def _create_serialize(
268
- self,
269
- pulp_domain,
270
- role,
271
- x_task_diagnostics,
272
- _request_auth,
273
- _content_type,
274
- _headers,
275
- _host_index,
276
- ) -> RequestSerialized:
277
-
278
- _host = None
279
-
280
- _collection_formats: Dict[str, str] = {
281
- 'X-Task-Diagnostics': 'csv',
282
- }
283
-
284
- _path_params: Dict[str, str] = {}
285
- _query_params: List[Tuple[str, str]] = []
286
- _header_params: Dict[str, Optional[str]] = _headers or {}
287
- _form_params: List[Tuple[str, str]] = []
288
- _files: Dict[
289
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
290
- ] = {}
291
- _body_params: Optional[bytes] = None
292
-
293
- # process the path parameters
294
- if pulp_domain is not None:
295
- _path_params['pulp_domain'] = pulp_domain
296
- # process the query parameters
297
- # process the header parameters
298
- if x_task_diagnostics is not None:
299
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
300
- # process the form parameters
301
- # process the body parameter
302
- if role is not None:
303
- _body_params = role
304
-
305
-
306
- # set the HTTP header `Accept`
307
- if 'Accept' not in _header_params:
308
- _header_params['Accept'] = self.api_client.select_header_accept(
309
- [
310
- 'application/json'
311
- ]
312
- )
313
-
314
- # set the HTTP header `Content-Type`
315
- if _content_type:
316
- _header_params['Content-Type'] = _content_type
317
- else:
318
- _default_content_type = (
319
- self.api_client.select_header_content_type(
320
- [
321
- 'application/json',
322
- 'application/x-www-form-urlencoded',
323
- 'multipart/form-data'
324
- ]
325
- )
326
- )
327
- if _default_content_type is not None:
328
- _header_params['Content-Type'] = _default_content_type
329
-
330
- # authentication setting
331
- _auth_settings: List[str] = [
332
- 'json_header_remote_authentication',
333
- 'basicAuth',
334
- 'cookieAuth'
335
- ]
336
-
337
- return self.api_client.param_serialize(
338
- method='POST',
339
- resource_path='/api/pulp/{pulp_domain}/api/v3/roles/',
340
- path_params=_path_params,
341
- query_params=_query_params,
342
- header_params=_header_params,
343
- body=_body_params,
344
- post_params=_form_params,
345
- files=_files,
346
- auth_settings=_auth_settings,
347
- collection_formats=_collection_formats,
348
- _host=_host,
349
- _request_auth=_request_auth
350
- )
351
-
352
-
353
-
354
-
355
- @validate_call
356
- def delete(
357
- self,
358
- role_href: StrictStr,
359
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
360
- _request_timeout: Union[
361
- None,
362
- Annotated[StrictFloat, Field(gt=0)],
363
- Tuple[
364
- Annotated[StrictFloat, Field(gt=0)],
365
- Annotated[StrictFloat, Field(gt=0)]
366
- ]
367
- ] = None,
368
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
369
- _content_type: Optional[StrictStr] = None,
370
- _headers: Optional[Dict[StrictStr, Any]] = None,
371
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
372
- ) -> None:
373
- """Delete a role
374
-
375
- ViewSet for Role.
376
-
377
- :param role_href: (required)
378
- :type role_href: str
379
- :param x_task_diagnostics: List of profilers to use on tasks.
380
- :type x_task_diagnostics: List[str]
381
- :param _request_timeout: timeout setting for this request. If one
382
- number provided, it will be total request
383
- timeout. It can also be a pair (tuple) of
384
- (connection, read) timeouts.
385
- :type _request_timeout: int, tuple(int, int), optional
386
- :param _request_auth: set to override the auth_settings for an a single
387
- request; this effectively ignores the
388
- authentication in the spec for a single request.
389
- :type _request_auth: dict, optional
390
- :param _content_type: force content-type for the request.
391
- :type _content_type: str, Optional
392
- :param _headers: set to override the headers for a single
393
- request; this effectively ignores the headers
394
- in the spec for a single request.
395
- :type _headers: dict, optional
396
- :param _host_index: set to override the host_index for a single
397
- request; this effectively ignores the host_index
398
- in the spec for a single request.
399
- :type _host_index: int, optional
400
- :return: Returns the result object.
401
- """ # noqa: E501
402
-
403
- _param = self._delete_serialize(
404
- role_href=role_href,
405
- x_task_diagnostics=x_task_diagnostics,
406
- _request_auth=_request_auth,
407
- _content_type=_content_type,
408
- _headers=_headers,
409
- _host_index=_host_index
410
- )
411
-
412
- _response_types_map: Dict[str, Optional[str]] = {
413
- '204': None,
414
- }
415
- response_data = self.api_client.call_api(
416
- *_param,
417
- _request_timeout=_request_timeout
418
- )
419
- response_data.read()
420
- return self.api_client.response_deserialize(
421
- response_data=response_data,
422
- response_types_map=_response_types_map,
423
- ).data
424
-
425
-
426
- @validate_call
427
- def delete_with_http_info(
428
- self,
429
- role_href: StrictStr,
430
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
431
- _request_timeout: Union[
432
- None,
433
- Annotated[StrictFloat, Field(gt=0)],
434
- Tuple[
435
- Annotated[StrictFloat, Field(gt=0)],
436
- Annotated[StrictFloat, Field(gt=0)]
437
- ]
438
- ] = None,
439
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
440
- _content_type: Optional[StrictStr] = None,
441
- _headers: Optional[Dict[StrictStr, Any]] = None,
442
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
443
- ) -> ApiResponse[None]:
444
- """Delete a role
445
-
446
- ViewSet for Role.
447
-
448
- :param role_href: (required)
449
- :type role_href: str
450
- :param x_task_diagnostics: List of profilers to use on tasks.
451
- :type x_task_diagnostics: List[str]
452
- :param _request_timeout: timeout setting for this request. If one
453
- number provided, it will be total request
454
- timeout. It can also be a pair (tuple) of
455
- (connection, read) timeouts.
456
- :type _request_timeout: int, tuple(int, int), optional
457
- :param _request_auth: set to override the auth_settings for an a single
458
- request; this effectively ignores the
459
- authentication in the spec for a single request.
460
- :type _request_auth: dict, optional
461
- :param _content_type: force content-type for the request.
462
- :type _content_type: str, Optional
463
- :param _headers: set to override the headers for a single
464
- request; this effectively ignores the headers
465
- in the spec for a single request.
466
- :type _headers: dict, optional
467
- :param _host_index: set to override the host_index for a single
468
- request; this effectively ignores the host_index
469
- in the spec for a single request.
470
- :type _host_index: int, optional
471
- :return: Returns the result object.
472
- """ # noqa: E501
473
-
474
- _param = self._delete_serialize(
475
- role_href=role_href,
476
- x_task_diagnostics=x_task_diagnostics,
477
- _request_auth=_request_auth,
478
- _content_type=_content_type,
479
- _headers=_headers,
480
- _host_index=_host_index
481
- )
482
-
483
- _response_types_map: Dict[str, Optional[str]] = {
484
- '204': None,
485
- }
486
- response_data = self.api_client.call_api(
487
- *_param,
488
- _request_timeout=_request_timeout
489
- )
490
- response_data.read()
491
- return self.api_client.response_deserialize(
492
- response_data=response_data,
493
- response_types_map=_response_types_map,
494
- )
495
-
496
-
497
- @validate_call
498
- def delete_without_preload_content(
499
- self,
500
- role_href: StrictStr,
501
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
502
- _request_timeout: Union[
503
- None,
504
- Annotated[StrictFloat, Field(gt=0)],
505
- Tuple[
506
- Annotated[StrictFloat, Field(gt=0)],
507
- Annotated[StrictFloat, Field(gt=0)]
508
- ]
509
- ] = None,
510
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
511
- _content_type: Optional[StrictStr] = None,
512
- _headers: Optional[Dict[StrictStr, Any]] = None,
513
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
514
- ) -> RESTResponseType:
515
- """Delete a role
516
-
517
- ViewSet for Role.
518
-
519
- :param role_href: (required)
520
- :type role_href: str
521
- :param x_task_diagnostics: List of profilers to use on tasks.
522
- :type x_task_diagnostics: List[str]
523
- :param _request_timeout: timeout setting for this request. If one
524
- number provided, it will be total request
525
- timeout. It can also be a pair (tuple) of
526
- (connection, read) timeouts.
527
- :type _request_timeout: int, tuple(int, int), optional
528
- :param _request_auth: set to override the auth_settings for an a single
529
- request; this effectively ignores the
530
- authentication in the spec for a single request.
531
- :type _request_auth: dict, optional
532
- :param _content_type: force content-type for the request.
533
- :type _content_type: str, Optional
534
- :param _headers: set to override the headers for a single
535
- request; this effectively ignores the headers
536
- in the spec for a single request.
537
- :type _headers: dict, optional
538
- :param _host_index: set to override the host_index for a single
539
- request; this effectively ignores the host_index
540
- in the spec for a single request.
541
- :type _host_index: int, optional
542
- :return: Returns the result object.
543
- """ # noqa: E501
544
-
545
- _param = self._delete_serialize(
546
- role_href=role_href,
547
- x_task_diagnostics=x_task_diagnostics,
548
- _request_auth=_request_auth,
549
- _content_type=_content_type,
550
- _headers=_headers,
551
- _host_index=_host_index
552
- )
553
-
554
- _response_types_map: Dict[str, Optional[str]] = {
555
- '204': None,
556
- }
557
- response_data = self.api_client.call_api(
558
- *_param,
559
- _request_timeout=_request_timeout
560
- )
561
- return response_data.response
562
-
563
-
564
- def _delete_serialize(
565
- self,
566
- role_href,
567
- x_task_diagnostics,
568
- _request_auth,
569
- _content_type,
570
- _headers,
571
- _host_index,
572
- ) -> RequestSerialized:
573
-
574
- _host = None
575
-
576
- _collection_formats: Dict[str, str] = {
577
- 'X-Task-Diagnostics': 'csv',
578
- }
579
-
580
- _path_params: Dict[str, str] = {}
581
- _query_params: List[Tuple[str, str]] = []
582
- _header_params: Dict[str, Optional[str]] = _headers or {}
583
- _form_params: List[Tuple[str, str]] = []
584
- _files: Dict[
585
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
586
- ] = {}
587
- _body_params: Optional[bytes] = None
588
-
589
- # process the path parameters
590
- if role_href is not None:
591
- _path_params['role_href'] = role_href
592
- # process the query parameters
593
- # process the header parameters
594
- if x_task_diagnostics is not None:
595
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
596
- # process the form parameters
597
- # process the body parameter
598
-
599
-
600
-
601
-
602
- # authentication setting
603
- _auth_settings: List[str] = [
604
- 'json_header_remote_authentication',
605
- 'basicAuth',
606
- 'cookieAuth'
607
- ]
608
-
609
- return self.api_client.param_serialize(
610
- method='DELETE',
611
- resource_path='{role_href}',
612
- path_params=_path_params,
613
- query_params=_query_params,
614
- header_params=_header_params,
615
- body=_body_params,
616
- post_params=_form_params,
617
- files=_files,
618
- auth_settings=_auth_settings,
619
- collection_formats=_collection_formats,
620
- _host=_host,
621
- _request_auth=_request_auth
622
- )
623
-
624
-
625
-
626
-
627
- @validate_call
628
- def list(
629
- self,
630
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
631
- contains_permission: Annotated[Optional[List[StrictStr]], Field(description="Filter roles that have any of the permissions in the list.")] = None,
632
- description: Annotated[Optional[StrictStr], Field(description="Filter results where description matches value")] = None,
633
- description__contains: Annotated[Optional[StrictStr], Field(description="Filter results where description contains value")] = None,
634
- description__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where description contains value")] = None,
635
- description__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where description matches value")] = None,
636
- for_object_type: Annotated[Optional[StrictStr], Field(description="Filter roles that only have permissions for the specified object HREF.")] = None,
637
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
638
- locked: Annotated[Optional[StrictBool], Field(description="Filter results where locked matches value")] = None,
639
- name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
640
- name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
641
- name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
642
- name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
643
- name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
644
- name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
645
- name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
646
- name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
647
- name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
648
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
649
- 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) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `locked` - Locked * `-locked` - Locked (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
650
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
651
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
652
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
653
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
654
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
655
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
656
- pulp_domain: StrictStr = "default",
657
- _request_timeout: Union[
658
- None,
659
- Annotated[StrictFloat, Field(gt=0)],
660
- Tuple[
661
- Annotated[StrictFloat, Field(gt=0)],
662
- Annotated[StrictFloat, Field(gt=0)]
663
- ]
664
- ] = None,
665
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
666
- _content_type: Optional[StrictStr] = None,
667
- _headers: Optional[Dict[StrictStr, Any]] = None,
668
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
669
- ) -> PaginatedRoleResponseList:
670
- """List roles
671
-
672
- ViewSet for Role.
673
-
674
- :param pulp_domain: (required)
675
- :type pulp_domain: str
676
- :param x_task_diagnostics: List of profilers to use on tasks.
677
- :type x_task_diagnostics: List[str]
678
- :param contains_permission: Filter roles that have any of the permissions in the list.
679
- :type contains_permission: List[str]
680
- :param description: Filter results where description matches value
681
- :type description: str
682
- :param description__contains: Filter results where description contains value
683
- :type description__contains: str
684
- :param description__icontains: Filter results where description contains value
685
- :type description__icontains: str
686
- :param description__iexact: Filter results where description matches value
687
- :type description__iexact: str
688
- :param for_object_type: Filter roles that only have permissions for the specified object HREF.
689
- :type for_object_type: str
690
- :param limit: Number of results to return per page.
691
- :type limit: int
692
- :param locked: Filter results where locked matches value
693
- :type locked: bool
694
- :param name: Filter results where name matches value
695
- :type name: str
696
- :param name__contains: Filter results where name contains value
697
- :type name__contains: str
698
- :param name__icontains: Filter results where name contains value
699
- :type name__icontains: str
700
- :param name__iexact: Filter results where name matches value
701
- :type name__iexact: str
702
- :param name__in: Filter results where name is in a comma-separated list of values
703
- :type name__in: List[str]
704
- :param name__iregex: Filter results where name matches regex value
705
- :type name__iregex: str
706
- :param name__istartswith: Filter results where name starts with value
707
- :type name__istartswith: str
708
- :param name__regex: Filter results where name matches regex value
709
- :type name__regex: str
710
- :param name__startswith: Filter results where name starts with value
711
- :type name__startswith: str
712
- :param offset: The initial index from which to return the results.
713
- :type offset: int
714
- :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) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `locked` - Locked * `-locked` - Locked (descending) * `pk` - Pk * `-pk` - Pk (descending)
715
- :type ordering: List[str]
716
- :param prn__in: Multiple values may be separated by commas.
717
- :type prn__in: List[str]
718
- :param pulp_href__in: Multiple values may be separated by commas.
719
- :type pulp_href__in: List[str]
720
- :param pulp_id__in: Multiple values may be separated by commas.
721
- :type pulp_id__in: List[str]
722
- :param q: Filter results by using NOT, AND and OR operations on other filters
723
- :type q: str
724
- :param fields: A list of fields to include in the response.
725
- :type fields: List[str]
726
- :param exclude_fields: A list of fields to exclude from the response.
727
- :type exclude_fields: List[str]
728
- :param _request_timeout: timeout setting for this request. If one
729
- number provided, it will be total request
730
- timeout. It can also be a pair (tuple) of
731
- (connection, read) timeouts.
732
- :type _request_timeout: int, tuple(int, int), optional
733
- :param _request_auth: set to override the auth_settings for an a single
734
- request; this effectively ignores the
735
- authentication in the spec for a single request.
736
- :type _request_auth: dict, optional
737
- :param _content_type: force content-type for the request.
738
- :type _content_type: str, Optional
739
- :param _headers: set to override the headers for a single
740
- request; this effectively ignores the headers
741
- in the spec for a single request.
742
- :type _headers: dict, optional
743
- :param _host_index: set to override the host_index for a single
744
- request; this effectively ignores the host_index
745
- in the spec for a single request.
746
- :type _host_index: int, optional
747
- :return: Returns the result object.
748
- """ # noqa: E501
749
-
750
- _param = self._list_serialize(
751
- pulp_domain=pulp_domain,
752
- x_task_diagnostics=x_task_diagnostics,
753
- contains_permission=contains_permission,
754
- description=description,
755
- description__contains=description__contains,
756
- description__icontains=description__icontains,
757
- description__iexact=description__iexact,
758
- for_object_type=for_object_type,
759
- limit=limit,
760
- locked=locked,
761
- name=name,
762
- name__contains=name__contains,
763
- name__icontains=name__icontains,
764
- name__iexact=name__iexact,
765
- name__in=name__in,
766
- name__iregex=name__iregex,
767
- name__istartswith=name__istartswith,
768
- name__regex=name__regex,
769
- name__startswith=name__startswith,
770
- offset=offset,
771
- ordering=ordering,
772
- prn__in=prn__in,
773
- pulp_href__in=pulp_href__in,
774
- pulp_id__in=pulp_id__in,
775
- q=q,
776
- fields=fields,
777
- exclude_fields=exclude_fields,
778
- _request_auth=_request_auth,
779
- _content_type=_content_type,
780
- _headers=_headers,
781
- _host_index=_host_index
782
- )
783
-
784
- _response_types_map: Dict[str, Optional[str]] = {
785
- '200': "PaginatedRoleResponseList",
786
- }
787
- response_data = self.api_client.call_api(
788
- *_param,
789
- _request_timeout=_request_timeout
790
- )
791
- response_data.read()
792
- return self.api_client.response_deserialize(
793
- response_data=response_data,
794
- response_types_map=_response_types_map,
795
- ).data
796
-
797
-
798
- @validate_call
799
- def list_with_http_info(
800
- self,
801
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
802
- contains_permission: Annotated[Optional[List[StrictStr]], Field(description="Filter roles that have any of the permissions in the list.")] = None,
803
- description: Annotated[Optional[StrictStr], Field(description="Filter results where description matches value")] = None,
804
- description__contains: Annotated[Optional[StrictStr], Field(description="Filter results where description contains value")] = None,
805
- description__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where description contains value")] = None,
806
- description__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where description matches value")] = None,
807
- for_object_type: Annotated[Optional[StrictStr], Field(description="Filter roles that only have permissions for the specified object HREF.")] = None,
808
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
809
- locked: Annotated[Optional[StrictBool], Field(description="Filter results where locked matches value")] = None,
810
- name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
811
- name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
812
- name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
813
- name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
814
- name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
815
- name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
816
- name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
817
- name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
818
- name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
819
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
820
- 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) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `locked` - Locked * `-locked` - Locked (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
821
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
822
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
823
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
824
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
825
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
826
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
827
- pulp_domain: StrictStr = "default",
828
- _request_timeout: Union[
829
- None,
830
- Annotated[StrictFloat, Field(gt=0)],
831
- Tuple[
832
- Annotated[StrictFloat, Field(gt=0)],
833
- Annotated[StrictFloat, Field(gt=0)]
834
- ]
835
- ] = None,
836
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
837
- _content_type: Optional[StrictStr] = None,
838
- _headers: Optional[Dict[StrictStr, Any]] = None,
839
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
840
- ) -> ApiResponse[PaginatedRoleResponseList]:
841
- """List roles
842
-
843
- ViewSet for Role.
844
-
845
- :param pulp_domain: (required)
846
- :type pulp_domain: str
847
- :param x_task_diagnostics: List of profilers to use on tasks.
848
- :type x_task_diagnostics: List[str]
849
- :param contains_permission: Filter roles that have any of the permissions in the list.
850
- :type contains_permission: List[str]
851
- :param description: Filter results where description matches value
852
- :type description: str
853
- :param description__contains: Filter results where description contains value
854
- :type description__contains: str
855
- :param description__icontains: Filter results where description contains value
856
- :type description__icontains: str
857
- :param description__iexact: Filter results where description matches value
858
- :type description__iexact: str
859
- :param for_object_type: Filter roles that only have permissions for the specified object HREF.
860
- :type for_object_type: str
861
- :param limit: Number of results to return per page.
862
- :type limit: int
863
- :param locked: Filter results where locked matches value
864
- :type locked: bool
865
- :param name: Filter results where name matches value
866
- :type name: str
867
- :param name__contains: Filter results where name contains value
868
- :type name__contains: str
869
- :param name__icontains: Filter results where name contains value
870
- :type name__icontains: str
871
- :param name__iexact: Filter results where name matches value
872
- :type name__iexact: str
873
- :param name__in: Filter results where name is in a comma-separated list of values
874
- :type name__in: List[str]
875
- :param name__iregex: Filter results where name matches regex value
876
- :type name__iregex: str
877
- :param name__istartswith: Filter results where name starts with value
878
- :type name__istartswith: str
879
- :param name__regex: Filter results where name matches regex value
880
- :type name__regex: str
881
- :param name__startswith: Filter results where name starts with value
882
- :type name__startswith: str
883
- :param offset: The initial index from which to return the results.
884
- :type offset: int
885
- :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) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `locked` - Locked * `-locked` - Locked (descending) * `pk` - Pk * `-pk` - Pk (descending)
886
- :type ordering: List[str]
887
- :param prn__in: Multiple values may be separated by commas.
888
- :type prn__in: List[str]
889
- :param pulp_href__in: Multiple values may be separated by commas.
890
- :type pulp_href__in: List[str]
891
- :param pulp_id__in: Multiple values may be separated by commas.
892
- :type pulp_id__in: List[str]
893
- :param q: Filter results by using NOT, AND and OR operations on other filters
894
- :type q: str
895
- :param fields: A list of fields to include in the response.
896
- :type fields: List[str]
897
- :param exclude_fields: A list of fields to exclude from the response.
898
- :type exclude_fields: List[str]
899
- :param _request_timeout: timeout setting for this request. If one
900
- number provided, it will be total request
901
- timeout. It can also be a pair (tuple) of
902
- (connection, read) timeouts.
903
- :type _request_timeout: int, tuple(int, int), optional
904
- :param _request_auth: set to override the auth_settings for an a single
905
- request; this effectively ignores the
906
- authentication in the spec for a single request.
907
- :type _request_auth: dict, optional
908
- :param _content_type: force content-type for the request.
909
- :type _content_type: str, Optional
910
- :param _headers: set to override the headers for a single
911
- request; this effectively ignores the headers
912
- in the spec for a single request.
913
- :type _headers: dict, optional
914
- :param _host_index: set to override the host_index for a single
915
- request; this effectively ignores the host_index
916
- in the spec for a single request.
917
- :type _host_index: int, optional
918
- :return: Returns the result object.
919
- """ # noqa: E501
920
-
921
- _param = self._list_serialize(
922
- pulp_domain=pulp_domain,
923
- x_task_diagnostics=x_task_diagnostics,
924
- contains_permission=contains_permission,
925
- description=description,
926
- description__contains=description__contains,
927
- description__icontains=description__icontains,
928
- description__iexact=description__iexact,
929
- for_object_type=for_object_type,
930
- limit=limit,
931
- locked=locked,
932
- name=name,
933
- name__contains=name__contains,
934
- name__icontains=name__icontains,
935
- name__iexact=name__iexact,
936
- name__in=name__in,
937
- name__iregex=name__iregex,
938
- name__istartswith=name__istartswith,
939
- name__regex=name__regex,
940
- name__startswith=name__startswith,
941
- offset=offset,
942
- ordering=ordering,
943
- prn__in=prn__in,
944
- pulp_href__in=pulp_href__in,
945
- pulp_id__in=pulp_id__in,
946
- q=q,
947
- fields=fields,
948
- exclude_fields=exclude_fields,
949
- _request_auth=_request_auth,
950
- _content_type=_content_type,
951
- _headers=_headers,
952
- _host_index=_host_index
953
- )
954
-
955
- _response_types_map: Dict[str, Optional[str]] = {
956
- '200': "PaginatedRoleResponseList",
957
- }
958
- response_data = self.api_client.call_api(
959
- *_param,
960
- _request_timeout=_request_timeout
961
- )
962
- response_data.read()
963
- return self.api_client.response_deserialize(
964
- response_data=response_data,
965
- response_types_map=_response_types_map,
966
- )
967
-
968
-
969
- @validate_call
970
- def list_without_preload_content(
971
- self,
972
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
973
- contains_permission: Annotated[Optional[List[StrictStr]], Field(description="Filter roles that have any of the permissions in the list.")] = None,
974
- description: Annotated[Optional[StrictStr], Field(description="Filter results where description matches value")] = None,
975
- description__contains: Annotated[Optional[StrictStr], Field(description="Filter results where description contains value")] = None,
976
- description__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where description contains value")] = None,
977
- description__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where description matches value")] = None,
978
- for_object_type: Annotated[Optional[StrictStr], Field(description="Filter roles that only have permissions for the specified object HREF.")] = None,
979
- limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
980
- locked: Annotated[Optional[StrictBool], Field(description="Filter results where locked matches value")] = None,
981
- name: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
982
- name__contains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
983
- name__icontains: Annotated[Optional[StrictStr], Field(description="Filter results where name contains value")] = None,
984
- name__iexact: Annotated[Optional[StrictStr], Field(description="Filter results where name matches value")] = None,
985
- name__in: Annotated[Optional[List[StrictStr]], Field(description="Filter results where name is in a comma-separated list of values")] = None,
986
- name__iregex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
987
- name__istartswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
988
- name__regex: Annotated[Optional[StrictStr], Field(description="Filter results where name matches regex value")] = None,
989
- name__startswith: Annotated[Optional[StrictStr], Field(description="Filter results where name starts with value")] = None,
990
- offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
991
- 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) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `locked` - Locked * `-locked` - Locked (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
992
- prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
993
- pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
994
- pulp_id__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
995
- q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
996
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
997
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
998
- pulp_domain: StrictStr = "default",
999
- _request_timeout: Union[
1000
- None,
1001
- Annotated[StrictFloat, Field(gt=0)],
1002
- Tuple[
1003
- Annotated[StrictFloat, Field(gt=0)],
1004
- Annotated[StrictFloat, Field(gt=0)]
1005
- ]
1006
- ] = None,
1007
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1008
- _content_type: Optional[StrictStr] = None,
1009
- _headers: Optional[Dict[StrictStr, Any]] = None,
1010
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1011
- ) -> RESTResponseType:
1012
- """List roles
1013
-
1014
- ViewSet for Role.
1015
-
1016
- :param pulp_domain: (required)
1017
- :type pulp_domain: str
1018
- :param x_task_diagnostics: List of profilers to use on tasks.
1019
- :type x_task_diagnostics: List[str]
1020
- :param contains_permission: Filter roles that have any of the permissions in the list.
1021
- :type contains_permission: List[str]
1022
- :param description: Filter results where description matches value
1023
- :type description: str
1024
- :param description__contains: Filter results where description contains value
1025
- :type description__contains: str
1026
- :param description__icontains: Filter results where description contains value
1027
- :type description__icontains: str
1028
- :param description__iexact: Filter results where description matches value
1029
- :type description__iexact: str
1030
- :param for_object_type: Filter roles that only have permissions for the specified object HREF.
1031
- :type for_object_type: str
1032
- :param limit: Number of results to return per page.
1033
- :type limit: int
1034
- :param locked: Filter results where locked matches value
1035
- :type locked: bool
1036
- :param name: Filter results where name matches value
1037
- :type name: str
1038
- :param name__contains: Filter results where name contains value
1039
- :type name__contains: str
1040
- :param name__icontains: Filter results where name contains value
1041
- :type name__icontains: str
1042
- :param name__iexact: Filter results where name matches value
1043
- :type name__iexact: str
1044
- :param name__in: Filter results where name is in a comma-separated list of values
1045
- :type name__in: List[str]
1046
- :param name__iregex: Filter results where name matches regex value
1047
- :type name__iregex: str
1048
- :param name__istartswith: Filter results where name starts with value
1049
- :type name__istartswith: str
1050
- :param name__regex: Filter results where name matches regex value
1051
- :type name__regex: str
1052
- :param name__startswith: Filter results where name starts with value
1053
- :type name__startswith: str
1054
- :param offset: The initial index from which to return the results.
1055
- :type offset: int
1056
- :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) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `locked` - Locked * `-locked` - Locked (descending) * `pk` - Pk * `-pk` - Pk (descending)
1057
- :type ordering: List[str]
1058
- :param prn__in: Multiple values may be separated by commas.
1059
- :type prn__in: List[str]
1060
- :param pulp_href__in: Multiple values may be separated by commas.
1061
- :type pulp_href__in: List[str]
1062
- :param pulp_id__in: Multiple values may be separated by commas.
1063
- :type pulp_id__in: List[str]
1064
- :param q: Filter results by using NOT, AND and OR operations on other filters
1065
- :type q: str
1066
- :param fields: A list of fields to include in the response.
1067
- :type fields: List[str]
1068
- :param exclude_fields: A list of fields to exclude from the response.
1069
- :type exclude_fields: List[str]
1070
- :param _request_timeout: timeout setting for this request. If one
1071
- number provided, it will be total request
1072
- timeout. It can also be a pair (tuple) of
1073
- (connection, read) timeouts.
1074
- :type _request_timeout: int, tuple(int, int), optional
1075
- :param _request_auth: set to override the auth_settings for an a single
1076
- request; this effectively ignores the
1077
- authentication in the spec for a single request.
1078
- :type _request_auth: dict, optional
1079
- :param _content_type: force content-type for the request.
1080
- :type _content_type: str, Optional
1081
- :param _headers: set to override the headers for a single
1082
- request; this effectively ignores the headers
1083
- in the spec for a single request.
1084
- :type _headers: dict, optional
1085
- :param _host_index: set to override the host_index for a single
1086
- request; this effectively ignores the host_index
1087
- in the spec for a single request.
1088
- :type _host_index: int, optional
1089
- :return: Returns the result object.
1090
- """ # noqa: E501
1091
-
1092
- _param = self._list_serialize(
1093
- pulp_domain=pulp_domain,
1094
- x_task_diagnostics=x_task_diagnostics,
1095
- contains_permission=contains_permission,
1096
- description=description,
1097
- description__contains=description__contains,
1098
- description__icontains=description__icontains,
1099
- description__iexact=description__iexact,
1100
- for_object_type=for_object_type,
1101
- limit=limit,
1102
- locked=locked,
1103
- name=name,
1104
- name__contains=name__contains,
1105
- name__icontains=name__icontains,
1106
- name__iexact=name__iexact,
1107
- name__in=name__in,
1108
- name__iregex=name__iregex,
1109
- name__istartswith=name__istartswith,
1110
- name__regex=name__regex,
1111
- name__startswith=name__startswith,
1112
- offset=offset,
1113
- ordering=ordering,
1114
- prn__in=prn__in,
1115
- pulp_href__in=pulp_href__in,
1116
- pulp_id__in=pulp_id__in,
1117
- q=q,
1118
- fields=fields,
1119
- exclude_fields=exclude_fields,
1120
- _request_auth=_request_auth,
1121
- _content_type=_content_type,
1122
- _headers=_headers,
1123
- _host_index=_host_index
1124
- )
1125
-
1126
- _response_types_map: Dict[str, Optional[str]] = {
1127
- '200': "PaginatedRoleResponseList",
1128
- }
1129
- response_data = self.api_client.call_api(
1130
- *_param,
1131
- _request_timeout=_request_timeout
1132
- )
1133
- return response_data.response
1134
-
1135
-
1136
- def _list_serialize(
1137
- self,
1138
- pulp_domain,
1139
- x_task_diagnostics,
1140
- contains_permission,
1141
- description,
1142
- description__contains,
1143
- description__icontains,
1144
- description__iexact,
1145
- for_object_type,
1146
- limit,
1147
- locked,
1148
- name,
1149
- name__contains,
1150
- name__icontains,
1151
- name__iexact,
1152
- name__in,
1153
- name__iregex,
1154
- name__istartswith,
1155
- name__regex,
1156
- name__startswith,
1157
- offset,
1158
- ordering,
1159
- prn__in,
1160
- pulp_href__in,
1161
- pulp_id__in,
1162
- q,
1163
- fields,
1164
- exclude_fields,
1165
- _request_auth,
1166
- _content_type,
1167
- _headers,
1168
- _host_index,
1169
- ) -> RequestSerialized:
1170
-
1171
- _host = None
1172
-
1173
- _collection_formats: Dict[str, str] = {
1174
- 'X-Task-Diagnostics': 'csv',
1175
- 'contains_permission': 'multi',
1176
- 'name__in': 'csv',
1177
- 'ordering': 'csv',
1178
- 'prn__in': 'csv',
1179
- 'pulp_href__in': 'csv',
1180
- 'pulp_id__in': 'csv',
1181
- 'fields': 'multi',
1182
- 'exclude_fields': 'multi',
1183
- }
1184
-
1185
- _path_params: Dict[str, str] = {}
1186
- _query_params: List[Tuple[str, str]] = []
1187
- _header_params: Dict[str, Optional[str]] = _headers or {}
1188
- _form_params: List[Tuple[str, str]] = []
1189
- _files: Dict[
1190
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1191
- ] = {}
1192
- _body_params: Optional[bytes] = None
1193
-
1194
- # process the path parameters
1195
- if pulp_domain is not None:
1196
- _path_params['pulp_domain'] = pulp_domain
1197
- # process the query parameters
1198
- if contains_permission is not None:
1199
-
1200
- _query_params.append(('contains_permission', contains_permission))
1201
-
1202
- if description is not None:
1203
-
1204
- _query_params.append(('description', description))
1205
-
1206
- if description__contains is not None:
1207
-
1208
- _query_params.append(('description__contains', description__contains))
1209
-
1210
- if description__icontains is not None:
1211
-
1212
- _query_params.append(('description__icontains', description__icontains))
1213
-
1214
- if description__iexact is not None:
1215
-
1216
- _query_params.append(('description__iexact', description__iexact))
1217
-
1218
- if for_object_type is not None:
1219
-
1220
- _query_params.append(('for_object_type', for_object_type))
1221
-
1222
- if limit is not None:
1223
-
1224
- _query_params.append(('limit', limit))
1225
-
1226
- if locked is not None:
1227
-
1228
- _query_params.append(('locked', locked))
1229
-
1230
- if name is not None:
1231
-
1232
- _query_params.append(('name', name))
1233
-
1234
- if name__contains is not None:
1235
-
1236
- _query_params.append(('name__contains', name__contains))
1237
-
1238
- if name__icontains is not None:
1239
-
1240
- _query_params.append(('name__icontains', name__icontains))
1241
-
1242
- if name__iexact is not None:
1243
-
1244
- _query_params.append(('name__iexact', name__iexact))
1245
-
1246
- if name__in is not None:
1247
-
1248
- _query_params.append(('name__in', name__in))
1249
-
1250
- if name__iregex is not None:
1251
-
1252
- _query_params.append(('name__iregex', name__iregex))
1253
-
1254
- if name__istartswith is not None:
1255
-
1256
- _query_params.append(('name__istartswith', name__istartswith))
1257
-
1258
- if name__regex is not None:
1259
-
1260
- _query_params.append(('name__regex', name__regex))
1261
-
1262
- if name__startswith is not None:
1263
-
1264
- _query_params.append(('name__startswith', name__startswith))
1265
-
1266
- if offset is not None:
1267
-
1268
- _query_params.append(('offset', offset))
1269
-
1270
- if ordering is not None:
1271
-
1272
- _query_params.append(('ordering', ordering))
1273
-
1274
- if prn__in is not None:
1275
-
1276
- _query_params.append(('prn__in', prn__in))
1277
-
1278
- if pulp_href__in is not None:
1279
-
1280
- _query_params.append(('pulp_href__in', pulp_href__in))
1281
-
1282
- if pulp_id__in is not None:
1283
-
1284
- _query_params.append(('pulp_id__in', pulp_id__in))
1285
-
1286
- if q is not None:
1287
-
1288
- _query_params.append(('q', q))
1289
-
1290
- if fields is not None:
1291
-
1292
- _query_params.append(('fields', fields))
1293
-
1294
- if exclude_fields is not None:
1295
-
1296
- _query_params.append(('exclude_fields', exclude_fields))
1297
-
1298
- # process the header parameters
1299
- if x_task_diagnostics is not None:
1300
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1301
- # process the form parameters
1302
- # process the body parameter
1303
-
1304
-
1305
- # set the HTTP header `Accept`
1306
- if 'Accept' not in _header_params:
1307
- _header_params['Accept'] = self.api_client.select_header_accept(
1308
- [
1309
- 'application/json'
1310
- ]
1311
- )
1312
-
1313
-
1314
- # authentication setting
1315
- _auth_settings: List[str] = [
1316
- 'json_header_remote_authentication',
1317
- 'basicAuth',
1318
- 'cookieAuth'
1319
- ]
1320
-
1321
- return self.api_client.param_serialize(
1322
- method='GET',
1323
- resource_path='/api/pulp/{pulp_domain}/api/v3/roles/',
1324
- path_params=_path_params,
1325
- query_params=_query_params,
1326
- header_params=_header_params,
1327
- body=_body_params,
1328
- post_params=_form_params,
1329
- files=_files,
1330
- auth_settings=_auth_settings,
1331
- collection_formats=_collection_formats,
1332
- _host=_host,
1333
- _request_auth=_request_auth
1334
- )
1335
-
1336
-
1337
-
1338
-
1339
- @validate_call
1340
- def partial_update(
1341
- self,
1342
- role_href: StrictStr,
1343
- patched_role: PatchedRole,
1344
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1345
- _request_timeout: Union[
1346
- None,
1347
- Annotated[StrictFloat, Field(gt=0)],
1348
- Tuple[
1349
- Annotated[StrictFloat, Field(gt=0)],
1350
- Annotated[StrictFloat, Field(gt=0)]
1351
- ]
1352
- ] = None,
1353
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1354
- _content_type: Optional[StrictStr] = None,
1355
- _headers: Optional[Dict[StrictStr, Any]] = None,
1356
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1357
- ) -> RoleResponse:
1358
- """Update a role
1359
-
1360
- ViewSet for Role.
1361
-
1362
- :param role_href: (required)
1363
- :type role_href: str
1364
- :param patched_role: (required)
1365
- :type patched_role: PatchedRole
1366
- :param x_task_diagnostics: List of profilers to use on tasks.
1367
- :type x_task_diagnostics: List[str]
1368
- :param _request_timeout: timeout setting for this request. If one
1369
- number provided, it will be total request
1370
- timeout. It can also be a pair (tuple) of
1371
- (connection, read) timeouts.
1372
- :type _request_timeout: int, tuple(int, int), optional
1373
- :param _request_auth: set to override the auth_settings for an a single
1374
- request; this effectively ignores the
1375
- authentication in the spec for a single request.
1376
- :type _request_auth: dict, optional
1377
- :param _content_type: force content-type for the request.
1378
- :type _content_type: str, Optional
1379
- :param _headers: set to override the headers for a single
1380
- request; this effectively ignores the headers
1381
- in the spec for a single request.
1382
- :type _headers: dict, optional
1383
- :param _host_index: set to override the host_index for a single
1384
- request; this effectively ignores the host_index
1385
- in the spec for a single request.
1386
- :type _host_index: int, optional
1387
- :return: Returns the result object.
1388
- """ # noqa: E501
1389
-
1390
- _param = self._partial_update_serialize(
1391
- role_href=role_href,
1392
- patched_role=patched_role,
1393
- x_task_diagnostics=x_task_diagnostics,
1394
- _request_auth=_request_auth,
1395
- _content_type=_content_type,
1396
- _headers=_headers,
1397
- _host_index=_host_index
1398
- )
1399
-
1400
- _response_types_map: Dict[str, Optional[str]] = {
1401
- '200': "RoleResponse",
1402
- }
1403
- response_data = self.api_client.call_api(
1404
- *_param,
1405
- _request_timeout=_request_timeout
1406
- )
1407
- response_data.read()
1408
- return self.api_client.response_deserialize(
1409
- response_data=response_data,
1410
- response_types_map=_response_types_map,
1411
- ).data
1412
-
1413
-
1414
- @validate_call
1415
- def partial_update_with_http_info(
1416
- self,
1417
- role_href: StrictStr,
1418
- patched_role: PatchedRole,
1419
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1420
- _request_timeout: Union[
1421
- None,
1422
- Annotated[StrictFloat, Field(gt=0)],
1423
- Tuple[
1424
- Annotated[StrictFloat, Field(gt=0)],
1425
- Annotated[StrictFloat, Field(gt=0)]
1426
- ]
1427
- ] = None,
1428
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1429
- _content_type: Optional[StrictStr] = None,
1430
- _headers: Optional[Dict[StrictStr, Any]] = None,
1431
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1432
- ) -> ApiResponse[RoleResponse]:
1433
- """Update a role
1434
-
1435
- ViewSet for Role.
1436
-
1437
- :param role_href: (required)
1438
- :type role_href: str
1439
- :param patched_role: (required)
1440
- :type patched_role: PatchedRole
1441
- :param x_task_diagnostics: List of profilers to use on tasks.
1442
- :type x_task_diagnostics: List[str]
1443
- :param _request_timeout: timeout setting for this request. If one
1444
- number provided, it will be total request
1445
- timeout. It can also be a pair (tuple) of
1446
- (connection, read) timeouts.
1447
- :type _request_timeout: int, tuple(int, int), optional
1448
- :param _request_auth: set to override the auth_settings for an a single
1449
- request; this effectively ignores the
1450
- authentication in the spec for a single request.
1451
- :type _request_auth: dict, optional
1452
- :param _content_type: force content-type for the request.
1453
- :type _content_type: str, Optional
1454
- :param _headers: set to override the headers for a single
1455
- request; this effectively ignores the headers
1456
- in the spec for a single request.
1457
- :type _headers: dict, optional
1458
- :param _host_index: set to override the host_index for a single
1459
- request; this effectively ignores the host_index
1460
- in the spec for a single request.
1461
- :type _host_index: int, optional
1462
- :return: Returns the result object.
1463
- """ # noqa: E501
1464
-
1465
- _param = self._partial_update_serialize(
1466
- role_href=role_href,
1467
- patched_role=patched_role,
1468
- x_task_diagnostics=x_task_diagnostics,
1469
- _request_auth=_request_auth,
1470
- _content_type=_content_type,
1471
- _headers=_headers,
1472
- _host_index=_host_index
1473
- )
1474
-
1475
- _response_types_map: Dict[str, Optional[str]] = {
1476
- '200': "RoleResponse",
1477
- }
1478
- response_data = self.api_client.call_api(
1479
- *_param,
1480
- _request_timeout=_request_timeout
1481
- )
1482
- response_data.read()
1483
- return self.api_client.response_deserialize(
1484
- response_data=response_data,
1485
- response_types_map=_response_types_map,
1486
- )
1487
-
1488
-
1489
- @validate_call
1490
- def partial_update_without_preload_content(
1491
- self,
1492
- role_href: StrictStr,
1493
- patched_role: PatchedRole,
1494
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1495
- _request_timeout: Union[
1496
- None,
1497
- Annotated[StrictFloat, Field(gt=0)],
1498
- Tuple[
1499
- Annotated[StrictFloat, Field(gt=0)],
1500
- Annotated[StrictFloat, Field(gt=0)]
1501
- ]
1502
- ] = None,
1503
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1504
- _content_type: Optional[StrictStr] = None,
1505
- _headers: Optional[Dict[StrictStr, Any]] = None,
1506
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1507
- ) -> RESTResponseType:
1508
- """Update a role
1509
-
1510
- ViewSet for Role.
1511
-
1512
- :param role_href: (required)
1513
- :type role_href: str
1514
- :param patched_role: (required)
1515
- :type patched_role: PatchedRole
1516
- :param x_task_diagnostics: List of profilers to use on tasks.
1517
- :type x_task_diagnostics: List[str]
1518
- :param _request_timeout: timeout setting for this request. If one
1519
- number provided, it will be total request
1520
- timeout. It can also be a pair (tuple) of
1521
- (connection, read) timeouts.
1522
- :type _request_timeout: int, tuple(int, int), optional
1523
- :param _request_auth: set to override the auth_settings for an a single
1524
- request; this effectively ignores the
1525
- authentication in the spec for a single request.
1526
- :type _request_auth: dict, optional
1527
- :param _content_type: force content-type for the request.
1528
- :type _content_type: str, Optional
1529
- :param _headers: set to override the headers for a single
1530
- request; this effectively ignores the headers
1531
- in the spec for a single request.
1532
- :type _headers: dict, optional
1533
- :param _host_index: set to override the host_index for a single
1534
- request; this effectively ignores the host_index
1535
- in the spec for a single request.
1536
- :type _host_index: int, optional
1537
- :return: Returns the result object.
1538
- """ # noqa: E501
1539
-
1540
- _param = self._partial_update_serialize(
1541
- role_href=role_href,
1542
- patched_role=patched_role,
1543
- x_task_diagnostics=x_task_diagnostics,
1544
- _request_auth=_request_auth,
1545
- _content_type=_content_type,
1546
- _headers=_headers,
1547
- _host_index=_host_index
1548
- )
1549
-
1550
- _response_types_map: Dict[str, Optional[str]] = {
1551
- '200': "RoleResponse",
1552
- }
1553
- response_data = self.api_client.call_api(
1554
- *_param,
1555
- _request_timeout=_request_timeout
1556
- )
1557
- return response_data.response
1558
-
1559
-
1560
- def _partial_update_serialize(
1561
- self,
1562
- role_href,
1563
- patched_role,
1564
- x_task_diagnostics,
1565
- _request_auth,
1566
- _content_type,
1567
- _headers,
1568
- _host_index,
1569
- ) -> RequestSerialized:
1570
-
1571
- _host = None
1572
-
1573
- _collection_formats: Dict[str, str] = {
1574
- 'X-Task-Diagnostics': 'csv',
1575
- }
1576
-
1577
- _path_params: Dict[str, str] = {}
1578
- _query_params: List[Tuple[str, str]] = []
1579
- _header_params: Dict[str, Optional[str]] = _headers or {}
1580
- _form_params: List[Tuple[str, str]] = []
1581
- _files: Dict[
1582
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1583
- ] = {}
1584
- _body_params: Optional[bytes] = None
1585
-
1586
- # process the path parameters
1587
- if role_href is not None:
1588
- _path_params['role_href'] = role_href
1589
- # process the query parameters
1590
- # process the header parameters
1591
- if x_task_diagnostics is not None:
1592
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1593
- # process the form parameters
1594
- # process the body parameter
1595
- if patched_role is not None:
1596
- _body_params = patched_role
1597
-
1598
-
1599
- # set the HTTP header `Accept`
1600
- if 'Accept' not in _header_params:
1601
- _header_params['Accept'] = self.api_client.select_header_accept(
1602
- [
1603
- 'application/json'
1604
- ]
1605
- )
1606
-
1607
- # set the HTTP header `Content-Type`
1608
- if _content_type:
1609
- _header_params['Content-Type'] = _content_type
1610
- else:
1611
- _default_content_type = (
1612
- self.api_client.select_header_content_type(
1613
- [
1614
- 'application/json',
1615
- 'application/x-www-form-urlencoded',
1616
- 'multipart/form-data'
1617
- ]
1618
- )
1619
- )
1620
- if _default_content_type is not None:
1621
- _header_params['Content-Type'] = _default_content_type
1622
-
1623
- # authentication setting
1624
- _auth_settings: List[str] = [
1625
- 'json_header_remote_authentication',
1626
- 'basicAuth',
1627
- 'cookieAuth'
1628
- ]
1629
-
1630
- return self.api_client.param_serialize(
1631
- method='PATCH',
1632
- resource_path='{role_href}',
1633
- path_params=_path_params,
1634
- query_params=_query_params,
1635
- header_params=_header_params,
1636
- body=_body_params,
1637
- post_params=_form_params,
1638
- files=_files,
1639
- auth_settings=_auth_settings,
1640
- collection_formats=_collection_formats,
1641
- _host=_host,
1642
- _request_auth=_request_auth
1643
- )
1644
-
1645
-
1646
-
1647
-
1648
- @validate_call
1649
- def read(
1650
- self,
1651
- role_href: StrictStr,
1652
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1653
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1654
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1655
- _request_timeout: Union[
1656
- None,
1657
- Annotated[StrictFloat, Field(gt=0)],
1658
- Tuple[
1659
- Annotated[StrictFloat, Field(gt=0)],
1660
- Annotated[StrictFloat, Field(gt=0)]
1661
- ]
1662
- ] = None,
1663
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1664
- _content_type: Optional[StrictStr] = None,
1665
- _headers: Optional[Dict[StrictStr, Any]] = None,
1666
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1667
- ) -> RoleResponse:
1668
- """Inspect a role
1669
-
1670
- ViewSet for Role.
1671
-
1672
- :param role_href: (required)
1673
- :type role_href: str
1674
- :param x_task_diagnostics: List of profilers to use on tasks.
1675
- :type x_task_diagnostics: List[str]
1676
- :param fields: A list of fields to include in the response.
1677
- :type fields: List[str]
1678
- :param exclude_fields: A list of fields to exclude from the response.
1679
- :type exclude_fields: List[str]
1680
- :param _request_timeout: timeout setting for this request. If one
1681
- number provided, it will be total request
1682
- timeout. It can also be a pair (tuple) of
1683
- (connection, read) timeouts.
1684
- :type _request_timeout: int, tuple(int, int), optional
1685
- :param _request_auth: set to override the auth_settings for an a single
1686
- request; this effectively ignores the
1687
- authentication in the spec for a single request.
1688
- :type _request_auth: dict, optional
1689
- :param _content_type: force content-type for the request.
1690
- :type _content_type: str, Optional
1691
- :param _headers: set to override the headers for a single
1692
- request; this effectively ignores the headers
1693
- in the spec for a single request.
1694
- :type _headers: dict, optional
1695
- :param _host_index: set to override the host_index for a single
1696
- request; this effectively ignores the host_index
1697
- in the spec for a single request.
1698
- :type _host_index: int, optional
1699
- :return: Returns the result object.
1700
- """ # noqa: E501
1701
-
1702
- _param = self._read_serialize(
1703
- role_href=role_href,
1704
- x_task_diagnostics=x_task_diagnostics,
1705
- fields=fields,
1706
- exclude_fields=exclude_fields,
1707
- _request_auth=_request_auth,
1708
- _content_type=_content_type,
1709
- _headers=_headers,
1710
- _host_index=_host_index
1711
- )
1712
-
1713
- _response_types_map: Dict[str, Optional[str]] = {
1714
- '200': "RoleResponse",
1715
- }
1716
- response_data = self.api_client.call_api(
1717
- *_param,
1718
- _request_timeout=_request_timeout
1719
- )
1720
- response_data.read()
1721
- return self.api_client.response_deserialize(
1722
- response_data=response_data,
1723
- response_types_map=_response_types_map,
1724
- ).data
1725
-
1726
-
1727
- @validate_call
1728
- def read_with_http_info(
1729
- self,
1730
- role_href: StrictStr,
1731
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1732
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1733
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1734
- _request_timeout: Union[
1735
- None,
1736
- Annotated[StrictFloat, Field(gt=0)],
1737
- Tuple[
1738
- Annotated[StrictFloat, Field(gt=0)],
1739
- Annotated[StrictFloat, Field(gt=0)]
1740
- ]
1741
- ] = None,
1742
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1743
- _content_type: Optional[StrictStr] = None,
1744
- _headers: Optional[Dict[StrictStr, Any]] = None,
1745
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1746
- ) -> ApiResponse[RoleResponse]:
1747
- """Inspect a role
1748
-
1749
- ViewSet for Role.
1750
-
1751
- :param role_href: (required)
1752
- :type role_href: str
1753
- :param x_task_diagnostics: List of profilers to use on tasks.
1754
- :type x_task_diagnostics: List[str]
1755
- :param fields: A list of fields to include in the response.
1756
- :type fields: List[str]
1757
- :param exclude_fields: A list of fields to exclude from the response.
1758
- :type exclude_fields: List[str]
1759
- :param _request_timeout: timeout setting for this request. If one
1760
- number provided, it will be total request
1761
- timeout. It can also be a pair (tuple) of
1762
- (connection, read) timeouts.
1763
- :type _request_timeout: int, tuple(int, int), optional
1764
- :param _request_auth: set to override the auth_settings for an a single
1765
- request; this effectively ignores the
1766
- authentication in the spec for a single request.
1767
- :type _request_auth: dict, optional
1768
- :param _content_type: force content-type for the request.
1769
- :type _content_type: str, Optional
1770
- :param _headers: set to override the headers for a single
1771
- request; this effectively ignores the headers
1772
- in the spec for a single request.
1773
- :type _headers: dict, optional
1774
- :param _host_index: set to override the host_index for a single
1775
- request; this effectively ignores the host_index
1776
- in the spec for a single request.
1777
- :type _host_index: int, optional
1778
- :return: Returns the result object.
1779
- """ # noqa: E501
1780
-
1781
- _param = self._read_serialize(
1782
- role_href=role_href,
1783
- x_task_diagnostics=x_task_diagnostics,
1784
- fields=fields,
1785
- exclude_fields=exclude_fields,
1786
- _request_auth=_request_auth,
1787
- _content_type=_content_type,
1788
- _headers=_headers,
1789
- _host_index=_host_index
1790
- )
1791
-
1792
- _response_types_map: Dict[str, Optional[str]] = {
1793
- '200': "RoleResponse",
1794
- }
1795
- response_data = self.api_client.call_api(
1796
- *_param,
1797
- _request_timeout=_request_timeout
1798
- )
1799
- response_data.read()
1800
- return self.api_client.response_deserialize(
1801
- response_data=response_data,
1802
- response_types_map=_response_types_map,
1803
- )
1804
-
1805
-
1806
- @validate_call
1807
- def read_without_preload_content(
1808
- self,
1809
- role_href: StrictStr,
1810
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1811
- fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1812
- exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1813
- _request_timeout: Union[
1814
- None,
1815
- Annotated[StrictFloat, Field(gt=0)],
1816
- Tuple[
1817
- Annotated[StrictFloat, Field(gt=0)],
1818
- Annotated[StrictFloat, Field(gt=0)]
1819
- ]
1820
- ] = None,
1821
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1822
- _content_type: Optional[StrictStr] = None,
1823
- _headers: Optional[Dict[StrictStr, Any]] = None,
1824
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1825
- ) -> RESTResponseType:
1826
- """Inspect a role
1827
-
1828
- ViewSet for Role.
1829
-
1830
- :param role_href: (required)
1831
- :type role_href: str
1832
- :param x_task_diagnostics: List of profilers to use on tasks.
1833
- :type x_task_diagnostics: List[str]
1834
- :param fields: A list of fields to include in the response.
1835
- :type fields: List[str]
1836
- :param exclude_fields: A list of fields to exclude from the response.
1837
- :type exclude_fields: List[str]
1838
- :param _request_timeout: timeout setting for this request. If one
1839
- number provided, it will be total request
1840
- timeout. It can also be a pair (tuple) of
1841
- (connection, read) timeouts.
1842
- :type _request_timeout: int, tuple(int, int), optional
1843
- :param _request_auth: set to override the auth_settings for an a single
1844
- request; this effectively ignores the
1845
- authentication in the spec for a single request.
1846
- :type _request_auth: dict, optional
1847
- :param _content_type: force content-type for the request.
1848
- :type _content_type: str, Optional
1849
- :param _headers: set to override the headers for a single
1850
- request; this effectively ignores the headers
1851
- in the spec for a single request.
1852
- :type _headers: dict, optional
1853
- :param _host_index: set to override the host_index for a single
1854
- request; this effectively ignores the host_index
1855
- in the spec for a single request.
1856
- :type _host_index: int, optional
1857
- :return: Returns the result object.
1858
- """ # noqa: E501
1859
-
1860
- _param = self._read_serialize(
1861
- role_href=role_href,
1862
- x_task_diagnostics=x_task_diagnostics,
1863
- fields=fields,
1864
- exclude_fields=exclude_fields,
1865
- _request_auth=_request_auth,
1866
- _content_type=_content_type,
1867
- _headers=_headers,
1868
- _host_index=_host_index
1869
- )
1870
-
1871
- _response_types_map: Dict[str, Optional[str]] = {
1872
- '200': "RoleResponse",
1873
- }
1874
- response_data = self.api_client.call_api(
1875
- *_param,
1876
- _request_timeout=_request_timeout
1877
- )
1878
- return response_data.response
1879
-
1880
-
1881
- def _read_serialize(
1882
- self,
1883
- role_href,
1884
- x_task_diagnostics,
1885
- fields,
1886
- exclude_fields,
1887
- _request_auth,
1888
- _content_type,
1889
- _headers,
1890
- _host_index,
1891
- ) -> RequestSerialized:
1892
-
1893
- _host = None
1894
-
1895
- _collection_formats: Dict[str, str] = {
1896
- 'X-Task-Diagnostics': 'csv',
1897
- 'fields': 'multi',
1898
- 'exclude_fields': 'multi',
1899
- }
1900
-
1901
- _path_params: Dict[str, str] = {}
1902
- _query_params: List[Tuple[str, str]] = []
1903
- _header_params: Dict[str, Optional[str]] = _headers or {}
1904
- _form_params: List[Tuple[str, str]] = []
1905
- _files: Dict[
1906
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1907
- ] = {}
1908
- _body_params: Optional[bytes] = None
1909
-
1910
- # process the path parameters
1911
- if role_href is not None:
1912
- _path_params['role_href'] = role_href
1913
- # process the query parameters
1914
- if fields is not None:
1915
-
1916
- _query_params.append(('fields', fields))
1917
-
1918
- if exclude_fields is not None:
1919
-
1920
- _query_params.append(('exclude_fields', exclude_fields))
1921
-
1922
- # process the header parameters
1923
- if x_task_diagnostics is not None:
1924
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1925
- # process the form parameters
1926
- # process the body parameter
1927
-
1928
-
1929
- # set the HTTP header `Accept`
1930
- if 'Accept' not in _header_params:
1931
- _header_params['Accept'] = self.api_client.select_header_accept(
1932
- [
1933
- 'application/json'
1934
- ]
1935
- )
1936
-
1937
-
1938
- # authentication setting
1939
- _auth_settings: List[str] = [
1940
- 'json_header_remote_authentication',
1941
- 'basicAuth',
1942
- 'cookieAuth'
1943
- ]
1944
-
1945
- return self.api_client.param_serialize(
1946
- method='GET',
1947
- resource_path='{role_href}',
1948
- path_params=_path_params,
1949
- query_params=_query_params,
1950
- header_params=_header_params,
1951
- body=_body_params,
1952
- post_params=_form_params,
1953
- files=_files,
1954
- auth_settings=_auth_settings,
1955
- collection_formats=_collection_formats,
1956
- _host=_host,
1957
- _request_auth=_request_auth
1958
- )
1959
-
1960
-
1961
-
1962
-
1963
- @validate_call
1964
- def update(
1965
- self,
1966
- role_href: StrictStr,
1967
- role: Role,
1968
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1969
- _request_timeout: Union[
1970
- None,
1971
- Annotated[StrictFloat, Field(gt=0)],
1972
- Tuple[
1973
- Annotated[StrictFloat, Field(gt=0)],
1974
- Annotated[StrictFloat, Field(gt=0)]
1975
- ]
1976
- ] = None,
1977
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1978
- _content_type: Optional[StrictStr] = None,
1979
- _headers: Optional[Dict[StrictStr, Any]] = None,
1980
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1981
- ) -> RoleResponse:
1982
- """Update a role
1983
-
1984
- ViewSet for Role.
1985
-
1986
- :param role_href: (required)
1987
- :type role_href: str
1988
- :param role: (required)
1989
- :type role: Role
1990
- :param x_task_diagnostics: List of profilers to use on tasks.
1991
- :type x_task_diagnostics: List[str]
1992
- :param _request_timeout: timeout setting for this request. If one
1993
- number provided, it will be total request
1994
- timeout. It can also be a pair (tuple) of
1995
- (connection, read) timeouts.
1996
- :type _request_timeout: int, tuple(int, int), optional
1997
- :param _request_auth: set to override the auth_settings for an a single
1998
- request; this effectively ignores the
1999
- authentication in the spec for a single request.
2000
- :type _request_auth: dict, optional
2001
- :param _content_type: force content-type for the request.
2002
- :type _content_type: str, Optional
2003
- :param _headers: set to override the headers for a single
2004
- request; this effectively ignores the headers
2005
- in the spec for a single request.
2006
- :type _headers: dict, optional
2007
- :param _host_index: set to override the host_index for a single
2008
- request; this effectively ignores the host_index
2009
- in the spec for a single request.
2010
- :type _host_index: int, optional
2011
- :return: Returns the result object.
2012
- """ # noqa: E501
2013
-
2014
- _param = self._update_serialize(
2015
- role_href=role_href,
2016
- role=role,
2017
- x_task_diagnostics=x_task_diagnostics,
2018
- _request_auth=_request_auth,
2019
- _content_type=_content_type,
2020
- _headers=_headers,
2021
- _host_index=_host_index
2022
- )
2023
-
2024
- _response_types_map: Dict[str, Optional[str]] = {
2025
- '200': "RoleResponse",
2026
- }
2027
- response_data = self.api_client.call_api(
2028
- *_param,
2029
- _request_timeout=_request_timeout
2030
- )
2031
- response_data.read()
2032
- return self.api_client.response_deserialize(
2033
- response_data=response_data,
2034
- response_types_map=_response_types_map,
2035
- ).data
2036
-
2037
-
2038
- @validate_call
2039
- def update_with_http_info(
2040
- self,
2041
- role_href: StrictStr,
2042
- role: Role,
2043
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2044
- _request_timeout: Union[
2045
- None,
2046
- Annotated[StrictFloat, Field(gt=0)],
2047
- Tuple[
2048
- Annotated[StrictFloat, Field(gt=0)],
2049
- Annotated[StrictFloat, Field(gt=0)]
2050
- ]
2051
- ] = None,
2052
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2053
- _content_type: Optional[StrictStr] = None,
2054
- _headers: Optional[Dict[StrictStr, Any]] = None,
2055
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2056
- ) -> ApiResponse[RoleResponse]:
2057
- """Update a role
2058
-
2059
- ViewSet for Role.
2060
-
2061
- :param role_href: (required)
2062
- :type role_href: str
2063
- :param role: (required)
2064
- :type role: Role
2065
- :param x_task_diagnostics: List of profilers to use on tasks.
2066
- :type x_task_diagnostics: List[str]
2067
- :param _request_timeout: timeout setting for this request. If one
2068
- number provided, it will be total request
2069
- timeout. It can also be a pair (tuple) of
2070
- (connection, read) timeouts.
2071
- :type _request_timeout: int, tuple(int, int), optional
2072
- :param _request_auth: set to override the auth_settings for an a single
2073
- request; this effectively ignores the
2074
- authentication in the spec for a single request.
2075
- :type _request_auth: dict, optional
2076
- :param _content_type: force content-type for the request.
2077
- :type _content_type: str, Optional
2078
- :param _headers: set to override the headers for a single
2079
- request; this effectively ignores the headers
2080
- in the spec for a single request.
2081
- :type _headers: dict, optional
2082
- :param _host_index: set to override the host_index for a single
2083
- request; this effectively ignores the host_index
2084
- in the spec for a single request.
2085
- :type _host_index: int, optional
2086
- :return: Returns the result object.
2087
- """ # noqa: E501
2088
-
2089
- _param = self._update_serialize(
2090
- role_href=role_href,
2091
- role=role,
2092
- x_task_diagnostics=x_task_diagnostics,
2093
- _request_auth=_request_auth,
2094
- _content_type=_content_type,
2095
- _headers=_headers,
2096
- _host_index=_host_index
2097
- )
2098
-
2099
- _response_types_map: Dict[str, Optional[str]] = {
2100
- '200': "RoleResponse",
2101
- }
2102
- response_data = self.api_client.call_api(
2103
- *_param,
2104
- _request_timeout=_request_timeout
2105
- )
2106
- response_data.read()
2107
- return self.api_client.response_deserialize(
2108
- response_data=response_data,
2109
- response_types_map=_response_types_map,
2110
- )
2111
-
2112
-
2113
- @validate_call
2114
- def update_without_preload_content(
2115
- self,
2116
- role_href: StrictStr,
2117
- role: Role,
2118
- x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
2119
- _request_timeout: Union[
2120
- None,
2121
- Annotated[StrictFloat, Field(gt=0)],
2122
- Tuple[
2123
- Annotated[StrictFloat, Field(gt=0)],
2124
- Annotated[StrictFloat, Field(gt=0)]
2125
- ]
2126
- ] = None,
2127
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2128
- _content_type: Optional[StrictStr] = None,
2129
- _headers: Optional[Dict[StrictStr, Any]] = None,
2130
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2131
- ) -> RESTResponseType:
2132
- """Update a role
2133
-
2134
- ViewSet for Role.
2135
-
2136
- :param role_href: (required)
2137
- :type role_href: str
2138
- :param role: (required)
2139
- :type role: Role
2140
- :param x_task_diagnostics: List of profilers to use on tasks.
2141
- :type x_task_diagnostics: List[str]
2142
- :param _request_timeout: timeout setting for this request. If one
2143
- number provided, it will be total request
2144
- timeout. It can also be a pair (tuple) of
2145
- (connection, read) timeouts.
2146
- :type _request_timeout: int, tuple(int, int), optional
2147
- :param _request_auth: set to override the auth_settings for an a single
2148
- request; this effectively ignores the
2149
- authentication in the spec for a single request.
2150
- :type _request_auth: dict, optional
2151
- :param _content_type: force content-type for the request.
2152
- :type _content_type: str, Optional
2153
- :param _headers: set to override the headers for a single
2154
- request; this effectively ignores the headers
2155
- in the spec for a single request.
2156
- :type _headers: dict, optional
2157
- :param _host_index: set to override the host_index for a single
2158
- request; this effectively ignores the host_index
2159
- in the spec for a single request.
2160
- :type _host_index: int, optional
2161
- :return: Returns the result object.
2162
- """ # noqa: E501
2163
-
2164
- _param = self._update_serialize(
2165
- role_href=role_href,
2166
- role=role,
2167
- x_task_diagnostics=x_task_diagnostics,
2168
- _request_auth=_request_auth,
2169
- _content_type=_content_type,
2170
- _headers=_headers,
2171
- _host_index=_host_index
2172
- )
2173
-
2174
- _response_types_map: Dict[str, Optional[str]] = {
2175
- '200': "RoleResponse",
2176
- }
2177
- response_data = self.api_client.call_api(
2178
- *_param,
2179
- _request_timeout=_request_timeout
2180
- )
2181
- return response_data.response
2182
-
2183
-
2184
- def _update_serialize(
2185
- self,
2186
- role_href,
2187
- role,
2188
- x_task_diagnostics,
2189
- _request_auth,
2190
- _content_type,
2191
- _headers,
2192
- _host_index,
2193
- ) -> RequestSerialized:
2194
-
2195
- _host = None
2196
-
2197
- _collection_formats: Dict[str, str] = {
2198
- 'X-Task-Diagnostics': 'csv',
2199
- }
2200
-
2201
- _path_params: Dict[str, str] = {}
2202
- _query_params: List[Tuple[str, str]] = []
2203
- _header_params: Dict[str, Optional[str]] = _headers or {}
2204
- _form_params: List[Tuple[str, str]] = []
2205
- _files: Dict[
2206
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2207
- ] = {}
2208
- _body_params: Optional[bytes] = None
2209
-
2210
- # process the path parameters
2211
- if role_href is not None:
2212
- _path_params['role_href'] = role_href
2213
- # process the query parameters
2214
- # process the header parameters
2215
- if x_task_diagnostics is not None:
2216
- _header_params['X-Task-Diagnostics'] = x_task_diagnostics
2217
- # process the form parameters
2218
- # process the body parameter
2219
- if role is not None:
2220
- _body_params = role
2221
-
2222
-
2223
- # set the HTTP header `Accept`
2224
- if 'Accept' not in _header_params:
2225
- _header_params['Accept'] = self.api_client.select_header_accept(
2226
- [
2227
- 'application/json'
2228
- ]
2229
- )
2230
-
2231
- # set the HTTP header `Content-Type`
2232
- if _content_type:
2233
- _header_params['Content-Type'] = _content_type
2234
- else:
2235
- _default_content_type = (
2236
- self.api_client.select_header_content_type(
2237
- [
2238
- 'application/json',
2239
- 'application/x-www-form-urlencoded',
2240
- 'multipart/form-data'
2241
- ]
2242
- )
2243
- )
2244
- if _default_content_type is not None:
2245
- _header_params['Content-Type'] = _default_content_type
2246
-
2247
- # authentication setting
2248
- _auth_settings: List[str] = [
2249
- 'json_header_remote_authentication',
2250
- 'basicAuth',
2251
- 'cookieAuth'
2252
- ]
2253
-
2254
- return self.api_client.param_serialize(
2255
- method='PUT',
2256
- resource_path='{role_href}',
2257
- path_params=_path_params,
2258
- query_params=_query_params,
2259
- header_params=_header_params,
2260
- body=_body_params,
2261
- post_params=_form_params,
2262
- files=_files,
2263
- auth_settings=_auth_settings,
2264
- collection_formats=_collection_formats,
2265
- _host=_host,
2266
- _request_auth=_request_auth
2267
- )
2268
-
2269
-