hatchet-sdk 1.18.1__py3-none-any.whl → 1.20.0__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 hatchet-sdk might be problematic. Click here for more details.

Files changed (234) hide show
  1. hatchet_sdk/clients/dispatcher/action_listener.py +0 -1
  2. hatchet_sdk/clients/dispatcher/dispatcher.py +0 -30
  3. hatchet_sdk/hatchet.py +0 -20
  4. hatchet_sdk/opentelemetry/instrumentor.py +1 -27
  5. hatchet_sdk/runnables/action.py +2 -5
  6. hatchet_sdk/runnables/task.py +0 -1
  7. hatchet_sdk/utils/opentelemetry.py +0 -1
  8. hatchet_sdk/worker/action_listener_process.py +0 -29
  9. hatchet_sdk/worker/runner/runner.py +1 -105
  10. {hatchet_sdk-1.18.1.dist-info → hatchet_sdk-1.20.0.dist-info}/METADATA +2 -3
  11. {hatchet_sdk-1.18.1.dist-info → hatchet_sdk-1.20.0.dist-info}/RECORD +13 -234
  12. hatchet_sdk/v0/__init__.py +0 -251
  13. hatchet_sdk/v0/client.py +0 -119
  14. hatchet_sdk/v0/clients/admin.py +0 -541
  15. hatchet_sdk/v0/clients/dispatcher/action_listener.py +0 -422
  16. hatchet_sdk/v0/clients/dispatcher/dispatcher.py +0 -204
  17. hatchet_sdk/v0/clients/event_ts.py +0 -28
  18. hatchet_sdk/v0/clients/events.py +0 -182
  19. hatchet_sdk/v0/clients/rest/__init__.py +0 -307
  20. hatchet_sdk/v0/clients/rest/api/__init__.py +0 -19
  21. hatchet_sdk/v0/clients/rest/api/api_token_api.py +0 -858
  22. hatchet_sdk/v0/clients/rest/api/default_api.py +0 -2259
  23. hatchet_sdk/v0/clients/rest/api/event_api.py +0 -2548
  24. hatchet_sdk/v0/clients/rest/api/github_api.py +0 -331
  25. hatchet_sdk/v0/clients/rest/api/healthcheck_api.py +0 -483
  26. hatchet_sdk/v0/clients/rest/api/log_api.py +0 -449
  27. hatchet_sdk/v0/clients/rest/api/metadata_api.py +0 -728
  28. hatchet_sdk/v0/clients/rest/api/rate_limits_api.py +0 -423
  29. hatchet_sdk/v0/clients/rest/api/slack_api.py +0 -577
  30. hatchet_sdk/v0/clients/rest/api/sns_api.py +0 -872
  31. hatchet_sdk/v0/clients/rest/api/step_run_api.py +0 -2202
  32. hatchet_sdk/v0/clients/rest/api/tenant_api.py +0 -4430
  33. hatchet_sdk/v0/clients/rest/api/user_api.py +0 -2888
  34. hatchet_sdk/v0/clients/rest/api/worker_api.py +0 -858
  35. hatchet_sdk/v0/clients/rest/api/workflow_api.py +0 -6312
  36. hatchet_sdk/v0/clients/rest/api/workflow_run_api.py +0 -1932
  37. hatchet_sdk/v0/clients/rest/api/workflow_runs_api.py +0 -610
  38. hatchet_sdk/v0/clients/rest/api_client.py +0 -759
  39. hatchet_sdk/v0/clients/rest/api_response.py +0 -22
  40. hatchet_sdk/v0/clients/rest/configuration.py +0 -611
  41. hatchet_sdk/v0/clients/rest/exceptions.py +0 -200
  42. hatchet_sdk/v0/clients/rest/models/__init__.py +0 -274
  43. hatchet_sdk/v0/clients/rest/models/accept_invite_request.py +0 -83
  44. hatchet_sdk/v0/clients/rest/models/api_error.py +0 -102
  45. hatchet_sdk/v0/clients/rest/models/api_errors.py +0 -100
  46. hatchet_sdk/v0/clients/rest/models/api_meta.py +0 -144
  47. hatchet_sdk/v0/clients/rest/models/api_meta_auth.py +0 -85
  48. hatchet_sdk/v0/clients/rest/models/api_meta_integration.py +0 -88
  49. hatchet_sdk/v0/clients/rest/models/api_meta_posthog.py +0 -90
  50. hatchet_sdk/v0/clients/rest/models/api_resource_meta.py +0 -98
  51. hatchet_sdk/v0/clients/rest/models/api_token.py +0 -105
  52. hatchet_sdk/v0/clients/rest/models/bulk_create_event_request.py +0 -100
  53. hatchet_sdk/v0/clients/rest/models/bulk_create_event_response.py +0 -110
  54. hatchet_sdk/v0/clients/rest/models/cancel_event_request.py +0 -85
  55. hatchet_sdk/v0/clients/rest/models/cancel_step_run_request.py +0 -83
  56. hatchet_sdk/v0/clients/rest/models/concurrency_limit_strategy.py +0 -39
  57. hatchet_sdk/v0/clients/rest/models/create_api_token_request.py +0 -92
  58. hatchet_sdk/v0/clients/rest/models/create_api_token_response.py +0 -83
  59. hatchet_sdk/v0/clients/rest/models/create_cron_workflow_trigger_request.py +0 -98
  60. hatchet_sdk/v0/clients/rest/models/create_event_request.py +0 -95
  61. hatchet_sdk/v0/clients/rest/models/create_pull_request_from_step_run.py +0 -83
  62. hatchet_sdk/v0/clients/rest/models/create_sns_integration_request.py +0 -85
  63. hatchet_sdk/v0/clients/rest/models/create_tenant_alert_email_group_request.py +0 -83
  64. hatchet_sdk/v0/clients/rest/models/create_tenant_invite_request.py +0 -86
  65. hatchet_sdk/v0/clients/rest/models/create_tenant_request.py +0 -84
  66. hatchet_sdk/v0/clients/rest/models/cron_workflows.py +0 -131
  67. hatchet_sdk/v0/clients/rest/models/cron_workflows_list.py +0 -110
  68. hatchet_sdk/v0/clients/rest/models/cron_workflows_method.py +0 -37
  69. hatchet_sdk/v0/clients/rest/models/cron_workflows_order_by_field.py +0 -37
  70. hatchet_sdk/v0/clients/rest/models/event.py +0 -143
  71. hatchet_sdk/v0/clients/rest/models/event_data.py +0 -83
  72. hatchet_sdk/v0/clients/rest/models/event_key_list.py +0 -98
  73. hatchet_sdk/v0/clients/rest/models/event_list.py +0 -110
  74. hatchet_sdk/v0/clients/rest/models/event_order_by_direction.py +0 -37
  75. hatchet_sdk/v0/clients/rest/models/event_order_by_field.py +0 -36
  76. hatchet_sdk/v0/clients/rest/models/event_update_cancel200_response.py +0 -85
  77. hatchet_sdk/v0/clients/rest/models/event_workflow_run_summary.py +0 -116
  78. hatchet_sdk/v0/clients/rest/models/events.py +0 -110
  79. hatchet_sdk/v0/clients/rest/models/get_step_run_diff_response.py +0 -100
  80. hatchet_sdk/v0/clients/rest/models/github_app_installation.py +0 -107
  81. hatchet_sdk/v0/clients/rest/models/github_branch.py +0 -86
  82. hatchet_sdk/v0/clients/rest/models/github_repo.py +0 -86
  83. hatchet_sdk/v0/clients/rest/models/info_get_version200_response.py +0 -83
  84. hatchet_sdk/v0/clients/rest/models/job.py +0 -132
  85. hatchet_sdk/v0/clients/rest/models/job_run.py +0 -176
  86. hatchet_sdk/v0/clients/rest/models/job_run_status.py +0 -41
  87. hatchet_sdk/v0/clients/rest/models/link_github_repository_request.py +0 -106
  88. hatchet_sdk/v0/clients/rest/models/list_api_tokens_response.py +0 -110
  89. hatchet_sdk/v0/clients/rest/models/list_github_app_installations_response.py +0 -112
  90. hatchet_sdk/v0/clients/rest/models/list_pull_requests_response.py +0 -100
  91. hatchet_sdk/v0/clients/rest/models/list_slack_webhooks.py +0 -110
  92. hatchet_sdk/v0/clients/rest/models/list_sns_integrations.py +0 -110
  93. hatchet_sdk/v0/clients/rest/models/log_line.py +0 -94
  94. hatchet_sdk/v0/clients/rest/models/log_line_level.py +0 -39
  95. hatchet_sdk/v0/clients/rest/models/log_line_list.py +0 -110
  96. hatchet_sdk/v0/clients/rest/models/log_line_order_by_direction.py +0 -37
  97. hatchet_sdk/v0/clients/rest/models/log_line_order_by_field.py +0 -36
  98. hatchet_sdk/v0/clients/rest/models/pagination_response.py +0 -95
  99. hatchet_sdk/v0/clients/rest/models/pull_request.py +0 -112
  100. hatchet_sdk/v0/clients/rest/models/pull_request_state.py +0 -37
  101. hatchet_sdk/v0/clients/rest/models/queue_metrics.py +0 -97
  102. hatchet_sdk/v0/clients/rest/models/rate_limit.py +0 -117
  103. hatchet_sdk/v0/clients/rest/models/rate_limit_list.py +0 -110
  104. hatchet_sdk/v0/clients/rest/models/rate_limit_order_by_direction.py +0 -37
  105. hatchet_sdk/v0/clients/rest/models/rate_limit_order_by_field.py +0 -38
  106. hatchet_sdk/v0/clients/rest/models/recent_step_runs.py +0 -118
  107. hatchet_sdk/v0/clients/rest/models/reject_invite_request.py +0 -83
  108. hatchet_sdk/v0/clients/rest/models/replay_event_request.py +0 -85
  109. hatchet_sdk/v0/clients/rest/models/replay_workflow_runs_request.py +0 -85
  110. hatchet_sdk/v0/clients/rest/models/replay_workflow_runs_response.py +0 -100
  111. hatchet_sdk/v0/clients/rest/models/rerun_step_run_request.py +0 -83
  112. hatchet_sdk/v0/clients/rest/models/schedule_workflow_run_request.py +0 -92
  113. hatchet_sdk/v0/clients/rest/models/scheduled_run_status.py +0 -42
  114. hatchet_sdk/v0/clients/rest/models/scheduled_workflows.py +0 -149
  115. hatchet_sdk/v0/clients/rest/models/scheduled_workflows_list.py +0 -110
  116. hatchet_sdk/v0/clients/rest/models/scheduled_workflows_method.py +0 -37
  117. hatchet_sdk/v0/clients/rest/models/scheduled_workflows_order_by_field.py +0 -37
  118. hatchet_sdk/v0/clients/rest/models/semaphore_slots.py +0 -113
  119. hatchet_sdk/v0/clients/rest/models/slack_webhook.py +0 -127
  120. hatchet_sdk/v0/clients/rest/models/sns_integration.py +0 -114
  121. hatchet_sdk/v0/clients/rest/models/step.py +0 -123
  122. hatchet_sdk/v0/clients/rest/models/step_run.py +0 -202
  123. hatchet_sdk/v0/clients/rest/models/step_run_archive.py +0 -142
  124. hatchet_sdk/v0/clients/rest/models/step_run_archive_list.py +0 -110
  125. hatchet_sdk/v0/clients/rest/models/step_run_diff.py +0 -91
  126. hatchet_sdk/v0/clients/rest/models/step_run_event.py +0 -122
  127. hatchet_sdk/v0/clients/rest/models/step_run_event_list.py +0 -110
  128. hatchet_sdk/v0/clients/rest/models/step_run_event_reason.py +0 -52
  129. hatchet_sdk/v0/clients/rest/models/step_run_event_severity.py +0 -38
  130. hatchet_sdk/v0/clients/rest/models/step_run_status.py +0 -44
  131. hatchet_sdk/v0/clients/rest/models/tenant.py +0 -118
  132. hatchet_sdk/v0/clients/rest/models/tenant_alert_email_group.py +0 -98
  133. hatchet_sdk/v0/clients/rest/models/tenant_alert_email_group_list.py +0 -112
  134. hatchet_sdk/v0/clients/rest/models/tenant_alerting_settings.py +0 -143
  135. hatchet_sdk/v0/clients/rest/models/tenant_invite.py +0 -120
  136. hatchet_sdk/v0/clients/rest/models/tenant_invite_list.py +0 -110
  137. hatchet_sdk/v0/clients/rest/models/tenant_list.py +0 -110
  138. hatchet_sdk/v0/clients/rest/models/tenant_member.py +0 -123
  139. hatchet_sdk/v0/clients/rest/models/tenant_member_list.py +0 -110
  140. hatchet_sdk/v0/clients/rest/models/tenant_member_role.py +0 -38
  141. hatchet_sdk/v0/clients/rest/models/tenant_queue_metrics.py +0 -116
  142. hatchet_sdk/v0/clients/rest/models/tenant_resource.py +0 -40
  143. hatchet_sdk/v0/clients/rest/models/tenant_resource_limit.py +0 -135
  144. hatchet_sdk/v0/clients/rest/models/tenant_resource_policy.py +0 -102
  145. hatchet_sdk/v0/clients/rest/models/tenant_step_run_queue_metrics.py +0 -83
  146. hatchet_sdk/v0/clients/rest/models/trigger_workflow_run_request.py +0 -91
  147. hatchet_sdk/v0/clients/rest/models/update_tenant_alert_email_group_request.py +0 -83
  148. hatchet_sdk/v0/clients/rest/models/update_tenant_invite_request.py +0 -85
  149. hatchet_sdk/v0/clients/rest/models/update_tenant_request.py +0 -137
  150. hatchet_sdk/v0/clients/rest/models/update_worker_request.py +0 -87
  151. hatchet_sdk/v0/clients/rest/models/user.py +0 -126
  152. hatchet_sdk/v0/clients/rest/models/user_change_password_request.py +0 -88
  153. hatchet_sdk/v0/clients/rest/models/user_login_request.py +0 -86
  154. hatchet_sdk/v0/clients/rest/models/user_register_request.py +0 -91
  155. hatchet_sdk/v0/clients/rest/models/user_tenant_memberships_list.py +0 -110
  156. hatchet_sdk/v0/clients/rest/models/user_tenant_public.py +0 -86
  157. hatchet_sdk/v0/clients/rest/models/webhook_worker.py +0 -100
  158. hatchet_sdk/v0/clients/rest/models/webhook_worker_create_request.py +0 -94
  159. hatchet_sdk/v0/clients/rest/models/webhook_worker_create_response.py +0 -98
  160. hatchet_sdk/v0/clients/rest/models/webhook_worker_created.py +0 -102
  161. hatchet_sdk/v0/clients/rest/models/webhook_worker_list_response.py +0 -110
  162. hatchet_sdk/v0/clients/rest/models/webhook_worker_request.py +0 -102
  163. hatchet_sdk/v0/clients/rest/models/webhook_worker_request_list_response.py +0 -104
  164. hatchet_sdk/v0/clients/rest/models/webhook_worker_request_method.py +0 -38
  165. hatchet_sdk/v0/clients/rest/models/worker.py +0 -239
  166. hatchet_sdk/v0/clients/rest/models/worker_label.py +0 -102
  167. hatchet_sdk/v0/clients/rest/models/worker_list.py +0 -110
  168. hatchet_sdk/v0/clients/rest/models/worker_runtime_info.py +0 -103
  169. hatchet_sdk/v0/clients/rest/models/worker_runtime_sdks.py +0 -38
  170. hatchet_sdk/v0/clients/rest/models/worker_type.py +0 -38
  171. hatchet_sdk/v0/clients/rest/models/workflow.py +0 -165
  172. hatchet_sdk/v0/clients/rest/models/workflow_concurrency.py +0 -107
  173. hatchet_sdk/v0/clients/rest/models/workflow_deployment_config.py +0 -136
  174. hatchet_sdk/v0/clients/rest/models/workflow_kind.py +0 -38
  175. hatchet_sdk/v0/clients/rest/models/workflow_list.py +0 -120
  176. hatchet_sdk/v0/clients/rest/models/workflow_metrics.py +0 -97
  177. hatchet_sdk/v0/clients/rest/models/workflow_run.py +0 -188
  178. hatchet_sdk/v0/clients/rest/models/workflow_run_cancel200_response.py +0 -85
  179. hatchet_sdk/v0/clients/rest/models/workflow_run_list.py +0 -110
  180. hatchet_sdk/v0/clients/rest/models/workflow_run_order_by_direction.py +0 -37
  181. hatchet_sdk/v0/clients/rest/models/workflow_run_order_by_field.py +0 -39
  182. hatchet_sdk/v0/clients/rest/models/workflow_run_shape.py +0 -186
  183. hatchet_sdk/v0/clients/rest/models/workflow_run_status.py +0 -42
  184. hatchet_sdk/v0/clients/rest/models/workflow_run_triggered_by.py +0 -112
  185. hatchet_sdk/v0/clients/rest/models/workflow_runs_cancel_request.py +0 -85
  186. hatchet_sdk/v0/clients/rest/models/workflow_runs_metrics.py +0 -94
  187. hatchet_sdk/v0/clients/rest/models/workflow_runs_metrics_counts.py +0 -104
  188. hatchet_sdk/v0/clients/rest/models/workflow_tag.py +0 -84
  189. hatchet_sdk/v0/clients/rest/models/workflow_trigger_cron_ref.py +0 -86
  190. hatchet_sdk/v0/clients/rest/models/workflow_trigger_event_ref.py +0 -86
  191. hatchet_sdk/v0/clients/rest/models/workflow_triggers.py +0 -141
  192. hatchet_sdk/v0/clients/rest/models/workflow_update_request.py +0 -85
  193. hatchet_sdk/v0/clients/rest/models/workflow_version.py +0 -170
  194. hatchet_sdk/v0/clients/rest/models/workflow_version_concurrency.py +0 -114
  195. hatchet_sdk/v0/clients/rest/models/workflow_version_definition.py +0 -85
  196. hatchet_sdk/v0/clients/rest/models/workflow_version_meta.py +0 -123
  197. hatchet_sdk/v0/clients/rest/models/workflow_workers_count.py +0 -95
  198. hatchet_sdk/v0/clients/rest/rest.py +0 -187
  199. hatchet_sdk/v0/clients/rest/tenacity_utils.py +0 -39
  200. hatchet_sdk/v0/clients/rest_client.py +0 -622
  201. hatchet_sdk/v0/clients/run_event_listener.py +0 -260
  202. hatchet_sdk/v0/clients/workflow_listener.py +0 -277
  203. hatchet_sdk/v0/connection.py +0 -63
  204. hatchet_sdk/v0/context/__init__.py +0 -1
  205. hatchet_sdk/v0/context/context.py +0 -446
  206. hatchet_sdk/v0/context/worker_context.py +0 -28
  207. hatchet_sdk/v0/features/cron.py +0 -286
  208. hatchet_sdk/v0/features/scheduled.py +0 -248
  209. hatchet_sdk/v0/hatchet.py +0 -310
  210. hatchet_sdk/v0/labels.py +0 -10
  211. hatchet_sdk/v0/loader.py +0 -244
  212. hatchet_sdk/v0/metadata.py +0 -2
  213. hatchet_sdk/v0/opentelemetry/instrumentor.py +0 -393
  214. hatchet_sdk/v0/rate_limit.py +0 -126
  215. hatchet_sdk/v0/semver.py +0 -30
  216. hatchet_sdk/v0/token.py +0 -27
  217. hatchet_sdk/v0/utils/aio_utils.py +0 -137
  218. hatchet_sdk/v0/utils/backoff.py +0 -9
  219. hatchet_sdk/v0/utils/types.py +0 -8
  220. hatchet_sdk/v0/utils/typing.py +0 -12
  221. hatchet_sdk/v0/v2/callable.py +0 -202
  222. hatchet_sdk/v0/v2/concurrency.py +0 -47
  223. hatchet_sdk/v0/v2/hatchet.py +0 -224
  224. hatchet_sdk/v0/worker/__init__.py +0 -1
  225. hatchet_sdk/v0/worker/action_listener_process.py +0 -294
  226. hatchet_sdk/v0/worker/runner/run_loop_manager.py +0 -112
  227. hatchet_sdk/v0/worker/runner/runner.py +0 -460
  228. hatchet_sdk/v0/worker/runner/utils/capture_logs.py +0 -81
  229. hatchet_sdk/v0/worker/runner/utils/error_with_traceback.py +0 -6
  230. hatchet_sdk/v0/worker/worker.py +0 -391
  231. hatchet_sdk/v0/workflow.py +0 -261
  232. hatchet_sdk/v0/workflow_run.py +0 -59
  233. {hatchet_sdk-1.18.1.dist-info → hatchet_sdk-1.20.0.dist-info}/WHEEL +0 -0
  234. {hatchet_sdk-1.18.1.dist-info → hatchet_sdk-1.20.0.dist-info}/entry_points.txt +0 -0
