cosmotech-api 3.2.0__2-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 cosmotech-api might be problematic. Click here for more details.

Files changed (255) hide show
  1. cosmotech_api/__init__.py +153 -0
  2. cosmotech_api/api/__init__.py +14 -0
  3. cosmotech_api/api/connector_api.py +1351 -0
  4. cosmotech_api/api/dataset_api.py +9148 -0
  5. cosmotech_api/api/organization_api.py +4692 -0
  6. cosmotech_api/api/run_api.py +2227 -0
  7. cosmotech_api/api/runner_api.py +4551 -0
  8. cosmotech_api/api/scenario_api.py +6688 -0
  9. cosmotech_api/api/scenariorun_api.py +4092 -0
  10. cosmotech_api/api/scenariorunresult_api.py +704 -0
  11. cosmotech_api/api/solution_api.py +6472 -0
  12. cosmotech_api/api/twingraph_api.py +4201 -0
  13. cosmotech_api/api/user_api.py +1291 -0
  14. cosmotech_api/api/validator_api.py +2566 -0
  15. cosmotech_api/api/workspace_api.py +6123 -0
  16. cosmotech_api/api_client.py +759 -0
  17. cosmotech_api/api_response.py +21 -0
  18. cosmotech_api/apis/__init__.py +28 -0
  19. cosmotech_api/configuration.py +453 -0
  20. cosmotech_api/exceptions.py +200 -0
  21. cosmotech_api/model/__init__.py +5 -0
  22. cosmotech_api/model/component_role_permissions.py +260 -0
  23. cosmotech_api/model/connector.py +330 -0
  24. cosmotech_api/model/connector_parameter.py +284 -0
  25. cosmotech_api/model/connector_parameter_group.py +280 -0
  26. cosmotech_api/model/container_resource_size_info.py +268 -0
  27. cosmotech_api/model/container_resource_sizing.py +274 -0
  28. cosmotech_api/model/dataset.py +376 -0
  29. cosmotech_api/model/dataset_access_control.py +268 -0
  30. cosmotech_api/model/dataset_compatibility.py +270 -0
  31. cosmotech_api/model/dataset_connector.py +268 -0
  32. cosmotech_api/model/dataset_copy_parameters.py +264 -0
  33. cosmotech_api/model/dataset_role.py +262 -0
  34. cosmotech_api/model/dataset_search.py +262 -0
  35. cosmotech_api/model/dataset_security.py +274 -0
  36. cosmotech_api/model/dataset_source_type.py +287 -0
  37. cosmotech_api/model/dataset_twin_graph_hash.py +256 -0
  38. cosmotech_api/model/dataset_twin_graph_info.py +264 -0
  39. cosmotech_api/model/dataset_twin_graph_query.py +262 -0
  40. cosmotech_api/model/delete_historical_data.py +272 -0
  41. cosmotech_api/model/file_upload_metadata.py +260 -0
  42. cosmotech_api/model/file_upload_validation.py +266 -0
  43. cosmotech_api/model/graph_properties.py +272 -0
  44. cosmotech_api/model/organization.py +282 -0
  45. cosmotech_api/model/organization_access_control.py +268 -0
  46. cosmotech_api/model/organization_role.py +262 -0
  47. cosmotech_api/model/organization_security.py +274 -0
  48. cosmotech_api/model/organization_service.py +272 -0
  49. cosmotech_api/model/organization_services.py +270 -0
  50. cosmotech_api/model/organization_user.py +277 -0
  51. cosmotech_api/model/resource_size_info.py +268 -0
  52. cosmotech_api/model/run.py +351 -0
  53. cosmotech_api/model/run_container.py +318 -0
  54. cosmotech_api/model/run_container_artifact.py +260 -0
  55. cosmotech_api/model/run_container_logs.py +272 -0
  56. cosmotech_api/model/run_logs.py +268 -0
  57. cosmotech_api/model/run_resource_requested.py +260 -0
  58. cosmotech_api/model/run_search.py +296 -0
  59. cosmotech_api/model/run_start_containers.py +286 -0
  60. cosmotech_api/model/run_state.py +285 -0
  61. cosmotech_api/model/run_status.py +316 -0
  62. cosmotech_api/model/run_status_node.py +307 -0
  63. cosmotech_api/model/run_template.py +408 -0
  64. cosmotech_api/model/run_template_handler_id.py +287 -0
  65. cosmotech_api/model/run_template_orchestrator.py +283 -0
  66. cosmotech_api/model/run_template_parameter.py +296 -0
  67. cosmotech_api/model/run_template_parameter_group.py +288 -0
  68. cosmotech_api/model/run_template_parameter_value.py +273 -0
  69. cosmotech_api/model/run_template_resource_sizing.py +274 -0
  70. cosmotech_api/model/run_template_step_source.py +285 -0
  71. cosmotech_api/model/runner.py +379 -0
  72. cosmotech_api/model/runner_access_control.py +268 -0
  73. cosmotech_api/model/runner_changed_parameter_value.py +272 -0
  74. cosmotech_api/model/runner_comparison_result.py +273 -0
  75. cosmotech_api/model/runner_data_download_info.py +267 -0
  76. cosmotech_api/model/runner_data_download_job.py +257 -0
  77. cosmotech_api/model/runner_job_state.py +287 -0
  78. cosmotech_api/model/runner_last_run.py +268 -0
  79. cosmotech_api/model/runner_resource_sizing.py +274 -0
  80. cosmotech_api/model/runner_role.py +262 -0
  81. cosmotech_api/model/runner_run_template_parameter_value.py +277 -0
  82. cosmotech_api/model/runner_security.py +274 -0
  83. cosmotech_api/model/runner_validation_status.py +285 -0
  84. cosmotech_api/model/scenario.py +379 -0
  85. cosmotech_api/model/scenario_access_control.py +268 -0
  86. cosmotech_api/model/scenario_changed_parameter_value.py +272 -0
  87. cosmotech_api/model/scenario_comparison_result.py +273 -0
  88. cosmotech_api/model/scenario_data_download_info.py +267 -0
  89. cosmotech_api/model/scenario_data_download_job.py +257 -0
  90. cosmotech_api/model/scenario_job_state.py +287 -0
  91. cosmotech_api/model/scenario_last_run.py +268 -0
  92. cosmotech_api/model/scenario_resource_sizing.py +274 -0
  93. cosmotech_api/model/scenario_role.py +262 -0
  94. cosmotech_api/model/scenario_run.py +369 -0
  95. cosmotech_api/model/scenario_run_container.py +318 -0
  96. cosmotech_api/model/scenario_run_container_artifact.py +260 -0
  97. cosmotech_api/model/scenario_run_container_logs.py +272 -0
  98. cosmotech_api/model/scenario_run_logs.py +268 -0
  99. cosmotech_api/model/scenario_run_resource_requested.py +260 -0
  100. cosmotech_api/model/scenario_run_result.py +260 -0
  101. cosmotech_api/model/scenario_run_search.py +296 -0
  102. cosmotech_api/model/scenario_run_start_containers.py +286 -0
  103. cosmotech_api/model/scenario_run_state.py +287 -0
  104. cosmotech_api/model/scenario_run_status.py +308 -0
  105. cosmotech_api/model/scenario_run_status_node.py +307 -0
  106. cosmotech_api/model/scenario_run_template_parameter_value.py +277 -0
  107. cosmotech_api/model/scenario_security.py +274 -0
  108. cosmotech_api/model/scenario_user.py +277 -0
  109. cosmotech_api/model/scenario_validation_status.py +285 -0
  110. cosmotech_api/model/solution.py +335 -0
  111. cosmotech_api/model/solution_access_control.py +268 -0
  112. cosmotech_api/model/solution_role.py +262 -0
  113. cosmotech_api/model/solution_security.py +274 -0
  114. cosmotech_api/model/source_info.py +274 -0
  115. cosmotech_api/model/sub_dataset_graph_query.py +268 -0
  116. cosmotech_api/model/translated_labels.py +252 -0
  117. cosmotech_api/model/twin_graph_batch_result.py +274 -0
  118. cosmotech_api/model/twin_graph_hash.py +256 -0
  119. cosmotech_api/model/twin_graph_import.py +278 -0
  120. cosmotech_api/model/twin_graph_import_info.py +260 -0
  121. cosmotech_api/model/twin_graph_query.py +266 -0
  122. cosmotech_api/model/user.py +281 -0
  123. cosmotech_api/model/user_organization.py +275 -0
  124. cosmotech_api/model/user_workspace.py +266 -0
  125. cosmotech_api/model/validator.py +295 -0
  126. cosmotech_api/model/validator_run.py +302 -0
  127. cosmotech_api/model/workspace.py +351 -0
  128. cosmotech_api/model/workspace_access_control.py +268 -0
  129. cosmotech_api/model/workspace_file.py +256 -0
  130. cosmotech_api/model/workspace_role.py +262 -0
  131. cosmotech_api/model/workspace_secret.py +256 -0
  132. cosmotech_api/model/workspace_security.py +274 -0
  133. cosmotech_api/model/workspace_solution.py +264 -0
  134. cosmotech_api/model/workspace_user.py +278 -0
  135. cosmotech_api/model/workspace_web_app.py +270 -0
  136. cosmotech_api/model_utils.py +2038 -0
  137. cosmotech_api/models/__init__.py +127 -0
  138. cosmotech_api/models/component_role_permissions.py +90 -0
  139. cosmotech_api/models/connector.py +135 -0
  140. cosmotech_api/models/connector_parameter.py +98 -0
  141. cosmotech_api/models/connector_parameter_group.py +100 -0
  142. cosmotech_api/models/container_resource_size_info.py +90 -0
  143. cosmotech_api/models/container_resource_sizing.py +97 -0
  144. cosmotech_api/models/dataset.py +195 -0
  145. cosmotech_api/models/dataset_access_control.py +90 -0
  146. cosmotech_api/models/dataset_compatibility.py +92 -0
  147. cosmotech_api/models/dataset_connector.py +94 -0
  148. cosmotech_api/models/dataset_copy_parameters.py +92 -0
  149. cosmotech_api/models/dataset_role.py +88 -0
  150. cosmotech_api/models/dataset_search.py +88 -0
  151. cosmotech_api/models/dataset_security.py +98 -0
  152. cosmotech_api/models/dataset_source_type.py +42 -0
  153. cosmotech_api/models/dataset_twin_graph_hash.py +88 -0
  154. cosmotech_api/models/dataset_twin_graph_info.py +92 -0
  155. cosmotech_api/models/dataset_twin_graph_query.py +88 -0
  156. cosmotech_api/models/delete_historical_data.py +92 -0
  157. cosmotech_api/models/file_upload_metadata.py +90 -0
  158. cosmotech_api/models/file_upload_validation.py +105 -0
  159. cosmotech_api/models/graph_properties.py +96 -0
  160. cosmotech_api/models/organization.py +108 -0
  161. cosmotech_api/models/organization_access_control.py +90 -0
  162. cosmotech_api/models/organization_role.py +88 -0
  163. cosmotech_api/models/organization_security.py +98 -0
  164. cosmotech_api/models/organization_service.py +96 -0
  165. cosmotech_api/models/organization_services.py +99 -0
  166. cosmotech_api/models/query_result.py +88 -0
  167. cosmotech_api/models/resource_size_info.py +90 -0
  168. cosmotech_api/models/run.py +167 -0
  169. cosmotech_api/models/run_container.py +126 -0
  170. cosmotech_api/models/run_container_artifact.py +90 -0
  171. cosmotech_api/models/run_container_logs.py +102 -0
  172. cosmotech_api/models/run_data.py +92 -0
  173. cosmotech_api/models/run_data_query.py +88 -0
  174. cosmotech_api/models/run_logs.py +107 -0
  175. cosmotech_api/models/run_resource_requested.py +90 -0
  176. cosmotech_api/models/run_search.py +112 -0
  177. cosmotech_api/models/run_start_containers.py +104 -0
  178. cosmotech_api/models/run_state.py +40 -0
  179. cosmotech_api/models/run_status.py +123 -0
  180. cosmotech_api/models/run_status_node.py +116 -0
  181. cosmotech_api/models/run_template.py +164 -0
  182. cosmotech_api/models/run_template_handler_id.py +42 -0
  183. cosmotech_api/models/run_template_orchestrator.py +38 -0
  184. cosmotech_api/models/run_template_parameter.py +102 -0
  185. cosmotech_api/models/run_template_parameter_group.py +98 -0
  186. cosmotech_api/models/run_template_parameter_value.py +94 -0
  187. cosmotech_api/models/run_template_resource_sizing.py +97 -0
  188. cosmotech_api/models/run_template_step_source.py +40 -0
  189. cosmotech_api/models/runner.py +188 -0
  190. cosmotech_api/models/runner_access_control.py +90 -0
  191. cosmotech_api/models/runner_changed_parameter_value.py +102 -0
  192. cosmotech_api/models/runner_comparison_result.py +106 -0
  193. cosmotech_api/models/runner_data_download_info.py +93 -0
  194. cosmotech_api/models/runner_data_download_job.py +90 -0
  195. cosmotech_api/models/runner_job_state.py +42 -0
  196. cosmotech_api/models/runner_last_run.py +94 -0
  197. cosmotech_api/models/runner_parent_last_run.py +94 -0
  198. cosmotech_api/models/runner_resource_sizing.py +97 -0
  199. cosmotech_api/models/runner_role.py +88 -0
  200. cosmotech_api/models/runner_root_last_run.py +94 -0
  201. cosmotech_api/models/runner_run_template_parameter_value.py +96 -0
  202. cosmotech_api/models/runner_security.py +98 -0
  203. cosmotech_api/models/runner_validation_status.py +40 -0
  204. cosmotech_api/models/scenario.py +186 -0
  205. cosmotech_api/models/scenario_access_control.py +90 -0
  206. cosmotech_api/models/scenario_changed_parameter_value.py +102 -0
  207. cosmotech_api/models/scenario_comparison_result.py +106 -0
  208. cosmotech_api/models/scenario_data_download_info.py +93 -0
  209. cosmotech_api/models/scenario_data_download_job.py +90 -0
  210. cosmotech_api/models/scenario_job_state.py +42 -0
  211. cosmotech_api/models/scenario_last_run.py +94 -0
  212. cosmotech_api/models/scenario_resource_sizing.py +97 -0
  213. cosmotech_api/models/scenario_role.py +88 -0
  214. cosmotech_api/models/scenario_run.py +179 -0
  215. cosmotech_api/models/scenario_run_container.py +126 -0
  216. cosmotech_api/models/scenario_run_container_artifact.py +90 -0
  217. cosmotech_api/models/scenario_run_container_logs.py +102 -0
  218. cosmotech_api/models/scenario_run_logs.py +107 -0
  219. cosmotech_api/models/scenario_run_resource_requested.py +90 -0
  220. cosmotech_api/models/scenario_run_result.py +90 -0
  221. cosmotech_api/models/scenario_run_search.py +112 -0
  222. cosmotech_api/models/scenario_run_start_containers.py +104 -0
  223. cosmotech_api/models/scenario_run_state.py +42 -0
  224. cosmotech_api/models/scenario_run_status.py +119 -0
  225. cosmotech_api/models/scenario_run_status_node.py +116 -0
  226. cosmotech_api/models/scenario_run_template_parameter_value.py +96 -0
  227. cosmotech_api/models/scenario_security.py +98 -0
  228. cosmotech_api/models/scenario_validation_status.py +40 -0
  229. cosmotech_api/models/send_run_data_request.py +90 -0
  230. cosmotech_api/models/solution.py +154 -0
  231. cosmotech_api/models/solution_access_control.py +90 -0
  232. cosmotech_api/models/solution_role.py +88 -0
  233. cosmotech_api/models/solution_security.py +98 -0
  234. cosmotech_api/models/source_info.py +94 -0
  235. cosmotech_api/models/sub_dataset_graph_query.py +94 -0
  236. cosmotech_api/models/twin_graph_batch_result.py +92 -0
  237. cosmotech_api/models/twin_graph_hash.py +88 -0
  238. cosmotech_api/models/twin_graph_query.py +90 -0
  239. cosmotech_api/models/validator.py +106 -0
  240. cosmotech_api/models/validator_run.py +126 -0
  241. cosmotech_api/models/workspace.py +142 -0
  242. cosmotech_api/models/workspace_access_control.py +90 -0
  243. cosmotech_api/models/workspace_file.py +88 -0
  244. cosmotech_api/models/workspace_role.py +88 -0
  245. cosmotech_api/models/workspace_secret.py +88 -0
  246. cosmotech_api/models/workspace_security.py +98 -0
  247. cosmotech_api/models/workspace_solution.py +92 -0
  248. cosmotech_api/models/workspace_web_app.py +92 -0
  249. cosmotech_api/py.typed +0 -0
  250. cosmotech_api/rest.py +256 -0
  251. cosmotech_api-3.2.0.dist-info/LICENSE +17 -0
  252. cosmotech_api-3.2.0.dist-info/METADATA +18 -0
  253. cosmotech_api-3.2.0.dist-info/RECORD +255 -0
  254. cosmotech_api-3.2.0.dist-info/WHEEL +5 -0
  255. cosmotech_api-3.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,4551 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Cosmo Tech Platform API
