hatchet-sdk 0.40.0a9__py3-none-any.whl → 0.42.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 (152) hide show
  1. hatchet_sdk/clients/admin.py +129 -59
  2. hatchet_sdk/clients/dispatcher/action_listener.py +25 -2
  3. hatchet_sdk/clients/events.py +91 -52
  4. hatchet_sdk/clients/rest/__init__.py +21 -0
  5. hatchet_sdk/clients/rest/api/api_token_api.py +12 -9
  6. hatchet_sdk/clients/rest/api/default_api.py +24 -18
  7. hatchet_sdk/clients/rest/api/event_api.py +32 -24
  8. hatchet_sdk/clients/rest/api/github_api.py +4 -3
  9. hatchet_sdk/clients/rest/api/log_api.py +4 -3
  10. hatchet_sdk/clients/rest/api/metadata_api.py +12 -9
  11. hatchet_sdk/clients/rest/api/rate_limits_api.py +7 -4
  12. hatchet_sdk/clients/rest/api/slack_api.py +8 -6
  13. hatchet_sdk/clients/rest/api/sns_api.py +12 -9
  14. hatchet_sdk/clients/rest/api/step_run_api.py +28 -21
  15. hatchet_sdk/clients/rest/api/tenant_api.py +67 -49
  16. hatchet_sdk/clients/rest/api/user_api.py +24 -18
  17. hatchet_sdk/clients/rest/api/worker_api.py +12 -9
  18. hatchet_sdk/clients/rest/api/workflow_api.py +3073 -936
  19. hatchet_sdk/clients/rest/api/workflow_run_api.py +669 -21
  20. hatchet_sdk/clients/rest/api_client.py +34 -11
  21. hatchet_sdk/clients/rest/configuration.py +161 -36
  22. hatchet_sdk/clients/rest/models/__init__.py +21 -0
  23. hatchet_sdk/clients/rest/models/api_errors.py +3 -3
  24. hatchet_sdk/clients/rest/models/bulk_create_event_request.py +3 -3
  25. hatchet_sdk/clients/rest/models/bulk_create_event_response.py +3 -3
  26. hatchet_sdk/clients/{cloud_rest/models/managed_worker_create_request_build_config_steps_inner.py → rest/models/create_cron_workflow_trigger_request.py} +18 -14
  27. hatchet_sdk/clients/{cloud_rest/models/github_app_list_installations200_response_rows_inner.py → rest/models/cron_workflows.py} +54 -21
  28. hatchet_sdk/clients/{cloud_rest/models/log_list200_response.py → rest/models/cron_workflows_list.py} +13 -22
  29. hatchet_sdk/clients/rest/models/cron_workflows_order_by_field.py +37 -0
  30. hatchet_sdk/clients/rest/models/event_list.py +3 -3
  31. hatchet_sdk/clients/rest/models/get_step_run_diff_response.py +3 -3
  32. hatchet_sdk/clients/rest/models/job.py +3 -3
  33. hatchet_sdk/clients/rest/models/job_run.py +3 -3
  34. hatchet_sdk/clients/rest/models/list_api_tokens_response.py +3 -3
  35. hatchet_sdk/clients/rest/models/list_pull_requests_response.py +3 -3
  36. hatchet_sdk/clients/rest/models/list_slack_webhooks.py +3 -3
  37. hatchet_sdk/clients/rest/models/list_sns_integrations.py +3 -3
  38. hatchet_sdk/clients/rest/models/log_line_list.py +3 -3
  39. hatchet_sdk/clients/rest/models/rate_limit_list.py +3 -3
  40. hatchet_sdk/clients/rest/models/replay_workflow_runs_response.py +3 -3
  41. hatchet_sdk/clients/{cloud_rest/models/log_list200_response_rows_inner.py → rest/models/schedule_workflow_run_request.py} +12 -12
  42. hatchet_sdk/clients/rest/models/scheduled_run_status.py +42 -0
  43. hatchet_sdk/clients/rest/models/scheduled_workflows.py +153 -0
  44. hatchet_sdk/clients/{cloud_rest/models/managed_worker_list200_response.py → rest/models/scheduled_workflows_list.py} +13 -22
  45. hatchet_sdk/clients/rest/models/scheduled_workflows_order_by_field.py +37 -0
  46. hatchet_sdk/clients/rest/models/step_run_archive_list.py +3 -3
  47. hatchet_sdk/clients/rest/models/step_run_event_list.py +3 -3
  48. hatchet_sdk/clients/rest/models/tenant_alert_email_group_list.py +3 -3
  49. hatchet_sdk/clients/rest/models/tenant_invite_list.py +3 -3
  50. hatchet_sdk/clients/rest/models/tenant_list.py +3 -3
  51. hatchet_sdk/clients/rest/models/tenant_member_list.py +3 -3
  52. hatchet_sdk/clients/rest/models/tenant_queue_metrics.py +16 -0
  53. hatchet_sdk/clients/rest/models/tenant_resource_policy.py +3 -3
  54. hatchet_sdk/clients/rest/models/tenant_step_run_queue_metrics.py +1 -1
  55. hatchet_sdk/clients/rest/models/user_tenant_memberships_list.py +3 -3
  56. hatchet_sdk/clients/rest/models/webhook_worker_list_response.py +3 -3
  57. hatchet_sdk/clients/rest/models/webhook_worker_request_list_response.py +3 -3
  58. hatchet_sdk/clients/rest/models/worker.py +20 -9
  59. hatchet_sdk/clients/rest/models/worker_list.py +3 -3
  60. hatchet_sdk/clients/{cloud_rest/models/tenant_billing_state_get200_response_payment_methods_inner.py → rest/models/worker_runtime_info.py} +23 -19
  61. hatchet_sdk/clients/rest/models/worker_runtime_sdks.py +38 -0
  62. hatchet_sdk/clients/rest/models/workflow.py +9 -9
  63. hatchet_sdk/clients/rest/models/workflow_list.py +3 -3
  64. hatchet_sdk/clients/rest/models/workflow_run.py +3 -3
  65. hatchet_sdk/clients/rest/models/workflow_run_list.py +3 -3
  66. hatchet_sdk/clients/rest/models/workflow_run_shape.py +3 -3
  67. hatchet_sdk/clients/rest/models/workflow_runs_metrics.py +1 -5
  68. hatchet_sdk/clients/rest/models/workflow_triggers.py +6 -6
  69. hatchet_sdk/clients/rest/models/workflow_version.py +3 -3
  70. hatchet_sdk/clients/rest/rest.py +3 -3
  71. hatchet_sdk/clients/rest_client.py +200 -21
  72. hatchet_sdk/contracts/dispatcher_pb2.py +71 -67
  73. hatchet_sdk/contracts/dispatcher_pb2.pyi +31 -2
  74. hatchet_sdk/contracts/events_pb2.pyi +2 -0
  75. hatchet_sdk/contracts/workflows_pb2.py +42 -40
  76. hatchet_sdk/contracts/workflows_pb2.pyi +24 -6
  77. hatchet_sdk/features/cron.py +286 -0
  78. hatchet_sdk/features/scheduled.py +248 -0
  79. hatchet_sdk/hatchet.py +80 -79
  80. hatchet_sdk/loader.py +37 -14
  81. hatchet_sdk/utils/serialization.py +15 -0
  82. hatchet_sdk/utils/tracing.py +67 -0
  83. hatchet_sdk/worker/runner/runner.py +158 -112
  84. hatchet_sdk/worker/worker.py +1 -17
  85. hatchet_sdk/workflow.py +4 -0
  86. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.42.0.dist-info}/METADATA +8 -2
  87. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.42.0.dist-info}/RECORD +89 -143
  88. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.42.0.dist-info}/entry_points.txt +1 -1
  89. hatchet_sdk/clients/cloud_rest/__init__.py +0 -186
  90. hatchet_sdk/clients/cloud_rest/api/__init__.py +0 -14
  91. hatchet_sdk/clients/cloud_rest/api/billing_api.py +0 -819
  92. hatchet_sdk/clients/cloud_rest/api/build_api.py +0 -298
  93. hatchet_sdk/clients/cloud_rest/api/feature_flags_api.py +0 -295
  94. hatchet_sdk/clients/cloud_rest/api/github_api.py +0 -1347
  95. hatchet_sdk/clients/cloud_rest/api/log_api.py +0 -971
  96. hatchet_sdk/clients/cloud_rest/api/managed_worker_api.py +0 -2546
  97. hatchet_sdk/clients/cloud_rest/api/metadata_api.py +0 -265
  98. hatchet_sdk/clients/cloud_rest/api/metrics_api.py +0 -1026
  99. hatchet_sdk/clients/cloud_rest/api/tenant_api.py +0 -301
  100. hatchet_sdk/clients/cloud_rest/api/user_api.py +0 -473
  101. hatchet_sdk/clients/cloud_rest/api/workflow_api.py +0 -369
  102. hatchet_sdk/clients/cloud_rest/api_client.py +0 -727
  103. hatchet_sdk/clients/cloud_rest/api_response.py +0 -22
  104. hatchet_sdk/clients/cloud_rest/configuration.py +0 -488
  105. hatchet_sdk/clients/cloud_rest/exceptions.py +0 -200
  106. hatchet_sdk/clients/cloud_rest/models/__init__.py +0 -157
  107. hatchet_sdk/clients/cloud_rest/models/billing_portal_link_get200_response.py +0 -85
  108. hatchet_sdk/clients/cloud_rest/models/build_get200_response.py +0 -121
  109. hatchet_sdk/clients/cloud_rest/models/github_app_list_branches200_response_inner.py +0 -86
  110. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response.py +0 -119
  111. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_pagination.py +0 -95
  112. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_rows_inner_metadata.py +0 -98
  113. hatchet_sdk/clients/cloud_rest/models/github_app_list_repos200_response_inner.py +0 -86
  114. hatchet_sdk/clients/cloud_rest/models/infra_as_code_create_request.py +0 -107
  115. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner.py +0 -136
  116. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_event.py +0 -83
  117. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly.py +0 -100
  118. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly_app.py +0 -86
  119. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_log.py +0 -83
  120. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request.py +0 -128
  121. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_build_config.py +0 -121
  122. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_runtime_config.py +0 -166
  123. hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response.py +0 -119
  124. hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response_rows_inner.py +0 -117
  125. hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response.py +0 -119
  126. hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response_rows_inner.py +0 -113
  127. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner.py +0 -154
  128. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config.py +0 -151
  129. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config_steps_inner.py +0 -109
  130. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_runtime_configs_inner.py +0 -171
  131. hatchet_sdk/clients/cloud_rest/models/managed_worker_update_request.py +0 -131
  132. hatchet_sdk/clients/cloud_rest/models/metadata_get200_response.py +0 -101
  133. hatchet_sdk/clients/cloud_rest/models/metadata_get400_response.py +0 -105
  134. hatchet_sdk/clients/cloud_rest/models/metadata_get400_response_errors_inner.py +0 -102
  135. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner.py +0 -108
  136. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner.py +0 -102
  137. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram.py +0 -113
  138. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram_buckets_inner.py +0 -93
  139. hatchet_sdk/clients/cloud_rest/models/runtime_config_list_actions200_response.py +0 -83
  140. hatchet_sdk/clients/cloud_rest/models/subscription_upsert200_response.py +0 -114
  141. hatchet_sdk/clients/cloud_rest/models/subscription_upsert_request.py +0 -88
  142. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response.py +0 -170
  143. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_coupons_inner.py +0 -137
  144. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_plans_inner.py +0 -103
  145. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_subscription.py +0 -114
  146. hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response.py +0 -107
  147. hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response_results_inner.py +0 -105
  148. hatchet_sdk/clients/cloud_rest/rest.py +0 -182
  149. hatchet_sdk/compute/__init__.py +0 -0
  150. hatchet_sdk/compute/configs.py +0 -34
  151. hatchet_sdk/compute/managed_compute.py +0 -111
  152. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.42.0.dist-info}/WHEEL +0 -0