@@ -1,858 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Hatchet API
5
-
6
- The Hatchet API
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
-
11
- Do not edit the class manually.
12
- """ # noqa: E501
13
-
14
- import warnings
15
- from typing import Any, Dict, List, Optional, Tuple, Union
16
-
17
- from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
18
- from typing_extensions import Annotated
19
-
20
- from hatchet_sdk.v0.clients.rest.api_client import ApiClient, RequestSerialized
21
- from hatchet_sdk.v0.clients.rest.api_response import ApiResponse
22
- from hatchet_sdk.v0.clients.rest.models.update_worker_request import UpdateWorkerRequest
23
- from hatchet_sdk.v0.clients.rest.models.worker import Worker
24
- from hatchet_sdk.v0.clients.rest.models.worker_list import WorkerList
25
- from hatchet_sdk.v0.clients.rest.rest import RESTResponseType
26
-
27
-
28
- class WorkerApi:
29
- """NOTE: This class is auto generated by OpenAPI Generator
30
- Ref: https://openapi-generator.tech
31
-
32
- Do not edit the class manually.
33
- """
34
-
35
- def __init__(self, api_client=None) -> None:
36
- if api_client is None:
37
- api_client = ApiClient.get_default()
38
- self.api_client = api_client
39
-
40
- @validate_call
41
- async def worker_get(
42
- self,
43
- worker: Annotated[
44
- str,
45
- Field(
46
- min_length=36, strict=True, max_length=36, description="The worker id"
47
- ),
48
- ],
49
- _request_timeout: Union[
50
- None,
51
- Annotated[StrictFloat, Field(gt=0)],
52
- Tuple[
53
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
54
- ],
55
- ] = None,
56
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
- _content_type: Optional[StrictStr] = None,
58
- _headers: Optional[Dict[StrictStr, Any]] = None,
59
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
- ) -> Worker:
61
- """Get worker
62
-
63
- Get a worker
64
-
65
- :param worker: The worker id (required)
66
- :type worker: str
67
- :param _request_timeout: timeout setting for this request. If one
68
- number provided, it will be total request
69
- timeout. It can also be a pair (tuple) of
70
- (connection, read) timeouts.
71
- :type _request_timeout: int, tuple(int, int), optional
72
- :param _request_auth: set to override the auth_settings for an a single
73
- request; this effectively ignores the
74
- authentication in the spec for a single request.
75
- :type _request_auth: dict, optional
76
- :param _content_type: force content-type for the request.
77
- :type _content_type: str, Optional
78
- :param _headers: set to override the headers for a single
79
- request; this effectively ignores the headers
80
- in the spec for a single request.
81
- :type _headers: dict, optional
82
- :param _host_index: set to override the host_index for a single
83
- request; this effectively ignores the host_index
84
- in the spec for a single request.
85
- :type _host_index: int, optional
86
- :return: Returns the result object.
87
- """ # noqa: E501
88
-
89
- _param = self._worker_get_serialize(
90
- worker=worker,
91
- _request_auth=_request_auth,
92
- _content_type=_content_type,
93
- _headers=_headers,
94
- _host_index=_host_index,
95
- )
96
-
97
- _response_types_map: Dict[str, Optional[str]] = {
98
- "200": "Worker",
99
- "400": "APIErrors",
100
- "403": "APIErrors",
101
- }
102
- response_data = await self.api_client.call_api(
103
- *_param, _request_timeout=_request_timeout
104
- )
105
- await response_data.read()
106
- return self.api_client.response_deserialize(
107
- response_data=response_data,
108
- response_types_map=_response_types_map,
109
- ).data
110
-
111
- @validate_call
112
- async def worker_get_with_http_info(
113
- self,
114
- worker: Annotated[
115
- str,
116
- Field(
117
- min_length=36, strict=True, max_length=36, description="The worker id"
118
- ),
119
- ],
120
- _request_timeout: Union[
121
- None,
122
- Annotated[StrictFloat, Field(gt=0)],
123
- Tuple[
124
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
125
- ],
126
- ] = None,
127
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
128
- _content_type: Optional[StrictStr] = None,
129
- _headers: Optional[Dict[StrictStr, Any]] = None,
130
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
131
- ) -> ApiResponse[Worker]:
132
- """Get worker
133
-
134
- Get a worker
135
-
136
- :param worker: The worker id (required)
137
- :type worker: str
138
- :param _request_timeout: timeout setting for this request. If one
139
- number provided, it will be total request
140
- timeout. It can also be a pair (tuple) of
141
- (connection, read) timeouts.
142
- :type _request_timeout: int, tuple(int, int), optional
143
- :param _request_auth: set to override the auth_settings for an a single
144
- request; this effectively ignores the
145
- authentication in the spec for a single request.
146
- :type _request_auth: dict, optional
147
- :param _content_type: force content-type for the request.
148
- :type _content_type: str, Optional
149
- :param _headers: set to override the headers for a single
150
- request; this effectively ignores the headers
151
- in the spec for a single request.
152
- :type _headers: dict, optional
153
- :param _host_index: set to override the host_index for a single
154
- request; this effectively ignores the host_index
155
- in the spec for a single request.
156
- :type _host_index: int, optional
157
- :return: Returns the result object.
158
- """ # noqa: E501
159
-
160
- _param = self._worker_get_serialize(
161
- worker=worker,
162
- _request_auth=_request_auth,
163
- _content_type=_content_type,
164
- _headers=_headers,
165
- _host_index=_host_index,
166
- )
167
-
168
- _response_types_map: Dict[str, Optional[str]] = {
169
- "200": "Worker",
170
- "400": "APIErrors",
171
- "403": "APIErrors",
172
- }
173
- response_data = await self.api_client.call_api(
174
- *_param, _request_timeout=_request_timeout
175
- )
176
- await response_data.read()
177
- return self.api_client.response_deserialize(
178
- response_data=response_data,
179
- response_types_map=_response_types_map,
180
- )
181
-
182
- @validate_call
183
- async def worker_get_without_preload_content(
184
- self,
185
- worker: Annotated[
186
- str,
187
- Field(
188
- min_length=36, strict=True, max_length=36, description="The worker id"
189
- ),
190
- ],
191
- _request_timeout: Union[
192
- None,
193
- Annotated[StrictFloat, Field(gt=0)],
194
- Tuple[
195
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
196
- ],
197
- ] = None,
198
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
199
- _content_type: Optional[StrictStr] = None,
200
- _headers: Optional[Dict[StrictStr, Any]] = None,
201
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
202
- ) -> RESTResponseType:
203
- """Get worker
204
-
205
- Get a worker
206
-
207
- :param worker: The worker id (required)
208
- :type worker: str
209
- :param _request_timeout: timeout setting for this request. If one
210
- number provided, it will be total request
211
- timeout. It can also be a pair (tuple) of
212
- (connection, read) timeouts.
213
- :type _request_timeout: int, tuple(int, int), optional
214
- :param _request_auth: set to override the auth_settings for an a single
215
- request; this effectively ignores the
216
- authentication in the spec for a single request.
217
- :type _request_auth: dict, optional
218
- :param _content_type: force content-type for the request.
219
- :type _content_type: str, Optional
220
- :param _headers: set to override the headers for a single
221
- request; this effectively ignores the headers
222
- in the spec for a single request.
223
- :type _headers: dict, optional
224
- :param _host_index: set to override the host_index for a single
225
- request; this effectively ignores the host_index
226
- in the spec for a single request.
227
- :type _host_index: int, optional
228
- :return: Returns the result object.
229
- """ # noqa: E501
230
-
231
- _param = self._worker_get_serialize(
232
- worker=worker,
233
- _request_auth=_request_auth,
234
- _content_type=_content_type,
235
- _headers=_headers,
236
- _host_index=_host_index,
237
- )
238
-
239
- _response_types_map: Dict[str, Optional[str]] = {
240
- "200": "Worker",
241
- "400": "APIErrors",
242
- "403": "APIErrors",
243
- }
244
- response_data = await self.api_client.call_api(
245
- *_param, _request_timeout=_request_timeout
246
- )
247
- return response_data.response
248
-
249
- def _worker_get_serialize(
250
- self,
251
- worker,
252
- _request_auth,
253
- _content_type,
254
- _headers,
255
- _host_index,
256
- ) -> RequestSerialized:
257
-
258
- _host = None
259
-
260
- _collection_formats: Dict[str, str] = {}
261
-
262
- _path_params: Dict[str, str] = {}
263
- _query_params: List[Tuple[str, str]] = []
264
- _header_params: Dict[str, Optional[str]] = _headers or {}
265
- _form_params: List[Tuple[str, str]] = []
266
- _files: Dict[
267
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
268
- ] = {}
269
- _body_params: Optional[bytes] = None
270
-
271
- # process the path parameters
272
- if worker is not None:
273
- _path_params["worker"] = worker
274
- # process the query parameters
275
- # process the header parameters
276
- # process the form parameters
277
- # process the body parameter
278
-
279
- # set the HTTP header `Accept`
280
- if "Accept" not in _header_params:
281
- _header_params["Accept"] = self.api_client.select_header_accept(
282
- ["application/json"]
283
- )
284
-
285
- # authentication setting
286
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
287
-
288
- return self.api_client.param_serialize(
289
- method="GET",
290
- resource_path="/api/v1/workers/{worker}",
291
- path_params=_path_params,
292
- query_params=_query_params,
293
- header_params=_header_params,
294
- body=_body_params,
295
- post_params=_form_params,
296
- files=_files,
297
- auth_settings=_auth_settings,
298
- collection_formats=_collection_formats,
299
- _host=_host,
300
- _request_auth=_request_auth,
301
- )
302
-
303
- @validate_call
304
- async def worker_list(
305
- self,
306
- tenant: Annotated[
307
- str,
308
- Field(
309
- min_length=36, strict=True, max_length=36, description="The tenant id"
310
- ),
311
- ],
312
- _request_timeout: Union[
313
- None,
314
- Annotated[StrictFloat, Field(gt=0)],
315
- Tuple[
316
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
317
- ],
318
- ] = None,
319
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
320
- _content_type: Optional[StrictStr] = None,
321
- _headers: Optional[Dict[StrictStr, Any]] = None,
322
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
323
- ) -> WorkerList:
324
- """Get workers
325
-
326
- Get all workers for a tenant
327
-
328
- :param tenant: The tenant id (required)
329
- :type tenant: str
330
- :param _request_timeout: timeout setting for this request. If one
331
- number provided, it will be total request
332
- timeout. It can also be a pair (tuple) of
333
- (connection, read) timeouts.
334
- :type _request_timeout: int, tuple(int, int), optional
335
- :param _request_auth: set to override the auth_settings for an a single
336
- request; this effectively ignores the
337
- authentication in the spec for a single request.
338
- :type _request_auth: dict, optional
339
- :param _content_type: force content-type for the request.
340
- :type _content_type: str, Optional
341
- :param _headers: set to override the headers for a single
342
- request; this effectively ignores the headers
343
- in the spec for a single request.
344
- :type _headers: dict, optional
345
- :param _host_index: set to override the host_index for a single
346
- request; this effectively ignores the host_index
347
- in the spec for a single request.
348
- :type _host_index: int, optional
349
- :return: Returns the result object.
350
- """ # noqa: E501
351
-
352
- _param = self._worker_list_serialize(
353
- tenant=tenant,
354
- _request_auth=_request_auth,
355
- _content_type=_content_type,
356
- _headers=_headers,
357
- _host_index=_host_index,
358
- )
359
-
360
- _response_types_map: Dict[str, Optional[str]] = {
361
- "200": "WorkerList",
362
- "400": "APIErrors",
363
- "403": "APIErrors",
364
- }
365
- response_data = await self.api_client.call_api(
366
- *_param, _request_timeout=_request_timeout
367
- )
368
- await response_data.read()
369
- return self.api_client.response_deserialize(
370
- response_data=response_data,
371
- response_types_map=_response_types_map,
372
- ).data
373
-
374
- @validate_call
375
- async def worker_list_with_http_info(
376
- self,
377
- tenant: Annotated[
378
- str,
379
- Field(
380
- min_length=36, strict=True, max_length=36, description="The tenant id"
381
- ),
382
- ],
383
- _request_timeout: Union[
384
- None,
385
- Annotated[StrictFloat, Field(gt=0)],
386
- Tuple[
387
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
388
- ],
389
- ] = None,
390
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
391
- _content_type: Optional[StrictStr] = None,
392
- _headers: Optional[Dict[StrictStr, Any]] = None,
393
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
394
- ) -> ApiResponse[WorkerList]:
395
- """Get workers
396
-
397
- Get all workers for a tenant
398
-
399
- :param tenant: The tenant id (required)
400
- :type tenant: str
401
- :param _request_timeout: timeout setting for this request. If one
402
- number provided, it will be total request
403
- timeout. It can also be a pair (tuple) of
404
- (connection, read) timeouts.
405
- :type _request_timeout: int, tuple(int, int), optional
406
- :param _request_auth: set to override the auth_settings for an a single
407
- request; this effectively ignores the
408
- authentication in the spec for a single request.
409
- :type _request_auth: dict, optional
410
- :param _content_type: force content-type for the request.
411
- :type _content_type: str, Optional
412
- :param _headers: set to override the headers for a single
413
- request; this effectively ignores the headers
414
- in the spec for a single request.
415
- :type _headers: dict, optional
416
- :param _host_index: set to override the host_index for a single
417
- request; this effectively ignores the host_index
418
- in the spec for a single request.
419
- :type _host_index: int, optional
420
- :return: Returns the result object.
421
- """ # noqa: E501
422
-
423
- _param = self._worker_list_serialize(
424
- tenant=tenant,
425
- _request_auth=_request_auth,
426
- _content_type=_content_type,
427
- _headers=_headers,
428
- _host_index=_host_index,
429
- )
430
-
431
- _response_types_map: Dict[str, Optional[str]] = {
432
- "200": "WorkerList",
433
- "400": "APIErrors",
434
- "403": "APIErrors",
435
- }
436
- response_data = await self.api_client.call_api(
437
- *_param, _request_timeout=_request_timeout
438
- )
439
- await response_data.read()
440
- return self.api_client.response_deserialize(
441
- response_data=response_data,
442
- response_types_map=_response_types_map,
443
- )
444
-
445
- @validate_call
446
- async def worker_list_without_preload_content(
447
- self,
448
- tenant: Annotated[
449
- str,
450
- Field(
451
- min_length=36, strict=True, max_length=36, description="The tenant id"
452
- ),
453
- ],
454
- _request_timeout: Union[
455
- None,
456
- Annotated[StrictFloat, Field(gt=0)],
457
- Tuple[
458
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
459
- ],
460
- ] = None,
461
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
462
- _content_type: Optional[StrictStr] = None,
463
- _headers: Optional[Dict[StrictStr, Any]] = None,
464
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
465
- ) -> RESTResponseType:
466
- """Get workers
467
-
468
- Get all workers for a tenant
469
-
470
- :param tenant: The tenant id (required)
471
- :type tenant: str
472
- :param _request_timeout: timeout setting for this request. If one
473
- number provided, it will be total request
474
- timeout. It can also be a pair (tuple) of
475
- (connection, read) timeouts.
476
- :type _request_timeout: int, tuple(int, int), optional
477
- :param _request_auth: set to override the auth_settings for an a single
478
- request; this effectively ignores the
479
- authentication in the spec for a single request.
480
- :type _request_auth: dict, optional
481
- :param _content_type: force content-type for the request.
482
- :type _content_type: str, Optional
483
- :param _headers: set to override the headers for a single
484
- request; this effectively ignores the headers
485
- in the spec for a single request.
486
- :type _headers: dict, optional
487
- :param _host_index: set to override the host_index for a single
488
- request; this effectively ignores the host_index
489
- in the spec for a single request.
490
- :type _host_index: int, optional
491
- :return: Returns the result object.
492
- """ # noqa: E501
493
-
494
- _param = self._worker_list_serialize(
495
- tenant=tenant,
496
- _request_auth=_request_auth,
497
- _content_type=_content_type,
498
- _headers=_headers,
499
- _host_index=_host_index,
500
- )
501
-
502
- _response_types_map: Dict[str, Optional[str]] = {
503
- "200": "WorkerList",
504
- "400": "APIErrors",
505
- "403": "APIErrors",
506
- }
507
- response_data = await self.api_client.call_api(
508
- *_param, _request_timeout=_request_timeout
509
- )
510
- return response_data.response
511
-
512
- def _worker_list_serialize(
513
- self,
514
- tenant,
515
- _request_auth,
516
- _content_type,
517
- _headers,
518
- _host_index,
519
- ) -> RequestSerialized:
520
-
521
- _host = None
522
-
523
- _collection_formats: Dict[str, str] = {}
524
-
525
- _path_params: Dict[str, str] = {}
526
- _query_params: List[Tuple[str, str]] = []
527
- _header_params: Dict[str, Optional[str]] = _headers or {}
528
- _form_params: List[Tuple[str, str]] = []
529
- _files: Dict[
530
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
531
- ] = {}
532
- _body_params: Optional[bytes] = None
533
-
534
- # process the path parameters
535
- if tenant is not None:
536
- _path_params["tenant"] = tenant
537
- # process the query parameters
538
- # process the header parameters
539
- # process the form parameters
540
- # process the body parameter
541
-
542
- # set the HTTP header `Accept`
543
- if "Accept" not in _header_params:
544
- _header_params["Accept"] = self.api_client.select_header_accept(
545
- ["application/json"]
546
- )
547
-
548
- # authentication setting
549
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
550
-
551
- return self.api_client.param_serialize(
552
- method="GET",
553
- resource_path="/api/v1/tenants/{tenant}/worker",
554
- path_params=_path_params,
555
- query_params=_query_params,
556
- header_params=_header_params,
557
- body=_body_params,
558
- post_params=_form_params,
559
- files=_files,
560
- auth_settings=_auth_settings,
561
- collection_formats=_collection_formats,
562
- _host=_host,
563
- _request_auth=_request_auth,
564
- )
565
-
566
- @validate_call
567
- async def worker_update(
568
- self,
569
- worker: Annotated[
570
- str,
571
- Field(
572
- min_length=36, strict=True, max_length=36, description="The worker id"
573
- ),
574
- ],
575
- update_worker_request: Annotated[
576
- UpdateWorkerRequest, Field(description="The worker update")
577
- ],
578
- _request_timeout: Union[
579
- None,
580
- Annotated[StrictFloat, Field(gt=0)],
581
- Tuple[
582
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
583
- ],
584
- ] = None,
585
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
586
- _content_type: Optional[StrictStr] = None,
587
- _headers: Optional[Dict[StrictStr, Any]] = None,
588
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
589
- ) -> Worker:
590
- """Update worker
591
-
592
- Update a worker
593
-
594
- :param worker: The worker id (required)
595
- :type worker: str
596
- :param update_worker_request: The worker update (required)
597
- :type update_worker_request: UpdateWorkerRequest
598
- :param _request_timeout: timeout setting for this request. If one
599
- number provided, it will be total request
600
- timeout. It can also be a pair (tuple) of
601
- (connection, read) timeouts.
602
- :type _request_timeout: int, tuple(int, int), optional
603
- :param _request_auth: set to override the auth_settings for an a single
604
- request; this effectively ignores the
605
- authentication in the spec for a single request.
606
- :type _request_auth: dict, optional
607
- :param _content_type: force content-type for the request.
608
- :type _content_type: str, Optional
609
- :param _headers: set to override the headers for a single
610
- request; this effectively ignores the headers
611
- in the spec for a single request.
612
- :type _headers: dict, optional
613
- :param _host_index: set to override the host_index for a single
614
- request; this effectively ignores the host_index
615
- in the spec for a single request.
616
- :type _host_index: int, optional
617
- :return: Returns the result object.
618
- """ # noqa: E501
619
-
620
- _param = self._worker_update_serialize(
621
- worker=worker,
622
- update_worker_request=update_worker_request,
623
- _request_auth=_request_auth,
624
- _content_type=_content_type,
625
- _headers=_headers,
626
- _host_index=_host_index,
627
- )
628
-
629
- _response_types_map: Dict[str, Optional[str]] = {
630
- "200": "Worker",
631
- "400": "APIErrors",
632
- "403": "APIErrors",
633
- }
634
- response_data = await self.api_client.call_api(
635
- *_param, _request_timeout=_request_timeout
636
- )
637
- await response_data.read()
638
- return self.api_client.response_deserialize(
639
- response_data=response_data,
640
- response_types_map=_response_types_map,
641
- ).data
642
-
643
- @validate_call
644
- async def worker_update_with_http_info(
645
- self,
646
- worker: Annotated[
647
- str,
648
- Field(
649
- min_length=36, strict=True, max_length=36, description="The worker id"
650
- ),
651
- ],
652
- update_worker_request: Annotated[
653
- UpdateWorkerRequest, Field(description="The worker update")
654
- ],
655
- _request_timeout: Union[
656
- None,
657
- Annotated[StrictFloat, Field(gt=0)],
658
- Tuple[
659
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
660
- ],
661
- ] = None,
662
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
663
- _content_type: Optional[StrictStr] = None,
664
- _headers: Optional[Dict[StrictStr, Any]] = None,
665
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
666
- ) -> ApiResponse[Worker]:
667
- """Update worker
668
-
669
- Update a worker
670
-
671
- :param worker: The worker id (required)
672
- :type worker: str
673
- :param update_worker_request: The worker update (required)
674
- :type update_worker_request: UpdateWorkerRequest
675
- :param _request_timeout: timeout setting for this request. If one
676
- number provided, it will be total request
677
- timeout. It can also be a pair (tuple) of
678
- (connection, read) timeouts.
679
- :type _request_timeout: int, tuple(int, int), optional
680
- :param _request_auth: set to override the auth_settings for an a single
681
- request; this effectively ignores the
682
- authentication in the spec for a single request.
683
- :type _request_auth: dict, optional
684
- :param _content_type: force content-type for the request.
685
- :type _content_type: str, Optional
686
- :param _headers: set to override the headers for a single
687
- request; this effectively ignores the headers
688
- in the spec for a single request.
689
- :type _headers: dict, optional
690
- :param _host_index: set to override the host_index for a single
691
- request; this effectively ignores the host_index
692
- in the spec for a single request.
693
- :type _host_index: int, optional
694
- :return: Returns the result object.
695
- """ # noqa: E501
696
-
697
- _param = self._worker_update_serialize(
698
- worker=worker,
699
- update_worker_request=update_worker_request,
700
- _request_auth=_request_auth,
701
- _content_type=_content_type,
702
- _headers=_headers,
703
- _host_index=_host_index,
704
- )
705
-
706
- _response_types_map: Dict[str, Optional[str]] = {
707
- "200": "Worker",
708
- "400": "APIErrors",
709
- "403": "APIErrors",
710
- }
711
- response_data = await self.api_client.call_api(
712
- *_param, _request_timeout=_request_timeout
713
- )
714
- await response_data.read()
715
- return self.api_client.response_deserialize(
716
- response_data=response_data,
717
- response_types_map=_response_types_map,
718
- )
719
-
720
- @validate_call
721
- async def worker_update_without_preload_content(
722
- self,
723
- worker: Annotated[
724
- str,
725
- Field(
726
- min_length=36, strict=True, max_length=36, description="The worker id"
727
- ),
728
- ],
729
- update_worker_request: Annotated[
730
- UpdateWorkerRequest, Field(description="The worker update")
731
- ],
732
- _request_timeout: Union[
733
- None,
734
- Annotated[StrictFloat, Field(gt=0)],
735
- Tuple[
736
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
737
- ],
738
- ] = None,
739
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
740
- _content_type: Optional[StrictStr] = None,
741
- _headers: Optional[Dict[StrictStr, Any]] = None,
742
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
743
- ) -> RESTResponseType:
744
- """Update worker
745
-
746
- Update a worker
747
-
748
- :param worker: The worker id (required)
749
- :type worker: str
750
- :param update_worker_request: The worker update (required)
751
- :type update_worker_request: UpdateWorkerRequest
752
- :param _request_timeout: timeout setting for this request. If one
753
- number provided, it will be total request
754
- timeout. It can also be a pair (tuple) of
755
- (connection, read) timeouts.
756
- :type _request_timeout: int, tuple(int, int), optional
757
- :param _request_auth: set to override the auth_settings for an a single
758
- request; this effectively ignores the
759
- authentication in the spec for a single request.
760
- :type _request_auth: dict, optional
761
- :param _content_type: force content-type for the request.
762
- :type _content_type: str, Optional
763
- :param _headers: set to override the headers for a single
764
- request; this effectively ignores the headers
765
- in the spec for a single request.
766
- :type _headers: dict, optional
767
- :param _host_index: set to override the host_index for a single
768
- request; this effectively ignores the host_index
769
- in the spec for a single request.
770
- :type _host_index: int, optional
771
- :return: Returns the result object.
772
- """ # noqa: E501
773
-
774
- _param = self._worker_update_serialize(
775
- worker=worker,
776
- update_worker_request=update_worker_request,
777
- _request_auth=_request_auth,
778
- _content_type=_content_type,
779
- _headers=_headers,
780
- _host_index=_host_index,
781
- )
782
-
783
- _response_types_map: Dict[str, Optional[str]] = {
784
- "200": "Worker",
785
- "400": "APIErrors",
786
- "403": "APIErrors",
787
- }
788
- response_data = await self.api_client.call_api(
789
- *_param, _request_timeout=_request_timeout
790
- )
791
- return response_data.response
792
-
793
- def _worker_update_serialize(
794
- self,
795
- worker,
796
- update_worker_request,
797
- _request_auth,
798
- _content_type,
799
- _headers,
800
- _host_index,
801
- ) -> RequestSerialized:
802
-
803
- _host = None
804
-
805
- _collection_formats: Dict[str, str] = {}
806
-
807
- _path_params: Dict[str, str] = {}
808
- _query_params: List[Tuple[str, str]] = []
809
- _header_params: Dict[str, Optional[str]] = _headers or {}
810
- _form_params: List[Tuple[str, str]] = []
811
- _files: Dict[
812
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
813
- ] = {}
814
- _body_params: Optional[bytes] = None
815
-
816
- # process the path parameters
817
- if worker is not None:
818
- _path_params["worker"] = worker
819
- # process the query parameters
820
- # process the header parameters
821
- # process the form parameters
822
- # process the body parameter
823
- if update_worker_request is not None:
824
- _body_params = update_worker_request
825
-
826
- # set the HTTP header `Accept`
827
- if "Accept" not in _header_params:
828
- _header_params["Accept"] = self.api_client.select_header_accept(
829
- ["application/json"]
830
- )
831
-
832
- # set the HTTP header `Content-Type`
833
- if _content_type:
834
- _header_params["Content-Type"] = _content_type
835
- else:
836
- _default_content_type = self.api_client.select_header_content_type(
837
- ["application/json"]
838
- )
839
- if _default_content_type is not None:
840
- _header_params["Content-Type"] = _default_content_type
841
-
842
- # authentication setting
843
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
844
-
845
- return self.api_client.param_serialize(
846
- method="PATCH",
847
- resource_path="/api/v1/workers/{worker}",
848
- path_params=_path_params,
849
- query_params=_query_params,
850
- header_params=_header_params,
851
- body=_body_params,
852
- post_params=_form_params,
853
- files=_files,
854
- auth_settings=_auth_settings,
855
- collection_formats=_collection_formats,
856
- _host=_host,
857
- _request_auth=_request_auth,
858
- )