5
+
6
+ Cosmo Tech Platform API
7
+
8
+ The version of the OpenAPI document: 3.2.0
9
+ Contact: platform@cosmotech.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, StrictInt, StrictStr
21
+ from typing import Optional
22
+ from typing_extensions import Annotated
23
+ from cosmotech_api.models.runner import Runner
24
+ from cosmotech_api.models.runner_access_control import RunnerAccessControl
25
+ from cosmotech_api.models.runner_last_run import RunnerLastRun
26
+ from cosmotech_api.models.runner_role import RunnerRole
27
+ from cosmotech_api.models.runner_security import RunnerSecurity
28
+
29
+ from cosmotech_api.api_client import ApiClient, RequestSerialized
30
+ from cosmotech_api.api_response import ApiResponse
31
+ from cosmotech_api.rest import RESTResponseType
32
+
33
+
34
+ class RunnerApi:
35
+ """NOTE: This class is auto generated by OpenAPI Generator
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+ """
40
+
41
+ def __init__(self, api_client=None) -> None:
42
+ if api_client is None:
43
+ api_client = ApiClient.get_default()
44
+ self.api_client = api_client
45
+
46
+
47
+ @validate_call
48
+ def add_runner_access_control(
49
+ self,
50
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
51
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
52
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
53
+ runner_access_control: Annotated[RunnerAccessControl, Field(description="the new Runner security access to add.")],
54
+ _request_timeout: Union[
55
+ None,
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Tuple[
58
+ Annotated[StrictFloat, Field(gt=0)],
59
+ Annotated[StrictFloat, Field(gt=0)]
60
+ ]
61
+ ] = None,
62
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
63
+ _content_type: Optional[StrictStr] = None,
64
+ _headers: Optional[Dict[StrictStr, Any]] = None,
65
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
66
+ ) -> RunnerAccessControl:
67
+ """Add a control access to the Runner
68
+
69
+
70
+ :param organization_id: the Organization identifier (required)
71
+ :type organization_id: str
72
+ :param workspace_id: the Workspace identifier (required)
73
+ :type workspace_id: str
74
+ :param runner_id: the Runner identifier (required)
75
+ :type runner_id: str
76
+ :param runner_access_control: the new Runner security access to add. (required)
77
+ :type runner_access_control: RunnerAccessControl
78
+ :param _request_timeout: timeout setting for this request. If one
79
+ number provided, it will be total request
80
+ timeout. It can also be a pair (tuple) of
81
+ (connection, read) timeouts.
82
+ :type _request_timeout: int, tuple(int, int), optional
83
+ :param _request_auth: set to override the auth_settings for an a single
84
+ request; this effectively ignores the
85
+ authentication in the spec for a single request.
86
+ :type _request_auth: dict, optional
87
+ :param _content_type: force content-type for the request.
88
+ :type _content_type: str, Optional
89
+ :param _headers: set to override the headers for a single
90
+ request; this effectively ignores the headers
91
+ in the spec for a single request.
92
+ :type _headers: dict, optional
93
+ :param _host_index: set to override the host_index for a single
94
+ request; this effectively ignores the host_index
95
+ in the spec for a single request.
96
+ :type _host_index: int, optional
97
+ :return: Returns the result object.
98
+ """ # noqa: E501
99
+
100
+ _param = self._add_runner_access_control_serialize(
101
+ organization_id=organization_id,
102
+ workspace_id=workspace_id,
103
+ runner_id=runner_id,
104
+ runner_access_control=runner_access_control,
105
+ _request_auth=_request_auth,
106
+ _content_type=_content_type,
107
+ _headers=_headers,
108
+ _host_index=_host_index
109
+ )
110
+
111
+ _response_types_map: Dict[str, Optional[str]] = {
112
+ '201': "RunnerAccessControl",
113
+ '404': None,
114
+ }
115
+ response_data = self.api_client.call_api(
116
+ *_param,
117
+ _request_timeout=_request_timeout
118
+ )
119
+ response_data.read()
120
+ return self.api_client.response_deserialize(
121
+ response_data=response_data,
122
+ response_types_map=_response_types_map,
123
+ ).data
124
+
125
+
126
+ @validate_call
127
+ def add_runner_access_control_with_http_info(
128
+ self,
129
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
130
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
131
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
132
+ runner_access_control: Annotated[RunnerAccessControl, Field(description="the new Runner security access to add.")],
133
+ _request_timeout: Union[
134
+ None,
135
+ Annotated[StrictFloat, Field(gt=0)],
136
+ Tuple[
137
+ Annotated[StrictFloat, Field(gt=0)],
138
+ Annotated[StrictFloat, Field(gt=0)]
139
+ ]
140
+ ] = None,
141
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
142
+ _content_type: Optional[StrictStr] = None,
143
+ _headers: Optional[Dict[StrictStr, Any]] = None,
144
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
145
+ ) -> ApiResponse[RunnerAccessControl]:
146
+ """Add a control access to the Runner
147
+
148
+
149
+ :param organization_id: the Organization identifier (required)
150
+ :type organization_id: str
151
+ :param workspace_id: the Workspace identifier (required)
152
+ :type workspace_id: str
153
+ :param runner_id: the Runner identifier (required)
154
+ :type runner_id: str
155
+ :param runner_access_control: the new Runner security access to add. (required)
156
+ :type runner_access_control: RunnerAccessControl
157
+ :param _request_timeout: timeout setting for this request. If one
158
+ number provided, it will be total request
159
+ timeout. It can also be a pair (tuple) of
160
+ (connection, read) timeouts.
161
+ :type _request_timeout: int, tuple(int, int), optional
162
+ :param _request_auth: set to override the auth_settings for an a single
163
+ request; this effectively ignores the
164
+ authentication in the spec for a single request.
165
+ :type _request_auth: dict, optional
166
+ :param _content_type: force content-type for the request.
167
+ :type _content_type: str, Optional
168
+ :param _headers: set to override the headers for a single
169
+ request; this effectively ignores the headers
170
+ in the spec for a single request.
171
+ :type _headers: dict, optional
172
+ :param _host_index: set to override the host_index for a single
173
+ request; this effectively ignores the host_index
174
+ in the spec for a single request.
175
+ :type _host_index: int, optional
176
+ :return: Returns the result object.
177
+ """ # noqa: E501
178
+
179
+ _param = self._add_runner_access_control_serialize(
180
+ organization_id=organization_id,
181
+ workspace_id=workspace_id,
182
+ runner_id=runner_id,
183
+ runner_access_control=runner_access_control,
184
+ _request_auth=_request_auth,
185
+ _content_type=_content_type,
186
+ _headers=_headers,
187
+ _host_index=_host_index
188
+ )
189
+
190
+ _response_types_map: Dict[str, Optional[str]] = {
191
+ '201': "RunnerAccessControl",
192
+ '404': None,
193
+ }
194
+ response_data = self.api_client.call_api(
195
+ *_param,
196
+ _request_timeout=_request_timeout
197
+ )
198
+ response_data.read()
199
+ return self.api_client.response_deserialize(
200
+ response_data=response_data,
201
+ response_types_map=_response_types_map,
202
+ )
203
+
204
+
205
+ @validate_call
206
+ def add_runner_access_control_without_preload_content(
207
+ self,
208
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
209
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
210
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
211
+ runner_access_control: Annotated[RunnerAccessControl, Field(description="the new Runner security access to add.")],
212
+ _request_timeout: Union[
213
+ None,
214
+ Annotated[StrictFloat, Field(gt=0)],
215
+ Tuple[
216
+ Annotated[StrictFloat, Field(gt=0)],
217
+ Annotated[StrictFloat, Field(gt=0)]
218
+ ]
219
+ ] = None,
220
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
221
+ _content_type: Optional[StrictStr] = None,
222
+ _headers: Optional[Dict[StrictStr, Any]] = None,
223
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
224
+ ) -> RESTResponseType:
225
+ """Add a control access to the Runner
226
+
227
+
228
+ :param organization_id: the Organization identifier (required)
229
+ :type organization_id: str
230
+ :param workspace_id: the Workspace identifier (required)
231
+ :type workspace_id: str
232
+ :param runner_id: the Runner identifier (required)
233
+ :type runner_id: str
234
+ :param runner_access_control: the new Runner security access to add. (required)
235
+ :type runner_access_control: RunnerAccessControl
236
+ :param _request_timeout: timeout setting for this request. If one
237
+ number provided, it will be total request
238
+ timeout. It can also be a pair (tuple) of
239
+ (connection, read) timeouts.
240
+ :type _request_timeout: int, tuple(int, int), optional
241
+ :param _request_auth: set to override the auth_settings for an a single
242
+ request; this effectively ignores the
243
+ authentication in the spec for a single request.
244
+ :type _request_auth: dict, optional
245
+ :param _content_type: force content-type for the request.
246
+ :type _content_type: str, Optional
247
+ :param _headers: set to override the headers for a single
248
+ request; this effectively ignores the headers
249
+ in the spec for a single request.
250
+ :type _headers: dict, optional
251
+ :param _host_index: set to override the host_index for a single
252
+ request; this effectively ignores the host_index
253
+ in the spec for a single request.
254
+ :type _host_index: int, optional
255
+ :return: Returns the result object.
256
+ """ # noqa: E501
257
+
258
+ _param = self._add_runner_access_control_serialize(
259
+ organization_id=organization_id,
260
+ workspace_id=workspace_id,
261
+ runner_id=runner_id,
262
+ runner_access_control=runner_access_control,
263
+ _request_auth=_request_auth,
264
+ _content_type=_content_type,
265
+ _headers=_headers,
266
+ _host_index=_host_index
267
+ )
268
+
269
+ _response_types_map: Dict[str, Optional[str]] = {
270
+ '201': "RunnerAccessControl",
271
+ '404': None,
272
+ }
273
+ response_data = self.api_client.call_api(
274
+ *_param,
275
+ _request_timeout=_request_timeout
276
+ )
277
+ return response_data.response
278
+
279
+
280
+ def _add_runner_access_control_serialize(
281
+ self,
282
+ organization_id,
283
+ workspace_id,
284
+ runner_id,
285
+ runner_access_control,
286
+ _request_auth,
287
+ _content_type,
288
+ _headers,
289
+ _host_index,
290
+ ) -> RequestSerialized:
291
+
292
+ _host = None
293
+
294
+ _collection_formats: Dict[str, str] = {
295
+ }
296
+
297
+ _path_params: Dict[str, str] = {}
298
+ _query_params: List[Tuple[str, str]] = []
299
+ _header_params: Dict[str, Optional[str]] = _headers or {}
300
+ _form_params: List[Tuple[str, str]] = []
301
+ _files: Dict[str, str] = {}
302
+ _body_params: Optional[bytes] = None
303
+
304
+ # process the path parameters
305
+ if organization_id is not None:
306
+ _path_params['organization_id'] = organization_id
307
+ if workspace_id is not None:
308
+ _path_params['workspace_id'] = workspace_id
309
+ if runner_id is not None:
310
+ _path_params['runner_id'] = runner_id
311
+ # process the query parameters
312
+ # process the header parameters
313
+ # process the form parameters
314
+ # process the body parameter
315
+ if runner_access_control is not None:
316
+ _body_params = runner_access_control
317
+
318
+
319
+ # set the HTTP header `Accept`
320
+ _header_params['Accept'] = self.api_client.select_header_accept(
321
+ [
322
+ 'application/json'
323
+ ]
324
+ )
325
+
326
+ # set the HTTP header `Content-Type`
327
+ if _content_type:
328
+ _header_params['Content-Type'] = _content_type
329
+ else:
330
+ _default_content_type = (
331
+ self.api_client.select_header_content_type(
332
+ [
333
+ 'application/json',
334
+ 'application/yaml'
335
+ ]
336
+ )
337
+ )
338
+ if _default_content_type is not None:
339
+ _header_params['Content-Type'] = _default_content_type
340
+
341
+ # authentication setting
342
+ _auth_settings: List[str] = [
343
+ 'oAuth2AuthCode'
344
+ ]
345
+
346
+ return self.api_client.param_serialize(
347
+ method='POST',
348
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security/access',
349
+ path_params=_path_params,
350
+ query_params=_query_params,
351
+ header_params=_header_params,
352
+ body=_body_params,
353
+ post_params=_form_params,
354
+ files=_files,
355
+ auth_settings=_auth_settings,
356
+ collection_formats=_collection_formats,
357
+ _host=_host,
358
+ _request_auth=_request_auth
359
+ )
360
+
361
+
362
+
363
+
364
+ @validate_call
365
+ def create_runner(
366
+ self,
367
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
368
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
369
+ runner: Annotated[Runner, Field(description="the Runner to create")],
370
+ _request_timeout: Union[
371
+ None,
372
+ Annotated[StrictFloat, Field(gt=0)],
373
+ Tuple[
374
+ Annotated[StrictFloat, Field(gt=0)],
375
+ Annotated[StrictFloat, Field(gt=0)]
376
+ ]
377
+ ] = None,
378
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
379
+ _content_type: Optional[StrictStr] = None,
380
+ _headers: Optional[Dict[StrictStr, Any]] = None,
381
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
382
+ ) -> Runner:
383
+ """Create a new Runner
384
+
385
+
386
+ :param organization_id: the Organization identifier (required)
387
+ :type organization_id: str
388
+ :param workspace_id: the Workspace identifier (required)
389
+ :type workspace_id: str
390
+ :param runner: the Runner to create (required)
391
+ :type runner: Runner
392
+ :param _request_timeout: timeout setting for this request. If one
393
+ number provided, it will be total request
394
+ timeout. It can also be a pair (tuple) of
395
+ (connection, read) timeouts.
396
+ :type _request_timeout: int, tuple(int, int), optional
397
+ :param _request_auth: set to override the auth_settings for an a single
398
+ request; this effectively ignores the
399
+ authentication in the spec for a single request.
400
+ :type _request_auth: dict, optional
401
+ :param _content_type: force content-type for the request.
402
+ :type _content_type: str, Optional
403
+ :param _headers: set to override the headers for a single
404
+ request; this effectively ignores the headers
405
+ in the spec for a single request.
406
+ :type _headers: dict, optional
407
+ :param _host_index: set to override the host_index for a single
408
+ request; this effectively ignores the host_index
409
+ in the spec for a single request.
410
+ :type _host_index: int, optional
411
+ :return: Returns the result object.
412
+ """ # noqa: E501
413
+
414
+ _param = self._create_runner_serialize(
415
+ organization_id=organization_id,
416
+ workspace_id=workspace_id,
417
+ runner=runner,
418
+ _request_auth=_request_auth,
419
+ _content_type=_content_type,
420
+ _headers=_headers,
421
+ _host_index=_host_index
422
+ )
423
+
424
+ _response_types_map: Dict[str, Optional[str]] = {
425
+ '201': "Runner",
426
+ '400': None,
427
+ }
428
+ response_data = self.api_client.call_api(
429
+ *_param,
430
+ _request_timeout=_request_timeout
431
+ )
432
+ response_data.read()
433
+ return self.api_client.response_deserialize(
434
+ response_data=response_data,
435
+ response_types_map=_response_types_map,
436
+ ).data
437
+
438
+
439
+ @validate_call
440
+ def create_runner_with_http_info(
441
+ self,
442
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
443
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
444
+ runner: Annotated[Runner, Field(description="the Runner to create")],
445
+ _request_timeout: Union[
446
+ None,
447
+ Annotated[StrictFloat, Field(gt=0)],
448
+ Tuple[
449
+ Annotated[StrictFloat, Field(gt=0)],
450
+ Annotated[StrictFloat, Field(gt=0)]
451
+ ]
452
+ ] = None,
453
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
454
+ _content_type: Optional[StrictStr] = None,
455
+ _headers: Optional[Dict[StrictStr, Any]] = None,
456
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
457
+ ) -> ApiResponse[Runner]:
458
+ """Create a new Runner
459
+
460
+
461
+ :param organization_id: the Organization identifier (required)
462
+ :type organization_id: str
463
+ :param workspace_id: the Workspace identifier (required)
464
+ :type workspace_id: str
465
+ :param runner: the Runner to create (required)
466
+ :type runner: Runner
467
+ :param _request_timeout: timeout setting for this request. If one
468
+ number provided, it will be total request
469
+ timeout. It can also be a pair (tuple) of
470
+ (connection, read) timeouts.
471
+ :type _request_timeout: int, tuple(int, int), optional
472
+ :param _request_auth: set to override the auth_settings for an a single
473
+ request; this effectively ignores the
474
+ authentication in the spec for a single request.
475
+ :type _request_auth: dict, optional
476
+ :param _content_type: force content-type for the request.
477
+ :type _content_type: str, Optional
478
+ :param _headers: set to override the headers for a single
479
+ request; this effectively ignores the headers
480
+ in the spec for a single request.
481
+ :type _headers: dict, optional
482
+ :param _host_index: set to override the host_index for a single
483
+ request; this effectively ignores the host_index
484
+ in the spec for a single request.
485
+ :type _host_index: int, optional
486
+ :return: Returns the result object.
487
+ """ # noqa: E501
488
+
489
+ _param = self._create_runner_serialize(
490
+ organization_id=organization_id,
491
+ workspace_id=workspace_id,
492
+ runner=runner,
493
+ _request_auth=_request_auth,
494
+ _content_type=_content_type,
495
+ _headers=_headers,
496
+ _host_index=_host_index
497
+ )
498
+
499
+ _response_types_map: Dict[str, Optional[str]] = {
500
+ '201': "Runner",
501
+ '400': None,
502
+ }
503
+ response_data = self.api_client.call_api(
504
+ *_param,
505
+ _request_timeout=_request_timeout
506
+ )
507
+ response_data.read()
508
+ return self.api_client.response_deserialize(
509
+ response_data=response_data,
510
+ response_types_map=_response_types_map,
511
+ )
512
+
513
+
514
+ @validate_call
515
+ def create_runner_without_preload_content(
516
+ self,
517
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
518
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
519
+ runner: Annotated[Runner, Field(description="the Runner to create")],
520
+ _request_timeout: Union[
521
+ None,
522
+ Annotated[StrictFloat, Field(gt=0)],
523
+ Tuple[
524
+ Annotated[StrictFloat, Field(gt=0)],
525
+ Annotated[StrictFloat, Field(gt=0)]
526
+ ]
527
+ ] = None,
528
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
529
+ _content_type: Optional[StrictStr] = None,
530
+ _headers: Optional[Dict[StrictStr, Any]] = None,
531
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
532
+ ) -> RESTResponseType:
533
+ """Create a new Runner
534
+
535
+
536
+ :param organization_id: the Organization identifier (required)
537
+ :type organization_id: str
538
+ :param workspace_id: the Workspace identifier (required)
539
+ :type workspace_id: str
540
+ :param runner: the Runner to create (required)
541
+ :type runner: Runner
542
+ :param _request_timeout: timeout setting for this request. If one
543
+ number provided, it will be total request
544
+ timeout. It can also be a pair (tuple) of
545
+ (connection, read) timeouts.
546
+ :type _request_timeout: int, tuple(int, int), optional
547
+ :param _request_auth: set to override the auth_settings for an a single
548
+ request; this effectively ignores the
549
+ authentication in the spec for a single request.
550
+ :type _request_auth: dict, optional
551
+ :param _content_type: force content-type for the request.
552
+ :type _content_type: str, Optional
553
+ :param _headers: set to override the headers for a single
554
+ request; this effectively ignores the headers
555
+ in the spec for a single request.
556
+ :type _headers: dict, optional
557
+ :param _host_index: set to override the host_index for a single
558
+ request; this effectively ignores the host_index
559
+ in the spec for a single request.
560
+ :type _host_index: int, optional
561
+ :return: Returns the result object.
562
+ """ # noqa: E501
563
+
564
+ _param = self._create_runner_serialize(
565
+ organization_id=organization_id,
566
+ workspace_id=workspace_id,
567
+ runner=runner,
568
+ _request_auth=_request_auth,
569
+ _content_type=_content_type,
570
+ _headers=_headers,
571
+ _host_index=_host_index
572
+ )
573
+
574
+ _response_types_map: Dict[str, Optional[str]] = {
575
+ '201': "Runner",
576
+ '400': None,
577
+ }
578
+ response_data = self.api_client.call_api(
579
+ *_param,
580
+ _request_timeout=_request_timeout
581
+ )
582
+ return response_data.response
583
+
584
+
585
+ def _create_runner_serialize(
586
+ self,
587
+ organization_id,
588
+ workspace_id,
589
+ runner,
590
+ _request_auth,
591
+ _content_type,
592
+ _headers,
593
+ _host_index,
594
+ ) -> RequestSerialized:
595
+
596
+ _host = None
597
+
598
+ _collection_formats: Dict[str, str] = {
599
+ }
600
+
601
+ _path_params: Dict[str, str] = {}
602
+ _query_params: List[Tuple[str, str]] = []
603
+ _header_params: Dict[str, Optional[str]] = _headers or {}
604
+ _form_params: List[Tuple[str, str]] = []
605
+ _files: Dict[str, str] = {}
606
+ _body_params: Optional[bytes] = None
607
+
608
+ # process the path parameters
609
+ if organization_id is not None:
610
+ _path_params['organization_id'] = organization_id
611
+ if workspace_id is not None:
612
+ _path_params['workspace_id'] = workspace_id
613
+ # process the query parameters
614
+ # process the header parameters
615
+ # process the form parameters
616
+ # process the body parameter
617
+ if runner is not None:
618
+ _body_params = runner
619
+
620
+
621
+ # set the HTTP header `Accept`
622
+ _header_params['Accept'] = self.api_client.select_header_accept(
623
+ [
624
+ 'application/json'
625
+ ]
626
+ )
627
+
628
+ # set the HTTP header `Content-Type`
629
+ if _content_type:
630
+ _header_params['Content-Type'] = _content_type
631
+ else:
632
+ _default_content_type = (
633
+ self.api_client.select_header_content_type(
634
+ [
635
+ 'application/json',
636
+ 'application/yaml'
637
+ ]
638
+ )
639
+ )
640
+ if _default_content_type is not None:
641
+ _header_params['Content-Type'] = _default_content_type
642
+
643
+ # authentication setting
644
+ _auth_settings: List[str] = [
645
+ 'oAuth2AuthCode'
646
+ ]
647
+
648
+ return self.api_client.param_serialize(
649
+ method='POST',
650
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners',
651
+ path_params=_path_params,
652
+ query_params=_query_params,
653
+ header_params=_header_params,
654
+ body=_body_params,
655
+ post_params=_form_params,
656
+ files=_files,
657
+ auth_settings=_auth_settings,
658
+ collection_formats=_collection_formats,
659
+ _host=_host,
660
+ _request_auth=_request_auth
661
+ )
662
+
663
+
664
+
665
+
666
+ @validate_call
667
+ def delete_runner(
668
+ self,
669
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
670
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
671
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
672
+ _request_timeout: Union[
673
+ None,
674
+ Annotated[StrictFloat, Field(gt=0)],
675
+ Tuple[
676
+ Annotated[StrictFloat, Field(gt=0)],
677
+ Annotated[StrictFloat, Field(gt=0)]
678
+ ]
679
+ ] = None,
680
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
681
+ _content_type: Optional[StrictStr] = None,
682
+ _headers: Optional[Dict[StrictStr, Any]] = None,
683
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
684
+ ) -> None:
685
+ """Delete a runner
686
+
687
+
688
+ :param organization_id: the Organization identifier (required)
689
+ :type organization_id: str
690
+ :param workspace_id: the Workspace identifier (required)
691
+ :type workspace_id: str
692
+ :param runner_id: the Runner identifier (required)
693
+ :type runner_id: str
694
+ :param _request_timeout: timeout setting for this request. If one
695
+ number provided, it will be total request
696
+ timeout. It can also be a pair (tuple) of
697
+ (connection, read) timeouts.
698
+ :type _request_timeout: int, tuple(int, int), optional
699
+ :param _request_auth: set to override the auth_settings for an a single
700
+ request; this effectively ignores the
701
+ authentication in the spec for a single request.
702
+ :type _request_auth: dict, optional
703
+ :param _content_type: force content-type for the request.
704
+ :type _content_type: str, Optional
705
+ :param _headers: set to override the headers for a single
706
+ request; this effectively ignores the headers
707
+ in the spec for a single request.
708
+ :type _headers: dict, optional
709
+ :param _host_index: set to override the host_index for a single
710
+ request; this effectively ignores the host_index
711
+ in the spec for a single request.
712
+ :type _host_index: int, optional
713
+ :return: Returns the result object.
714
+ """ # noqa: E501
715
+
716
+ _param = self._delete_runner_serialize(
717
+ organization_id=organization_id,
718
+ workspace_id=workspace_id,
719
+ runner_id=runner_id,
720
+ _request_auth=_request_auth,
721
+ _content_type=_content_type,
722
+ _headers=_headers,
723
+ _host_index=_host_index
724
+ )
725
+
726
+ _response_types_map: Dict[str, Optional[str]] = {
727
+ '204': None,
728
+ '404': None,
729
+ }
730
+ response_data = self.api_client.call_api(
731
+ *_param,
732
+ _request_timeout=_request_timeout
733
+ )
734
+ response_data.read()
735
+ return self.api_client.response_deserialize(
736
+ response_data=response_data,
737
+ response_types_map=_response_types_map,
738
+ ).data
739
+
740
+
741
+ @validate_call
742
+ def delete_runner_with_http_info(
743
+ self,
744
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
745
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
746
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
747
+ _request_timeout: Union[
748
+ None,
749
+ Annotated[StrictFloat, Field(gt=0)],
750
+ Tuple[
751
+ Annotated[StrictFloat, Field(gt=0)],
752
+ Annotated[StrictFloat, Field(gt=0)]
753
+ ]
754
+ ] = None,
755
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
756
+ _content_type: Optional[StrictStr] = None,
757
+ _headers: Optional[Dict[StrictStr, Any]] = None,
758
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
759
+ ) -> ApiResponse[None]:
760
+ """Delete a runner
761
+
762
+
763
+ :param organization_id: the Organization identifier (required)
764
+ :type organization_id: str
765
+ :param workspace_id: the Workspace identifier (required)
766
+ :type workspace_id: str
767
+ :param runner_id: the Runner identifier (required)
768
+ :type runner_id: str
769
+ :param _request_timeout: timeout setting for this request. If one
770
+ number provided, it will be total request
771
+ timeout. It can also be a pair (tuple) of
772
+ (connection, read) timeouts.
773
+ :type _request_timeout: int, tuple(int, int), optional
774
+ :param _request_auth: set to override the auth_settings for an a single
775
+ request; this effectively ignores the
776
+ authentication in the spec for a single request.
777
+ :type _request_auth: dict, optional
778
+ :param _content_type: force content-type for the request.
779
+ :type _content_type: str, Optional
780
+ :param _headers: set to override the headers for a single
781
+ request; this effectively ignores the headers
782
+ in the spec for a single request.
783
+ :type _headers: dict, optional
784
+ :param _host_index: set to override the host_index for a single
785
+ request; this effectively ignores the host_index
786
+ in the spec for a single request.
787
+ :type _host_index: int, optional
788
+ :return: Returns the result object.
789
+ """ # noqa: E501
790
+
791
+ _param = self._delete_runner_serialize(
792
+ organization_id=organization_id,
793
+ workspace_id=workspace_id,
794
+ runner_id=runner_id,
795
+ _request_auth=_request_auth,
796
+ _content_type=_content_type,
797
+ _headers=_headers,
798
+ _host_index=_host_index
799
+ )
800
+
801
+ _response_types_map: Dict[str, Optional[str]] = {
802
+ '204': None,
803
+ '404': None,
804
+ }
805
+ response_data = self.api_client.call_api(
806
+ *_param,
807
+ _request_timeout=_request_timeout
808
+ )
809
+ response_data.read()
810
+ return self.api_client.response_deserialize(
811
+ response_data=response_data,
812
+ response_types_map=_response_types_map,
813
+ )
814
+
815
+
816
+ @validate_call
817
+ def delete_runner_without_preload_content(
818
+ self,
819
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
820
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
821
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
822
+ _request_timeout: Union[
823
+ None,
824
+ Annotated[StrictFloat, Field(gt=0)],
825
+ Tuple[
826
+ Annotated[StrictFloat, Field(gt=0)],
827
+ Annotated[StrictFloat, Field(gt=0)]
828
+ ]
829
+ ] = None,
830
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
831
+ _content_type: Optional[StrictStr] = None,
832
+ _headers: Optional[Dict[StrictStr, Any]] = None,
833
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
834
+ ) -> RESTResponseType:
835
+ """Delete a runner
836
+
837
+
838
+ :param organization_id: the Organization identifier (required)
839
+ :type organization_id: str
840
+ :param workspace_id: the Workspace identifier (required)
841
+ :type workspace_id: str
842
+ :param runner_id: the Runner identifier (required)
843
+ :type runner_id: str
844
+ :param _request_timeout: timeout setting for this request. If one
845
+ number provided, it will be total request
846
+ timeout. It can also be a pair (tuple) of
847
+ (connection, read) timeouts.
848
+ :type _request_timeout: int, tuple(int, int), optional
849
+ :param _request_auth: set to override the auth_settings for an a single
850
+ request; this effectively ignores the
851
+ authentication in the spec for a single request.
852
+ :type _request_auth: dict, optional
853
+ :param _content_type: force content-type for the request.
854
+ :type _content_type: str, Optional
855
+ :param _headers: set to override the headers for a single
856
+ request; this effectively ignores the headers
857
+ in the spec for a single request.
858
+ :type _headers: dict, optional
859
+ :param _host_index: set to override the host_index for a single
860
+ request; this effectively ignores the host_index
861
+ in the spec for a single request.
862
+ :type _host_index: int, optional
863
+ :return: Returns the result object.
864
+ """ # noqa: E501
865
+
866
+ _param = self._delete_runner_serialize(
867
+ organization_id=organization_id,
868
+ workspace_id=workspace_id,
869
+ runner_id=runner_id,
870
+ _request_auth=_request_auth,
871
+ _content_type=_content_type,
872
+ _headers=_headers,
873
+ _host_index=_host_index
874
+ )
875
+
876
+ _response_types_map: Dict[str, Optional[str]] = {
877
+ '204': None,
878
+ '404': None,
879
+ }
880
+ response_data = self.api_client.call_api(
881
+ *_param,
882
+ _request_timeout=_request_timeout
883
+ )
884
+ return response_data.response
885
+
886
+
887
+ def _delete_runner_serialize(
888
+ self,
889
+ organization_id,
890
+ workspace_id,
891
+ runner_id,
892
+ _request_auth,
893
+ _content_type,
894
+ _headers,
895
+ _host_index,
896
+ ) -> RequestSerialized:
897
+
898
+ _host = None
899
+
900
+ _collection_formats: Dict[str, str] = {
901
+ }
902
+
903
+ _path_params: Dict[str, str] = {}
904
+ _query_params: List[Tuple[str, str]] = []
905
+ _header_params: Dict[str, Optional[str]] = _headers or {}
906
+ _form_params: List[Tuple[str, str]] = []
907
+ _files: Dict[str, str] = {}
908
+ _body_params: Optional[bytes] = None
909
+
910
+ # process the path parameters
911
+ if organization_id is not None:
912
+ _path_params['organization_id'] = organization_id
913
+ if workspace_id is not None:
914
+ _path_params['workspace_id'] = workspace_id
915
+ if runner_id is not None:
916
+ _path_params['runner_id'] = runner_id
917
+ # process the query parameters
918
+ # process the header parameters
919
+ # process the form parameters
920
+ # process the body parameter
921
+
922
+
923
+
924
+
925
+ # authentication setting
926
+ _auth_settings: List[str] = [
927
+ 'oAuth2AuthCode'
928
+ ]
929
+
930
+ return self.api_client.param_serialize(
931
+ method='DELETE',
932
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}',
933
+ path_params=_path_params,
934
+ query_params=_query_params,
935
+ header_params=_header_params,
936
+ body=_body_params,
937
+ post_params=_form_params,
938
+ files=_files,
939
+ auth_settings=_auth_settings,
940
+ collection_formats=_collection_formats,
941
+ _host=_host,
942
+ _request_auth=_request_auth
943
+ )
944
+
945
+
946
+
947
+
948
+ @validate_call
949
+ def get_runner(
950
+ self,
951
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
952
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
953
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
954
+ _request_timeout: Union[
955
+ None,
956
+ Annotated[StrictFloat, Field(gt=0)],
957
+ Tuple[
958
+ Annotated[StrictFloat, Field(gt=0)],
959
+ Annotated[StrictFloat, Field(gt=0)]
960
+ ]
961
+ ] = None,
962
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
963
+ _content_type: Optional[StrictStr] = None,
964
+ _headers: Optional[Dict[StrictStr, Any]] = None,
965
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
966
+ ) -> Runner:
967
+ """Get the details of an runner
968
+
969
+
970
+ :param organization_id: the Organization identifier (required)
971
+ :type organization_id: str
972
+ :param workspace_id: the Workspace identifier (required)
973
+ :type workspace_id: str
974
+ :param runner_id: the Runner identifier (required)
975
+ :type runner_id: str
976
+ :param _request_timeout: timeout setting for this request. If one
977
+ number provided, it will be total request
978
+ timeout. It can also be a pair (tuple) of
979
+ (connection, read) timeouts.
980
+ :type _request_timeout: int, tuple(int, int), optional
981
+ :param _request_auth: set to override the auth_settings for an a single
982
+ request; this effectively ignores the
983
+ authentication in the spec for a single request.
984
+ :type _request_auth: dict, optional
985
+ :param _content_type: force content-type for the request.
986
+ :type _content_type: str, Optional
987
+ :param _headers: set to override the headers for a single
988
+ request; this effectively ignores the headers
989
+ in the spec for a single request.
990
+ :type _headers: dict, optional
991
+ :param _host_index: set to override the host_index for a single
992
+ request; this effectively ignores the host_index
993
+ in the spec for a single request.
994
+ :type _host_index: int, optional
995
+ :return: Returns the result object.
996
+ """ # noqa: E501
997
+
998
+ _param = self._get_runner_serialize(
999
+ organization_id=organization_id,
1000
+ workspace_id=workspace_id,
1001
+ runner_id=runner_id,
1002
+ _request_auth=_request_auth,
1003
+ _content_type=_content_type,
1004
+ _headers=_headers,
1005
+ _host_index=_host_index
1006
+ )
1007
+
1008
+ _response_types_map: Dict[str, Optional[str]] = {
1009
+ '200': "Runner",
1010
+ '404': None,
1011
+ }
1012
+ response_data = self.api_client.call_api(
1013
+ *_param,
1014
+ _request_timeout=_request_timeout
1015
+ )
1016
+ response_data.read()
1017
+ return self.api_client.response_deserialize(
1018
+ response_data=response_data,
1019
+ response_types_map=_response_types_map,
1020
+ ).data
1021
+
1022
+
1023
+ @validate_call
1024
+ def get_runner_with_http_info(
1025
+ self,
1026
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1027
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
1028
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
1029
+ _request_timeout: Union[
1030
+ None,
1031
+ Annotated[StrictFloat, Field(gt=0)],
1032
+ Tuple[
1033
+ Annotated[StrictFloat, Field(gt=0)],
1034
+ Annotated[StrictFloat, Field(gt=0)]
1035
+ ]
1036
+ ] = None,
1037
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1038
+ _content_type: Optional[StrictStr] = None,
1039
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1040
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1041
+ ) -> ApiResponse[Runner]:
1042
+ """Get the details of an runner
1043
+
1044
+
1045
+ :param organization_id: the Organization identifier (required)
1046
+ :type organization_id: str
1047
+ :param workspace_id: the Workspace identifier (required)
1048
+ :type workspace_id: str
1049
+ :param runner_id: the Runner identifier (required)
1050
+ :type runner_id: str
1051
+ :param _request_timeout: timeout setting for this request. If one
1052
+ number provided, it will be total request
1053
+ timeout. It can also be a pair (tuple) of
1054
+ (connection, read) timeouts.
1055
+ :type _request_timeout: int, tuple(int, int), optional
1056
+ :param _request_auth: set to override the auth_settings for an a single
1057
+ request; this effectively ignores the
1058
+ authentication in the spec for a single request.
1059
+ :type _request_auth: dict, optional
1060
+ :param _content_type: force content-type for the request.
1061
+ :type _content_type: str, Optional
1062
+ :param _headers: set to override the headers for a single
1063
+ request; this effectively ignores the headers
1064
+ in the spec for a single request.
1065
+ :type _headers: dict, optional
1066
+ :param _host_index: set to override the host_index for a single
1067
+ request; this effectively ignores the host_index
1068
+ in the spec for a single request.
1069
+ :type _host_index: int, optional
1070
+ :return: Returns the result object.
1071
+ """ # noqa: E501
1072
+
1073
+ _param = self._get_runner_serialize(
1074
+ organization_id=organization_id,
1075
+ workspace_id=workspace_id,
1076
+ runner_id=runner_id,
1077
+ _request_auth=_request_auth,
1078
+ _content_type=_content_type,
1079
+ _headers=_headers,
1080
+ _host_index=_host_index
1081
+ )
1082
+
1083
+ _response_types_map: Dict[str, Optional[str]] = {
1084
+ '200': "Runner",
1085
+ '404': None,
1086
+ }
1087
+ response_data = self.api_client.call_api(
1088
+ *_param,
1089
+ _request_timeout=_request_timeout
1090
+ )
1091
+ response_data.read()
1092
+ return self.api_client.response_deserialize(
1093
+ response_data=response_data,
1094
+ response_types_map=_response_types_map,
1095
+ )
1096
+
1097
+
1098
+ @validate_call
1099
+ def get_runner_without_preload_content(
1100
+ self,
1101
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1102
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
1103
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
1104
+ _request_timeout: Union[
1105
+ None,
1106
+ Annotated[StrictFloat, Field(gt=0)],
1107
+ Tuple[
1108
+ Annotated[StrictFloat, Field(gt=0)],
1109
+ Annotated[StrictFloat, Field(gt=0)]
1110
+ ]
1111
+ ] = None,
1112
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1113
+ _content_type: Optional[StrictStr] = None,
1114
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1115
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1116
+ ) -> RESTResponseType:
1117
+ """Get the details of an runner
1118
+
1119
+
1120
+ :param organization_id: the Organization identifier (required)
1121
+ :type organization_id: str
1122
+ :param workspace_id: the Workspace identifier (required)
1123
+ :type workspace_id: str
1124
+ :param runner_id: the Runner identifier (required)
1125
+ :type runner_id: str
1126
+ :param _request_timeout: timeout setting for this request. If one
1127
+ number provided, it will be total request
1128
+ timeout. It can also be a pair (tuple) of
1129
+ (connection, read) timeouts.
1130
+ :type _request_timeout: int, tuple(int, int), optional
1131
+ :param _request_auth: set to override the auth_settings for an a single
1132
+ request; this effectively ignores the
1133
+ authentication in the spec for a single request.
1134
+ :type _request_auth: dict, optional
1135
+ :param _content_type: force content-type for the request.
1136
+ :type _content_type: str, Optional
1137
+ :param _headers: set to override the headers for a single
1138
+ request; this effectively ignores the headers
1139
+ in the spec for a single request.
1140
+ :type _headers: dict, optional
1141
+ :param _host_index: set to override the host_index for a single
1142
+ request; this effectively ignores the host_index
1143
+ in the spec for a single request.
1144
+ :type _host_index: int, optional
1145
+ :return: Returns the result object.
1146
+ """ # noqa: E501
1147
+
1148
+ _param = self._get_runner_serialize(
1149
+ organization_id=organization_id,
1150
+ workspace_id=workspace_id,
1151
+ runner_id=runner_id,
1152
+ _request_auth=_request_auth,
1153
+ _content_type=_content_type,
1154
+ _headers=_headers,
1155
+ _host_index=_host_index
1156
+ )
1157
+
1158
+ _response_types_map: Dict[str, Optional[str]] = {
1159
+ '200': "Runner",
1160
+ '404': None,
1161
+ }
1162
+ response_data = self.api_client.call_api(
1163
+ *_param,
1164
+ _request_timeout=_request_timeout
1165
+ )
1166
+ return response_data.response
1167
+
1168
+
1169
+ def _get_runner_serialize(
1170
+ self,
1171
+ organization_id,
1172
+ workspace_id,
1173
+ runner_id,
1174
+ _request_auth,
1175
+ _content_type,
1176
+ _headers,
1177
+ _host_index,
1178
+ ) -> RequestSerialized:
1179
+
1180
+ _host = None
1181
+
1182
+ _collection_formats: Dict[str, str] = {
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[str, str] = {}
1190
+ _body_params: Optional[bytes] = None
1191
+
1192
+ # process the path parameters
1193
+ if organization_id is not None:
1194
+ _path_params['organization_id'] = organization_id
1195
+ if workspace_id is not None:
1196
+ _path_params['workspace_id'] = workspace_id
1197
+ if runner_id is not None:
1198
+ _path_params['runner_id'] = runner_id
1199
+ # process the query parameters
1200
+ # process the header parameters
1201
+ # process the form parameters
1202
+ # process the body parameter
1203
+
1204
+
1205
+ # set the HTTP header `Accept`
1206
+ _header_params['Accept'] = self.api_client.select_header_accept(
1207
+ [
1208
+ 'application/json'
1209
+ ]
1210
+ )
1211
+
1212
+
1213
+ # authentication setting
1214
+ _auth_settings: List[str] = [
1215
+ 'oAuth2AuthCode'
1216
+ ]
1217
+
1218
+ return self.api_client.param_serialize(
1219
+ method='GET',
1220
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}',
1221
+ path_params=_path_params,
1222
+ query_params=_query_params,
1223
+ header_params=_header_params,
1224
+ body=_body_params,
1225
+ post_params=_form_params,
1226
+ files=_files,
1227
+ auth_settings=_auth_settings,
1228
+ collection_formats=_collection_formats,
1229
+ _host=_host,
1230
+ _request_auth=_request_auth
1231
+ )
1232
+
1233
+
1234
+
1235
+
1236
+ @validate_call
1237
+ def get_runner_access_control(
1238
+ self,
1239
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1240
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
1241
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
1242
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
1243
+ _request_timeout: Union[
1244
+ None,
1245
+ Annotated[StrictFloat, Field(gt=0)],
1246
+ Tuple[
1247
+ Annotated[StrictFloat, Field(gt=0)],
1248
+ Annotated[StrictFloat, Field(gt=0)]
1249
+ ]
1250
+ ] = None,
1251
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1252
+ _content_type: Optional[StrictStr] = None,
1253
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1254
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1255
+ ) -> RunnerAccessControl:
1256
+ """Get a control access for the Runner
1257
+
1258
+
1259
+ :param organization_id: the Organization identifier (required)
1260
+ :type organization_id: str
1261
+ :param workspace_id: the Workspace identifier (required)
1262
+ :type workspace_id: str
1263
+ :param runner_id: the Runner identifier (required)
1264
+ :type runner_id: str
1265
+ :param identity_id: the User identifier (required)
1266
+ :type identity_id: str
1267
+ :param _request_timeout: timeout setting for this request. If one
1268
+ number provided, it will be total request
1269
+ timeout. It can also be a pair (tuple) of
1270
+ (connection, read) timeouts.
1271
+ :type _request_timeout: int, tuple(int, int), optional
1272
+ :param _request_auth: set to override the auth_settings for an a single
1273
+ request; this effectively ignores the
1274
+ authentication in the spec for a single request.
1275
+ :type _request_auth: dict, optional
1276
+ :param _content_type: force content-type for the request.
1277
+ :type _content_type: str, Optional
1278
+ :param _headers: set to override the headers for a single
1279
+ request; this effectively ignores the headers
1280
+ in the spec for a single request.
1281
+ :type _headers: dict, optional
1282
+ :param _host_index: set to override the host_index for a single
1283
+ request; this effectively ignores the host_index
1284
+ in the spec for a single request.
1285
+ :type _host_index: int, optional
1286
+ :return: Returns the result object.
1287
+ """ # noqa: E501
1288
+
1289
+ _param = self._get_runner_access_control_serialize(
1290
+ organization_id=organization_id,
1291
+ workspace_id=workspace_id,
1292
+ runner_id=runner_id,
1293
+ identity_id=identity_id,
1294
+ _request_auth=_request_auth,
1295
+ _content_type=_content_type,
1296
+ _headers=_headers,
1297
+ _host_index=_host_index
1298
+ )
1299
+
1300
+ _response_types_map: Dict[str, Optional[str]] = {
1301
+ '200': "RunnerAccessControl",
1302
+ '404': None,
1303
+ }
1304
+ response_data = self.api_client.call_api(
1305
+ *_param,
1306
+ _request_timeout=_request_timeout
1307
+ )
1308
+ response_data.read()
1309
+ return self.api_client.response_deserialize(
1310
+ response_data=response_data,
1311
+ response_types_map=_response_types_map,
1312
+ ).data
1313
+
1314
+
1315
+ @validate_call
1316
+ def get_runner_access_control_with_http_info(
1317
+ self,
1318
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1319
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
1320
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
1321
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
1322
+ _request_timeout: Union[
1323
+ None,
1324
+ Annotated[StrictFloat, Field(gt=0)],
1325
+ Tuple[
1326
+ Annotated[StrictFloat, Field(gt=0)],
1327
+ Annotated[StrictFloat, Field(gt=0)]
1328
+ ]
1329
+ ] = None,
1330
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1331
+ _content_type: Optional[StrictStr] = None,
1332
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1333
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1334
+ ) -> ApiResponse[RunnerAccessControl]:
1335
+ """Get a control access for the Runner
1336
+
1337
+
1338
+ :param organization_id: the Organization identifier (required)
1339
+ :type organization_id: str
1340
+ :param workspace_id: the Workspace identifier (required)
1341
+ :type workspace_id: str
1342
+ :param runner_id: the Runner identifier (required)
1343
+ :type runner_id: str
1344
+ :param identity_id: the User identifier (required)
1345
+ :type identity_id: str
1346
+ :param _request_timeout: timeout setting for this request. If one
1347
+ number provided, it will be total request
1348
+ timeout. It can also be a pair (tuple) of
1349
+ (connection, read) timeouts.
1350
+ :type _request_timeout: int, tuple(int, int), optional
1351
+ :param _request_auth: set to override the auth_settings for an a single
1352
+ request; this effectively ignores the
1353
+ authentication in the spec for a single request.
1354
+ :type _request_auth: dict, optional
1355
+ :param _content_type: force content-type for the request.
1356
+ :type _content_type: str, Optional
1357
+ :param _headers: set to override the headers for a single
1358
+ request; this effectively ignores the headers
1359
+ in the spec for a single request.
1360
+ :type _headers: dict, optional
1361
+ :param _host_index: set to override the host_index for a single
1362
+ request; this effectively ignores the host_index
1363
+ in the spec for a single request.
1364
+ :type _host_index: int, optional
1365
+ :return: Returns the result object.
1366
+ """ # noqa: E501
1367
+
1368
+ _param = self._get_runner_access_control_serialize(
1369
+ organization_id=organization_id,
1370
+ workspace_id=workspace_id,
1371
+ runner_id=runner_id,
1372
+ identity_id=identity_id,
1373
+ _request_auth=_request_auth,
1374
+ _content_type=_content_type,
1375
+ _headers=_headers,
1376
+ _host_index=_host_index
1377
+ )
1378
+
1379
+ _response_types_map: Dict[str, Optional[str]] = {
1380
+ '200': "RunnerAccessControl",
1381
+ '404': None,
1382
+ }
1383
+ response_data = self.api_client.call_api(
1384
+ *_param,
1385
+ _request_timeout=_request_timeout
1386
+ )
1387
+ response_data.read()
1388
+ return self.api_client.response_deserialize(
1389
+ response_data=response_data,
1390
+ response_types_map=_response_types_map,
1391
+ )
1392
+
1393
+
1394
+ @validate_call
1395
+ def get_runner_access_control_without_preload_content(
1396
+ self,
1397
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1398
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
1399
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
1400
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
1401
+ _request_timeout: Union[
1402
+ None,
1403
+ Annotated[StrictFloat, Field(gt=0)],
1404
+ Tuple[
1405
+ Annotated[StrictFloat, Field(gt=0)],
1406
+ Annotated[StrictFloat, Field(gt=0)]
1407
+ ]
1408
+ ] = None,
1409
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1410
+ _content_type: Optional[StrictStr] = None,
1411
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1412
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1413
+ ) -> RESTResponseType:
1414
+ """Get a control access for the Runner
1415
+
1416
+
1417
+ :param organization_id: the Organization identifier (required)
1418
+ :type organization_id: str
1419
+ :param workspace_id: the Workspace identifier (required)
1420
+ :type workspace_id: str
1421
+ :param runner_id: the Runner identifier (required)
1422
+ :type runner_id: str
1423
+ :param identity_id: the User identifier (required)
1424
+ :type identity_id: str
1425
+ :param _request_timeout: timeout setting for this request. If one
1426
+ number provided, it will be total request
1427
+ timeout. It can also be a pair (tuple) of
1428
+ (connection, read) timeouts.
1429
+ :type _request_timeout: int, tuple(int, int), optional
1430
+ :param _request_auth: set to override the auth_settings for an a single
1431
+ request; this effectively ignores the
1432
+ authentication in the spec for a single request.
1433
+ :type _request_auth: dict, optional
1434
+ :param _content_type: force content-type for the request.
1435
+ :type _content_type: str, Optional
1436
+ :param _headers: set to override the headers for a single
1437
+ request; this effectively ignores the headers
1438
+ in the spec for a single request.
1439
+ :type _headers: dict, optional
1440
+ :param _host_index: set to override the host_index for a single
1441
+ request; this effectively ignores the host_index
1442
+ in the spec for a single request.
1443
+ :type _host_index: int, optional
1444
+ :return: Returns the result object.
1445
+ """ # noqa: E501
1446
+
1447
+ _param = self._get_runner_access_control_serialize(
1448
+ organization_id=organization_id,
1449
+ workspace_id=workspace_id,
1450
+ runner_id=runner_id,
1451
+ identity_id=identity_id,
1452
+ _request_auth=_request_auth,
1453
+ _content_type=_content_type,
1454
+ _headers=_headers,
1455
+ _host_index=_host_index
1456
+ )
1457
+
1458
+ _response_types_map: Dict[str, Optional[str]] = {
1459
+ '200': "RunnerAccessControl",
1460
+ '404': None,
1461
+ }
1462
+ response_data = self.api_client.call_api(
1463
+ *_param,
1464
+ _request_timeout=_request_timeout
1465
+ )
1466
+ return response_data.response
1467
+
1468
+
1469
+ def _get_runner_access_control_serialize(
1470
+ self,
1471
+ organization_id,
1472
+ workspace_id,
1473
+ runner_id,
1474
+ identity_id,
1475
+ _request_auth,
1476
+ _content_type,
1477
+ _headers,
1478
+ _host_index,
1479
+ ) -> RequestSerialized:
1480
+
1481
+ _host = None
1482
+
1483
+ _collection_formats: Dict[str, str] = {
1484
+ }
1485
+
1486
+ _path_params: Dict[str, str] = {}
1487
+ _query_params: List[Tuple[str, str]] = []
1488
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1489
+ _form_params: List[Tuple[str, str]] = []
1490
+ _files: Dict[str, str] = {}
1491
+ _body_params: Optional[bytes] = None
1492
+
1493
+ # process the path parameters
1494
+ if organization_id is not None:
1495
+ _path_params['organization_id'] = organization_id
1496
+ if workspace_id is not None:
1497
+ _path_params['workspace_id'] = workspace_id
1498
+ if runner_id is not None:
1499
+ _path_params['runner_id'] = runner_id
1500
+ if identity_id is not None:
1501
+ _path_params['identity_id'] = identity_id
1502
+ # process the query parameters
1503
+ # process the header parameters
1504
+ # process the form parameters
1505
+ # process the body parameter
1506
+
1507
+
1508
+ # set the HTTP header `Accept`
1509
+ _header_params['Accept'] = self.api_client.select_header_accept(
1510
+ [
1511
+ 'application/json'
1512
+ ]
1513
+ )
1514
+
1515
+
1516
+ # authentication setting
1517
+ _auth_settings: List[str] = [
1518
+ 'oAuth2AuthCode'
1519
+ ]
1520
+
1521
+ return self.api_client.param_serialize(
1522
+ method='GET',
1523
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security/access/{identity_id}',
1524
+ path_params=_path_params,
1525
+ query_params=_query_params,
1526
+ header_params=_header_params,
1527
+ body=_body_params,
1528
+ post_params=_form_params,
1529
+ files=_files,
1530
+ auth_settings=_auth_settings,
1531
+ collection_formats=_collection_formats,
1532
+ _host=_host,
1533
+ _request_auth=_request_auth
1534
+ )
1535
+
1536
+
1537
+
1538
+
1539
+ @validate_call
1540
+ def get_runner_permissions(
1541
+ self,
1542
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1543
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
1544
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
1545
+ role: Annotated[StrictStr, Field(description="the Role")],
1546
+ _request_timeout: Union[
1547
+ None,
1548
+ Annotated[StrictFloat, Field(gt=0)],
1549
+ Tuple[
1550
+ Annotated[StrictFloat, Field(gt=0)],
1551
+ Annotated[StrictFloat, Field(gt=0)]
1552
+ ]
1553
+ ] = None,
1554
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1555
+ _content_type: Optional[StrictStr] = None,
1556
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1557
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1558
+ ) -> List[str]:
1559
+ """Get the Runner permission by given role
1560
+
1561
+
1562
+ :param organization_id: the Organization identifier (required)
1563
+ :type organization_id: str
1564
+ :param workspace_id: the Workspace identifier (required)
1565
+ :type workspace_id: str
1566
+ :param runner_id: the Runner identifier (required)
1567
+ :type runner_id: str
1568
+ :param role: the Role (required)
1569
+ :type role: str
1570
+ :param _request_timeout: timeout setting for this request. If one
1571
+ number provided, it will be total request
1572
+ timeout. It can also be a pair (tuple) of
1573
+ (connection, read) timeouts.
1574
+ :type _request_timeout: int, tuple(int, int), optional
1575
+ :param _request_auth: set to override the auth_settings for an a single
1576
+ request; this effectively ignores the
1577
+ authentication in the spec for a single request.
1578
+ :type _request_auth: dict, optional
1579
+ :param _content_type: force content-type for the request.
1580
+ :type _content_type: str, Optional
1581
+ :param _headers: set to override the headers for a single
1582
+ request; this effectively ignores the headers
1583
+ in the spec for a single request.
1584
+ :type _headers: dict, optional
1585
+ :param _host_index: set to override the host_index for a single
1586
+ request; this effectively ignores the host_index
1587
+ in the spec for a single request.
1588
+ :type _host_index: int, optional
1589
+ :return: Returns the result object.
1590
+ """ # noqa: E501
1591
+
1592
+ _param = self._get_runner_permissions_serialize(
1593
+ organization_id=organization_id,
1594
+ workspace_id=workspace_id,
1595
+ runner_id=runner_id,
1596
+ role=role,
1597
+ _request_auth=_request_auth,
1598
+ _content_type=_content_type,
1599
+ _headers=_headers,
1600
+ _host_index=_host_index
1601
+ )
1602
+
1603
+ _response_types_map: Dict[str, Optional[str]] = {
1604
+ '200': "List[str]",
1605
+ }
1606
+ response_data = self.api_client.call_api(
1607
+ *_param,
1608
+ _request_timeout=_request_timeout
1609
+ )
1610
+ response_data.read()
1611
+ return self.api_client.response_deserialize(
1612
+ response_data=response_data,
1613
+ response_types_map=_response_types_map,
1614
+ ).data
1615
+
1616
+
1617
+ @validate_call
1618
+ def get_runner_permissions_with_http_info(
1619
+ self,
1620
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1621
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
1622
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
1623
+ role: Annotated[StrictStr, Field(description="the Role")],
1624
+ _request_timeout: Union[
1625
+ None,
1626
+ Annotated[StrictFloat, Field(gt=0)],
1627
+ Tuple[
1628
+ Annotated[StrictFloat, Field(gt=0)],
1629
+ Annotated[StrictFloat, Field(gt=0)]
1630
+ ]
1631
+ ] = None,
1632
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1633
+ _content_type: Optional[StrictStr] = None,
1634
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1635
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1636
+ ) -> ApiResponse[List[str]]:
1637
+ """Get the Runner permission by given role
1638
+
1639
+
1640
+ :param organization_id: the Organization identifier (required)
1641
+ :type organization_id: str
1642
+ :param workspace_id: the Workspace identifier (required)
1643
+ :type workspace_id: str
1644
+ :param runner_id: the Runner identifier (required)
1645
+ :type runner_id: str
1646
+ :param role: the Role (required)
1647
+ :type role: str
1648
+ :param _request_timeout: timeout setting for this request. If one
1649
+ number provided, it will be total request
1650
+ timeout. It can also be a pair (tuple) of
1651
+ (connection, read) timeouts.
1652
+ :type _request_timeout: int, tuple(int, int), optional
1653
+ :param _request_auth: set to override the auth_settings for an a single
1654
+ request; this effectively ignores the
1655
+ authentication in the spec for a single request.
1656
+ :type _request_auth: dict, optional
1657
+ :param _content_type: force content-type for the request.
1658
+ :type _content_type: str, Optional
1659
+ :param _headers: set to override the headers for a single
1660
+ request; this effectively ignores the headers
1661
+ in the spec for a single request.
1662
+ :type _headers: dict, optional
1663
+ :param _host_index: set to override the host_index for a single
1664
+ request; this effectively ignores the host_index
1665
+ in the spec for a single request.
1666
+ :type _host_index: int, optional
1667
+ :return: Returns the result object.
1668
+ """ # noqa: E501
1669
+
1670
+ _param = self._get_runner_permissions_serialize(
1671
+ organization_id=organization_id,
1672
+ workspace_id=workspace_id,
1673
+ runner_id=runner_id,
1674
+ role=role,
1675
+ _request_auth=_request_auth,
1676
+ _content_type=_content_type,
1677
+ _headers=_headers,
1678
+ _host_index=_host_index
1679
+ )
1680
+
1681
+ _response_types_map: Dict[str, Optional[str]] = {
1682
+ '200': "List[str]",
1683
+ }
1684
+ response_data = self.api_client.call_api(
1685
+ *_param,
1686
+ _request_timeout=_request_timeout
1687
+ )
1688
+ response_data.read()
1689
+ return self.api_client.response_deserialize(
1690
+ response_data=response_data,
1691
+ response_types_map=_response_types_map,
1692
+ )
1693
+
1694
+
1695
+ @validate_call
1696
+ def get_runner_permissions_without_preload_content(
1697
+ self,
1698
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1699
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
1700
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
1701
+ role: Annotated[StrictStr, Field(description="the Role")],
1702
+ _request_timeout: Union[
1703
+ None,
1704
+ Annotated[StrictFloat, Field(gt=0)],
1705
+ Tuple[
1706
+ Annotated[StrictFloat, Field(gt=0)],
1707
+ Annotated[StrictFloat, Field(gt=0)]
1708
+ ]
1709
+ ] = None,
1710
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1711
+ _content_type: Optional[StrictStr] = None,
1712
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1713
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1714
+ ) -> RESTResponseType:
1715
+ """Get the Runner permission by given role
1716
+
1717
+
1718
+ :param organization_id: the Organization identifier (required)
1719
+ :type organization_id: str
1720
+ :param workspace_id: the Workspace identifier (required)
1721
+ :type workspace_id: str
1722
+ :param runner_id: the Runner identifier (required)
1723
+ :type runner_id: str
1724
+ :param role: the Role (required)
1725
+ :type role: str
1726
+ :param _request_timeout: timeout setting for this request. If one
1727
+ number provided, it will be total request
1728
+ timeout. It can also be a pair (tuple) of
1729
+ (connection, read) timeouts.
1730
+ :type _request_timeout: int, tuple(int, int), optional
1731
+ :param _request_auth: set to override the auth_settings for an a single
1732
+ request; this effectively ignores the
1733
+ authentication in the spec for a single request.
1734
+ :type _request_auth: dict, optional
1735
+ :param _content_type: force content-type for the request.
1736
+ :type _content_type: str, Optional
1737
+ :param _headers: set to override the headers for a single
1738
+ request; this effectively ignores the headers
1739
+ in the spec for a single request.
1740
+ :type _headers: dict, optional
1741
+ :param _host_index: set to override the host_index for a single
1742
+ request; this effectively ignores the host_index
1743
+ in the spec for a single request.
1744
+ :type _host_index: int, optional
1745
+ :return: Returns the result object.
1746
+ """ # noqa: E501
1747
+
1748
+ _param = self._get_runner_permissions_serialize(
1749
+ organization_id=organization_id,
1750
+ workspace_id=workspace_id,
1751
+ runner_id=runner_id,
1752
+ role=role,
1753
+ _request_auth=_request_auth,
1754
+ _content_type=_content_type,
1755
+ _headers=_headers,
1756
+ _host_index=_host_index
1757
+ )
1758
+
1759
+ _response_types_map: Dict[str, Optional[str]] = {
1760
+ '200': "List[str]",
1761
+ }
1762
+ response_data = self.api_client.call_api(
1763
+ *_param,
1764
+ _request_timeout=_request_timeout
1765
+ )
1766
+ return response_data.response
1767
+
1768
+
1769
+ def _get_runner_permissions_serialize(
1770
+ self,
1771
+ organization_id,
1772
+ workspace_id,
1773
+ runner_id,
1774
+ role,
1775
+ _request_auth,
1776
+ _content_type,
1777
+ _headers,
1778
+ _host_index,
1779
+ ) -> RequestSerialized:
1780
+
1781
+ _host = None
1782
+
1783
+ _collection_formats: Dict[str, str] = {
1784
+ }
1785
+
1786
+ _path_params: Dict[str, str] = {}
1787
+ _query_params: List[Tuple[str, str]] = []
1788
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1789
+ _form_params: List[Tuple[str, str]] = []
1790
+ _files: Dict[str, str] = {}
1791
+ _body_params: Optional[bytes] = None
1792
+
1793
+ # process the path parameters
1794
+ if organization_id is not None:
1795
+ _path_params['organization_id'] = organization_id
1796
+ if workspace_id is not None:
1797
+ _path_params['workspace_id'] = workspace_id
1798
+ if runner_id is not None:
1799
+ _path_params['runner_id'] = runner_id
1800
+ if role is not None:
1801
+ _path_params['role'] = role
1802
+ # process the query parameters
1803
+ # process the header parameters
1804
+ # process the form parameters
1805
+ # process the body parameter
1806
+
1807
+
1808
+ # set the HTTP header `Accept`
1809
+ _header_params['Accept'] = self.api_client.select_header_accept(
1810
+ [
1811
+ 'application/json'
1812
+ ]
1813
+ )
1814
+
1815
+
1816
+ # authentication setting
1817
+ _auth_settings: List[str] = [
1818
+ 'oAuth2AuthCode'
1819
+ ]
1820
+
1821
+ return self.api_client.param_serialize(
1822
+ method='GET',
1823
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/permissions/{role}',
1824
+ path_params=_path_params,
1825
+ query_params=_query_params,
1826
+ header_params=_header_params,
1827
+ body=_body_params,
1828
+ post_params=_form_params,
1829
+ files=_files,
1830
+ auth_settings=_auth_settings,
1831
+ collection_formats=_collection_formats,
1832
+ _host=_host,
1833
+ _request_auth=_request_auth
1834
+ )
1835
+
1836
+
1837
+
1838
+
1839
+ @validate_call
1840
+ def get_runner_security(
1841
+ self,
1842
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1843
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
1844
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
1845
+ _request_timeout: Union[
1846
+ None,
1847
+ Annotated[StrictFloat, Field(gt=0)],
1848
+ Tuple[
1849
+ Annotated[StrictFloat, Field(gt=0)],
1850
+ Annotated[StrictFloat, Field(gt=0)]
1851
+ ]
1852
+ ] = None,
1853
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1854
+ _content_type: Optional[StrictStr] = None,
1855
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1856
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1857
+ ) -> RunnerSecurity:
1858
+ """Get the Runner security information
1859
+
1860
+
1861
+ :param organization_id: the Organization identifier (required)
1862
+ :type organization_id: str
1863
+ :param workspace_id: the Workspace identifier (required)
1864
+ :type workspace_id: str
1865
+ :param runner_id: the Runner identifier (required)
1866
+ :type runner_id: str
1867
+ :param _request_timeout: timeout setting for this request. If one
1868
+ number provided, it will be total request
1869
+ timeout. It can also be a pair (tuple) of
1870
+ (connection, read) timeouts.
1871
+ :type _request_timeout: int, tuple(int, int), optional
1872
+ :param _request_auth: set to override the auth_settings for an a single
1873
+ request; this effectively ignores the
1874
+ authentication in the spec for a single request.
1875
+ :type _request_auth: dict, optional
1876
+ :param _content_type: force content-type for the request.
1877
+ :type _content_type: str, Optional
1878
+ :param _headers: set to override the headers for a single
1879
+ request; this effectively ignores the headers
1880
+ in the spec for a single request.
1881
+ :type _headers: dict, optional
1882
+ :param _host_index: set to override the host_index for a single
1883
+ request; this effectively ignores the host_index
1884
+ in the spec for a single request.
1885
+ :type _host_index: int, optional
1886
+ :return: Returns the result object.
1887
+ """ # noqa: E501
1888
+
1889
+ _param = self._get_runner_security_serialize(
1890
+ organization_id=organization_id,
1891
+ workspace_id=workspace_id,
1892
+ runner_id=runner_id,
1893
+ _request_auth=_request_auth,
1894
+ _content_type=_content_type,
1895
+ _headers=_headers,
1896
+ _host_index=_host_index
1897
+ )
1898
+
1899
+ _response_types_map: Dict[str, Optional[str]] = {
1900
+ '200': "RunnerSecurity",
1901
+ '404': None,
1902
+ }
1903
+ response_data = self.api_client.call_api(
1904
+ *_param,
1905
+ _request_timeout=_request_timeout
1906
+ )
1907
+ response_data.read()
1908
+ return self.api_client.response_deserialize(
1909
+ response_data=response_data,
1910
+ response_types_map=_response_types_map,
1911
+ ).data
1912
+
1913
+
1914
+ @validate_call
1915
+ def get_runner_security_with_http_info(
1916
+ self,
1917
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1918
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
1919
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
1920
+ _request_timeout: Union[
1921
+ None,
1922
+ Annotated[StrictFloat, Field(gt=0)],
1923
+ Tuple[
1924
+ Annotated[StrictFloat, Field(gt=0)],
1925
+ Annotated[StrictFloat, Field(gt=0)]
1926
+ ]
1927
+ ] = None,
1928
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1929
+ _content_type: Optional[StrictStr] = None,
1930
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1931
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1932
+ ) -> ApiResponse[RunnerSecurity]:
1933
+ """Get the Runner security information
1934
+
1935
+
1936
+ :param organization_id: the Organization identifier (required)
1937
+ :type organization_id: str
1938
+ :param workspace_id: the Workspace identifier (required)
1939
+ :type workspace_id: str
1940
+ :param runner_id: the Runner identifier (required)
1941
+ :type runner_id: str
1942
+ :param _request_timeout: timeout setting for this request. If one
1943
+ number provided, it will be total request
1944
+ timeout. It can also be a pair (tuple) of
1945
+ (connection, read) timeouts.
1946
+ :type _request_timeout: int, tuple(int, int), optional
1947
+ :param _request_auth: set to override the auth_settings for an a single
1948
+ request; this effectively ignores the
1949
+ authentication in the spec for a single request.
1950
+ :type _request_auth: dict, optional
1951
+ :param _content_type: force content-type for the request.
1952
+ :type _content_type: str, Optional
1953
+ :param _headers: set to override the headers for a single
1954
+ request; this effectively ignores the headers
1955
+ in the spec for a single request.
1956
+ :type _headers: dict, optional
1957
+ :param _host_index: set to override the host_index for a single
1958
+ request; this effectively ignores the host_index
1959
+ in the spec for a single request.
1960
+ :type _host_index: int, optional
1961
+ :return: Returns the result object.
1962
+ """ # noqa: E501
1963
+
1964
+ _param = self._get_runner_security_serialize(
1965
+ organization_id=organization_id,
1966
+ workspace_id=workspace_id,
1967
+ runner_id=runner_id,
1968
+ _request_auth=_request_auth,
1969
+ _content_type=_content_type,
1970
+ _headers=_headers,
1971
+ _host_index=_host_index
1972
+ )
1973
+
1974
+ _response_types_map: Dict[str, Optional[str]] = {
1975
+ '200': "RunnerSecurity",
1976
+ '404': None,
1977
+ }
1978
+ response_data = self.api_client.call_api(
1979
+ *_param,
1980
+ _request_timeout=_request_timeout
1981
+ )
1982
+ response_data.read()
1983
+ return self.api_client.response_deserialize(
1984
+ response_data=response_data,
1985
+ response_types_map=_response_types_map,
1986
+ )
1987
+
1988
+
1989
+ @validate_call
1990
+ def get_runner_security_without_preload_content(
1991
+ self,
1992
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
1993
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
1994
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
1995
+ _request_timeout: Union[
1996
+ None,
1997
+ Annotated[StrictFloat, Field(gt=0)],
1998
+ Tuple[
1999
+ Annotated[StrictFloat, Field(gt=0)],
2000
+ Annotated[StrictFloat, Field(gt=0)]
2001
+ ]
2002
+ ] = None,
2003
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2004
+ _content_type: Optional[StrictStr] = None,
2005
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2006
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2007
+ ) -> RESTResponseType:
2008
+ """Get the Runner security information
2009
+
2010
+
2011
+ :param organization_id: the Organization identifier (required)
2012
+ :type organization_id: str
2013
+ :param workspace_id: the Workspace identifier (required)
2014
+ :type workspace_id: str
2015
+ :param runner_id: the Runner identifier (required)
2016
+ :type runner_id: str
2017
+ :param _request_timeout: timeout setting for this request. If one
2018
+ number provided, it will be total request
2019
+ timeout. It can also be a pair (tuple) of
2020
+ (connection, read) timeouts.
2021
+ :type _request_timeout: int, tuple(int, int), optional
2022
+ :param _request_auth: set to override the auth_settings for an a single
2023
+ request; this effectively ignores the
2024
+ authentication in the spec for a single request.
2025
+ :type _request_auth: dict, optional
2026
+ :param _content_type: force content-type for the request.
2027
+ :type _content_type: str, Optional
2028
+ :param _headers: set to override the headers for a single
2029
+ request; this effectively ignores the headers
2030
+ in the spec for a single request.
2031
+ :type _headers: dict, optional
2032
+ :param _host_index: set to override the host_index for a single
2033
+ request; this effectively ignores the host_index
2034
+ in the spec for a single request.
2035
+ :type _host_index: int, optional
2036
+ :return: Returns the result object.
2037
+ """ # noqa: E501
2038
+
2039
+ _param = self._get_runner_security_serialize(
2040
+ organization_id=organization_id,
2041
+ workspace_id=workspace_id,
2042
+ runner_id=runner_id,
2043
+ _request_auth=_request_auth,
2044
+ _content_type=_content_type,
2045
+ _headers=_headers,
2046
+ _host_index=_host_index
2047
+ )
2048
+
2049
+ _response_types_map: Dict[str, Optional[str]] = {
2050
+ '200': "RunnerSecurity",
2051
+ '404': None,
2052
+ }
2053
+ response_data = self.api_client.call_api(
2054
+ *_param,
2055
+ _request_timeout=_request_timeout
2056
+ )
2057
+ return response_data.response
2058
+
2059
+
2060
+ def _get_runner_security_serialize(
2061
+ self,
2062
+ organization_id,
2063
+ workspace_id,
2064
+ runner_id,
2065
+ _request_auth,
2066
+ _content_type,
2067
+ _headers,
2068
+ _host_index,
2069
+ ) -> RequestSerialized:
2070
+
2071
+ _host = None
2072
+
2073
+ _collection_formats: Dict[str, str] = {
2074
+ }
2075
+
2076
+ _path_params: Dict[str, str] = {}
2077
+ _query_params: List[Tuple[str, str]] = []
2078
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2079
+ _form_params: List[Tuple[str, str]] = []
2080
+ _files: Dict[str, str] = {}
2081
+ _body_params: Optional[bytes] = None
2082
+
2083
+ # process the path parameters
2084
+ if organization_id is not None:
2085
+ _path_params['organization_id'] = organization_id
2086
+ if workspace_id is not None:
2087
+ _path_params['workspace_id'] = workspace_id
2088
+ if runner_id is not None:
2089
+ _path_params['runner_id'] = runner_id
2090
+ # process the query parameters
2091
+ # process the header parameters
2092
+ # process the form parameters
2093
+ # process the body parameter
2094
+
2095
+
2096
+ # set the HTTP header `Accept`
2097
+ _header_params['Accept'] = self.api_client.select_header_accept(
2098
+ [
2099
+ 'application/json'
2100
+ ]
2101
+ )
2102
+
2103
+
2104
+ # authentication setting
2105
+ _auth_settings: List[str] = [
2106
+ 'oAuth2AuthCode'
2107
+ ]
2108
+
2109
+ return self.api_client.param_serialize(
2110
+ method='GET',
2111
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security',
2112
+ path_params=_path_params,
2113
+ query_params=_query_params,
2114
+ header_params=_header_params,
2115
+ body=_body_params,
2116
+ post_params=_form_params,
2117
+ files=_files,
2118
+ auth_settings=_auth_settings,
2119
+ collection_formats=_collection_formats,
2120
+ _host=_host,
2121
+ _request_auth=_request_auth
2122
+ )
2123
+
2124
+
2125
+
2126
+
2127
+ @validate_call
2128
+ def get_runner_security_users(
2129
+ self,
2130
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2131
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
2132
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
2133
+ _request_timeout: Union[
2134
+ None,
2135
+ Annotated[StrictFloat, Field(gt=0)],
2136
+ Tuple[
2137
+ Annotated[StrictFloat, Field(gt=0)],
2138
+ Annotated[StrictFloat, Field(gt=0)]
2139
+ ]
2140
+ ] = None,
2141
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2142
+ _content_type: Optional[StrictStr] = None,
2143
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2144
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2145
+ ) -> List[str]:
2146
+ """Get the Runner security users list
2147
+
2148
+
2149
+ :param organization_id: the Organization identifier (required)
2150
+ :type organization_id: str
2151
+ :param workspace_id: the Workspace identifier (required)
2152
+ :type workspace_id: str
2153
+ :param runner_id: the Runner identifier (required)
2154
+ :type runner_id: str
2155
+ :param _request_timeout: timeout setting for this request. If one
2156
+ number provided, it will be total request
2157
+ timeout. It can also be a pair (tuple) of
2158
+ (connection, read) timeouts.
2159
+ :type _request_timeout: int, tuple(int, int), optional
2160
+ :param _request_auth: set to override the auth_settings for an a single
2161
+ request; this effectively ignores the
2162
+ authentication in the spec for a single request.
2163
+ :type _request_auth: dict, optional
2164
+ :param _content_type: force content-type for the request.
2165
+ :type _content_type: str, Optional
2166
+ :param _headers: set to override the headers for a single
2167
+ request; this effectively ignores the headers
2168
+ in the spec for a single request.
2169
+ :type _headers: dict, optional
2170
+ :param _host_index: set to override the host_index for a single
2171
+ request; this effectively ignores the host_index
2172
+ in the spec for a single request.
2173
+ :type _host_index: int, optional
2174
+ :return: Returns the result object.
2175
+ """ # noqa: E501
2176
+
2177
+ _param = self._get_runner_security_users_serialize(
2178
+ organization_id=organization_id,
2179
+ workspace_id=workspace_id,
2180
+ runner_id=runner_id,
2181
+ _request_auth=_request_auth,
2182
+ _content_type=_content_type,
2183
+ _headers=_headers,
2184
+ _host_index=_host_index
2185
+ )
2186
+
2187
+ _response_types_map: Dict[str, Optional[str]] = {
2188
+ '200': "List[str]",
2189
+ '404': None,
2190
+ }
2191
+ response_data = self.api_client.call_api(
2192
+ *_param,
2193
+ _request_timeout=_request_timeout
2194
+ )
2195
+ response_data.read()
2196
+ return self.api_client.response_deserialize(
2197
+ response_data=response_data,
2198
+ response_types_map=_response_types_map,
2199
+ ).data
2200
+
2201
+
2202
+ @validate_call
2203
+ def get_runner_security_users_with_http_info(
2204
+ self,
2205
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2206
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
2207
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
2208
+ _request_timeout: Union[
2209
+ None,
2210
+ Annotated[StrictFloat, Field(gt=0)],
2211
+ Tuple[
2212
+ Annotated[StrictFloat, Field(gt=0)],
2213
+ Annotated[StrictFloat, Field(gt=0)]
2214
+ ]
2215
+ ] = None,
2216
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2217
+ _content_type: Optional[StrictStr] = None,
2218
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2219
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2220
+ ) -> ApiResponse[List[str]]:
2221
+ """Get the Runner security users list
2222
+
2223
+
2224
+ :param organization_id: the Organization identifier (required)
2225
+ :type organization_id: str
2226
+ :param workspace_id: the Workspace identifier (required)
2227
+ :type workspace_id: str
2228
+ :param runner_id: the Runner identifier (required)
2229
+ :type runner_id: str
2230
+ :param _request_timeout: timeout setting for this request. If one
2231
+ number provided, it will be total request
2232
+ timeout. It can also be a pair (tuple) of
2233
+ (connection, read) timeouts.
2234
+ :type _request_timeout: int, tuple(int, int), optional
2235
+ :param _request_auth: set to override the auth_settings for an a single
2236
+ request; this effectively ignores the
2237
+ authentication in the spec for a single request.
2238
+ :type _request_auth: dict, optional
2239
+ :param _content_type: force content-type for the request.
2240
+ :type _content_type: str, Optional
2241
+ :param _headers: set to override the headers for a single
2242
+ request; this effectively ignores the headers
2243
+ in the spec for a single request.
2244
+ :type _headers: dict, optional
2245
+ :param _host_index: set to override the host_index for a single
2246
+ request; this effectively ignores the host_index
2247
+ in the spec for a single request.
2248
+ :type _host_index: int, optional
2249
+ :return: Returns the result object.
2250
+ """ # noqa: E501
2251
+
2252
+ _param = self._get_runner_security_users_serialize(
2253
+ organization_id=organization_id,
2254
+ workspace_id=workspace_id,
2255
+ runner_id=runner_id,
2256
+ _request_auth=_request_auth,
2257
+ _content_type=_content_type,
2258
+ _headers=_headers,
2259
+ _host_index=_host_index
2260
+ )
2261
+
2262
+ _response_types_map: Dict[str, Optional[str]] = {
2263
+ '200': "List[str]",
2264
+ '404': None,
2265
+ }
2266
+ response_data = self.api_client.call_api(
2267
+ *_param,
2268
+ _request_timeout=_request_timeout
2269
+ )
2270
+ response_data.read()
2271
+ return self.api_client.response_deserialize(
2272
+ response_data=response_data,
2273
+ response_types_map=_response_types_map,
2274
+ )
2275
+
2276
+
2277
+ @validate_call
2278
+ def get_runner_security_users_without_preload_content(
2279
+ self,
2280
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2281
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
2282
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
2283
+ _request_timeout: Union[
2284
+ None,
2285
+ Annotated[StrictFloat, Field(gt=0)],
2286
+ Tuple[
2287
+ Annotated[StrictFloat, Field(gt=0)],
2288
+ Annotated[StrictFloat, Field(gt=0)]
2289
+ ]
2290
+ ] = None,
2291
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2292
+ _content_type: Optional[StrictStr] = None,
2293
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2294
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2295
+ ) -> RESTResponseType:
2296
+ """Get the Runner security users list
2297
+
2298
+
2299
+ :param organization_id: the Organization identifier (required)
2300
+ :type organization_id: str
2301
+ :param workspace_id: the Workspace identifier (required)
2302
+ :type workspace_id: str
2303
+ :param runner_id: the Runner identifier (required)
2304
+ :type runner_id: str
2305
+ :param _request_timeout: timeout setting for this request. If one
2306
+ number provided, it will be total request
2307
+ timeout. It can also be a pair (tuple) of
2308
+ (connection, read) timeouts.
2309
+ :type _request_timeout: int, tuple(int, int), optional
2310
+ :param _request_auth: set to override the auth_settings for an a single
2311
+ request; this effectively ignores the
2312
+ authentication in the spec for a single request.
2313
+ :type _request_auth: dict, optional
2314
+ :param _content_type: force content-type for the request.
2315
+ :type _content_type: str, Optional
2316
+ :param _headers: set to override the headers for a single
2317
+ request; this effectively ignores the headers
2318
+ in the spec for a single request.
2319
+ :type _headers: dict, optional
2320
+ :param _host_index: set to override the host_index for a single
2321
+ request; this effectively ignores the host_index
2322
+ in the spec for a single request.
2323
+ :type _host_index: int, optional
2324
+ :return: Returns the result object.
2325
+ """ # noqa: E501
2326
+
2327
+ _param = self._get_runner_security_users_serialize(
2328
+ organization_id=organization_id,
2329
+ workspace_id=workspace_id,
2330
+ runner_id=runner_id,
2331
+ _request_auth=_request_auth,
2332
+ _content_type=_content_type,
2333
+ _headers=_headers,
2334
+ _host_index=_host_index
2335
+ )
2336
+
2337
+ _response_types_map: Dict[str, Optional[str]] = {
2338
+ '200': "List[str]",
2339
+ '404': None,
2340
+ }
2341
+ response_data = self.api_client.call_api(
2342
+ *_param,
2343
+ _request_timeout=_request_timeout
2344
+ )
2345
+ return response_data.response
2346
+
2347
+
2348
+ def _get_runner_security_users_serialize(
2349
+ self,
2350
+ organization_id,
2351
+ workspace_id,
2352
+ runner_id,
2353
+ _request_auth,
2354
+ _content_type,
2355
+ _headers,
2356
+ _host_index,
2357
+ ) -> RequestSerialized:
2358
+
2359
+ _host = None
2360
+
2361
+ _collection_formats: Dict[str, str] = {
2362
+ }
2363
+
2364
+ _path_params: Dict[str, str] = {}
2365
+ _query_params: List[Tuple[str, str]] = []
2366
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2367
+ _form_params: List[Tuple[str, str]] = []
2368
+ _files: Dict[str, str] = {}
2369
+ _body_params: Optional[bytes] = None
2370
+
2371
+ # process the path parameters
2372
+ if organization_id is not None:
2373
+ _path_params['organization_id'] = organization_id
2374
+ if workspace_id is not None:
2375
+ _path_params['workspace_id'] = workspace_id
2376
+ if runner_id is not None:
2377
+ _path_params['runner_id'] = runner_id
2378
+ # process the query parameters
2379
+ # process the header parameters
2380
+ # process the form parameters
2381
+ # process the body parameter
2382
+
2383
+
2384
+ # set the HTTP header `Accept`
2385
+ _header_params['Accept'] = self.api_client.select_header_accept(
2386
+ [
2387
+ 'application/json'
2388
+ ]
2389
+ )
2390
+
2391
+
2392
+ # authentication setting
2393
+ _auth_settings: List[str] = [
2394
+ 'oAuth2AuthCode'
2395
+ ]
2396
+
2397
+ return self.api_client.param_serialize(
2398
+ method='GET',
2399
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security/users',
2400
+ path_params=_path_params,
2401
+ query_params=_query_params,
2402
+ header_params=_header_params,
2403
+ body=_body_params,
2404
+ post_params=_form_params,
2405
+ files=_files,
2406
+ auth_settings=_auth_settings,
2407
+ collection_formats=_collection_formats,
2408
+ _host=_host,
2409
+ _request_auth=_request_auth
2410
+ )
2411
+
2412
+
2413
+
2414
+
2415
+ @validate_call
2416
+ def list_runners(
2417
+ self,
2418
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2419
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
2420
+ page: Annotated[Optional[StrictInt], Field(description="page number to query")] = None,
2421
+ size: Annotated[Optional[StrictInt], Field(description="amount of result by page")] = None,
2422
+ _request_timeout: Union[
2423
+ None,
2424
+ Annotated[StrictFloat, Field(gt=0)],
2425
+ Tuple[
2426
+ Annotated[StrictFloat, Field(gt=0)],
2427
+ Annotated[StrictFloat, Field(gt=0)]
2428
+ ]
2429
+ ] = None,
2430
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2431
+ _content_type: Optional[StrictStr] = None,
2432
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2433
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2434
+ ) -> List[Runner]:
2435
+ """List all Runners
2436
+
2437
+
2438
+ :param organization_id: the Organization identifier (required)
2439
+ :type organization_id: str
2440
+ :param workspace_id: the Workspace identifier (required)
2441
+ :type workspace_id: str
2442
+ :param page: page number to query
2443
+ :type page: int
2444
+ :param size: amount of result by page
2445
+ :type size: int
2446
+ :param _request_timeout: timeout setting for this request. If one
2447
+ number provided, it will be total request
2448
+ timeout. It can also be a pair (tuple) of
2449
+ (connection, read) timeouts.
2450
+ :type _request_timeout: int, tuple(int, int), optional
2451
+ :param _request_auth: set to override the auth_settings for an a single
2452
+ request; this effectively ignores the
2453
+ authentication in the spec for a single request.
2454
+ :type _request_auth: dict, optional
2455
+ :param _content_type: force content-type for the request.
2456
+ :type _content_type: str, Optional
2457
+ :param _headers: set to override the headers for a single
2458
+ request; this effectively ignores the headers
2459
+ in the spec for a single request.
2460
+ :type _headers: dict, optional
2461
+ :param _host_index: set to override the host_index for a single
2462
+ request; this effectively ignores the host_index
2463
+ in the spec for a single request.
2464
+ :type _host_index: int, optional
2465
+ :return: Returns the result object.
2466
+ """ # noqa: E501
2467
+
2468
+ _param = self._list_runners_serialize(
2469
+ organization_id=organization_id,
2470
+ workspace_id=workspace_id,
2471
+ page=page,
2472
+ size=size,
2473
+ _request_auth=_request_auth,
2474
+ _content_type=_content_type,
2475
+ _headers=_headers,
2476
+ _host_index=_host_index
2477
+ )
2478
+
2479
+ _response_types_map: Dict[str, Optional[str]] = {
2480
+ '200': "List[Runner]",
2481
+ }
2482
+ response_data = self.api_client.call_api(
2483
+ *_param,
2484
+ _request_timeout=_request_timeout
2485
+ )
2486
+ response_data.read()
2487
+ return self.api_client.response_deserialize(
2488
+ response_data=response_data,
2489
+ response_types_map=_response_types_map,
2490
+ ).data
2491
+
2492
+
2493
+ @validate_call
2494
+ def list_runners_with_http_info(
2495
+ self,
2496
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2497
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
2498
+ page: Annotated[Optional[StrictInt], Field(description="page number to query")] = None,
2499
+ size: Annotated[Optional[StrictInt], Field(description="amount of result by page")] = None,
2500
+ _request_timeout: Union[
2501
+ None,
2502
+ Annotated[StrictFloat, Field(gt=0)],
2503
+ Tuple[
2504
+ Annotated[StrictFloat, Field(gt=0)],
2505
+ Annotated[StrictFloat, Field(gt=0)]
2506
+ ]
2507
+ ] = None,
2508
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2509
+ _content_type: Optional[StrictStr] = None,
2510
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2511
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2512
+ ) -> ApiResponse[List[Runner]]:
2513
+ """List all Runners
2514
+
2515
+
2516
+ :param organization_id: the Organization identifier (required)
2517
+ :type organization_id: str
2518
+ :param workspace_id: the Workspace identifier (required)
2519
+ :type workspace_id: str
2520
+ :param page: page number to query
2521
+ :type page: int
2522
+ :param size: amount of result by page
2523
+ :type size: int
2524
+ :param _request_timeout: timeout setting for this request. If one
2525
+ number provided, it will be total request
2526
+ timeout. It can also be a pair (tuple) of
2527
+ (connection, read) timeouts.
2528
+ :type _request_timeout: int, tuple(int, int), optional
2529
+ :param _request_auth: set to override the auth_settings for an a single
2530
+ request; this effectively ignores the
2531
+ authentication in the spec for a single request.
2532
+ :type _request_auth: dict, optional
2533
+ :param _content_type: force content-type for the request.
2534
+ :type _content_type: str, Optional
2535
+ :param _headers: set to override the headers for a single
2536
+ request; this effectively ignores the headers
2537
+ in the spec for a single request.
2538
+ :type _headers: dict, optional
2539
+ :param _host_index: set to override the host_index for a single
2540
+ request; this effectively ignores the host_index
2541
+ in the spec for a single request.
2542
+ :type _host_index: int, optional
2543
+ :return: Returns the result object.
2544
+ """ # noqa: E501
2545
+
2546
+ _param = self._list_runners_serialize(
2547
+ organization_id=organization_id,
2548
+ workspace_id=workspace_id,
2549
+ page=page,
2550
+ size=size,
2551
+ _request_auth=_request_auth,
2552
+ _content_type=_content_type,
2553
+ _headers=_headers,
2554
+ _host_index=_host_index
2555
+ )
2556
+
2557
+ _response_types_map: Dict[str, Optional[str]] = {
2558
+ '200': "List[Runner]",
2559
+ }
2560
+ response_data = self.api_client.call_api(
2561
+ *_param,
2562
+ _request_timeout=_request_timeout
2563
+ )
2564
+ response_data.read()
2565
+ return self.api_client.response_deserialize(
2566
+ response_data=response_data,
2567
+ response_types_map=_response_types_map,
2568
+ )
2569
+
2570
+
2571
+ @validate_call
2572
+ def list_runners_without_preload_content(
2573
+ self,
2574
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2575
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
2576
+ page: Annotated[Optional[StrictInt], Field(description="page number to query")] = None,
2577
+ size: Annotated[Optional[StrictInt], Field(description="amount of result by page")] = None,
2578
+ _request_timeout: Union[
2579
+ None,
2580
+ Annotated[StrictFloat, Field(gt=0)],
2581
+ Tuple[
2582
+ Annotated[StrictFloat, Field(gt=0)],
2583
+ Annotated[StrictFloat, Field(gt=0)]
2584
+ ]
2585
+ ] = None,
2586
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2587
+ _content_type: Optional[StrictStr] = None,
2588
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2589
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2590
+ ) -> RESTResponseType:
2591
+ """List all Runners
2592
+
2593
+
2594
+ :param organization_id: the Organization identifier (required)
2595
+ :type organization_id: str
2596
+ :param workspace_id: the Workspace identifier (required)
2597
+ :type workspace_id: str
2598
+ :param page: page number to query
2599
+ :type page: int
2600
+ :param size: amount of result by page
2601
+ :type size: int
2602
+ :param _request_timeout: timeout setting for this request. If one
2603
+ number provided, it will be total request
2604
+ timeout. It can also be a pair (tuple) of
2605
+ (connection, read) timeouts.
2606
+ :type _request_timeout: int, tuple(int, int), optional
2607
+ :param _request_auth: set to override the auth_settings for an a single
2608
+ request; this effectively ignores the
2609
+ authentication in the spec for a single request.
2610
+ :type _request_auth: dict, optional
2611
+ :param _content_type: force content-type for the request.
2612
+ :type _content_type: str, Optional
2613
+ :param _headers: set to override the headers for a single
2614
+ request; this effectively ignores the headers
2615
+ in the spec for a single request.
2616
+ :type _headers: dict, optional
2617
+ :param _host_index: set to override the host_index for a single
2618
+ request; this effectively ignores the host_index
2619
+ in the spec for a single request.
2620
+ :type _host_index: int, optional
2621
+ :return: Returns the result object.
2622
+ """ # noqa: E501
2623
+
2624
+ _param = self._list_runners_serialize(
2625
+ organization_id=organization_id,
2626
+ workspace_id=workspace_id,
2627
+ page=page,
2628
+ size=size,
2629
+ _request_auth=_request_auth,
2630
+ _content_type=_content_type,
2631
+ _headers=_headers,
2632
+ _host_index=_host_index
2633
+ )
2634
+
2635
+ _response_types_map: Dict[str, Optional[str]] = {
2636
+ '200': "List[Runner]",
2637
+ }
2638
+ response_data = self.api_client.call_api(
2639
+ *_param,
2640
+ _request_timeout=_request_timeout
2641
+ )
2642
+ return response_data.response
2643
+
2644
+
2645
+ def _list_runners_serialize(
2646
+ self,
2647
+ organization_id,
2648
+ workspace_id,
2649
+ page,
2650
+ size,
2651
+ _request_auth,
2652
+ _content_type,
2653
+ _headers,
2654
+ _host_index,
2655
+ ) -> RequestSerialized:
2656
+
2657
+ _host = None
2658
+
2659
+ _collection_formats: Dict[str, str] = {
2660
+ }
2661
+
2662
+ _path_params: Dict[str, str] = {}
2663
+ _query_params: List[Tuple[str, str]] = []
2664
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2665
+ _form_params: List[Tuple[str, str]] = []
2666
+ _files: Dict[str, str] = {}
2667
+ _body_params: Optional[bytes] = None
2668
+
2669
+ # process the path parameters
2670
+ if organization_id is not None:
2671
+ _path_params['organization_id'] = organization_id
2672
+ if workspace_id is not None:
2673
+ _path_params['workspace_id'] = workspace_id
2674
+ # process the query parameters
2675
+ if page is not None:
2676
+
2677
+ _query_params.append(('page', page))
2678
+
2679
+ if size is not None:
2680
+
2681
+ _query_params.append(('size', size))
2682
+
2683
+ # process the header parameters
2684
+ # process the form parameters
2685
+ # process the body parameter
2686
+
2687
+
2688
+ # set the HTTP header `Accept`
2689
+ _header_params['Accept'] = self.api_client.select_header_accept(
2690
+ [
2691
+ 'application/json'
2692
+ ]
2693
+ )
2694
+
2695
+
2696
+ # authentication setting
2697
+ _auth_settings: List[str] = [
2698
+ 'oAuth2AuthCode'
2699
+ ]
2700
+
2701
+ return self.api_client.param_serialize(
2702
+ method='GET',
2703
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners',
2704
+ path_params=_path_params,
2705
+ query_params=_query_params,
2706
+ header_params=_header_params,
2707
+ body=_body_params,
2708
+ post_params=_form_params,
2709
+ files=_files,
2710
+ auth_settings=_auth_settings,
2711
+ collection_formats=_collection_formats,
2712
+ _host=_host,
2713
+ _request_auth=_request_auth
2714
+ )
2715
+
2716
+
2717
+
2718
+
2719
+ @validate_call
2720
+ def remove_runner_access_control(
2721
+ self,
2722
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2723
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
2724
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
2725
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
2726
+ _request_timeout: Union[
2727
+ None,
2728
+ Annotated[StrictFloat, Field(gt=0)],
2729
+ Tuple[
2730
+ Annotated[StrictFloat, Field(gt=0)],
2731
+ Annotated[StrictFloat, Field(gt=0)]
2732
+ ]
2733
+ ] = None,
2734
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2735
+ _content_type: Optional[StrictStr] = None,
2736
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2737
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2738
+ ) -> None:
2739
+ """Remove the specified access from the given Organization Runner
2740
+
2741
+
2742
+ :param organization_id: the Organization identifier (required)
2743
+ :type organization_id: str
2744
+ :param workspace_id: the Workspace identifier (required)
2745
+ :type workspace_id: str
2746
+ :param runner_id: the Runner identifier (required)
2747
+ :type runner_id: str
2748
+ :param identity_id: the User identifier (required)
2749
+ :type identity_id: str
2750
+ :param _request_timeout: timeout setting for this request. If one
2751
+ number provided, it will be total request
2752
+ timeout. It can also be a pair (tuple) of
2753
+ (connection, read) timeouts.
2754
+ :type _request_timeout: int, tuple(int, int), optional
2755
+ :param _request_auth: set to override the auth_settings for an a single
2756
+ request; this effectively ignores the
2757
+ authentication in the spec for a single request.
2758
+ :type _request_auth: dict, optional
2759
+ :param _content_type: force content-type for the request.
2760
+ :type _content_type: str, Optional
2761
+ :param _headers: set to override the headers for a single
2762
+ request; this effectively ignores the headers
2763
+ in the spec for a single request.
2764
+ :type _headers: dict, optional
2765
+ :param _host_index: set to override the host_index for a single
2766
+ request; this effectively ignores the host_index
2767
+ in the spec for a single request.
2768
+ :type _host_index: int, optional
2769
+ :return: Returns the result object.
2770
+ """ # noqa: E501
2771
+
2772
+ _param = self._remove_runner_access_control_serialize(
2773
+ organization_id=organization_id,
2774
+ workspace_id=workspace_id,
2775
+ runner_id=runner_id,
2776
+ identity_id=identity_id,
2777
+ _request_auth=_request_auth,
2778
+ _content_type=_content_type,
2779
+ _headers=_headers,
2780
+ _host_index=_host_index
2781
+ )
2782
+
2783
+ _response_types_map: Dict[str, Optional[str]] = {
2784
+ '204': None,
2785
+ '404': None,
2786
+ }
2787
+ response_data = self.api_client.call_api(
2788
+ *_param,
2789
+ _request_timeout=_request_timeout
2790
+ )
2791
+ response_data.read()
2792
+ return self.api_client.response_deserialize(
2793
+ response_data=response_data,
2794
+ response_types_map=_response_types_map,
2795
+ ).data
2796
+
2797
+
2798
+ @validate_call
2799
+ def remove_runner_access_control_with_http_info(
2800
+ self,
2801
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2802
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
2803
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
2804
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
2805
+ _request_timeout: Union[
2806
+ None,
2807
+ Annotated[StrictFloat, Field(gt=0)],
2808
+ Tuple[
2809
+ Annotated[StrictFloat, Field(gt=0)],
2810
+ Annotated[StrictFloat, Field(gt=0)]
2811
+ ]
2812
+ ] = None,
2813
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2814
+ _content_type: Optional[StrictStr] = None,
2815
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2816
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2817
+ ) -> ApiResponse[None]:
2818
+ """Remove the specified access from the given Organization Runner
2819
+
2820
+
2821
+ :param organization_id: the Organization identifier (required)
2822
+ :type organization_id: str
2823
+ :param workspace_id: the Workspace identifier (required)
2824
+ :type workspace_id: str
2825
+ :param runner_id: the Runner identifier (required)
2826
+ :type runner_id: str
2827
+ :param identity_id: the User identifier (required)
2828
+ :type identity_id: str
2829
+ :param _request_timeout: timeout setting for this request. If one
2830
+ number provided, it will be total request
2831
+ timeout. It can also be a pair (tuple) of
2832
+ (connection, read) timeouts.
2833
+ :type _request_timeout: int, tuple(int, int), optional
2834
+ :param _request_auth: set to override the auth_settings for an a single
2835
+ request; this effectively ignores the
2836
+ authentication in the spec for a single request.
2837
+ :type _request_auth: dict, optional
2838
+ :param _content_type: force content-type for the request.
2839
+ :type _content_type: str, Optional
2840
+ :param _headers: set to override the headers for a single
2841
+ request; this effectively ignores the headers
2842
+ in the spec for a single request.
2843
+ :type _headers: dict, optional
2844
+ :param _host_index: set to override the host_index for a single
2845
+ request; this effectively ignores the host_index
2846
+ in the spec for a single request.
2847
+ :type _host_index: int, optional
2848
+ :return: Returns the result object.
2849
+ """ # noqa: E501
2850
+
2851
+ _param = self._remove_runner_access_control_serialize(
2852
+ organization_id=organization_id,
2853
+ workspace_id=workspace_id,
2854
+ runner_id=runner_id,
2855
+ identity_id=identity_id,
2856
+ _request_auth=_request_auth,
2857
+ _content_type=_content_type,
2858
+ _headers=_headers,
2859
+ _host_index=_host_index
2860
+ )
2861
+
2862
+ _response_types_map: Dict[str, Optional[str]] = {
2863
+ '204': None,
2864
+ '404': None,
2865
+ }
2866
+ response_data = self.api_client.call_api(
2867
+ *_param,
2868
+ _request_timeout=_request_timeout
2869
+ )
2870
+ response_data.read()
2871
+ return self.api_client.response_deserialize(
2872
+ response_data=response_data,
2873
+ response_types_map=_response_types_map,
2874
+ )
2875
+
2876
+
2877
+ @validate_call
2878
+ def remove_runner_access_control_without_preload_content(
2879
+ self,
2880
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
2881
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
2882
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
2883
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
2884
+ _request_timeout: Union[
2885
+ None,
2886
+ Annotated[StrictFloat, Field(gt=0)],
2887
+ Tuple[
2888
+ Annotated[StrictFloat, Field(gt=0)],
2889
+ Annotated[StrictFloat, Field(gt=0)]
2890
+ ]
2891
+ ] = None,
2892
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2893
+ _content_type: Optional[StrictStr] = None,
2894
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2895
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2896
+ ) -> RESTResponseType:
2897
+ """Remove the specified access from the given Organization Runner
2898
+
2899
+
2900
+ :param organization_id: the Organization identifier (required)
2901
+ :type organization_id: str
2902
+ :param workspace_id: the Workspace identifier (required)
2903
+ :type workspace_id: str
2904
+ :param runner_id: the Runner identifier (required)
2905
+ :type runner_id: str
2906
+ :param identity_id: the User identifier (required)
2907
+ :type identity_id: str
2908
+ :param _request_timeout: timeout setting for this request. If one
2909
+ number provided, it will be total request
2910
+ timeout. It can also be a pair (tuple) of
2911
+ (connection, read) timeouts.
2912
+ :type _request_timeout: int, tuple(int, int), optional
2913
+ :param _request_auth: set to override the auth_settings for an a single
2914
+ request; this effectively ignores the
2915
+ authentication in the spec for a single request.
2916
+ :type _request_auth: dict, optional
2917
+ :param _content_type: force content-type for the request.
2918
+ :type _content_type: str, Optional
2919
+ :param _headers: set to override the headers for a single
2920
+ request; this effectively ignores the headers
2921
+ in the spec for a single request.
2922
+ :type _headers: dict, optional
2923
+ :param _host_index: set to override the host_index for a single
2924
+ request; this effectively ignores the host_index
2925
+ in the spec for a single request.
2926
+ :type _host_index: int, optional
2927
+ :return: Returns the result object.
2928
+ """ # noqa: E501
2929
+
2930
+ _param = self._remove_runner_access_control_serialize(
2931
+ organization_id=organization_id,
2932
+ workspace_id=workspace_id,
2933
+ runner_id=runner_id,
2934
+ identity_id=identity_id,
2935
+ _request_auth=_request_auth,
2936
+ _content_type=_content_type,
2937
+ _headers=_headers,
2938
+ _host_index=_host_index
2939
+ )
2940
+
2941
+ _response_types_map: Dict[str, Optional[str]] = {
2942
+ '204': None,
2943
+ '404': None,
2944
+ }
2945
+ response_data = self.api_client.call_api(
2946
+ *_param,
2947
+ _request_timeout=_request_timeout
2948
+ )
2949
+ return response_data.response
2950
+
2951
+
2952
+ def _remove_runner_access_control_serialize(
2953
+ self,
2954
+ organization_id,
2955
+ workspace_id,
2956
+ runner_id,
2957
+ identity_id,
2958
+ _request_auth,
2959
+ _content_type,
2960
+ _headers,
2961
+ _host_index,
2962
+ ) -> RequestSerialized:
2963
+
2964
+ _host = None
2965
+
2966
+ _collection_formats: Dict[str, str] = {
2967
+ }
2968
+
2969
+ _path_params: Dict[str, str] = {}
2970
+ _query_params: List[Tuple[str, str]] = []
2971
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2972
+ _form_params: List[Tuple[str, str]] = []
2973
+ _files: Dict[str, str] = {}
2974
+ _body_params: Optional[bytes] = None
2975
+
2976
+ # process the path parameters
2977
+ if organization_id is not None:
2978
+ _path_params['organization_id'] = organization_id
2979
+ if workspace_id is not None:
2980
+ _path_params['workspace_id'] = workspace_id
2981
+ if runner_id is not None:
2982
+ _path_params['runner_id'] = runner_id
2983
+ if identity_id is not None:
2984
+ _path_params['identity_id'] = identity_id
2985
+ # process the query parameters
2986
+ # process the header parameters
2987
+ # process the form parameters
2988
+ # process the body parameter
2989
+
2990
+
2991
+
2992
+
2993
+ # authentication setting
2994
+ _auth_settings: List[str] = [
2995
+ 'oAuth2AuthCode'
2996
+ ]
2997
+
2998
+ return self.api_client.param_serialize(
2999
+ method='DELETE',
3000
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security/access/{identity_id}',
3001
+ path_params=_path_params,
3002
+ query_params=_query_params,
3003
+ header_params=_header_params,
3004
+ body=_body_params,
3005
+ post_params=_form_params,
3006
+ files=_files,
3007
+ auth_settings=_auth_settings,
3008
+ collection_formats=_collection_formats,
3009
+ _host=_host,
3010
+ _request_auth=_request_auth
3011
+ )
3012
+
3013
+
3014
+
3015
+
3016
+ @validate_call
3017
+ def set_runner_default_security(
3018
+ self,
3019
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3020
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
3021
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
3022
+ runner_role: Annotated[RunnerRole, Field(description="This change the runner default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the runner.")],
3023
+ _request_timeout: Union[
3024
+ None,
3025
+ Annotated[StrictFloat, Field(gt=0)],
3026
+ Tuple[
3027
+ Annotated[StrictFloat, Field(gt=0)],
3028
+ Annotated[StrictFloat, Field(gt=0)]
3029
+ ]
3030
+ ] = None,
3031
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3032
+ _content_type: Optional[StrictStr] = None,
3033
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3034
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3035
+ ) -> RunnerSecurity:
3036
+ """Set the Runner default security
3037
+
3038
+
3039
+ :param organization_id: the Organization identifier (required)
3040
+ :type organization_id: str
3041
+ :param workspace_id: the Workspace identifier (required)
3042
+ :type workspace_id: str
3043
+ :param runner_id: the Runner identifier (required)
3044
+ :type runner_id: str
3045
+ :param runner_role: This change the runner default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the runner. (required)
3046
+ :type runner_role: RunnerRole
3047
+ :param _request_timeout: timeout setting for this request. If one
3048
+ number provided, it will be total request
3049
+ timeout. It can also be a pair (tuple) of
3050
+ (connection, read) timeouts.
3051
+ :type _request_timeout: int, tuple(int, int), optional
3052
+ :param _request_auth: set to override the auth_settings for an a single
3053
+ request; this effectively ignores the
3054
+ authentication in the spec for a single request.
3055
+ :type _request_auth: dict, optional
3056
+ :param _content_type: force content-type for the request.
3057
+ :type _content_type: str, Optional
3058
+ :param _headers: set to override the headers for a single
3059
+ request; this effectively ignores the headers
3060
+ in the spec for a single request.
3061
+ :type _headers: dict, optional
3062
+ :param _host_index: set to override the host_index for a single
3063
+ request; this effectively ignores the host_index
3064
+ in the spec for a single request.
3065
+ :type _host_index: int, optional
3066
+ :return: Returns the result object.
3067
+ """ # noqa: E501
3068
+
3069
+ _param = self._set_runner_default_security_serialize(
3070
+ organization_id=organization_id,
3071
+ workspace_id=workspace_id,
3072
+ runner_id=runner_id,
3073
+ runner_role=runner_role,
3074
+ _request_auth=_request_auth,
3075
+ _content_type=_content_type,
3076
+ _headers=_headers,
3077
+ _host_index=_host_index
3078
+ )
3079
+
3080
+ _response_types_map: Dict[str, Optional[str]] = {
3081
+ '201': "RunnerSecurity",
3082
+ '404': None,
3083
+ }
3084
+ response_data = self.api_client.call_api(
3085
+ *_param,
3086
+ _request_timeout=_request_timeout
3087
+ )
3088
+ response_data.read()
3089
+ return self.api_client.response_deserialize(
3090
+ response_data=response_data,
3091
+ response_types_map=_response_types_map,
3092
+ ).data
3093
+
3094
+
3095
+ @validate_call
3096
+ def set_runner_default_security_with_http_info(
3097
+ self,
3098
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3099
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
3100
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
3101
+ runner_role: Annotated[RunnerRole, Field(description="This change the runner default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the runner.")],
3102
+ _request_timeout: Union[
3103
+ None,
3104
+ Annotated[StrictFloat, Field(gt=0)],
3105
+ Tuple[
3106
+ Annotated[StrictFloat, Field(gt=0)],
3107
+ Annotated[StrictFloat, Field(gt=0)]
3108
+ ]
3109
+ ] = None,
3110
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3111
+ _content_type: Optional[StrictStr] = None,
3112
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3113
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3114
+ ) -> ApiResponse[RunnerSecurity]:
3115
+ """Set the Runner default security
3116
+
3117
+
3118
+ :param organization_id: the Organization identifier (required)
3119
+ :type organization_id: str
3120
+ :param workspace_id: the Workspace identifier (required)
3121
+ :type workspace_id: str
3122
+ :param runner_id: the Runner identifier (required)
3123
+ :type runner_id: str
3124
+ :param runner_role: This change the runner default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the runner. (required)
3125
+ :type runner_role: RunnerRole
3126
+ :param _request_timeout: timeout setting for this request. If one
3127
+ number provided, it will be total request
3128
+ timeout. It can also be a pair (tuple) of
3129
+ (connection, read) timeouts.
3130
+ :type _request_timeout: int, tuple(int, int), optional
3131
+ :param _request_auth: set to override the auth_settings for an a single
3132
+ request; this effectively ignores the
3133
+ authentication in the spec for a single request.
3134
+ :type _request_auth: dict, optional
3135
+ :param _content_type: force content-type for the request.
3136
+ :type _content_type: str, Optional
3137
+ :param _headers: set to override the headers for a single
3138
+ request; this effectively ignores the headers
3139
+ in the spec for a single request.
3140
+ :type _headers: dict, optional
3141
+ :param _host_index: set to override the host_index for a single
3142
+ request; this effectively ignores the host_index
3143
+ in the spec for a single request.
3144
+ :type _host_index: int, optional
3145
+ :return: Returns the result object.
3146
+ """ # noqa: E501
3147
+
3148
+ _param = self._set_runner_default_security_serialize(
3149
+ organization_id=organization_id,
3150
+ workspace_id=workspace_id,
3151
+ runner_id=runner_id,
3152
+ runner_role=runner_role,
3153
+ _request_auth=_request_auth,
3154
+ _content_type=_content_type,
3155
+ _headers=_headers,
3156
+ _host_index=_host_index
3157
+ )
3158
+
3159
+ _response_types_map: Dict[str, Optional[str]] = {
3160
+ '201': "RunnerSecurity",
3161
+ '404': None,
3162
+ }
3163
+ response_data = self.api_client.call_api(
3164
+ *_param,
3165
+ _request_timeout=_request_timeout
3166
+ )
3167
+ response_data.read()
3168
+ return self.api_client.response_deserialize(
3169
+ response_data=response_data,
3170
+ response_types_map=_response_types_map,
3171
+ )
3172
+
3173
+
3174
+ @validate_call
3175
+ def set_runner_default_security_without_preload_content(
3176
+ self,
3177
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3178
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
3179
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
3180
+ runner_role: Annotated[RunnerRole, Field(description="This change the runner default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the runner.")],
3181
+ _request_timeout: Union[
3182
+ None,
3183
+ Annotated[StrictFloat, Field(gt=0)],
3184
+ Tuple[
3185
+ Annotated[StrictFloat, Field(gt=0)],
3186
+ Annotated[StrictFloat, Field(gt=0)]
3187
+ ]
3188
+ ] = None,
3189
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3190
+ _content_type: Optional[StrictStr] = None,
3191
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3192
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3193
+ ) -> RESTResponseType:
3194
+ """Set the Runner default security
3195
+
3196
+
3197
+ :param organization_id: the Organization identifier (required)
3198
+ :type organization_id: str
3199
+ :param workspace_id: the Workspace identifier (required)
3200
+ :type workspace_id: str
3201
+ :param runner_id: the Runner identifier (required)
3202
+ :type runner_id: str
3203
+ :param runner_role: This change the runner default security. The default security is the role assigned to any person not on the Access Control List. If the default security is None, then nobody outside of the ACL can access the runner. (required)
3204
+ :type runner_role: RunnerRole
3205
+ :param _request_timeout: timeout setting for this request. If one
3206
+ number provided, it will be total request
3207
+ timeout. It can also be a pair (tuple) of
3208
+ (connection, read) timeouts.
3209
+ :type _request_timeout: int, tuple(int, int), optional
3210
+ :param _request_auth: set to override the auth_settings for an a single
3211
+ request; this effectively ignores the
3212
+ authentication in the spec for a single request.
3213
+ :type _request_auth: dict, optional
3214
+ :param _content_type: force content-type for the request.
3215
+ :type _content_type: str, Optional
3216
+ :param _headers: set to override the headers for a single
3217
+ request; this effectively ignores the headers
3218
+ in the spec for a single request.
3219
+ :type _headers: dict, optional
3220
+ :param _host_index: set to override the host_index for a single
3221
+ request; this effectively ignores the host_index
3222
+ in the spec for a single request.
3223
+ :type _host_index: int, optional
3224
+ :return: Returns the result object.
3225
+ """ # noqa: E501
3226
+
3227
+ _param = self._set_runner_default_security_serialize(
3228
+ organization_id=organization_id,
3229
+ workspace_id=workspace_id,
3230
+ runner_id=runner_id,
3231
+ runner_role=runner_role,
3232
+ _request_auth=_request_auth,
3233
+ _content_type=_content_type,
3234
+ _headers=_headers,
3235
+ _host_index=_host_index
3236
+ )
3237
+
3238
+ _response_types_map: Dict[str, Optional[str]] = {
3239
+ '201': "RunnerSecurity",
3240
+ '404': None,
3241
+ }
3242
+ response_data = self.api_client.call_api(
3243
+ *_param,
3244
+ _request_timeout=_request_timeout
3245
+ )
3246
+ return response_data.response
3247
+
3248
+
3249
+ def _set_runner_default_security_serialize(
3250
+ self,
3251
+ organization_id,
3252
+ workspace_id,
3253
+ runner_id,
3254
+ runner_role,
3255
+ _request_auth,
3256
+ _content_type,
3257
+ _headers,
3258
+ _host_index,
3259
+ ) -> RequestSerialized:
3260
+
3261
+ _host = None
3262
+
3263
+ _collection_formats: Dict[str, str] = {
3264
+ }
3265
+
3266
+ _path_params: Dict[str, str] = {}
3267
+ _query_params: List[Tuple[str, str]] = []
3268
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3269
+ _form_params: List[Tuple[str, str]] = []
3270
+ _files: Dict[str, str] = {}
3271
+ _body_params: Optional[bytes] = None
3272
+
3273
+ # process the path parameters
3274
+ if organization_id is not None:
3275
+ _path_params['organization_id'] = organization_id
3276
+ if workspace_id is not None:
3277
+ _path_params['workspace_id'] = workspace_id
3278
+ if runner_id is not None:
3279
+ _path_params['runner_id'] = runner_id
3280
+ # process the query parameters
3281
+ # process the header parameters
3282
+ # process the form parameters
3283
+ # process the body parameter
3284
+ if runner_role is not None:
3285
+ _body_params = runner_role
3286
+
3287
+
3288
+ # set the HTTP header `Accept`
3289
+ _header_params['Accept'] = self.api_client.select_header_accept(
3290
+ [
3291
+ 'application/json'
3292
+ ]
3293
+ )
3294
+
3295
+ # set the HTTP header `Content-Type`
3296
+ if _content_type:
3297
+ _header_params['Content-Type'] = _content_type
3298
+ else:
3299
+ _default_content_type = (
3300
+ self.api_client.select_header_content_type(
3301
+ [
3302
+ 'application/json',
3303
+ 'application/yaml'
3304
+ ]
3305
+ )
3306
+ )
3307
+ if _default_content_type is not None:
3308
+ _header_params['Content-Type'] = _default_content_type
3309
+
3310
+ # authentication setting
3311
+ _auth_settings: List[str] = [
3312
+ 'oAuth2AuthCode'
3313
+ ]
3314
+
3315
+ return self.api_client.param_serialize(
3316
+ method='POST',
3317
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security/default',
3318
+ path_params=_path_params,
3319
+ query_params=_query_params,
3320
+ header_params=_header_params,
3321
+ body=_body_params,
3322
+ post_params=_form_params,
3323
+ files=_files,
3324
+ auth_settings=_auth_settings,
3325
+ collection_formats=_collection_formats,
3326
+ _host=_host,
3327
+ _request_auth=_request_auth
3328
+ )
3329
+
3330
+
3331
+
3332
+
3333
+ @validate_call
3334
+ def start_run(
3335
+ self,
3336
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3337
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
3338
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
3339
+ _request_timeout: Union[
3340
+ None,
3341
+ Annotated[StrictFloat, Field(gt=0)],
3342
+ Tuple[
3343
+ Annotated[StrictFloat, Field(gt=0)],
3344
+ Annotated[StrictFloat, Field(gt=0)]
3345
+ ]
3346
+ ] = None,
3347
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3348
+ _content_type: Optional[StrictStr] = None,
3349
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3350
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3351
+ ) -> RunnerLastRun:
3352
+ """Start a run with runner parameters
3353
+
3354
+
3355
+ :param organization_id: the Organization identifier (required)
3356
+ :type organization_id: str
3357
+ :param workspace_id: the Workspace identifier (required)
3358
+ :type workspace_id: str
3359
+ :param runner_id: the Runner identifier (required)
3360
+ :type runner_id: str
3361
+ :param _request_timeout: timeout setting for this request. If one
3362
+ number provided, it will be total request
3363
+ timeout. It can also be a pair (tuple) of
3364
+ (connection, read) timeouts.
3365
+ :type _request_timeout: int, tuple(int, int), optional
3366
+ :param _request_auth: set to override the auth_settings for an a single
3367
+ request; this effectively ignores the
3368
+ authentication in the spec for a single request.
3369
+ :type _request_auth: dict, optional
3370
+ :param _content_type: force content-type for the request.
3371
+ :type _content_type: str, Optional
3372
+ :param _headers: set to override the headers for a single
3373
+ request; this effectively ignores the headers
3374
+ in the spec for a single request.
3375
+ :type _headers: dict, optional
3376
+ :param _host_index: set to override the host_index for a single
3377
+ request; this effectively ignores the host_index
3378
+ in the spec for a single request.
3379
+ :type _host_index: int, optional
3380
+ :return: Returns the result object.
3381
+ """ # noqa: E501
3382
+
3383
+ _param = self._start_run_serialize(
3384
+ organization_id=organization_id,
3385
+ workspace_id=workspace_id,
3386
+ runner_id=runner_id,
3387
+ _request_auth=_request_auth,
3388
+ _content_type=_content_type,
3389
+ _headers=_headers,
3390
+ _host_index=_host_index
3391
+ )
3392
+
3393
+ _response_types_map: Dict[str, Optional[str]] = {
3394
+ '202': "RunnerLastRun",
3395
+ '404': None,
3396
+ }
3397
+ response_data = self.api_client.call_api(
3398
+ *_param,
3399
+ _request_timeout=_request_timeout
3400
+ )
3401
+ response_data.read()
3402
+ return self.api_client.response_deserialize(
3403
+ response_data=response_data,
3404
+ response_types_map=_response_types_map,
3405
+ ).data
3406
+
3407
+
3408
+ @validate_call
3409
+ def start_run_with_http_info(
3410
+ self,
3411
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3412
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
3413
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
3414
+ _request_timeout: Union[
3415
+ None,
3416
+ Annotated[StrictFloat, Field(gt=0)],
3417
+ Tuple[
3418
+ Annotated[StrictFloat, Field(gt=0)],
3419
+ Annotated[StrictFloat, Field(gt=0)]
3420
+ ]
3421
+ ] = None,
3422
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3423
+ _content_type: Optional[StrictStr] = None,
3424
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3425
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3426
+ ) -> ApiResponse[RunnerLastRun]:
3427
+ """Start a run with runner parameters
3428
+
3429
+
3430
+ :param organization_id: the Organization identifier (required)
3431
+ :type organization_id: str
3432
+ :param workspace_id: the Workspace identifier (required)
3433
+ :type workspace_id: str
3434
+ :param runner_id: the Runner identifier (required)
3435
+ :type runner_id: str
3436
+ :param _request_timeout: timeout setting for this request. If one
3437
+ number provided, it will be total request
3438
+ timeout. It can also be a pair (tuple) of
3439
+ (connection, read) timeouts.
3440
+ :type _request_timeout: int, tuple(int, int), optional
3441
+ :param _request_auth: set to override the auth_settings for an a single
3442
+ request; this effectively ignores the
3443
+ authentication in the spec for a single request.
3444
+ :type _request_auth: dict, optional
3445
+ :param _content_type: force content-type for the request.
3446
+ :type _content_type: str, Optional
3447
+ :param _headers: set to override the headers for a single
3448
+ request; this effectively ignores the headers
3449
+ in the spec for a single request.
3450
+ :type _headers: dict, optional
3451
+ :param _host_index: set to override the host_index for a single
3452
+ request; this effectively ignores the host_index
3453
+ in the spec for a single request.
3454
+ :type _host_index: int, optional
3455
+ :return: Returns the result object.
3456
+ """ # noqa: E501
3457
+
3458
+ _param = self._start_run_serialize(
3459
+ organization_id=organization_id,
3460
+ workspace_id=workspace_id,
3461
+ runner_id=runner_id,
3462
+ _request_auth=_request_auth,
3463
+ _content_type=_content_type,
3464
+ _headers=_headers,
3465
+ _host_index=_host_index
3466
+ )
3467
+
3468
+ _response_types_map: Dict[str, Optional[str]] = {
3469
+ '202': "RunnerLastRun",
3470
+ '404': None,
3471
+ }
3472
+ response_data = self.api_client.call_api(
3473
+ *_param,
3474
+ _request_timeout=_request_timeout
3475
+ )
3476
+ response_data.read()
3477
+ return self.api_client.response_deserialize(
3478
+ response_data=response_data,
3479
+ response_types_map=_response_types_map,
3480
+ )
3481
+
3482
+
3483
+ @validate_call
3484
+ def start_run_without_preload_content(
3485
+ self,
3486
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3487
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
3488
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
3489
+ _request_timeout: Union[
3490
+ None,
3491
+ Annotated[StrictFloat, Field(gt=0)],
3492
+ Tuple[
3493
+ Annotated[StrictFloat, Field(gt=0)],
3494
+ Annotated[StrictFloat, Field(gt=0)]
3495
+ ]
3496
+ ] = None,
3497
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3498
+ _content_type: Optional[StrictStr] = None,
3499
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3500
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3501
+ ) -> RESTResponseType:
3502
+ """Start a run with runner parameters
3503
+
3504
+
3505
+ :param organization_id: the Organization identifier (required)
3506
+ :type organization_id: str
3507
+ :param workspace_id: the Workspace identifier (required)
3508
+ :type workspace_id: str
3509
+ :param runner_id: the Runner identifier (required)
3510
+ :type runner_id: str
3511
+ :param _request_timeout: timeout setting for this request. If one
3512
+ number provided, it will be total request
3513
+ timeout. It can also be a pair (tuple) of
3514
+ (connection, read) timeouts.
3515
+ :type _request_timeout: int, tuple(int, int), optional
3516
+ :param _request_auth: set to override the auth_settings for an a single
3517
+ request; this effectively ignores the
3518
+ authentication in the spec for a single request.
3519
+ :type _request_auth: dict, optional
3520
+ :param _content_type: force content-type for the request.
3521
+ :type _content_type: str, Optional
3522
+ :param _headers: set to override the headers for a single
3523
+ request; this effectively ignores the headers
3524
+ in the spec for a single request.
3525
+ :type _headers: dict, optional
3526
+ :param _host_index: set to override the host_index for a single
3527
+ request; this effectively ignores the host_index
3528
+ in the spec for a single request.
3529
+ :type _host_index: int, optional
3530
+ :return: Returns the result object.
3531
+ """ # noqa: E501
3532
+
3533
+ _param = self._start_run_serialize(
3534
+ organization_id=organization_id,
3535
+ workspace_id=workspace_id,
3536
+ runner_id=runner_id,
3537
+ _request_auth=_request_auth,
3538
+ _content_type=_content_type,
3539
+ _headers=_headers,
3540
+ _host_index=_host_index
3541
+ )
3542
+
3543
+ _response_types_map: Dict[str, Optional[str]] = {
3544
+ '202': "RunnerLastRun",
3545
+ '404': None,
3546
+ }
3547
+ response_data = self.api_client.call_api(
3548
+ *_param,
3549
+ _request_timeout=_request_timeout
3550
+ )
3551
+ return response_data.response
3552
+
3553
+
3554
+ def _start_run_serialize(
3555
+ self,
3556
+ organization_id,
3557
+ workspace_id,
3558
+ runner_id,
3559
+ _request_auth,
3560
+ _content_type,
3561
+ _headers,
3562
+ _host_index,
3563
+ ) -> RequestSerialized:
3564
+
3565
+ _host = None
3566
+
3567
+ _collection_formats: Dict[str, str] = {
3568
+ }
3569
+
3570
+ _path_params: Dict[str, str] = {}
3571
+ _query_params: List[Tuple[str, str]] = []
3572
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3573
+ _form_params: List[Tuple[str, str]] = []
3574
+ _files: Dict[str, str] = {}
3575
+ _body_params: Optional[bytes] = None
3576
+
3577
+ # process the path parameters
3578
+ if organization_id is not None:
3579
+ _path_params['organization_id'] = organization_id
3580
+ if workspace_id is not None:
3581
+ _path_params['workspace_id'] = workspace_id
3582
+ if runner_id is not None:
3583
+ _path_params['runner_id'] = runner_id
3584
+ # process the query parameters
3585
+ # process the header parameters
3586
+ # process the form parameters
3587
+ # process the body parameter
3588
+
3589
+
3590
+ # set the HTTP header `Accept`
3591
+ _header_params['Accept'] = self.api_client.select_header_accept(
3592
+ [
3593
+ 'application/json'
3594
+ ]
3595
+ )
3596
+
3597
+
3598
+ # authentication setting
3599
+ _auth_settings: List[str] = [
3600
+ 'oAuth2AuthCode'
3601
+ ]
3602
+
3603
+ return self.api_client.param_serialize(
3604
+ method='POST',
3605
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/start',
3606
+ path_params=_path_params,
3607
+ query_params=_query_params,
3608
+ header_params=_header_params,
3609
+ body=_body_params,
3610
+ post_params=_form_params,
3611
+ files=_files,
3612
+ auth_settings=_auth_settings,
3613
+ collection_formats=_collection_formats,
3614
+ _host=_host,
3615
+ _request_auth=_request_auth
3616
+ )
3617
+
3618
+
3619
+
3620
+
3621
+ @validate_call
3622
+ def stop_run(
3623
+ self,
3624
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3625
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
3626
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
3627
+ _request_timeout: Union[
3628
+ None,
3629
+ Annotated[StrictFloat, Field(gt=0)],
3630
+ Tuple[
3631
+ Annotated[StrictFloat, Field(gt=0)],
3632
+ Annotated[StrictFloat, Field(gt=0)]
3633
+ ]
3634
+ ] = None,
3635
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3636
+ _content_type: Optional[StrictStr] = None,
3637
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3638
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3639
+ ) -> None:
3640
+ """Stop the last run
3641
+
3642
+
3643
+ :param organization_id: the Organization identifier (required)
3644
+ :type organization_id: str
3645
+ :param workspace_id: the Workspace identifier (required)
3646
+ :type workspace_id: str
3647
+ :param runner_id: the Runner identifier (required)
3648
+ :type runner_id: str
3649
+ :param _request_timeout: timeout setting for this request. If one
3650
+ number provided, it will be total request
3651
+ timeout. It can also be a pair (tuple) of
3652
+ (connection, read) timeouts.
3653
+ :type _request_timeout: int, tuple(int, int), optional
3654
+ :param _request_auth: set to override the auth_settings for an a single
3655
+ request; this effectively ignores the
3656
+ authentication in the spec for a single request.
3657
+ :type _request_auth: dict, optional
3658
+ :param _content_type: force content-type for the request.
3659
+ :type _content_type: str, Optional
3660
+ :param _headers: set to override the headers for a single
3661
+ request; this effectively ignores the headers
3662
+ in the spec for a single request.
3663
+ :type _headers: dict, optional
3664
+ :param _host_index: set to override the host_index for a single
3665
+ request; this effectively ignores the host_index
3666
+ in the spec for a single request.
3667
+ :type _host_index: int, optional
3668
+ :return: Returns the result object.
3669
+ """ # noqa: E501
3670
+
3671
+ _param = self._stop_run_serialize(
3672
+ organization_id=organization_id,
3673
+ workspace_id=workspace_id,
3674
+ runner_id=runner_id,
3675
+ _request_auth=_request_auth,
3676
+ _content_type=_content_type,
3677
+ _headers=_headers,
3678
+ _host_index=_host_index
3679
+ )
3680
+
3681
+ _response_types_map: Dict[str, Optional[str]] = {
3682
+ '202': None,
3683
+ '404': None,
3684
+ }
3685
+ response_data = self.api_client.call_api(
3686
+ *_param,
3687
+ _request_timeout=_request_timeout
3688
+ )
3689
+ response_data.read()
3690
+ return self.api_client.response_deserialize(
3691
+ response_data=response_data,
3692
+ response_types_map=_response_types_map,
3693
+ ).data
3694
+
3695
+
3696
+ @validate_call
3697
+ def stop_run_with_http_info(
3698
+ self,
3699
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3700
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
3701
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
3702
+ _request_timeout: Union[
3703
+ None,
3704
+ Annotated[StrictFloat, Field(gt=0)],
3705
+ Tuple[
3706
+ Annotated[StrictFloat, Field(gt=0)],
3707
+ Annotated[StrictFloat, Field(gt=0)]
3708
+ ]
3709
+ ] = None,
3710
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3711
+ _content_type: Optional[StrictStr] = None,
3712
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3713
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3714
+ ) -> ApiResponse[None]:
3715
+ """Stop the last run
3716
+
3717
+
3718
+ :param organization_id: the Organization identifier (required)
3719
+ :type organization_id: str
3720
+ :param workspace_id: the Workspace identifier (required)
3721
+ :type workspace_id: str
3722
+ :param runner_id: the Runner identifier (required)
3723
+ :type runner_id: str
3724
+ :param _request_timeout: timeout setting for this request. If one
3725
+ number provided, it will be total request
3726
+ timeout. It can also be a pair (tuple) of
3727
+ (connection, read) timeouts.
3728
+ :type _request_timeout: int, tuple(int, int), optional
3729
+ :param _request_auth: set to override the auth_settings for an a single
3730
+ request; this effectively ignores the
3731
+ authentication in the spec for a single request.
3732
+ :type _request_auth: dict, optional
3733
+ :param _content_type: force content-type for the request.
3734
+ :type _content_type: str, Optional
3735
+ :param _headers: set to override the headers for a single
3736
+ request; this effectively ignores the headers
3737
+ in the spec for a single request.
3738
+ :type _headers: dict, optional
3739
+ :param _host_index: set to override the host_index for a single
3740
+ request; this effectively ignores the host_index
3741
+ in the spec for a single request.
3742
+ :type _host_index: int, optional
3743
+ :return: Returns the result object.
3744
+ """ # noqa: E501
3745
+
3746
+ _param = self._stop_run_serialize(
3747
+ organization_id=organization_id,
3748
+ workspace_id=workspace_id,
3749
+ runner_id=runner_id,
3750
+ _request_auth=_request_auth,
3751
+ _content_type=_content_type,
3752
+ _headers=_headers,
3753
+ _host_index=_host_index
3754
+ )
3755
+
3756
+ _response_types_map: Dict[str, Optional[str]] = {
3757
+ '202': None,
3758
+ '404': None,
3759
+ }
3760
+ response_data = self.api_client.call_api(
3761
+ *_param,
3762
+ _request_timeout=_request_timeout
3763
+ )
3764
+ response_data.read()
3765
+ return self.api_client.response_deserialize(
3766
+ response_data=response_data,
3767
+ response_types_map=_response_types_map,
3768
+ )
3769
+
3770
+
3771
+ @validate_call
3772
+ def stop_run_without_preload_content(
3773
+ self,
3774
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3775
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
3776
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
3777
+ _request_timeout: Union[
3778
+ None,
3779
+ Annotated[StrictFloat, Field(gt=0)],
3780
+ Tuple[
3781
+ Annotated[StrictFloat, Field(gt=0)],
3782
+ Annotated[StrictFloat, Field(gt=0)]
3783
+ ]
3784
+ ] = None,
3785
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3786
+ _content_type: Optional[StrictStr] = None,
3787
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3788
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3789
+ ) -> RESTResponseType:
3790
+ """Stop the last run
3791
+
3792
+
3793
+ :param organization_id: the Organization identifier (required)
3794
+ :type organization_id: str
3795
+ :param workspace_id: the Workspace identifier (required)
3796
+ :type workspace_id: str
3797
+ :param runner_id: the Runner identifier (required)
3798
+ :type runner_id: str
3799
+ :param _request_timeout: timeout setting for this request. If one
3800
+ number provided, it will be total request
3801
+ timeout. It can also be a pair (tuple) of
3802
+ (connection, read) timeouts.
3803
+ :type _request_timeout: int, tuple(int, int), optional
3804
+ :param _request_auth: set to override the auth_settings for an a single
3805
+ request; this effectively ignores the
3806
+ authentication in the spec for a single request.
3807
+ :type _request_auth: dict, optional
3808
+ :param _content_type: force content-type for the request.
3809
+ :type _content_type: str, Optional
3810
+ :param _headers: set to override the headers for a single
3811
+ request; this effectively ignores the headers
3812
+ in the spec for a single request.
3813
+ :type _headers: dict, optional
3814
+ :param _host_index: set to override the host_index for a single
3815
+ request; this effectively ignores the host_index
3816
+ in the spec for a single request.
3817
+ :type _host_index: int, optional
3818
+ :return: Returns the result object.
3819
+ """ # noqa: E501
3820
+
3821
+ _param = self._stop_run_serialize(
3822
+ organization_id=organization_id,
3823
+ workspace_id=workspace_id,
3824
+ runner_id=runner_id,
3825
+ _request_auth=_request_auth,
3826
+ _content_type=_content_type,
3827
+ _headers=_headers,
3828
+ _host_index=_host_index
3829
+ )
3830
+
3831
+ _response_types_map: Dict[str, Optional[str]] = {
3832
+ '202': None,
3833
+ '404': None,
3834
+ }
3835
+ response_data = self.api_client.call_api(
3836
+ *_param,
3837
+ _request_timeout=_request_timeout
3838
+ )
3839
+ return response_data.response
3840
+
3841
+
3842
+ def _stop_run_serialize(
3843
+ self,
3844
+ organization_id,
3845
+ workspace_id,
3846
+ runner_id,
3847
+ _request_auth,
3848
+ _content_type,
3849
+ _headers,
3850
+ _host_index,
3851
+ ) -> RequestSerialized:
3852
+
3853
+ _host = None
3854
+
3855
+ _collection_formats: Dict[str, str] = {
3856
+ }
3857
+
3858
+ _path_params: Dict[str, str] = {}
3859
+ _query_params: List[Tuple[str, str]] = []
3860
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3861
+ _form_params: List[Tuple[str, str]] = []
3862
+ _files: Dict[str, str] = {}
3863
+ _body_params: Optional[bytes] = None
3864
+
3865
+ # process the path parameters
3866
+ if organization_id is not None:
3867
+ _path_params['organization_id'] = organization_id
3868
+ if workspace_id is not None:
3869
+ _path_params['workspace_id'] = workspace_id
3870
+ if runner_id is not None:
3871
+ _path_params['runner_id'] = runner_id
3872
+ # process the query parameters
3873
+ # process the header parameters
3874
+ # process the form parameters
3875
+ # process the body parameter
3876
+
3877
+
3878
+
3879
+
3880
+ # authentication setting
3881
+ _auth_settings: List[str] = [
3882
+ 'oAuth2AuthCode'
3883
+ ]
3884
+
3885
+ return self.api_client.param_serialize(
3886
+ method='POST',
3887
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/stop',
3888
+ path_params=_path_params,
3889
+ query_params=_query_params,
3890
+ header_params=_header_params,
3891
+ body=_body_params,
3892
+ post_params=_form_params,
3893
+ files=_files,
3894
+ auth_settings=_auth_settings,
3895
+ collection_formats=_collection_formats,
3896
+ _host=_host,
3897
+ _request_auth=_request_auth
3898
+ )
3899
+
3900
+
3901
+
3902
+
3903
+ @validate_call
3904
+ def update_runner(
3905
+ self,
3906
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3907
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
3908
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
3909
+ runner: Annotated[Runner, Field(description="the new Runner details. This endpoint can't be used to update security")],
3910
+ _request_timeout: Union[
3911
+ None,
3912
+ Annotated[StrictFloat, Field(gt=0)],
3913
+ Tuple[
3914
+ Annotated[StrictFloat, Field(gt=0)],
3915
+ Annotated[StrictFloat, Field(gt=0)]
3916
+ ]
3917
+ ] = None,
3918
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3919
+ _content_type: Optional[StrictStr] = None,
3920
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3921
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3922
+ ) -> Runner:
3923
+ """Update a runner
3924
+
3925
+
3926
+ :param organization_id: the Organization identifier (required)
3927
+ :type organization_id: str
3928
+ :param workspace_id: the Workspace identifier (required)
3929
+ :type workspace_id: str
3930
+ :param runner_id: the Runner identifier (required)
3931
+ :type runner_id: str
3932
+ :param runner: the new Runner details. This endpoint can't be used to update security (required)
3933
+ :type runner: Runner
3934
+ :param _request_timeout: timeout setting for this request. If one
3935
+ number provided, it will be total request
3936
+ timeout. It can also be a pair (tuple) of
3937
+ (connection, read) timeouts.
3938
+ :type _request_timeout: int, tuple(int, int), optional
3939
+ :param _request_auth: set to override the auth_settings for an a single
3940
+ request; this effectively ignores the
3941
+ authentication in the spec for a single request.
3942
+ :type _request_auth: dict, optional
3943
+ :param _content_type: force content-type for the request.
3944
+ :type _content_type: str, Optional
3945
+ :param _headers: set to override the headers for a single
3946
+ request; this effectively ignores the headers
3947
+ in the spec for a single request.
3948
+ :type _headers: dict, optional
3949
+ :param _host_index: set to override the host_index for a single
3950
+ request; this effectively ignores the host_index
3951
+ in the spec for a single request.
3952
+ :type _host_index: int, optional
3953
+ :return: Returns the result object.
3954
+ """ # noqa: E501
3955
+
3956
+ _param = self._update_runner_serialize(
3957
+ organization_id=organization_id,
3958
+ workspace_id=workspace_id,
3959
+ runner_id=runner_id,
3960
+ runner=runner,
3961
+ _request_auth=_request_auth,
3962
+ _content_type=_content_type,
3963
+ _headers=_headers,
3964
+ _host_index=_host_index
3965
+ )
3966
+
3967
+ _response_types_map: Dict[str, Optional[str]] = {
3968
+ '200': "Runner",
3969
+ '400': None,
3970
+ '404': None,
3971
+ }
3972
+ response_data = self.api_client.call_api(
3973
+ *_param,
3974
+ _request_timeout=_request_timeout
3975
+ )
3976
+ response_data.read()
3977
+ return self.api_client.response_deserialize(
3978
+ response_data=response_data,
3979
+ response_types_map=_response_types_map,
3980
+ ).data
3981
+
3982
+
3983
+ @validate_call
3984
+ def update_runner_with_http_info(
3985
+ self,
3986
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
3987
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
3988
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
3989
+ runner: Annotated[Runner, Field(description="the new Runner details. This endpoint can't be used to update security")],
3990
+ _request_timeout: Union[
3991
+ None,
3992
+ Annotated[StrictFloat, Field(gt=0)],
3993
+ Tuple[
3994
+ Annotated[StrictFloat, Field(gt=0)],
3995
+ Annotated[StrictFloat, Field(gt=0)]
3996
+ ]
3997
+ ] = None,
3998
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3999
+ _content_type: Optional[StrictStr] = None,
4000
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4001
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4002
+ ) -> ApiResponse[Runner]:
4003
+ """Update a runner
4004
+
4005
+
4006
+ :param organization_id: the Organization identifier (required)
4007
+ :type organization_id: str
4008
+ :param workspace_id: the Workspace identifier (required)
4009
+ :type workspace_id: str
4010
+ :param runner_id: the Runner identifier (required)
4011
+ :type runner_id: str
4012
+ :param runner: the new Runner details. This endpoint can't be used to update security (required)
4013
+ :type runner: Runner
4014
+ :param _request_timeout: timeout setting for this request. If one
4015
+ number provided, it will be total request
4016
+ timeout. It can also be a pair (tuple) of
4017
+ (connection, read) timeouts.
4018
+ :type _request_timeout: int, tuple(int, int), optional
4019
+ :param _request_auth: set to override the auth_settings for an a single
4020
+ request; this effectively ignores the
4021
+ authentication in the spec for a single request.
4022
+ :type _request_auth: dict, optional
4023
+ :param _content_type: force content-type for the request.
4024
+ :type _content_type: str, Optional
4025
+ :param _headers: set to override the headers for a single
4026
+ request; this effectively ignores the headers
4027
+ in the spec for a single request.
4028
+ :type _headers: dict, optional
4029
+ :param _host_index: set to override the host_index for a single
4030
+ request; this effectively ignores the host_index
4031
+ in the spec for a single request.
4032
+ :type _host_index: int, optional
4033
+ :return: Returns the result object.
4034
+ """ # noqa: E501
4035
+
4036
+ _param = self._update_runner_serialize(
4037
+ organization_id=organization_id,
4038
+ workspace_id=workspace_id,
4039
+ runner_id=runner_id,
4040
+ runner=runner,
4041
+ _request_auth=_request_auth,
4042
+ _content_type=_content_type,
4043
+ _headers=_headers,
4044
+ _host_index=_host_index
4045
+ )
4046
+
4047
+ _response_types_map: Dict[str, Optional[str]] = {
4048
+ '200': "Runner",
4049
+ '400': None,
4050
+ '404': None,
4051
+ }
4052
+ response_data = self.api_client.call_api(
4053
+ *_param,
4054
+ _request_timeout=_request_timeout
4055
+ )
4056
+ response_data.read()
4057
+ return self.api_client.response_deserialize(
4058
+ response_data=response_data,
4059
+ response_types_map=_response_types_map,
4060
+ )
4061
+
4062
+
4063
+ @validate_call
4064
+ def update_runner_without_preload_content(
4065
+ self,
4066
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
4067
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
4068
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
4069
+ runner: Annotated[Runner, Field(description="the new Runner details. This endpoint can't be used to update security")],
4070
+ _request_timeout: Union[
4071
+ None,
4072
+ Annotated[StrictFloat, Field(gt=0)],
4073
+ Tuple[
4074
+ Annotated[StrictFloat, Field(gt=0)],
4075
+ Annotated[StrictFloat, Field(gt=0)]
4076
+ ]
4077
+ ] = None,
4078
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4079
+ _content_type: Optional[StrictStr] = None,
4080
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4081
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4082
+ ) -> RESTResponseType:
4083
+ """Update a runner
4084
+
4085
+
4086
+ :param organization_id: the Organization identifier (required)
4087
+ :type organization_id: str
4088
+ :param workspace_id: the Workspace identifier (required)
4089
+ :type workspace_id: str
4090
+ :param runner_id: the Runner identifier (required)
4091
+ :type runner_id: str
4092
+ :param runner: the new Runner details. This endpoint can't be used to update security (required)
4093
+ :type runner: Runner
4094
+ :param _request_timeout: timeout setting for this request. If one
4095
+ number provided, it will be total request
4096
+ timeout. It can also be a pair (tuple) of
4097
+ (connection, read) timeouts.
4098
+ :type _request_timeout: int, tuple(int, int), optional
4099
+ :param _request_auth: set to override the auth_settings for an a single
4100
+ request; this effectively ignores the
4101
+ authentication in the spec for a single request.
4102
+ :type _request_auth: dict, optional
4103
+ :param _content_type: force content-type for the request.
4104
+ :type _content_type: str, Optional
4105
+ :param _headers: set to override the headers for a single
4106
+ request; this effectively ignores the headers
4107
+ in the spec for a single request.
4108
+ :type _headers: dict, optional
4109
+ :param _host_index: set to override the host_index for a single
4110
+ request; this effectively ignores the host_index
4111
+ in the spec for a single request.
4112
+ :type _host_index: int, optional
4113
+ :return: Returns the result object.
4114
+ """ # noqa: E501
4115
+
4116
+ _param = self._update_runner_serialize(
4117
+ organization_id=organization_id,
4118
+ workspace_id=workspace_id,
4119
+ runner_id=runner_id,
4120
+ runner=runner,
4121
+ _request_auth=_request_auth,
4122
+ _content_type=_content_type,
4123
+ _headers=_headers,
4124
+ _host_index=_host_index
4125
+ )
4126
+
4127
+ _response_types_map: Dict[str, Optional[str]] = {
4128
+ '200': "Runner",
4129
+ '400': None,
4130
+ '404': None,
4131
+ }
4132
+ response_data = self.api_client.call_api(
4133
+ *_param,
4134
+ _request_timeout=_request_timeout
4135
+ )
4136
+ return response_data.response
4137
+
4138
+
4139
+ def _update_runner_serialize(
4140
+ self,
4141
+ organization_id,
4142
+ workspace_id,
4143
+ runner_id,
4144
+ runner,
4145
+ _request_auth,
4146
+ _content_type,
4147
+ _headers,
4148
+ _host_index,
4149
+ ) -> RequestSerialized:
4150
+
4151
+ _host = None
4152
+
4153
+ _collection_formats: Dict[str, str] = {
4154
+ }
4155
+
4156
+ _path_params: Dict[str, str] = {}
4157
+ _query_params: List[Tuple[str, str]] = []
4158
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4159
+ _form_params: List[Tuple[str, str]] = []
4160
+ _files: Dict[str, str] = {}
4161
+ _body_params: Optional[bytes] = None
4162
+
4163
+ # process the path parameters
4164
+ if organization_id is not None:
4165
+ _path_params['organization_id'] = organization_id
4166
+ if workspace_id is not None:
4167
+ _path_params['workspace_id'] = workspace_id
4168
+ if runner_id is not None:
4169
+ _path_params['runner_id'] = runner_id
4170
+ # process the query parameters
4171
+ # process the header parameters
4172
+ # process the form parameters
4173
+ # process the body parameter
4174
+ if runner is not None:
4175
+ _body_params = runner
4176
+
4177
+
4178
+ # set the HTTP header `Accept`
4179
+ _header_params['Accept'] = self.api_client.select_header_accept(
4180
+ [
4181
+ 'application/json'
4182
+ ]
4183
+ )
4184
+
4185
+ # set the HTTP header `Content-Type`
4186
+ if _content_type:
4187
+ _header_params['Content-Type'] = _content_type
4188
+ else:
4189
+ _default_content_type = (
4190
+ self.api_client.select_header_content_type(
4191
+ [
4192
+ 'application/json',
4193
+ 'application/yaml'
4194
+ ]
4195
+ )
4196
+ )
4197
+ if _default_content_type is not None:
4198
+ _header_params['Content-Type'] = _default_content_type
4199
+
4200
+ # authentication setting
4201
+ _auth_settings: List[str] = [
4202
+ 'oAuth2AuthCode'
4203
+ ]
4204
+
4205
+ return self.api_client.param_serialize(
4206
+ method='PATCH',
4207
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}',
4208
+ path_params=_path_params,
4209
+ query_params=_query_params,
4210
+ header_params=_header_params,
4211
+ body=_body_params,
4212
+ post_params=_form_params,
4213
+ files=_files,
4214
+ auth_settings=_auth_settings,
4215
+ collection_formats=_collection_formats,
4216
+ _host=_host,
4217
+ _request_auth=_request_auth
4218
+ )
4219
+
4220
+
4221
+
4222
+
4223
+ @validate_call
4224
+ def update_runner_access_control(
4225
+ self,
4226
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
4227
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
4228
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
4229
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
4230
+ runner_role: Annotated[RunnerRole, Field(description="The new Runner Access Control")],
4231
+ _request_timeout: Union[
4232
+ None,
4233
+ Annotated[StrictFloat, Field(gt=0)],
4234
+ Tuple[
4235
+ Annotated[StrictFloat, Field(gt=0)],
4236
+ Annotated[StrictFloat, Field(gt=0)]
4237
+ ]
4238
+ ] = None,
4239
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4240
+ _content_type: Optional[StrictStr] = None,
4241
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4242
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4243
+ ) -> RunnerAccessControl:
4244
+ """Update the specified access to User for a Runner
4245
+
4246
+
4247
+ :param organization_id: the Organization identifier (required)
4248
+ :type organization_id: str
4249
+ :param workspace_id: the Workspace identifier (required)
4250
+ :type workspace_id: str
4251
+ :param runner_id: the Runner identifier (required)
4252
+ :type runner_id: str
4253
+ :param identity_id: the User identifier (required)
4254
+ :type identity_id: str
4255
+ :param runner_role: The new Runner Access Control (required)
4256
+ :type runner_role: RunnerRole
4257
+ :param _request_timeout: timeout setting for this request. If one
4258
+ number provided, it will be total request
4259
+ timeout. It can also be a pair (tuple) of
4260
+ (connection, read) timeouts.
4261
+ :type _request_timeout: int, tuple(int, int), optional
4262
+ :param _request_auth: set to override the auth_settings for an a single
4263
+ request; this effectively ignores the
4264
+ authentication in the spec for a single request.
4265
+ :type _request_auth: dict, optional
4266
+ :param _content_type: force content-type for the request.
4267
+ :type _content_type: str, Optional
4268
+ :param _headers: set to override the headers for a single
4269
+ request; this effectively ignores the headers
4270
+ in the spec for a single request.
4271
+ :type _headers: dict, optional
4272
+ :param _host_index: set to override the host_index for a single
4273
+ request; this effectively ignores the host_index
4274
+ in the spec for a single request.
4275
+ :type _host_index: int, optional
4276
+ :return: Returns the result object.
4277
+ """ # noqa: E501
4278
+
4279
+ _param = self._update_runner_access_control_serialize(
4280
+ organization_id=organization_id,
4281
+ workspace_id=workspace_id,
4282
+ runner_id=runner_id,
4283
+ identity_id=identity_id,
4284
+ runner_role=runner_role,
4285
+ _request_auth=_request_auth,
4286
+ _content_type=_content_type,
4287
+ _headers=_headers,
4288
+ _host_index=_host_index
4289
+ )
4290
+
4291
+ _response_types_map: Dict[str, Optional[str]] = {
4292
+ '200': "RunnerAccessControl",
4293
+ '404': None,
4294
+ }
4295
+ response_data = self.api_client.call_api(
4296
+ *_param,
4297
+ _request_timeout=_request_timeout
4298
+ )
4299
+ response_data.read()
4300
+ return self.api_client.response_deserialize(
4301
+ response_data=response_data,
4302
+ response_types_map=_response_types_map,
4303
+ ).data
4304
+
4305
+
4306
+ @validate_call
4307
+ def update_runner_access_control_with_http_info(
4308
+ self,
4309
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
4310
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
4311
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
4312
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
4313
+ runner_role: Annotated[RunnerRole, Field(description="The new Runner Access Control")],
4314
+ _request_timeout: Union[
4315
+ None,
4316
+ Annotated[StrictFloat, Field(gt=0)],
4317
+ Tuple[
4318
+ Annotated[StrictFloat, Field(gt=0)],
4319
+ Annotated[StrictFloat, Field(gt=0)]
4320
+ ]
4321
+ ] = None,
4322
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4323
+ _content_type: Optional[StrictStr] = None,
4324
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4325
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4326
+ ) -> ApiResponse[RunnerAccessControl]:
4327
+ """Update the specified access to User for a Runner
4328
+
4329
+
4330
+ :param organization_id: the Organization identifier (required)
4331
+ :type organization_id: str
4332
+ :param workspace_id: the Workspace identifier (required)
4333
+ :type workspace_id: str
4334
+ :param runner_id: the Runner identifier (required)
4335
+ :type runner_id: str
4336
+ :param identity_id: the User identifier (required)
4337
+ :type identity_id: str
4338
+ :param runner_role: The new Runner Access Control (required)
4339
+ :type runner_role: RunnerRole
4340
+ :param _request_timeout: timeout setting for this request. If one
4341
+ number provided, it will be total request
4342
+ timeout. It can also be a pair (tuple) of
4343
+ (connection, read) timeouts.
4344
+ :type _request_timeout: int, tuple(int, int), optional
4345
+ :param _request_auth: set to override the auth_settings for an a single
4346
+ request; this effectively ignores the
4347
+ authentication in the spec for a single request.
4348
+ :type _request_auth: dict, optional
4349
+ :param _content_type: force content-type for the request.
4350
+ :type _content_type: str, Optional
4351
+ :param _headers: set to override the headers for a single
4352
+ request; this effectively ignores the headers
4353
+ in the spec for a single request.
4354
+ :type _headers: dict, optional
4355
+ :param _host_index: set to override the host_index for a single
4356
+ request; this effectively ignores the host_index
4357
+ in the spec for a single request.
4358
+ :type _host_index: int, optional
4359
+ :return: Returns the result object.
4360
+ """ # noqa: E501
4361
+
4362
+ _param = self._update_runner_access_control_serialize(
4363
+ organization_id=organization_id,
4364
+ workspace_id=workspace_id,
4365
+ runner_id=runner_id,
4366
+ identity_id=identity_id,
4367
+ runner_role=runner_role,
4368
+ _request_auth=_request_auth,
4369
+ _content_type=_content_type,
4370
+ _headers=_headers,
4371
+ _host_index=_host_index
4372
+ )
4373
+
4374
+ _response_types_map: Dict[str, Optional[str]] = {
4375
+ '200': "RunnerAccessControl",
4376
+ '404': None,
4377
+ }
4378
+ response_data = self.api_client.call_api(
4379
+ *_param,
4380
+ _request_timeout=_request_timeout
4381
+ )
4382
+ response_data.read()
4383
+ return self.api_client.response_deserialize(
4384
+ response_data=response_data,
4385
+ response_types_map=_response_types_map,
4386
+ )
4387
+
4388
+
4389
+ @validate_call
4390
+ def update_runner_access_control_without_preload_content(
4391
+ self,
4392
+ organization_id: Annotated[StrictStr, Field(description="the Organization identifier")],
4393
+ workspace_id: Annotated[StrictStr, Field(description="the Workspace identifier")],
4394
+ runner_id: Annotated[StrictStr, Field(description="the Runner identifier")],
4395
+ identity_id: Annotated[StrictStr, Field(description="the User identifier")],
4396
+ runner_role: Annotated[RunnerRole, Field(description="The new Runner Access Control")],
4397
+ _request_timeout: Union[
4398
+ None,
4399
+ Annotated[StrictFloat, Field(gt=0)],
4400
+ Tuple[
4401
+ Annotated[StrictFloat, Field(gt=0)],
4402
+ Annotated[StrictFloat, Field(gt=0)]
4403
+ ]
4404
+ ] = None,
4405
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4406
+ _content_type: Optional[StrictStr] = None,
4407
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4408
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4409
+ ) -> RESTResponseType:
4410
+ """Update the specified access to User for a Runner
4411
+
4412
+
4413
+ :param organization_id: the Organization identifier (required)
4414
+ :type organization_id: str
4415
+ :param workspace_id: the Workspace identifier (required)
4416
+ :type workspace_id: str
4417
+ :param runner_id: the Runner identifier (required)
4418
+ :type runner_id: str
4419
+ :param identity_id: the User identifier (required)
4420
+ :type identity_id: str
4421
+ :param runner_role: The new Runner Access Control (required)
4422
+ :type runner_role: RunnerRole
4423
+ :param _request_timeout: timeout setting for this request. If one
4424
+ number provided, it will be total request
4425
+ timeout. It can also be a pair (tuple) of
4426
+ (connection, read) timeouts.
4427
+ :type _request_timeout: int, tuple(int, int), optional
4428
+ :param _request_auth: set to override the auth_settings for an a single
4429
+ request; this effectively ignores the
4430
+ authentication in the spec for a single request.
4431
+ :type _request_auth: dict, optional
4432
+ :param _content_type: force content-type for the request.
4433
+ :type _content_type: str, Optional
4434
+ :param _headers: set to override the headers for a single
4435
+ request; this effectively ignores the headers
4436
+ in the spec for a single request.
4437
+ :type _headers: dict, optional
4438
+ :param _host_index: set to override the host_index for a single
4439
+ request; this effectively ignores the host_index
4440
+ in the spec for a single request.
4441
+ :type _host_index: int, optional
4442
+ :return: Returns the result object.
4443
+ """ # noqa: E501
4444
+
4445
+ _param = self._update_runner_access_control_serialize(
4446
+ organization_id=organization_id,
4447
+ workspace_id=workspace_id,
4448
+ runner_id=runner_id,
4449
+ identity_id=identity_id,
4450
+ runner_role=runner_role,
4451
+ _request_auth=_request_auth,
4452
+ _content_type=_content_type,
4453
+ _headers=_headers,
4454
+ _host_index=_host_index
4455
+ )
4456
+
4457
+ _response_types_map: Dict[str, Optional[str]] = {
4458
+ '200': "RunnerAccessControl",
4459
+ '404': None,
4460
+ }
4461
+ response_data = self.api_client.call_api(
4462
+ *_param,
4463
+ _request_timeout=_request_timeout
4464
+ )
4465
+ return response_data.response
4466
+
4467
+
4468
+ def _update_runner_access_control_serialize(
4469
+ self,
4470
+ organization_id,
4471
+ workspace_id,
4472
+ runner_id,
4473
+ identity_id,
4474
+ runner_role,
4475
+ _request_auth,
4476
+ _content_type,
4477
+ _headers,
4478
+ _host_index,
4479
+ ) -> RequestSerialized:
4480
+
4481
+ _host = None
4482
+
4483
+ _collection_formats: Dict[str, str] = {
4484
+ }
4485
+
4486
+ _path_params: Dict[str, str] = {}
4487
+ _query_params: List[Tuple[str, str]] = []
4488
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4489
+ _form_params: List[Tuple[str, str]] = []
4490
+ _files: Dict[str, str] = {}
4491
+ _body_params: Optional[bytes] = None
4492
+
4493
+ # process the path parameters
4494
+ if organization_id is not None:
4495
+ _path_params['organization_id'] = organization_id
4496
+ if workspace_id is not None:
4497
+ _path_params['workspace_id'] = workspace_id
4498
+ if runner_id is not None:
4499
+ _path_params['runner_id'] = runner_id
4500
+ if identity_id is not None:
4501
+ _path_params['identity_id'] = identity_id
4502
+ # process the query parameters
4503
+ # process the header parameters
4504
+ # process the form parameters
4505
+ # process the body parameter
4506
+ if runner_role is not None:
4507
+ _body_params = runner_role
4508
+
4509
+
4510
+ # set the HTTP header `Accept`
4511
+ _header_params['Accept'] = self.api_client.select_header_accept(
4512
+ [
4513
+ 'application/json'
4514
+ ]
4515
+ )
4516
+
4517
+ # set the HTTP header `Content-Type`
4518
+ if _content_type:
4519
+ _header_params['Content-Type'] = _content_type
4520
+ else:
4521
+ _default_content_type = (
4522
+ self.api_client.select_header_content_type(
4523
+ [
4524
+ 'application/json'
4525
+ ]
4526
+ )
4527
+ )
4528
+ if _default_content_type is not None:
4529
+ _header_params['Content-Type'] = _default_content_type
4530
+
4531
+ # authentication setting
4532
+ _auth_settings: List[str] = [
4533
+ 'oAuth2AuthCode'
4534
+ ]
4535
+
4536
+ return self.api_client.param_serialize(
4537
+ method='PATCH',
4538
+ resource_path='/organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security/access/{identity_id}',
4539
+ path_params=_path_params,
4540
+ query_params=_query_params,
4541
+ header_params=_header_params,
4542
+ body=_body_params,
4543
+ post_params=_form_params,
4544
+ files=_files,
4545
+ auth_settings=_auth_settings,
4546
+ collection_formats=_collection_formats,
4547
+ _host=_host,
4548
+ _request_auth=_request_auth
4549
+ )
4550
+
4551
+