@@ -1,1026 +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 datetime import datetime
16
- from typing import Any, Dict, List, Optional, Tuple, Union
17
-
18
- from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
19
- from typing_extensions import Annotated
20
-
21
- from hatchet_sdk.clients.cloud_rest.api_client import ApiClient, RequestSerialized
22
- from hatchet_sdk.clients.cloud_rest.api_response import ApiResponse
23
- from hatchet_sdk.clients.cloud_rest.models.metrics_cpu_get200_response_inner import (
24
- MetricsCpuGet200ResponseInner,
25
- )
26
- from hatchet_sdk.clients.cloud_rest.rest import RESTResponseType
27
-
28
-
29
- class MetricsApi:
30
- """NOTE: This class is auto generated by OpenAPI Generator
31
- Ref: https://openapi-generator.tech
32
-
33
- Do not edit the class manually.
34
- """
35
-
36
- def __init__(self, api_client=None) -> None:
37
- if api_client is None:
38
- api_client = ApiClient.get_default()
39
- self.api_client = api_client
40
-
41
- @validate_call
42
- async def metrics_cpu_get(
43
- self,
44
- managed_worker: Annotated[
45
- str,
46
- Field(
47
- min_length=36,
48
- strict=True,
49
- max_length=36,
50
- description="The managed worker id",
51
- ),
52
- ],
53
- after: Annotated[
54
- Optional[datetime], Field(description="When the metrics should start")
55
- ] = None,
56
- before: Annotated[
57
- Optional[datetime], Field(description="When the metrics should end")
58
- ] = None,
59
- _request_timeout: Union[
60
- None,
61
- Annotated[StrictFloat, Field(gt=0)],
62
- Tuple[
63
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
64
- ],
65
- ] = None,
66
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
67
- _content_type: Optional[StrictStr] = None,
68
- _headers: Optional[Dict[StrictStr, Any]] = None,
69
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
70
- ) -> List[MetricsCpuGet200ResponseInner]:
71
- """Get CPU Metrics
72
-
73
- Get CPU metrics for a managed worker
74
-
75
- :param managed_worker: The managed worker id (required)
76
- :type managed_worker: str
77
- :param after: When the metrics should start
78
- :type after: datetime
79
- :param before: When the metrics should end
80
- :type before: datetime
81
- :param _request_timeout: timeout setting for this request. If one
82
- number provided, it will be total request
83
- timeout. It can also be a pair (tuple) of
84
- (connection, read) timeouts.
85
- :type _request_timeout: int, tuple(int, int), optional
86
- :param _request_auth: set to override the auth_settings for an a single
87
- request; this effectively ignores the
88
- authentication in the spec for a single request.
89
- :type _request_auth: dict, optional
90
- :param _content_type: force content-type for the request.
91
- :type _content_type: str, Optional
92
- :param _headers: set to override the headers for a single
93
- request; this effectively ignores the headers
94
- in the spec for a single request.
95
- :type _headers: dict, optional
96
- :param _host_index: set to override the host_index for a single
97
- request; this effectively ignores the host_index
98
- in the spec for a single request.
99
- :type _host_index: int, optional
100
- :return: Returns the result object.
101
- """ # noqa: E501
102
-
103
- _param = self._metrics_cpu_get_serialize(
104
- managed_worker=managed_worker,
105
- after=after,
106
- before=before,
107
- _request_auth=_request_auth,
108
- _content_type=_content_type,
109
- _headers=_headers,
110
- _host_index=_host_index,
111
- )
112
-
113
- _response_types_map: Dict[str, Optional[str]] = {
114
- "200": "List[MetricsCpuGet200ResponseInner]",
115
- "400": "MetadataGet400Response",
116
- "403": "MetadataGet400Response",
117
- }
118
- response_data = await self.api_client.call_api(
119
- *_param, _request_timeout=_request_timeout
120
- )
121
- await response_data.read()
122
- return self.api_client.response_deserialize(
123
- response_data=response_data,
124
- response_types_map=_response_types_map,
125
- ).data
126
-
127
- @validate_call
128
- async def metrics_cpu_get_with_http_info(
129
- self,
130
- managed_worker: Annotated[
131
- str,
132
- Field(
133
- min_length=36,
134
- strict=True,
135
- max_length=36,
136
- description="The managed worker id",
137
- ),
138
- ],
139
- after: Annotated[
140
- Optional[datetime], Field(description="When the metrics should start")
141
- ] = None,
142
- before: Annotated[
143
- Optional[datetime], Field(description="When the metrics should end")
144
- ] = None,
145
- _request_timeout: Union[
146
- None,
147
- Annotated[StrictFloat, Field(gt=0)],
148
- Tuple[
149
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
150
- ],
151
- ] = None,
152
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
153
- _content_type: Optional[StrictStr] = None,
154
- _headers: Optional[Dict[StrictStr, Any]] = None,
155
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
156
- ) -> ApiResponse[List[MetricsCpuGet200ResponseInner]]:
157
- """Get CPU Metrics
158
-
159
- Get CPU metrics for a managed worker
160
-
161
- :param managed_worker: The managed worker id (required)
162
- :type managed_worker: str
163
- :param after: When the metrics should start
164
- :type after: datetime
165
- :param before: When the metrics should end
166
- :type before: datetime
167
- :param _request_timeout: timeout setting for this request. If one
168
- number provided, it will be total request
169
- timeout. It can also be a pair (tuple) of
170
- (connection, read) timeouts.
171
- :type _request_timeout: int, tuple(int, int), optional
172
- :param _request_auth: set to override the auth_settings for an a single
173
- request; this effectively ignores the
174
- authentication in the spec for a single request.
175
- :type _request_auth: dict, optional
176
- :param _content_type: force content-type for the request.
177
- :type _content_type: str, Optional
178
- :param _headers: set to override the headers for a single
179
- request; this effectively ignores the headers
180
- in the spec for a single request.
181
- :type _headers: dict, optional
182
- :param _host_index: set to override the host_index for a single
183
- request; this effectively ignores the host_index
184
- in the spec for a single request.
185
- :type _host_index: int, optional
186
- :return: Returns the result object.
187
- """ # noqa: E501
188
-
189
- _param = self._metrics_cpu_get_serialize(
190
- managed_worker=managed_worker,
191
- after=after,
192
- before=before,
193
- _request_auth=_request_auth,
194
- _content_type=_content_type,
195
- _headers=_headers,
196
- _host_index=_host_index,
197
- )
198
-
199
- _response_types_map: Dict[str, Optional[str]] = {
200
- "200": "List[MetricsCpuGet200ResponseInner]",
201
- "400": "MetadataGet400Response",
202
- "403": "MetadataGet400Response",
203
- }
204
- response_data = await self.api_client.call_api(
205
- *_param, _request_timeout=_request_timeout
206
- )
207
- await response_data.read()
208
- return self.api_client.response_deserialize(
209
- response_data=response_data,
210
- response_types_map=_response_types_map,
211
- )
212
-
213
- @validate_call
214
- async def metrics_cpu_get_without_preload_content(
215
- self,
216
- managed_worker: Annotated[
217
- str,
218
- Field(
219
- min_length=36,
220
- strict=True,
221
- max_length=36,
222
- description="The managed worker id",
223
- ),
224
- ],
225
- after: Annotated[
226
- Optional[datetime], Field(description="When the metrics should start")
227
- ] = None,
228
- before: Annotated[
229
- Optional[datetime], Field(description="When the metrics should end")
230
- ] = None,
231
- _request_timeout: Union[
232
- None,
233
- Annotated[StrictFloat, Field(gt=0)],
234
- Tuple[
235
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
236
- ],
237
- ] = None,
238
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
239
- _content_type: Optional[StrictStr] = None,
240
- _headers: Optional[Dict[StrictStr, Any]] = None,
241
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
242
- ) -> RESTResponseType:
243
- """Get CPU Metrics
244
-
245
- Get CPU metrics for a managed worker
246
-
247
- :param managed_worker: The managed worker id (required)
248
- :type managed_worker: str
249
- :param after: When the metrics should start
250
- :type after: datetime
251
- :param before: When the metrics should end
252
- :type before: datetime
253
- :param _request_timeout: timeout setting for this request. If one
254
- number provided, it will be total request
255
- timeout. It can also be a pair (tuple) of
256
- (connection, read) timeouts.
257
- :type _request_timeout: int, tuple(int, int), optional
258
- :param _request_auth: set to override the auth_settings for an a single
259
- request; this effectively ignores the
260
- authentication in the spec for a single request.
261
- :type _request_auth: dict, optional
262
- :param _content_type: force content-type for the request.
263
- :type _content_type: str, Optional
264
- :param _headers: set to override the headers for a single
265
- request; this effectively ignores the headers
266
- in the spec for a single request.
267
- :type _headers: dict, optional
268
- :param _host_index: set to override the host_index for a single
269
- request; this effectively ignores the host_index
270
- in the spec for a single request.
271
- :type _host_index: int, optional
272
- :return: Returns the result object.
273
- """ # noqa: E501
274
-
275
- _param = self._metrics_cpu_get_serialize(
276
- managed_worker=managed_worker,
277
- after=after,
278
- before=before,
279
- _request_auth=_request_auth,
280
- _content_type=_content_type,
281
- _headers=_headers,
282
- _host_index=_host_index,
283
- )
284
-
285
- _response_types_map: Dict[str, Optional[str]] = {
286
- "200": "List[MetricsCpuGet200ResponseInner]",
287
- "400": "MetadataGet400Response",
288
- "403": "MetadataGet400Response",
289
- }
290
- response_data = await self.api_client.call_api(
291
- *_param, _request_timeout=_request_timeout
292
- )
293
- return response_data.response
294
-
295
- def _metrics_cpu_get_serialize(
296
- self,
297
- managed_worker,
298
- after,
299
- before,
300
- _request_auth,
301
- _content_type,
302
- _headers,
303
- _host_index,
304
- ) -> RequestSerialized:
305
-
306
- _host = None
307
-
308
- _collection_formats: Dict[str, str] = {}
309
-
310
- _path_params: Dict[str, str] = {}
311
- _query_params: List[Tuple[str, str]] = []
312
- _header_params: Dict[str, Optional[str]] = _headers or {}
313
- _form_params: List[Tuple[str, str]] = []
314
- _files: Dict[str, Union[str, bytes]] = {}
315
- _body_params: Optional[bytes] = None
316
-
317
- # process the path parameters
318
- if managed_worker is not None:
319
- _path_params["managed-worker"] = managed_worker
320
- # process the query parameters
321
- if after is not None:
322
- if isinstance(after, datetime):
323
- _query_params.append(
324
- (
325
- "after",
326
- after.strftime(self.api_client.configuration.datetime_format),
327
- )
328
- )
329
- else:
330
- _query_params.append(("after", after))
331
-
332
- if before is not None:
333
- if isinstance(before, datetime):
334
- _query_params.append(
335
- (
336
- "before",
337
- before.strftime(self.api_client.configuration.datetime_format),
338
- )
339
- )
340
- else:
341
- _query_params.append(("before", before))
342
-
343
- # process the header parameters
344
- # process the form parameters
345
- # process the body parameter
346
-
347
- # set the HTTP header `Accept`
348
- _header_params["Accept"] = self.api_client.select_header_accept(
349
- ["application/json"]
350
- )
351
-
352
- # authentication setting
353
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
354
-
355
- return self.api_client.param_serialize(
356
- method="GET",
357
- resource_path="/api/v1/cloud/managed-worker/{managed-worker}/metrics/cpu",
358
- path_params=_path_params,
359
- query_params=_query_params,
360
- header_params=_header_params,
361
- body=_body_params,
362
- post_params=_form_params,
363
- files=_files,
364
- auth_settings=_auth_settings,
365
- collection_formats=_collection_formats,
366
- _host=_host,
367
- _request_auth=_request_auth,
368
- )
369
-
370
- @validate_call
371
- async def metrics_disk_get(
372
- self,
373
- managed_worker: Annotated[
374
- str,
375
- Field(
376
- min_length=36,
377
- strict=True,
378
- max_length=36,
379
- description="The managed worker id",
380
- ),
381
- ],
382
- after: Annotated[
383
- Optional[datetime], Field(description="When the metrics should start")
384
- ] = None,
385
- before: Annotated[
386
- Optional[datetime], Field(description="When the metrics should end")
387
- ] = None,
388
- _request_timeout: Union[
389
- None,
390
- Annotated[StrictFloat, Field(gt=0)],
391
- Tuple[
392
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
393
- ],
394
- ] = None,
395
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
396
- _content_type: Optional[StrictStr] = None,
397
- _headers: Optional[Dict[StrictStr, Any]] = None,
398
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
399
- ) -> List[MetricsCpuGet200ResponseInner]:
400
- """Get Disk Metrics
401
-
402
- Get disk metrics for a managed worker
403
-
404
- :param managed_worker: The managed worker id (required)
405
- :type managed_worker: str
406
- :param after: When the metrics should start
407
- :type after: datetime
408
- :param before: When the metrics should end
409
- :type before: datetime
410
- :param _request_timeout: timeout setting for this request. If one
411
- number provided, it will be total request
412
- timeout. It can also be a pair (tuple) of
413
- (connection, read) timeouts.
414
- :type _request_timeout: int, tuple(int, int), optional
415
- :param _request_auth: set to override the auth_settings for an a single
416
- request; this effectively ignores the
417
- authentication in the spec for a single request.
418
- :type _request_auth: dict, optional
419
- :param _content_type: force content-type for the request.
420
- :type _content_type: str, Optional
421
- :param _headers: set to override the headers for a single
422
- request; this effectively ignores the headers
423
- in the spec for a single request.
424
- :type _headers: dict, optional
425
- :param _host_index: set to override the host_index for a single
426
- request; this effectively ignores the host_index
427
- in the spec for a single request.
428
- :type _host_index: int, optional
429
- :return: Returns the result object.
430
- """ # noqa: E501
431
-
432
- _param = self._metrics_disk_get_serialize(
433
- managed_worker=managed_worker,
434
- after=after,
435
- before=before,
436
- _request_auth=_request_auth,
437
- _content_type=_content_type,
438
- _headers=_headers,
439
- _host_index=_host_index,
440
- )
441
-
442
- _response_types_map: Dict[str, Optional[str]] = {
443
- "200": "List[MetricsCpuGet200ResponseInner]",
444
- "400": "MetadataGet400Response",
445
- "403": "MetadataGet400Response",
446
- }
447
- response_data = await self.api_client.call_api(
448
- *_param, _request_timeout=_request_timeout
449
- )
450
- await response_data.read()
451
- return self.api_client.response_deserialize(
452
- response_data=response_data,
453
- response_types_map=_response_types_map,
454
- ).data
455
-
456
- @validate_call
457
- async def metrics_disk_get_with_http_info(
458
- self,
459
- managed_worker: Annotated[
460
- str,
461
- Field(
462
- min_length=36,
463
- strict=True,
464
- max_length=36,
465
- description="The managed worker id",
466
- ),
467
- ],
468
- after: Annotated[
469
- Optional[datetime], Field(description="When the metrics should start")
470
- ] = None,
471
- before: Annotated[
472
- Optional[datetime], Field(description="When the metrics should end")
473
- ] = None,
474
- _request_timeout: Union[
475
- None,
476
- Annotated[StrictFloat, Field(gt=0)],
477
- Tuple[
478
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
479
- ],
480
- ] = None,
481
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
482
- _content_type: Optional[StrictStr] = None,
483
- _headers: Optional[Dict[StrictStr, Any]] = None,
484
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
485
- ) -> ApiResponse[List[MetricsCpuGet200ResponseInner]]:
486
- """Get Disk Metrics
487
-
488
- Get disk metrics for a managed worker
489
-
490
- :param managed_worker: The managed worker id (required)
491
- :type managed_worker: str
492
- :param after: When the metrics should start
493
- :type after: datetime
494
- :param before: When the metrics should end
495
- :type before: datetime
496
- :param _request_timeout: timeout setting for this request. If one
497
- number provided, it will be total request
498
- timeout. It can also be a pair (tuple) of
499
- (connection, read) timeouts.
500
- :type _request_timeout: int, tuple(int, int), optional
501
- :param _request_auth: set to override the auth_settings for an a single
502
- request; this effectively ignores the
503
- authentication in the spec for a single request.
504
- :type _request_auth: dict, optional
505
- :param _content_type: force content-type for the request.
506
- :type _content_type: str, Optional
507
- :param _headers: set to override the headers for a single
508
- request; this effectively ignores the headers
509
- in the spec for a single request.
510
- :type _headers: dict, optional
511
- :param _host_index: set to override the host_index for a single
512
- request; this effectively ignores the host_index
513
- in the spec for a single request.
514
- :type _host_index: int, optional
515
- :return: Returns the result object.
516
- """ # noqa: E501
517
-
518
- _param = self._metrics_disk_get_serialize(
519
- managed_worker=managed_worker,
520
- after=after,
521
- before=before,
522
- _request_auth=_request_auth,
523
- _content_type=_content_type,
524
- _headers=_headers,
525
- _host_index=_host_index,
526
- )
527
-
528
- _response_types_map: Dict[str, Optional[str]] = {
529
- "200": "List[MetricsCpuGet200ResponseInner]",
530
- "400": "MetadataGet400Response",
531
- "403": "MetadataGet400Response",
532
- }
533
- response_data = await self.api_client.call_api(
534
- *_param, _request_timeout=_request_timeout
535
- )
536
- await response_data.read()
537
- return self.api_client.response_deserialize(
538
- response_data=response_data,
539
- response_types_map=_response_types_map,
540
- )
541
-
542
- @validate_call
543
- async def metrics_disk_get_without_preload_content(
544
- self,
545
- managed_worker: Annotated[
546
- str,
547
- Field(
548
- min_length=36,
549
- strict=True,
550
- max_length=36,
551
- description="The managed worker id",
552
- ),
553
- ],
554
- after: Annotated[
555
- Optional[datetime], Field(description="When the metrics should start")
556
- ] = None,
557
- before: Annotated[
558
- Optional[datetime], Field(description="When the metrics should end")
559
- ] = None,
560
- _request_timeout: Union[
561
- None,
562
- Annotated[StrictFloat, Field(gt=0)],
563
- Tuple[
564
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
565
- ],
566
- ] = None,
567
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
568
- _content_type: Optional[StrictStr] = None,
569
- _headers: Optional[Dict[StrictStr, Any]] = None,
570
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
571
- ) -> RESTResponseType:
572
- """Get Disk Metrics
573
-
574
- Get disk metrics for a managed worker
575
-
576
- :param managed_worker: The managed worker id (required)
577
- :type managed_worker: str
578
- :param after: When the metrics should start
579
- :type after: datetime
580
- :param before: When the metrics should end
581
- :type before: datetime
582
- :param _request_timeout: timeout setting for this request. If one
583
- number provided, it will be total request
584
- timeout. It can also be a pair (tuple) of
585
- (connection, read) timeouts.
586
- :type _request_timeout: int, tuple(int, int), optional
587
- :param _request_auth: set to override the auth_settings for an a single
588
- request; this effectively ignores the
589
- authentication in the spec for a single request.
590
- :type _request_auth: dict, optional
591
- :param _content_type: force content-type for the request.
592
- :type _content_type: str, Optional
593
- :param _headers: set to override the headers for a single
594
- request; this effectively ignores the headers
595
- in the spec for a single request.
596
- :type _headers: dict, optional
597
- :param _host_index: set to override the host_index for a single
598
- request; this effectively ignores the host_index
599
- in the spec for a single request.
600
- :type _host_index: int, optional
601
- :return: Returns the result object.
602
- """ # noqa: E501
603
-
604
- _param = self._metrics_disk_get_serialize(
605
- managed_worker=managed_worker,
606
- after=after,
607
- before=before,
608
- _request_auth=_request_auth,
609
- _content_type=_content_type,
610
- _headers=_headers,
611
- _host_index=_host_index,
612
- )
613
-
614
- _response_types_map: Dict[str, Optional[str]] = {
615
- "200": "List[MetricsCpuGet200ResponseInner]",
616
- "400": "MetadataGet400Response",
617
- "403": "MetadataGet400Response",
618
- }
619
- response_data = await self.api_client.call_api(
620
- *_param, _request_timeout=_request_timeout
621
- )
622
- return response_data.response
623
-
624
- def _metrics_disk_get_serialize(
625
- self,
626
- managed_worker,
627
- after,
628
- before,
629
- _request_auth,
630
- _content_type,
631
- _headers,
632
- _host_index,
633
- ) -> RequestSerialized:
634
-
635
- _host = None
636
-
637
- _collection_formats: Dict[str, str] = {}
638
-
639
- _path_params: Dict[str, str] = {}
640
- _query_params: List[Tuple[str, str]] = []
641
- _header_params: Dict[str, Optional[str]] = _headers or {}
642
- _form_params: List[Tuple[str, str]] = []
643
- _files: Dict[str, Union[str, bytes]] = {}
644
- _body_params: Optional[bytes] = None
645
-
646
- # process the path parameters
647
- if managed_worker is not None:
648
- _path_params["managed-worker"] = managed_worker
649
- # process the query parameters
650
- if after is not None:
651
- if isinstance(after, datetime):
652
- _query_params.append(
653
- (
654
- "after",
655
- after.strftime(self.api_client.configuration.datetime_format),
656
- )
657
- )
658
- else:
659
- _query_params.append(("after", after))
660
-
661
- if before is not None:
662
- if isinstance(before, datetime):
663
- _query_params.append(
664
- (
665
- "before",
666
- before.strftime(self.api_client.configuration.datetime_format),
667
- )
668
- )
669
- else:
670
- _query_params.append(("before", before))
671
-
672
- # process the header parameters
673
- # process the form parameters
674
- # process the body parameter
675
-
676
- # set the HTTP header `Accept`
677
- _header_params["Accept"] = self.api_client.select_header_accept(
678
- ["application/json"]
679
- )
680
-
681
- # authentication setting
682
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
683
-
684
- return self.api_client.param_serialize(
685
- method="GET",
686
- resource_path="/api/v1/cloud/managed-worker/{managed-worker}/metrics/disk",
687
- path_params=_path_params,
688
- query_params=_query_params,
689
- header_params=_header_params,
690
- body=_body_params,
691
- post_params=_form_params,
692
- files=_files,
693
- auth_settings=_auth_settings,
694
- collection_formats=_collection_formats,
695
- _host=_host,
696
- _request_auth=_request_auth,
697
- )
698
-
699
- @validate_call
700
- async def metrics_memory_get(
701
- self,
702
- managed_worker: Annotated[
703
- str,
704
- Field(
705
- min_length=36,
706
- strict=True,
707
- max_length=36,
708
- description="The managed worker id",
709
- ),
710
- ],
711
- after: Annotated[
712
- Optional[datetime], Field(description="When the metrics should start")
713
- ] = None,
714
- before: Annotated[
715
- Optional[datetime], Field(description="When the metrics should end")
716
- ] = None,
717
- _request_timeout: Union[
718
- None,
719
- Annotated[StrictFloat, Field(gt=0)],
720
- Tuple[
721
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
722
- ],
723
- ] = None,
724
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
725
- _content_type: Optional[StrictStr] = None,
726
- _headers: Optional[Dict[StrictStr, Any]] = None,
727
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
728
- ) -> List[MetricsCpuGet200ResponseInner]:
729
- """Get Memory Metrics
730
-
731
- Get memory metrics for a managed worker
732
-
733
- :param managed_worker: The managed worker id (required)
734
- :type managed_worker: str
735
- :param after: When the metrics should start
736
- :type after: datetime
737
- :param before: When the metrics should end
738
- :type before: datetime
739
- :param _request_timeout: timeout setting for this request. If one
740
- number provided, it will be total request
741
- timeout. It can also be a pair (tuple) of
742
- (connection, read) timeouts.
743
- :type _request_timeout: int, tuple(int, int), optional
744
- :param _request_auth: set to override the auth_settings for an a single
745
- request; this effectively ignores the
746
- authentication in the spec for a single request.
747
- :type _request_auth: dict, optional
748
- :param _content_type: force content-type for the request.
749
- :type _content_type: str, Optional
750
- :param _headers: set to override the headers for a single
751
- request; this effectively ignores the headers
752
- in the spec for a single request.
753
- :type _headers: dict, optional
754
- :param _host_index: set to override the host_index for a single
755
- request; this effectively ignores the host_index
756
- in the spec for a single request.
757
- :type _host_index: int, optional
758
- :return: Returns the result object.
759
- """ # noqa: E501
760
-
761
- _param = self._metrics_memory_get_serialize(
762
- managed_worker=managed_worker,
763
- after=after,
764
- before=before,
765
- _request_auth=_request_auth,
766
- _content_type=_content_type,
767
- _headers=_headers,
768
- _host_index=_host_index,
769
- )
770
-
771
- _response_types_map: Dict[str, Optional[str]] = {
772
- "200": "List[MetricsCpuGet200ResponseInner]",
773
- "400": "MetadataGet400Response",
774
- "403": "MetadataGet400Response",
775
- }
776
- response_data = await self.api_client.call_api(
777
- *_param, _request_timeout=_request_timeout
778
- )
779
- await response_data.read()
780
- return self.api_client.response_deserialize(
781
- response_data=response_data,
782
- response_types_map=_response_types_map,
783
- ).data
784
-
785
- @validate_call
786
- async def metrics_memory_get_with_http_info(
787
- self,
788
- managed_worker: Annotated[
789
- str,
790
- Field(
791
- min_length=36,
792
- strict=True,
793
- max_length=36,
794
- description="The managed worker id",
795
- ),
796
- ],
797
- after: Annotated[
798
- Optional[datetime], Field(description="When the metrics should start")
799
- ] = None,
800
- before: Annotated[
801
- Optional[datetime], Field(description="When the metrics should end")
802
- ] = None,
803
- _request_timeout: Union[
804
- None,
805
- Annotated[StrictFloat, Field(gt=0)],
806
- Tuple[
807
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
808
- ],
809
- ] = None,
810
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
811
- _content_type: Optional[StrictStr] = None,
812
- _headers: Optional[Dict[StrictStr, Any]] = None,
813
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
814
- ) -> ApiResponse[List[MetricsCpuGet200ResponseInner]]:
815
- """Get Memory Metrics
816
-
817
- Get memory metrics for a managed worker
818
-
819
- :param managed_worker: The managed worker id (required)
820
- :type managed_worker: str
821
- :param after: When the metrics should start
822
- :type after: datetime
823
- :param before: When the metrics should end
824
- :type before: datetime
825
- :param _request_timeout: timeout setting for this request. If one
826
- number provided, it will be total request
827
- timeout. It can also be a pair (tuple) of
828
- (connection, read) timeouts.
829
- :type _request_timeout: int, tuple(int, int), optional
830
- :param _request_auth: set to override the auth_settings for an a single
831
- request; this effectively ignores the
832
- authentication in the spec for a single request.
833
- :type _request_auth: dict, optional
834
- :param _content_type: force content-type for the request.
835
- :type _content_type: str, Optional
836
- :param _headers: set to override the headers for a single
837
- request; this effectively ignores the headers
838
- in the spec for a single request.
839
- :type _headers: dict, optional
840
- :param _host_index: set to override the host_index for a single
841
- request; this effectively ignores the host_index
842
- in the spec for a single request.
843
- :type _host_index: int, optional
844
- :return: Returns the result object.
845
- """ # noqa: E501
846
-
847
- _param = self._metrics_memory_get_serialize(
848
- managed_worker=managed_worker,
849
- after=after,
850
- before=before,
851
- _request_auth=_request_auth,
852
- _content_type=_content_type,
853
- _headers=_headers,
854
- _host_index=_host_index,
855
- )
856
-
857
- _response_types_map: Dict[str, Optional[str]] = {
858
- "200": "List[MetricsCpuGet200ResponseInner]",
859
- "400": "MetadataGet400Response",
860
- "403": "MetadataGet400Response",
861
- }
862
- response_data = await self.api_client.call_api(
863
- *_param, _request_timeout=_request_timeout
864
- )
865
- await response_data.read()
866
- return self.api_client.response_deserialize(
867
- response_data=response_data,
868
- response_types_map=_response_types_map,
869
- )
870
-
871
- @validate_call
872
- async def metrics_memory_get_without_preload_content(
873
- self,
874
- managed_worker: Annotated[
875
- str,
876
- Field(
877
- min_length=36,
878
- strict=True,
879
- max_length=36,
880
- description="The managed worker id",
881
- ),
882
- ],
883
- after: Annotated[
884
- Optional[datetime], Field(description="When the metrics should start")
885
- ] = None,
886
- before: Annotated[
887
- Optional[datetime], Field(description="When the metrics should end")
888
- ] = None,
889
- _request_timeout: Union[
890
- None,
891
- Annotated[StrictFloat, Field(gt=0)],
892
- Tuple[
893
- Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
894
- ],
895
- ] = None,
896
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
897
- _content_type: Optional[StrictStr] = None,
898
- _headers: Optional[Dict[StrictStr, Any]] = None,
899
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
900
- ) -> RESTResponseType:
901
- """Get Memory Metrics
902
-
903
- Get memory metrics for a managed worker
904
-
905
- :param managed_worker: The managed worker id (required)
906
- :type managed_worker: str
907
- :param after: When the metrics should start
908
- :type after: datetime
909
- :param before: When the metrics should end
910
- :type before: datetime
911
- :param _request_timeout: timeout setting for this request. If one
912
- number provided, it will be total request
913
- timeout. It can also be a pair (tuple) of
914
- (connection, read) timeouts.
915
- :type _request_timeout: int, tuple(int, int), optional
916
- :param _request_auth: set to override the auth_settings for an a single
917
- request; this effectively ignores the
918
- authentication in the spec for a single request.
919
- :type _request_auth: dict, optional
920
- :param _content_type: force content-type for the request.
921
- :type _content_type: str, Optional
922
- :param _headers: set to override the headers for a single
923
- request; this effectively ignores the headers
924
- in the spec for a single request.
925
- :type _headers: dict, optional
926
- :param _host_index: set to override the host_index for a single
927
- request; this effectively ignores the host_index
928
- in the spec for a single request.
929
- :type _host_index: int, optional
930
- :return: Returns the result object.
931
- """ # noqa: E501
932
-
933
- _param = self._metrics_memory_get_serialize(
934
- managed_worker=managed_worker,
935
- after=after,
936
- before=before,
937
- _request_auth=_request_auth,
938
- _content_type=_content_type,
939
- _headers=_headers,
940
- _host_index=_host_index,
941
- )
942
-
943
- _response_types_map: Dict[str, Optional[str]] = {
944
- "200": "List[MetricsCpuGet200ResponseInner]",
945
- "400": "MetadataGet400Response",
946
- "403": "MetadataGet400Response",
947
- }
948
- response_data = await self.api_client.call_api(
949
- *_param, _request_timeout=_request_timeout
950
- )
951
- return response_data.response
952
-
953
- def _metrics_memory_get_serialize(
954
- self,
955
- managed_worker,
956
- after,
957
- before,
958
- _request_auth,
959
- _content_type,
960
- _headers,
961
- _host_index,
962
- ) -> RequestSerialized:
963
-
964
- _host = None
965
-
966
- _collection_formats: Dict[str, str] = {}
967
-
968
- _path_params: Dict[str, str] = {}
969
- _query_params: List[Tuple[str, str]] = []
970
- _header_params: Dict[str, Optional[str]] = _headers or {}
971
- _form_params: List[Tuple[str, str]] = []
972
- _files: Dict[str, Union[str, bytes]] = {}
973
- _body_params: Optional[bytes] = None
974
-
975
- # process the path parameters
976
- if managed_worker is not None:
977
- _path_params["managed-worker"] = managed_worker
978
- # process the query parameters
979
- if after is not None:
980
- if isinstance(after, datetime):
981
- _query_params.append(
982
- (
983
- "after",
984
- after.strftime(self.api_client.configuration.datetime_format),
985
- )
986
- )
987
- else:
988
- _query_params.append(("after", after))
989
-
990
- if before is not None:
991
- if isinstance(before, datetime):
992
- _query_params.append(
993
- (
994
- "before",
995
- before.strftime(self.api_client.configuration.datetime_format),
996
- )
997
- )
998
- else:
999
- _query_params.append(("before", before))
1000
-
1001
- # process the header parameters
1002
- # process the form parameters
1003
- # process the body parameter
1004
-
1005
- # set the HTTP header `Accept`
1006
- _header_params["Accept"] = self.api_client.select_header_accept(
1007
- ["application/json"]
1008
- )
1009
-
1010
- # authentication setting
1011
- _auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
1012
-
1013
- return self.api_client.param_serialize(
1014
- method="GET",
1015
- resource_path="/api/v1/cloud/managed-worker/{managed-worker}/metrics/memory",
1016
- path_params=_path_params,
1017
- query_params=_query_params,
1018
- header_params=_header_params,
1019
- body=_body_params,
1020
- post_params=_form_params,
1021
- files=_files,
1022
- auth_settings=_auth_settings,
1023
- collection_formats=_collection_formats,
1024
- _host=_host,
1025
- _request_auth=_request_auth,
1026
- )