perceptic-core-client 0.6.0__py3-none-any.whl → 0.6.2__py3-none-any.whl

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

Potentially problematic release.


This version of perceptic-core-client might be problematic. Click here for more details.

Files changed (225) hide show
  1. perceptic_core_client/__init__.py +0 -0
  2. perceptic_core_client/perceptic_core_client/__init__.py +101 -0
  3. perceptic_core_client/perceptic_core_client/api/__init__.py +12 -0
  4. perceptic_core_client/perceptic_core_client/api/connection_resource_api.py +569 -0
  5. perceptic_core_client/perceptic_core_client/api/file_system_contents_resource_api.py +2361 -0
  6. perceptic_core_client/perceptic_core_client/api/file_system_resource_api.py +1086 -0
  7. perceptic_core_client/perceptic_core_client/api/indexer_resource_api.py +537 -0
  8. perceptic_core_client/perceptic_core_client/api/indexing_task_resource_api.py +1173 -0
  9. perceptic_core_client/perceptic_core_client/api/uri_resource_api.py +1630 -0
  10. perceptic_core_client/perceptic_core_client/api/user_resource_api.py +278 -0
  11. perceptic_core_client/perceptic_core_client/api/worker_resource_api.py +1746 -0
  12. perceptic_core_client/perceptic_core_client/api_client.py +797 -0
  13. perceptic_core_client/perceptic_core_client/api_response.py +21 -0
  14. perceptic_core_client/perceptic_core_client/configuration.py +573 -0
  15. perceptic_core_client/perceptic_core_client/docs/ActionType.md +14 -0
  16. perceptic_core_client/perceptic_core_client/docs/AzureBlobConnectionSettingsApiDto.md +33 -0
  17. perceptic_core_client/perceptic_core_client/docs/AzureBlobFileSystemRootMetadataApiDto.md +30 -0
  18. perceptic_core_client/perceptic_core_client/docs/ConnectionApiDto.md +33 -0
  19. perceptic_core_client/perceptic_core_client/docs/ConnectionResourceApi.md +144 -0
  20. perceptic_core_client/perceptic_core_client/docs/ConnectionSettingsApiDto.md +36 -0
  21. perceptic_core_client/perceptic_core_client/docs/CreateConnectionRequest.md +31 -0
  22. perceptic_core_client/perceptic_core_client/docs/CreateConnectionResponse.md +29 -0
  23. perceptic_core_client/perceptic_core_client/docs/CreateFileSystemResponse.md +29 -0
  24. perceptic_core_client/perceptic_core_client/docs/CreateFolderRequest.md +29 -0
  25. perceptic_core_client/perceptic_core_client/docs/CreateFolderResponse.md +29 -0
  26. perceptic_core_client/perceptic_core_client/docs/CreateIndexingTaskRequest.md +33 -0
  27. perceptic_core_client/perceptic_core_client/docs/CreateIndexingTaskResponse.md +31 -0
  28. perceptic_core_client/perceptic_core_client/docs/CreateManagedFileSystemRequest.md +30 -0
  29. perceptic_core_client/perceptic_core_client/docs/CreateRemoteFileSystemRequest.md +32 -0
  30. perceptic_core_client/perceptic_core_client/docs/FileSystemApiDto.md +34 -0
  31. perceptic_core_client/perceptic_core_client/docs/FileSystemContentsResourceApi.md +573 -0
  32. perceptic_core_client/perceptic_core_client/docs/FileSystemResourceApi.md +276 -0
  33. perceptic_core_client/perceptic_core_client/docs/FileSystemRootMetadataApiDto.md +31 -0
  34. perceptic_core_client/perceptic_core_client/docs/GetConnectionResponse.md +29 -0
  35. perceptic_core_client/perceptic_core_client/docs/GetIndexerResponse.md +29 -0
  36. perceptic_core_client/perceptic_core_client/docs/GetIndexingTaskResponse.md +29 -0
  37. perceptic_core_client/perceptic_core_client/docs/GetMetadataResponse.md +29 -0
  38. perceptic_core_client/perceptic_core_client/docs/GetParentResponse.md +29 -0
  39. perceptic_core_client/perceptic_core_client/docs/GetParentUriResponse.md +29 -0
  40. perceptic_core_client/perceptic_core_client/docs/GetSignedUrlResponse.md +29 -0
  41. perceptic_core_client/perceptic_core_client/docs/GetWorkerEventsResponse.md +29 -0
  42. perceptic_core_client/perceptic_core_client/docs/GetWorkerMetadataResponse.md +29 -0
  43. perceptic_core_client/perceptic_core_client/docs/GetWorkerStatusResponse.md +29 -0
  44. perceptic_core_client/perceptic_core_client/docs/GetWorkersResponse.md +29 -0
  45. perceptic_core_client/perceptic_core_client/docs/IndexerDto.md +32 -0
  46. perceptic_core_client/perceptic_core_client/docs/IndexerResourceApi.md +138 -0
  47. perceptic_core_client/perceptic_core_client/docs/IndexingActionDto.md +35 -0
  48. perceptic_core_client/perceptic_core_client/docs/IndexingActionStatus.md +16 -0
  49. perceptic_core_client/perceptic_core_client/docs/IndexingTaskDto.md +36 -0
  50. perceptic_core_client/perceptic_core_client/docs/IndexingTaskResourceApi.md +289 -0
  51. perceptic_core_client/perceptic_core_client/docs/IndexingTaskStatus.md +29 -0
  52. perceptic_core_client/perceptic_core_client/docs/InfoEvent.md +31 -0
  53. perceptic_core_client/perceptic_core_client/docs/JsonNode.md +50 -0
  54. perceptic_core_client/perceptic_core_client/docs/JsonNodeType.md +26 -0
  55. perceptic_core_client/perceptic_core_client/docs/ListAllFileSystemsResponse.md +29 -0
  56. perceptic_core_client/perceptic_core_client/docs/ListFileSystemResponse.md +29 -0
  57. perceptic_core_client/perceptic_core_client/docs/ListIndexersResponse.md +29 -0
  58. perceptic_core_client/perceptic_core_client/docs/ListIndexingActionsResponse.md +37 -0
  59. perceptic_core_client/perceptic_core_client/docs/ManagedFileSystemApiDto.md +32 -0
  60. perceptic_core_client/perceptic_core_client/docs/MeResponse.md +33 -0
  61. perceptic_core_client/perceptic_core_client/docs/ModelSchema.md +38 -0
  62. perceptic_core_client/perceptic_core_client/docs/PagedListFileSystemResponse.md +30 -0
  63. perceptic_core_client/perceptic_core_client/docs/PostWorkerRunRequest.md +29 -0
  64. perceptic_core_client/perceptic_core_client/docs/PostWorkerRunResponse.md +29 -0
  65. perceptic_core_client/perceptic_core_client/docs/ProgressEvent.md +31 -0
  66. perceptic_core_client/perceptic_core_client/docs/RemoteFileSystemApiDto.md +34 -0
  67. perceptic_core_client/perceptic_core_client/docs/RequestForInputEvent.md +32 -0
  68. perceptic_core_client/perceptic_core_client/docs/ResourceEntryDto.md +30 -0
  69. perceptic_core_client/perceptic_core_client/docs/ResourceId.md +29 -0
  70. perceptic_core_client/perceptic_core_client/docs/ResourceIdentifier.md +36 -0
  71. perceptic_core_client/perceptic_core_client/docs/ResourceMetadataDto.md +38 -0
  72. perceptic_core_client/perceptic_core_client/docs/ResourceTypeDto.md +12 -0
  73. perceptic_core_client/perceptic_core_client/docs/RunStatusDto.md +26 -0
  74. perceptic_core_client/perceptic_core_client/docs/S3ConnectionSettingsApiDto.md +33 -0
  75. perceptic_core_client/perceptic_core_client/docs/S3FileSystemRootMetadataApiDto.md +30 -0
  76. perceptic_core_client/perceptic_core_client/docs/SchemaLocation.md +30 -0
  77. perceptic_core_client/perceptic_core_client/docs/StartExecutionResponse.md +29 -0
  78. perceptic_core_client/perceptic_core_client/docs/UploadFileToManagedFileSystemResponse.md +29 -0
  79. perceptic_core_client/perceptic_core_client/docs/UriResourceApi.md +413 -0
  80. perceptic_core_client/perceptic_core_client/docs/UserResourceApi.md +71 -0
  81. perceptic_core_client/perceptic_core_client/docs/WorkerEvent.md +34 -0
  82. perceptic_core_client/perceptic_core_client/docs/WorkerMetadataDto.md +32 -0
  83. perceptic_core_client/perceptic_core_client/docs/WorkerResourceApi.md +427 -0
  84. perceptic_core_client/perceptic_core_client/exceptions.py +216 -0
  85. perceptic_core_client/perceptic_core_client/models/__init__.py +77 -0
  86. perceptic_core_client/perceptic_core_client/models/action_type.py +38 -0
  87. perceptic_core_client/perceptic_core_client/models/azure_blob_connection_settings_api_dto.py +124 -0
  88. perceptic_core_client/perceptic_core_client/models/azure_blob_file_system_root_metadata_api_dto.py +89 -0
  89. perceptic_core_client/perceptic_core_client/models/connection_api_dto.py +99 -0
  90. perceptic_core_client/perceptic_core_client/models/connection_settings_api_dto.py +165 -0
  91. perceptic_core_client/perceptic_core_client/models/create_connection_request.py +95 -0
  92. perceptic_core_client/perceptic_core_client/models/create_connection_response.py +87 -0
  93. perceptic_core_client/perceptic_core_client/models/create_file_system_response.py +87 -0
  94. perceptic_core_client/perceptic_core_client/models/create_folder_request.py +87 -0
  95. perceptic_core_client/perceptic_core_client/models/create_folder_response.py +87 -0
  96. perceptic_core_client/perceptic_core_client/models/create_indexing_task_request.py +95 -0
  97. perceptic_core_client/perceptic_core_client/models/create_indexing_task_response.py +95 -0
  98. perceptic_core_client/perceptic_core_client/models/create_managed_file_system_request.py +89 -0
  99. perceptic_core_client/perceptic_core_client/models/create_remote_file_system_request.py +97 -0
  100. perceptic_core_client/perceptic_core_client/models/file_system_api_dto.py +165 -0
  101. perceptic_core_client/perceptic_core_client/models/file_system_root_metadata_api_dto.py +165 -0
  102. perceptic_core_client/perceptic_core_client/models/get_connection_response.py +91 -0
  103. perceptic_core_client/perceptic_core_client/models/get_indexer_response.py +91 -0
  104. perceptic_core_client/perceptic_core_client/models/get_indexing_task_response.py +91 -0
  105. perceptic_core_client/perceptic_core_client/models/get_metadata_response.py +91 -0
  106. perceptic_core_client/perceptic_core_client/models/get_parent_response.py +96 -0
  107. perceptic_core_client/perceptic_core_client/models/get_parent_uri_response.py +92 -0
  108. perceptic_core_client/perceptic_core_client/models/get_signed_url_response.py +92 -0
  109. perceptic_core_client/perceptic_core_client/models/get_worker_events_response.py +95 -0
  110. perceptic_core_client/perceptic_core_client/models/get_worker_metadata_response.py +91 -0
  111. perceptic_core_client/perceptic_core_client/models/get_worker_status_response.py +88 -0
  112. perceptic_core_client/perceptic_core_client/models/get_workers_response.py +87 -0
  113. perceptic_core_client/perceptic_core_client/models/indexer_dto.py +91 -0
  114. perceptic_core_client/perceptic_core_client/models/indexing_action_dto.py +107 -0
  115. perceptic_core_client/perceptic_core_client/models/indexing_action_status.py +39 -0
  116. perceptic_core_client/perceptic_core_client/models/indexing_task_dto.py +106 -0
  117. perceptic_core_client/perceptic_core_client/models/indexing_task_status.py +87 -0
  118. perceptic_core_client/perceptic_core_client/models/info_event.py +91 -0
  119. perceptic_core_client/perceptic_core_client/models/json_node.py +130 -0
  120. perceptic_core_client/perceptic_core_client/models/json_node_type.py +44 -0
  121. perceptic_core_client/perceptic_core_client/models/list_all_file_systems_response.py +100 -0
  122. perceptic_core_client/perceptic_core_client/models/list_file_system_response.py +100 -0
  123. perceptic_core_client/perceptic_core_client/models/list_indexers_response.py +100 -0
  124. perceptic_core_client/perceptic_core_client/models/list_indexing_actions_response.py +116 -0
  125. perceptic_core_client/perceptic_core_client/models/managed_file_system_api_dto.py +93 -0
  126. perceptic_core_client/perceptic_core_client/models/me_response.py +95 -0
  127. perceptic_core_client/perceptic_core_client/models/model_schema.py +114 -0
  128. perceptic_core_client/perceptic_core_client/models/paged_list_file_system_response.py +102 -0
  129. perceptic_core_client/perceptic_core_client/models/post_worker_run_request.py +87 -0
  130. perceptic_core_client/perceptic_core_client/models/post_worker_run_response.py +87 -0
  131. perceptic_core_client/perceptic_core_client/models/progress_event.py +91 -0
  132. perceptic_core_client/perceptic_core_client/models/remote_file_system_api_dto.py +101 -0
  133. perceptic_core_client/perceptic_core_client/models/request_for_input_event.py +98 -0
  134. perceptic_core_client/perceptic_core_client/models/resource_entry_dto.py +93 -0
  135. perceptic_core_client/perceptic_core_client/models/resource_id.py +87 -0
  136. perceptic_core_client/perceptic_core_client/models/resource_identifier.py +101 -0
  137. perceptic_core_client/perceptic_core_client/models/resource_metadata_dto.py +122 -0
  138. perceptic_core_client/perceptic_core_client/models/resource_type_dto.py +37 -0
  139. perceptic_core_client/perceptic_core_client/models/run_status_dto.py +44 -0
  140. perceptic_core_client/perceptic_core_client/models/s3_connection_settings_api_dto.py +124 -0
  141. perceptic_core_client/perceptic_core_client/models/s3_file_system_root_metadata_api_dto.py +89 -0
  142. perceptic_core_client/perceptic_core_client/models/schema_location.py +89 -0
  143. perceptic_core_client/perceptic_core_client/models/start_execution_response.py +91 -0
  144. perceptic_core_client/perceptic_core_client/models/upload_file_to_managed_file_system_response.py +87 -0
  145. perceptic_core_client/perceptic_core_client/models/worker_event.py +189 -0
  146. perceptic_core_client/perceptic_core_client/models/worker_metadata_dto.py +93 -0
  147. perceptic_core_client/perceptic_core_client/rest.py +258 -0
  148. perceptic_core_client/perceptic_core_client/test/__init__.py +0 -0
  149. perceptic_core_client/perceptic_core_client/test/test_action_type.py +33 -0
  150. perceptic_core_client/perceptic_core_client/test/test_azure_blob_connection_settings_api_dto.py +59 -0
  151. perceptic_core_client/perceptic_core_client/test/test_azure_blob_file_system_root_metadata_api_dto.py +52 -0
  152. perceptic_core_client/perceptic_core_client/test/test_connection_api_dto.py +55 -0
  153. perceptic_core_client/perceptic_core_client/test/test_connection_resource_api.py +45 -0
  154. perceptic_core_client/perceptic_core_client/test/test_connection_settings_api_dto.py +65 -0
  155. perceptic_core_client/perceptic_core_client/test/test_create_connection_request.py +53 -0
  156. perceptic_core_client/perceptic_core_client/test/test_create_connection_response.py +51 -0
  157. perceptic_core_client/perceptic_core_client/test/test_create_file_system_response.py +51 -0
  158. perceptic_core_client/perceptic_core_client/test/test_create_folder_request.py +51 -0
  159. perceptic_core_client/perceptic_core_client/test/test_create_folder_response.py +51 -0
  160. perceptic_core_client/perceptic_core_client/test/test_create_indexing_task_request.py +57 -0
  161. perceptic_core_client/perceptic_core_client/test/test_create_indexing_task_response.py +64 -0
  162. perceptic_core_client/perceptic_core_client/test/test_create_managed_file_system_request.py +52 -0
  163. perceptic_core_client/perceptic_core_client/test/test_create_remote_file_system_request.py +54 -0
  164. perceptic_core_client/perceptic_core_client/test/test_file_system_api_dto.py +56 -0
  165. perceptic_core_client/perceptic_core_client/test/test_file_system_contents_resource_api.py +87 -0
  166. perceptic_core_client/perceptic_core_client/test/test_file_system_resource_api.py +59 -0
  167. perceptic_core_client/perceptic_core_client/test/test_file_system_root_metadata_api_dto.py +53 -0
  168. perceptic_core_client/perceptic_core_client/test/test_get_connection_response.py +56 -0
  169. perceptic_core_client/perceptic_core_client/test/test_get_indexer_response.py +54 -0
  170. perceptic_core_client/perceptic_core_client/test/test_get_indexing_task_response.py +62 -0
  171. perceptic_core_client/perceptic_core_client/test/test_get_metadata_response.py +61 -0
  172. perceptic_core_client/perceptic_core_client/test/test_get_parent_response.py +52 -0
  173. perceptic_core_client/perceptic_core_client/test/test_get_parent_uri_response.py +51 -0
  174. perceptic_core_client/perceptic_core_client/test/test_get_signed_url_response.py +51 -0
  175. perceptic_core_client/perceptic_core_client/test/test_get_worker_events_response.py +53 -0
  176. perceptic_core_client/perceptic_core_client/test/test_get_worker_metadata_response.py +55 -0
  177. perceptic_core_client/perceptic_core_client/test/test_get_worker_status_response.py +51 -0
  178. perceptic_core_client/perceptic_core_client/test/test_get_workers_response.py +55 -0
  179. perceptic_core_client/perceptic_core_client/test/test_indexer_dto.py +53 -0
  180. perceptic_core_client/perceptic_core_client/test/test_indexer_resource_api.py +45 -0
  181. perceptic_core_client/perceptic_core_client/test/test_indexing_action_dto.py +57 -0
  182. perceptic_core_client/perceptic_core_client/test/test_indexing_action_status.py +33 -0
  183. perceptic_core_client/perceptic_core_client/test/test_indexing_task_dto.py +61 -0
  184. perceptic_core_client/perceptic_core_client/test/test_indexing_task_resource_api.py +59 -0
  185. perceptic_core_client/perceptic_core_client/test/test_indexing_task_status.py +51 -0
  186. perceptic_core_client/perceptic_core_client/test/test_info_event.py +53 -0
  187. perceptic_core_client/perceptic_core_client/test/test_json_node.py +72 -0
  188. perceptic_core_client/perceptic_core_client/test/test_json_node_type.py +33 -0
  189. perceptic_core_client/perceptic_core_client/test/test_list_all_file_systems_response.py +53 -0
  190. perceptic_core_client/perceptic_core_client/test/test_list_file_system_response.py +63 -0
  191. perceptic_core_client/perceptic_core_client/test/test_list_indexers_response.py +56 -0
  192. perceptic_core_client/perceptic_core_client/test/test_list_indexing_actions_response.py +68 -0
  193. perceptic_core_client/perceptic_core_client/test/test_managed_file_system_api_dto.py +54 -0
  194. perceptic_core_client/perceptic_core_client/test/test_me_response.py +55 -0
  195. perceptic_core_client/perceptic_core_client/test/test_model_schema.py +66 -0
  196. perceptic_core_client/perceptic_core_client/test/test_paged_list_file_system_response.py +65 -0
  197. perceptic_core_client/perceptic_core_client/test/test_post_worker_run_request.py +52 -0
  198. perceptic_core_client/perceptic_core_client/test/test_post_worker_run_response.py +51 -0
  199. perceptic_core_client/perceptic_core_client/test/test_progress_event.py +53 -0
  200. perceptic_core_client/perceptic_core_client/test/test_remote_file_system_api_dto.py +56 -0
  201. perceptic_core_client/perceptic_core_client/test/test_request_for_input_event.py +54 -0
  202. perceptic_core_client/perceptic_core_client/test/test_resource_entry_dto.py +62 -0
  203. perceptic_core_client/perceptic_core_client/test/test_resource_id.py +51 -0
  204. perceptic_core_client/perceptic_core_client/test/test_resource_identifier.py +58 -0
  205. perceptic_core_client/perceptic_core_client/test/test_resource_metadata_dto.py +60 -0
  206. perceptic_core_client/perceptic_core_client/test/test_resource_type_dto.py +33 -0
  207. perceptic_core_client/perceptic_core_client/test/test_run_status_dto.py +33 -0
  208. perceptic_core_client/perceptic_core_client/test/test_s3_connection_settings_api_dto.py +59 -0
  209. perceptic_core_client/perceptic_core_client/test/test_s3_file_system_root_metadata_api_dto.py +52 -0
  210. perceptic_core_client/perceptic_core_client/test/test_schema_location.py +54 -0
  211. perceptic_core_client/perceptic_core_client/test/test_start_execution_response.py +62 -0
  212. perceptic_core_client/perceptic_core_client/test/test_upload_file_to_managed_file_system_response.py +51 -0
  213. perceptic_core_client/perceptic_core_client/test/test_uri_resource_api.py +73 -0
  214. perceptic_core_client/perceptic_core_client/test/test_user_resource_api.py +38 -0
  215. perceptic_core_client/perceptic_core_client/test/test_worker_event.py +56 -0
  216. perceptic_core_client/perceptic_core_client/test/test_worker_metadata_dto.py +54 -0
  217. perceptic_core_client/perceptic_core_client/test/test_worker_resource_api.py +73 -0
  218. perceptic_core_client/perceptic_core_client_README.md +181 -0
  219. perceptic_core_client-0.6.2.dist-info/METADATA +93 -0
  220. perceptic_core_client-0.6.2.dist-info/RECORD +222 -0
  221. perceptic_core_client-0.6.2.dist-info/top_level.txt +1 -0
  222. perceptic_core_client-0.6.0.dist-info/METADATA +0 -179
  223. perceptic_core_client-0.6.0.dist-info/RECORD +0 -4
  224. perceptic_core_client-0.6.0.dist-info/top_level.txt +0 -1
  225. {perceptic_core_client-0.6.0.dist-info → perceptic_core_client-0.6.2.dist-info}/WHEEL +0 -0
@@ -0,0 +1,1746 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ perceptic-core-server API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.0.1-SNAPSHOT
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 pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr
20
+ from typing import Any, Dict, Optional
21
+ from typing_extensions import Annotated
22
+ from perceptic_core_client.models.get_worker_events_response import GetWorkerEventsResponse
23
+ from perceptic_core_client.models.get_worker_metadata_response import GetWorkerMetadataResponse
24
+ from perceptic_core_client.models.get_worker_status_response import GetWorkerStatusResponse
25
+ from perceptic_core_client.models.get_workers_response import GetWorkersResponse
26
+ from perceptic_core_client.models.post_worker_run_request import PostWorkerRunRequest
27
+ from perceptic_core_client.models.post_worker_run_response import PostWorkerRunResponse
28
+
29
+ from perceptic_core_client.api_client import ApiClient, RequestSerialized
30
+ from perceptic_core_client.api_response import ApiResponse
31
+ from perceptic_core_client.rest import RESTResponseType
32
+
33
+
34
+ class WorkerResourceApi:
35
+ """NOTE: This class is auto generated by OpenAPI Generator
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+ """
40
+
41
+ def __init__(self, api_client=None) -> None:
42
+ if api_client is None:
43
+ api_client = ApiClient.get_default()
44
+ self.api_client = api_client
45
+
46
+
47
+ @validate_call
48
+ def api_v1_workers_get(
49
+ self,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> GetWorkersResponse:
63
+ """Get Workers
64
+
65
+
66
+ :param _request_timeout: timeout setting for this request. If one
67
+ number provided, it will be total request
68
+ timeout. It can also be a pair (tuple) of
69
+ (connection, read) timeouts.
70
+ :type _request_timeout: int, tuple(int, int), optional
71
+ :param _request_auth: set to override the auth_settings for an a single
72
+ request; this effectively ignores the
73
+ authentication in the spec for a single request.
74
+ :type _request_auth: dict, optional
75
+ :param _content_type: force content-type for the request.
76
+ :type _content_type: str, Optional
77
+ :param _headers: set to override the headers for a single
78
+ request; this effectively ignores the headers
79
+ in the spec for a single request.
80
+ :type _headers: dict, optional
81
+ :param _host_index: set to override the host_index for a single
82
+ request; this effectively ignores the host_index
83
+ in the spec for a single request.
84
+ :type _host_index: int, optional
85
+ :return: Returns the result object.
86
+ """ # noqa: E501
87
+
88
+ _param = self._api_v1_workers_get_serialize(
89
+ _request_auth=_request_auth,
90
+ _content_type=_content_type,
91
+ _headers=_headers,
92
+ _host_index=_host_index
93
+ )
94
+
95
+ _response_types_map: Dict[str, Optional[str]] = {
96
+ '200': "GetWorkersResponse",
97
+ }
98
+ response_data = self.api_client.call_api(
99
+ *_param,
100
+ _request_timeout=_request_timeout
101
+ )
102
+ response_data.read()
103
+ return self.api_client.response_deserialize(
104
+ response_data=response_data,
105
+ response_types_map=_response_types_map,
106
+ ).data
107
+
108
+
109
+ @validate_call
110
+ def api_v1_workers_get_with_http_info(
111
+ self,
112
+ _request_timeout: Union[
113
+ None,
114
+ Annotated[StrictFloat, Field(gt=0)],
115
+ Tuple[
116
+ Annotated[StrictFloat, Field(gt=0)],
117
+ Annotated[StrictFloat, Field(gt=0)]
118
+ ]
119
+ ] = None,
120
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
121
+ _content_type: Optional[StrictStr] = None,
122
+ _headers: Optional[Dict[StrictStr, Any]] = None,
123
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
124
+ ) -> ApiResponse[GetWorkersResponse]:
125
+ """Get Workers
126
+
127
+
128
+ :param _request_timeout: timeout setting for this request. If one
129
+ number provided, it will be total request
130
+ timeout. It can also be a pair (tuple) of
131
+ (connection, read) timeouts.
132
+ :type _request_timeout: int, tuple(int, int), optional
133
+ :param _request_auth: set to override the auth_settings for an a single
134
+ request; this effectively ignores the
135
+ authentication in the spec for a single request.
136
+ :type _request_auth: dict, optional
137
+ :param _content_type: force content-type for the request.
138
+ :type _content_type: str, Optional
139
+ :param _headers: set to override the headers for a single
140
+ request; this effectively ignores the headers
141
+ in the spec for a single request.
142
+ :type _headers: dict, optional
143
+ :param _host_index: set to override the host_index for a single
144
+ request; this effectively ignores the host_index
145
+ in the spec for a single request.
146
+ :type _host_index: int, optional
147
+ :return: Returns the result object.
148
+ """ # noqa: E501
149
+
150
+ _param = self._api_v1_workers_get_serialize(
151
+ _request_auth=_request_auth,
152
+ _content_type=_content_type,
153
+ _headers=_headers,
154
+ _host_index=_host_index
155
+ )
156
+
157
+ _response_types_map: Dict[str, Optional[str]] = {
158
+ '200': "GetWorkersResponse",
159
+ }
160
+ response_data = self.api_client.call_api(
161
+ *_param,
162
+ _request_timeout=_request_timeout
163
+ )
164
+ response_data.read()
165
+ return self.api_client.response_deserialize(
166
+ response_data=response_data,
167
+ response_types_map=_response_types_map,
168
+ )
169
+
170
+
171
+ @validate_call
172
+ def api_v1_workers_get_without_preload_content(
173
+ self,
174
+ _request_timeout: Union[
175
+ None,
176
+ Annotated[StrictFloat, Field(gt=0)],
177
+ Tuple[
178
+ Annotated[StrictFloat, Field(gt=0)],
179
+ Annotated[StrictFloat, Field(gt=0)]
180
+ ]
181
+ ] = None,
182
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
183
+ _content_type: Optional[StrictStr] = None,
184
+ _headers: Optional[Dict[StrictStr, Any]] = None,
185
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
186
+ ) -> RESTResponseType:
187
+ """Get Workers
188
+
189
+
190
+ :param _request_timeout: timeout setting for this request. If one
191
+ number provided, it will be total request
192
+ timeout. It can also be a pair (tuple) of
193
+ (connection, read) timeouts.
194
+ :type _request_timeout: int, tuple(int, int), optional
195
+ :param _request_auth: set to override the auth_settings for an a single
196
+ request; this effectively ignores the
197
+ authentication in the spec for a single request.
198
+ :type _request_auth: dict, optional
199
+ :param _content_type: force content-type for the request.
200
+ :type _content_type: str, Optional
201
+ :param _headers: set to override the headers for a single
202
+ request; this effectively ignores the headers
203
+ in the spec for a single request.
204
+ :type _headers: dict, optional
205
+ :param _host_index: set to override the host_index for a single
206
+ request; this effectively ignores the host_index
207
+ in the spec for a single request.
208
+ :type _host_index: int, optional
209
+ :return: Returns the result object.
210
+ """ # noqa: E501
211
+
212
+ _param = self._api_v1_workers_get_serialize(
213
+ _request_auth=_request_auth,
214
+ _content_type=_content_type,
215
+ _headers=_headers,
216
+ _host_index=_host_index
217
+ )
218
+
219
+ _response_types_map: Dict[str, Optional[str]] = {
220
+ '200': "GetWorkersResponse",
221
+ }
222
+ response_data = self.api_client.call_api(
223
+ *_param,
224
+ _request_timeout=_request_timeout
225
+ )
226
+ return response_data.response
227
+
228
+
229
+ def _api_v1_workers_get_serialize(
230
+ self,
231
+ _request_auth,
232
+ _content_type,
233
+ _headers,
234
+ _host_index,
235
+ ) -> RequestSerialized:
236
+
237
+ _host = None
238
+
239
+ _collection_formats: Dict[str, str] = {
240
+ }
241
+
242
+ _path_params: Dict[str, str] = {}
243
+ _query_params: List[Tuple[str, str]] = []
244
+ _header_params: Dict[str, Optional[str]] = _headers or {}
245
+ _form_params: List[Tuple[str, str]] = []
246
+ _files: Dict[
247
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
248
+ ] = {}
249
+ _body_params: Optional[bytes] = None
250
+
251
+ # process the path parameters
252
+ # process the query parameters
253
+ # process the header parameters
254
+ # process the form parameters
255
+ # process the body parameter
256
+
257
+
258
+ # set the HTTP header `Accept`
259
+ if 'Accept' not in _header_params:
260
+ _header_params['Accept'] = self.api_client.select_header_accept(
261
+ [
262
+ 'application/json'
263
+ ]
264
+ )
265
+
266
+
267
+ # authentication setting
268
+ _auth_settings: List[str] = [
269
+ ]
270
+
271
+ return self.api_client.param_serialize(
272
+ method='GET',
273
+ resource_path='/api/v1/workers',
274
+ path_params=_path_params,
275
+ query_params=_query_params,
276
+ header_params=_header_params,
277
+ body=_body_params,
278
+ post_params=_form_params,
279
+ files=_files,
280
+ auth_settings=_auth_settings,
281
+ collection_formats=_collection_formats,
282
+ _host=_host,
283
+ _request_auth=_request_auth
284
+ )
285
+
286
+
287
+
288
+
289
+ @validate_call
290
+ def api_v1_workers_worker_id_get(
291
+ self,
292
+ worker_id: StrictStr,
293
+ version: Optional[StrictStr] = None,
294
+ _request_timeout: Union[
295
+ None,
296
+ Annotated[StrictFloat, Field(gt=0)],
297
+ Tuple[
298
+ Annotated[StrictFloat, Field(gt=0)],
299
+ Annotated[StrictFloat, Field(gt=0)]
300
+ ]
301
+ ] = None,
302
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
303
+ _content_type: Optional[StrictStr] = None,
304
+ _headers: Optional[Dict[StrictStr, Any]] = None,
305
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
306
+ ) -> GetWorkerMetadataResponse:
307
+ """Get Worker Metadata
308
+
309
+
310
+ :param worker_id: (required)
311
+ :type worker_id: str
312
+ :param version:
313
+ :type version: str
314
+ :param _request_timeout: timeout setting for this request. If one
315
+ number provided, it will be total request
316
+ timeout. It can also be a pair (tuple) of
317
+ (connection, read) timeouts.
318
+ :type _request_timeout: int, tuple(int, int), optional
319
+ :param _request_auth: set to override the auth_settings for an a single
320
+ request; this effectively ignores the
321
+ authentication in the spec for a single request.
322
+ :type _request_auth: dict, optional
323
+ :param _content_type: force content-type for the request.
324
+ :type _content_type: str, Optional
325
+ :param _headers: set to override the headers for a single
326
+ request; this effectively ignores the headers
327
+ in the spec for a single request.
328
+ :type _headers: dict, optional
329
+ :param _host_index: set to override the host_index for a single
330
+ request; this effectively ignores the host_index
331
+ in the spec for a single request.
332
+ :type _host_index: int, optional
333
+ :return: Returns the result object.
334
+ """ # noqa: E501
335
+
336
+ _param = self._api_v1_workers_worker_id_get_serialize(
337
+ worker_id=worker_id,
338
+ version=version,
339
+ _request_auth=_request_auth,
340
+ _content_type=_content_type,
341
+ _headers=_headers,
342
+ _host_index=_host_index
343
+ )
344
+
345
+ _response_types_map: Dict[str, Optional[str]] = {
346
+ '200': "GetWorkerMetadataResponse",
347
+ }
348
+ response_data = self.api_client.call_api(
349
+ *_param,
350
+ _request_timeout=_request_timeout
351
+ )
352
+ response_data.read()
353
+ return self.api_client.response_deserialize(
354
+ response_data=response_data,
355
+ response_types_map=_response_types_map,
356
+ ).data
357
+
358
+
359
+ @validate_call
360
+ def api_v1_workers_worker_id_get_with_http_info(
361
+ self,
362
+ worker_id: StrictStr,
363
+ version: Optional[StrictStr] = None,
364
+ _request_timeout: Union[
365
+ None,
366
+ Annotated[StrictFloat, Field(gt=0)],
367
+ Tuple[
368
+ Annotated[StrictFloat, Field(gt=0)],
369
+ Annotated[StrictFloat, Field(gt=0)]
370
+ ]
371
+ ] = None,
372
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
373
+ _content_type: Optional[StrictStr] = None,
374
+ _headers: Optional[Dict[StrictStr, Any]] = None,
375
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
376
+ ) -> ApiResponse[GetWorkerMetadataResponse]:
377
+ """Get Worker Metadata
378
+
379
+
380
+ :param worker_id: (required)
381
+ :type worker_id: str
382
+ :param version:
383
+ :type version: str
384
+ :param _request_timeout: timeout setting for this request. If one
385
+ number provided, it will be total request
386
+ timeout. It can also be a pair (tuple) of
387
+ (connection, read) timeouts.
388
+ :type _request_timeout: int, tuple(int, int), optional
389
+ :param _request_auth: set to override the auth_settings for an a single
390
+ request; this effectively ignores the
391
+ authentication in the spec for a single request.
392
+ :type _request_auth: dict, optional
393
+ :param _content_type: force content-type for the request.
394
+ :type _content_type: str, Optional
395
+ :param _headers: set to override the headers for a single
396
+ request; this effectively ignores the headers
397
+ in the spec for a single request.
398
+ :type _headers: dict, optional
399
+ :param _host_index: set to override the host_index for a single
400
+ request; this effectively ignores the host_index
401
+ in the spec for a single request.
402
+ :type _host_index: int, optional
403
+ :return: Returns the result object.
404
+ """ # noqa: E501
405
+
406
+ _param = self._api_v1_workers_worker_id_get_serialize(
407
+ worker_id=worker_id,
408
+ version=version,
409
+ _request_auth=_request_auth,
410
+ _content_type=_content_type,
411
+ _headers=_headers,
412
+ _host_index=_host_index
413
+ )
414
+
415
+ _response_types_map: Dict[str, Optional[str]] = {
416
+ '200': "GetWorkerMetadataResponse",
417
+ }
418
+ response_data = self.api_client.call_api(
419
+ *_param,
420
+ _request_timeout=_request_timeout
421
+ )
422
+ response_data.read()
423
+ return self.api_client.response_deserialize(
424
+ response_data=response_data,
425
+ response_types_map=_response_types_map,
426
+ )
427
+
428
+
429
+ @validate_call
430
+ def api_v1_workers_worker_id_get_without_preload_content(
431
+ self,
432
+ worker_id: StrictStr,
433
+ version: Optional[StrictStr] = None,
434
+ _request_timeout: Union[
435
+ None,
436
+ Annotated[StrictFloat, Field(gt=0)],
437
+ Tuple[
438
+ Annotated[StrictFloat, Field(gt=0)],
439
+ Annotated[StrictFloat, Field(gt=0)]
440
+ ]
441
+ ] = None,
442
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
443
+ _content_type: Optional[StrictStr] = None,
444
+ _headers: Optional[Dict[StrictStr, Any]] = None,
445
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
446
+ ) -> RESTResponseType:
447
+ """Get Worker Metadata
448
+
449
+
450
+ :param worker_id: (required)
451
+ :type worker_id: str
452
+ :param version:
453
+ :type version: str
454
+ :param _request_timeout: timeout setting for this request. If one
455
+ number provided, it will be total request
456
+ timeout. It can also be a pair (tuple) of
457
+ (connection, read) timeouts.
458
+ :type _request_timeout: int, tuple(int, int), optional
459
+ :param _request_auth: set to override the auth_settings for an a single
460
+ request; this effectively ignores the
461
+ authentication in the spec for a single request.
462
+ :type _request_auth: dict, optional
463
+ :param _content_type: force content-type for the request.
464
+ :type _content_type: str, Optional
465
+ :param _headers: set to override the headers for a single
466
+ request; this effectively ignores the headers
467
+ in the spec for a single request.
468
+ :type _headers: dict, optional
469
+ :param _host_index: set to override the host_index for a single
470
+ request; this effectively ignores the host_index
471
+ in the spec for a single request.
472
+ :type _host_index: int, optional
473
+ :return: Returns the result object.
474
+ """ # noqa: E501
475
+
476
+ _param = self._api_v1_workers_worker_id_get_serialize(
477
+ worker_id=worker_id,
478
+ version=version,
479
+ _request_auth=_request_auth,
480
+ _content_type=_content_type,
481
+ _headers=_headers,
482
+ _host_index=_host_index
483
+ )
484
+
485
+ _response_types_map: Dict[str, Optional[str]] = {
486
+ '200': "GetWorkerMetadataResponse",
487
+ }
488
+ response_data = self.api_client.call_api(
489
+ *_param,
490
+ _request_timeout=_request_timeout
491
+ )
492
+ return response_data.response
493
+
494
+
495
+ def _api_v1_workers_worker_id_get_serialize(
496
+ self,
497
+ worker_id,
498
+ version,
499
+ _request_auth,
500
+ _content_type,
501
+ _headers,
502
+ _host_index,
503
+ ) -> RequestSerialized:
504
+
505
+ _host = None
506
+
507
+ _collection_formats: Dict[str, str] = {
508
+ }
509
+
510
+ _path_params: Dict[str, str] = {}
511
+ _query_params: List[Tuple[str, str]] = []
512
+ _header_params: Dict[str, Optional[str]] = _headers or {}
513
+ _form_params: List[Tuple[str, str]] = []
514
+ _files: Dict[
515
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
516
+ ] = {}
517
+ _body_params: Optional[bytes] = None
518
+
519
+ # process the path parameters
520
+ if worker_id is not None:
521
+ _path_params['workerId'] = worker_id
522
+ # process the query parameters
523
+ if version is not None:
524
+
525
+ _query_params.append(('version', version))
526
+
527
+ # process the header parameters
528
+ # process the form parameters
529
+ # process the body parameter
530
+
531
+
532
+ # set the HTTP header `Accept`
533
+ if 'Accept' not in _header_params:
534
+ _header_params['Accept'] = self.api_client.select_header_accept(
535
+ [
536
+ 'application/json'
537
+ ]
538
+ )
539
+
540
+
541
+ # authentication setting
542
+ _auth_settings: List[str] = [
543
+ ]
544
+
545
+ return self.api_client.param_serialize(
546
+ method='GET',
547
+ resource_path='/api/v1/workers/{workerId}',
548
+ path_params=_path_params,
549
+ query_params=_query_params,
550
+ header_params=_header_params,
551
+ body=_body_params,
552
+ post_params=_form_params,
553
+ files=_files,
554
+ auth_settings=_auth_settings,
555
+ collection_formats=_collection_formats,
556
+ _host=_host,
557
+ _request_auth=_request_auth
558
+ )
559
+
560
+
561
+
562
+
563
+ @validate_call
564
+ def api_v1_workers_worker_id_runs_post(
565
+ self,
566
+ worker_id: StrictStr,
567
+ post_worker_run_request: PostWorkerRunRequest,
568
+ version: Optional[StrictStr] = None,
569
+ _request_timeout: Union[
570
+ None,
571
+ Annotated[StrictFloat, Field(gt=0)],
572
+ Tuple[
573
+ Annotated[StrictFloat, Field(gt=0)],
574
+ Annotated[StrictFloat, Field(gt=0)]
575
+ ]
576
+ ] = None,
577
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
578
+ _content_type: Optional[StrictStr] = None,
579
+ _headers: Optional[Dict[StrictStr, Any]] = None,
580
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
581
+ ) -> PostWorkerRunResponse:
582
+ """Post Worker Run
583
+
584
+
585
+ :param worker_id: (required)
586
+ :type worker_id: str
587
+ :param post_worker_run_request: (required)
588
+ :type post_worker_run_request: PostWorkerRunRequest
589
+ :param version:
590
+ :type version: str
591
+ :param _request_timeout: timeout setting for this request. If one
592
+ number provided, it will be total request
593
+ timeout. It can also be a pair (tuple) of
594
+ (connection, read) timeouts.
595
+ :type _request_timeout: int, tuple(int, int), optional
596
+ :param _request_auth: set to override the auth_settings for an a single
597
+ request; this effectively ignores the
598
+ authentication in the spec for a single request.
599
+ :type _request_auth: dict, optional
600
+ :param _content_type: force content-type for the request.
601
+ :type _content_type: str, Optional
602
+ :param _headers: set to override the headers for a single
603
+ request; this effectively ignores the headers
604
+ in the spec for a single request.
605
+ :type _headers: dict, optional
606
+ :param _host_index: set to override the host_index for a single
607
+ request; this effectively ignores the host_index
608
+ in the spec for a single request.
609
+ :type _host_index: int, optional
610
+ :return: Returns the result object.
611
+ """ # noqa: E501
612
+
613
+ _param = self._api_v1_workers_worker_id_runs_post_serialize(
614
+ worker_id=worker_id,
615
+ post_worker_run_request=post_worker_run_request,
616
+ version=version,
617
+ _request_auth=_request_auth,
618
+ _content_type=_content_type,
619
+ _headers=_headers,
620
+ _host_index=_host_index
621
+ )
622
+
623
+ _response_types_map: Dict[str, Optional[str]] = {
624
+ '200': "PostWorkerRunResponse",
625
+ '400': None,
626
+ }
627
+ response_data = self.api_client.call_api(
628
+ *_param,
629
+ _request_timeout=_request_timeout
630
+ )
631
+ response_data.read()
632
+ return self.api_client.response_deserialize(
633
+ response_data=response_data,
634
+ response_types_map=_response_types_map,
635
+ ).data
636
+
637
+
638
+ @validate_call
639
+ def api_v1_workers_worker_id_runs_post_with_http_info(
640
+ self,
641
+ worker_id: StrictStr,
642
+ post_worker_run_request: PostWorkerRunRequest,
643
+ version: Optional[StrictStr] = None,
644
+ _request_timeout: Union[
645
+ None,
646
+ Annotated[StrictFloat, Field(gt=0)],
647
+ Tuple[
648
+ Annotated[StrictFloat, Field(gt=0)],
649
+ Annotated[StrictFloat, Field(gt=0)]
650
+ ]
651
+ ] = None,
652
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
653
+ _content_type: Optional[StrictStr] = None,
654
+ _headers: Optional[Dict[StrictStr, Any]] = None,
655
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
656
+ ) -> ApiResponse[PostWorkerRunResponse]:
657
+ """Post Worker Run
658
+
659
+
660
+ :param worker_id: (required)
661
+ :type worker_id: str
662
+ :param post_worker_run_request: (required)
663
+ :type post_worker_run_request: PostWorkerRunRequest
664
+ :param version:
665
+ :type version: str
666
+ :param _request_timeout: timeout setting for this request. If one
667
+ number provided, it will be total request
668
+ timeout. It can also be a pair (tuple) of
669
+ (connection, read) timeouts.
670
+ :type _request_timeout: int, tuple(int, int), optional
671
+ :param _request_auth: set to override the auth_settings for an a single
672
+ request; this effectively ignores the
673
+ authentication in the spec for a single request.
674
+ :type _request_auth: dict, optional
675
+ :param _content_type: force content-type for the request.
676
+ :type _content_type: str, Optional
677
+ :param _headers: set to override the headers for a single
678
+ request; this effectively ignores the headers
679
+ in the spec for a single request.
680
+ :type _headers: dict, optional
681
+ :param _host_index: set to override the host_index for a single
682
+ request; this effectively ignores the host_index
683
+ in the spec for a single request.
684
+ :type _host_index: int, optional
685
+ :return: Returns the result object.
686
+ """ # noqa: E501
687
+
688
+ _param = self._api_v1_workers_worker_id_runs_post_serialize(
689
+ worker_id=worker_id,
690
+ post_worker_run_request=post_worker_run_request,
691
+ version=version,
692
+ _request_auth=_request_auth,
693
+ _content_type=_content_type,
694
+ _headers=_headers,
695
+ _host_index=_host_index
696
+ )
697
+
698
+ _response_types_map: Dict[str, Optional[str]] = {
699
+ '200': "PostWorkerRunResponse",
700
+ '400': None,
701
+ }
702
+ response_data = self.api_client.call_api(
703
+ *_param,
704
+ _request_timeout=_request_timeout
705
+ )
706
+ response_data.read()
707
+ return self.api_client.response_deserialize(
708
+ response_data=response_data,
709
+ response_types_map=_response_types_map,
710
+ )
711
+
712
+
713
+ @validate_call
714
+ def api_v1_workers_worker_id_runs_post_without_preload_content(
715
+ self,
716
+ worker_id: StrictStr,
717
+ post_worker_run_request: PostWorkerRunRequest,
718
+ version: Optional[StrictStr] = None,
719
+ _request_timeout: Union[
720
+ None,
721
+ Annotated[StrictFloat, Field(gt=0)],
722
+ Tuple[
723
+ Annotated[StrictFloat, Field(gt=0)],
724
+ Annotated[StrictFloat, Field(gt=0)]
725
+ ]
726
+ ] = None,
727
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
728
+ _content_type: Optional[StrictStr] = None,
729
+ _headers: Optional[Dict[StrictStr, Any]] = None,
730
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
731
+ ) -> RESTResponseType:
732
+ """Post Worker Run
733
+
734
+
735
+ :param worker_id: (required)
736
+ :type worker_id: str
737
+ :param post_worker_run_request: (required)
738
+ :type post_worker_run_request: PostWorkerRunRequest
739
+ :param version:
740
+ :type version: str
741
+ :param _request_timeout: timeout setting for this request. If one
742
+ number provided, it will be total request
743
+ timeout. It can also be a pair (tuple) of
744
+ (connection, read) timeouts.
745
+ :type _request_timeout: int, tuple(int, int), optional
746
+ :param _request_auth: set to override the auth_settings for an a single
747
+ request; this effectively ignores the
748
+ authentication in the spec for a single request.
749
+ :type _request_auth: dict, optional
750
+ :param _content_type: force content-type for the request.
751
+ :type _content_type: str, Optional
752
+ :param _headers: set to override the headers for a single
753
+ request; this effectively ignores the headers
754
+ in the spec for a single request.
755
+ :type _headers: dict, optional
756
+ :param _host_index: set to override the host_index for a single
757
+ request; this effectively ignores the host_index
758
+ in the spec for a single request.
759
+ :type _host_index: int, optional
760
+ :return: Returns the result object.
761
+ """ # noqa: E501
762
+
763
+ _param = self._api_v1_workers_worker_id_runs_post_serialize(
764
+ worker_id=worker_id,
765
+ post_worker_run_request=post_worker_run_request,
766
+ version=version,
767
+ _request_auth=_request_auth,
768
+ _content_type=_content_type,
769
+ _headers=_headers,
770
+ _host_index=_host_index
771
+ )
772
+
773
+ _response_types_map: Dict[str, Optional[str]] = {
774
+ '200': "PostWorkerRunResponse",
775
+ '400': None,
776
+ }
777
+ response_data = self.api_client.call_api(
778
+ *_param,
779
+ _request_timeout=_request_timeout
780
+ )
781
+ return response_data.response
782
+
783
+
784
+ def _api_v1_workers_worker_id_runs_post_serialize(
785
+ self,
786
+ worker_id,
787
+ post_worker_run_request,
788
+ version,
789
+ _request_auth,
790
+ _content_type,
791
+ _headers,
792
+ _host_index,
793
+ ) -> RequestSerialized:
794
+
795
+ _host = None
796
+
797
+ _collection_formats: Dict[str, str] = {
798
+ }
799
+
800
+ _path_params: Dict[str, str] = {}
801
+ _query_params: List[Tuple[str, str]] = []
802
+ _header_params: Dict[str, Optional[str]] = _headers or {}
803
+ _form_params: List[Tuple[str, str]] = []
804
+ _files: Dict[
805
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
806
+ ] = {}
807
+ _body_params: Optional[bytes] = None
808
+
809
+ # process the path parameters
810
+ if worker_id is not None:
811
+ _path_params['workerId'] = worker_id
812
+ # process the query parameters
813
+ if version is not None:
814
+
815
+ _query_params.append(('version', version))
816
+
817
+ # process the header parameters
818
+ # process the form parameters
819
+ # process the body parameter
820
+ if post_worker_run_request is not None:
821
+ _body_params = post_worker_run_request
822
+
823
+
824
+ # set the HTTP header `Accept`
825
+ if 'Accept' not in _header_params:
826
+ _header_params['Accept'] = self.api_client.select_header_accept(
827
+ [
828
+ 'application/json'
829
+ ]
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 = (
837
+ self.api_client.select_header_content_type(
838
+ [
839
+ 'application/json'
840
+ ]
841
+ )
842
+ )
843
+ if _default_content_type is not None:
844
+ _header_params['Content-Type'] = _default_content_type
845
+
846
+ # authentication setting
847
+ _auth_settings: List[str] = [
848
+ ]
849
+
850
+ return self.api_client.param_serialize(
851
+ method='POST',
852
+ resource_path='/api/v1/workers/{workerId}/runs',
853
+ path_params=_path_params,
854
+ query_params=_query_params,
855
+ header_params=_header_params,
856
+ body=_body_params,
857
+ post_params=_form_params,
858
+ files=_files,
859
+ auth_settings=_auth_settings,
860
+ collection_formats=_collection_formats,
861
+ _host=_host,
862
+ _request_auth=_request_auth
863
+ )
864
+
865
+
866
+
867
+
868
+ @validate_call
869
+ def api_v1_workers_worker_id_runs_run_rid_events_get(
870
+ self,
871
+ run_rid: StrictStr,
872
+ worker_id: StrictStr,
873
+ limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None,
874
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
875
+ _request_timeout: Union[
876
+ None,
877
+ Annotated[StrictFloat, Field(gt=0)],
878
+ Tuple[
879
+ Annotated[StrictFloat, Field(gt=0)],
880
+ Annotated[StrictFloat, Field(gt=0)]
881
+ ]
882
+ ] = None,
883
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
884
+ _content_type: Optional[StrictStr] = None,
885
+ _headers: Optional[Dict[StrictStr, Any]] = None,
886
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
887
+ ) -> GetWorkerEventsResponse:
888
+ """Get Worker Run Events
889
+
890
+
891
+ :param run_rid: (required)
892
+ :type run_rid: str
893
+ :param worker_id: (required)
894
+ :type worker_id: str
895
+ :param limit:
896
+ :type limit: int
897
+ :param offset:
898
+ :type offset: int
899
+ :param _request_timeout: timeout setting for this request. If one
900
+ number provided, it will be total request
901
+ timeout. It can also be a pair (tuple) of
902
+ (connection, read) timeouts.
903
+ :type _request_timeout: int, tuple(int, int), optional
904
+ :param _request_auth: set to override the auth_settings for an a single
905
+ request; this effectively ignores the
906
+ authentication in the spec for a single request.
907
+ :type _request_auth: dict, optional
908
+ :param _content_type: force content-type for the request.
909
+ :type _content_type: str, Optional
910
+ :param _headers: set to override the headers for a single
911
+ request; this effectively ignores the headers
912
+ in the spec for a single request.
913
+ :type _headers: dict, optional
914
+ :param _host_index: set to override the host_index for a single
915
+ request; this effectively ignores the host_index
916
+ in the spec for a single request.
917
+ :type _host_index: int, optional
918
+ :return: Returns the result object.
919
+ """ # noqa: E501
920
+
921
+ _param = self._api_v1_workers_worker_id_runs_run_rid_events_get_serialize(
922
+ run_rid=run_rid,
923
+ worker_id=worker_id,
924
+ limit=limit,
925
+ offset=offset,
926
+ _request_auth=_request_auth,
927
+ _content_type=_content_type,
928
+ _headers=_headers,
929
+ _host_index=_host_index
930
+ )
931
+
932
+ _response_types_map: Dict[str, Optional[str]] = {
933
+ '200': "GetWorkerEventsResponse",
934
+ }
935
+ response_data = self.api_client.call_api(
936
+ *_param,
937
+ _request_timeout=_request_timeout
938
+ )
939
+ response_data.read()
940
+ return self.api_client.response_deserialize(
941
+ response_data=response_data,
942
+ response_types_map=_response_types_map,
943
+ ).data
944
+
945
+
946
+ @validate_call
947
+ def api_v1_workers_worker_id_runs_run_rid_events_get_with_http_info(
948
+ self,
949
+ run_rid: StrictStr,
950
+ worker_id: StrictStr,
951
+ limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None,
952
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
953
+ _request_timeout: Union[
954
+ None,
955
+ Annotated[StrictFloat, Field(gt=0)],
956
+ Tuple[
957
+ Annotated[StrictFloat, Field(gt=0)],
958
+ Annotated[StrictFloat, Field(gt=0)]
959
+ ]
960
+ ] = None,
961
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
962
+ _content_type: Optional[StrictStr] = None,
963
+ _headers: Optional[Dict[StrictStr, Any]] = None,
964
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
965
+ ) -> ApiResponse[GetWorkerEventsResponse]:
966
+ """Get Worker Run Events
967
+
968
+
969
+ :param run_rid: (required)
970
+ :type run_rid: str
971
+ :param worker_id: (required)
972
+ :type worker_id: str
973
+ :param limit:
974
+ :type limit: int
975
+ :param offset:
976
+ :type offset: int
977
+ :param _request_timeout: timeout setting for this request. If one
978
+ number provided, it will be total request
979
+ timeout. It can also be a pair (tuple) of
980
+ (connection, read) timeouts.
981
+ :type _request_timeout: int, tuple(int, int), optional
982
+ :param _request_auth: set to override the auth_settings for an a single
983
+ request; this effectively ignores the
984
+ authentication in the spec for a single request.
985
+ :type _request_auth: dict, optional
986
+ :param _content_type: force content-type for the request.
987
+ :type _content_type: str, Optional
988
+ :param _headers: set to override the headers for a single
989
+ request; this effectively ignores the headers
990
+ in the spec for a single request.
991
+ :type _headers: dict, optional
992
+ :param _host_index: set to override the host_index for a single
993
+ request; this effectively ignores the host_index
994
+ in the spec for a single request.
995
+ :type _host_index: int, optional
996
+ :return: Returns the result object.
997
+ """ # noqa: E501
998
+
999
+ _param = self._api_v1_workers_worker_id_runs_run_rid_events_get_serialize(
1000
+ run_rid=run_rid,
1001
+ worker_id=worker_id,
1002
+ limit=limit,
1003
+ offset=offset,
1004
+ _request_auth=_request_auth,
1005
+ _content_type=_content_type,
1006
+ _headers=_headers,
1007
+ _host_index=_host_index
1008
+ )
1009
+
1010
+ _response_types_map: Dict[str, Optional[str]] = {
1011
+ '200': "GetWorkerEventsResponse",
1012
+ }
1013
+ response_data = self.api_client.call_api(
1014
+ *_param,
1015
+ _request_timeout=_request_timeout
1016
+ )
1017
+ response_data.read()
1018
+ return self.api_client.response_deserialize(
1019
+ response_data=response_data,
1020
+ response_types_map=_response_types_map,
1021
+ )
1022
+
1023
+
1024
+ @validate_call
1025
+ def api_v1_workers_worker_id_runs_run_rid_events_get_without_preload_content(
1026
+ self,
1027
+ run_rid: StrictStr,
1028
+ worker_id: StrictStr,
1029
+ limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None,
1030
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
1031
+ _request_timeout: Union[
1032
+ None,
1033
+ Annotated[StrictFloat, Field(gt=0)],
1034
+ Tuple[
1035
+ Annotated[StrictFloat, Field(gt=0)],
1036
+ Annotated[StrictFloat, Field(gt=0)]
1037
+ ]
1038
+ ] = None,
1039
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1040
+ _content_type: Optional[StrictStr] = None,
1041
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1042
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1043
+ ) -> RESTResponseType:
1044
+ """Get Worker Run Events
1045
+
1046
+
1047
+ :param run_rid: (required)
1048
+ :type run_rid: str
1049
+ :param worker_id: (required)
1050
+ :type worker_id: str
1051
+ :param limit:
1052
+ :type limit: int
1053
+ :param offset:
1054
+ :type offset: int
1055
+ :param _request_timeout: timeout setting for this request. If one
1056
+ number provided, it will be total request
1057
+ timeout. It can also be a pair (tuple) of
1058
+ (connection, read) timeouts.
1059
+ :type _request_timeout: int, tuple(int, int), optional
1060
+ :param _request_auth: set to override the auth_settings for an a single
1061
+ request; this effectively ignores the
1062
+ authentication in the spec for a single request.
1063
+ :type _request_auth: dict, optional
1064
+ :param _content_type: force content-type for the request.
1065
+ :type _content_type: str, Optional
1066
+ :param _headers: set to override the headers for a single
1067
+ request; this effectively ignores the headers
1068
+ in the spec for a single request.
1069
+ :type _headers: dict, optional
1070
+ :param _host_index: set to override the host_index for a single
1071
+ request; this effectively ignores the host_index
1072
+ in the spec for a single request.
1073
+ :type _host_index: int, optional
1074
+ :return: Returns the result object.
1075
+ """ # noqa: E501
1076
+
1077
+ _param = self._api_v1_workers_worker_id_runs_run_rid_events_get_serialize(
1078
+ run_rid=run_rid,
1079
+ worker_id=worker_id,
1080
+ limit=limit,
1081
+ offset=offset,
1082
+ _request_auth=_request_auth,
1083
+ _content_type=_content_type,
1084
+ _headers=_headers,
1085
+ _host_index=_host_index
1086
+ )
1087
+
1088
+ _response_types_map: Dict[str, Optional[str]] = {
1089
+ '200': "GetWorkerEventsResponse",
1090
+ }
1091
+ response_data = self.api_client.call_api(
1092
+ *_param,
1093
+ _request_timeout=_request_timeout
1094
+ )
1095
+ return response_data.response
1096
+
1097
+
1098
+ def _api_v1_workers_worker_id_runs_run_rid_events_get_serialize(
1099
+ self,
1100
+ run_rid,
1101
+ worker_id,
1102
+ limit,
1103
+ offset,
1104
+ _request_auth,
1105
+ _content_type,
1106
+ _headers,
1107
+ _host_index,
1108
+ ) -> RequestSerialized:
1109
+
1110
+ _host = None
1111
+
1112
+ _collection_formats: Dict[str, str] = {
1113
+ }
1114
+
1115
+ _path_params: Dict[str, str] = {}
1116
+ _query_params: List[Tuple[str, str]] = []
1117
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1118
+ _form_params: List[Tuple[str, str]] = []
1119
+ _files: Dict[
1120
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1121
+ ] = {}
1122
+ _body_params: Optional[bytes] = None
1123
+
1124
+ # process the path parameters
1125
+ if run_rid is not None:
1126
+ _path_params['runRid'] = run_rid
1127
+ if worker_id is not None:
1128
+ _path_params['workerId'] = worker_id
1129
+ # process the query parameters
1130
+ if limit is not None:
1131
+
1132
+ _query_params.append(('limit', limit))
1133
+
1134
+ if offset is not None:
1135
+
1136
+ _query_params.append(('offset', offset))
1137
+
1138
+ # process the header parameters
1139
+ # process the form parameters
1140
+ # process the body parameter
1141
+
1142
+
1143
+ # set the HTTP header `Accept`
1144
+ if 'Accept' not in _header_params:
1145
+ _header_params['Accept'] = self.api_client.select_header_accept(
1146
+ [
1147
+ 'application/json'
1148
+ ]
1149
+ )
1150
+
1151
+
1152
+ # authentication setting
1153
+ _auth_settings: List[str] = [
1154
+ ]
1155
+
1156
+ return self.api_client.param_serialize(
1157
+ method='GET',
1158
+ resource_path='/api/v1/workers/{workerId}/runs/{runRid}/events',
1159
+ path_params=_path_params,
1160
+ query_params=_query_params,
1161
+ header_params=_header_params,
1162
+ body=_body_params,
1163
+ post_params=_form_params,
1164
+ files=_files,
1165
+ auth_settings=_auth_settings,
1166
+ collection_formats=_collection_formats,
1167
+ _host=_host,
1168
+ _request_auth=_request_auth
1169
+ )
1170
+
1171
+
1172
+
1173
+
1174
+ @validate_call
1175
+ def api_v1_workers_worker_id_runs_run_rid_resume_post(
1176
+ self,
1177
+ run_rid: StrictStr,
1178
+ worker_id: StrictStr,
1179
+ post_worker_run_request: PostWorkerRunRequest,
1180
+ _request_timeout: Union[
1181
+ None,
1182
+ Annotated[StrictFloat, Field(gt=0)],
1183
+ Tuple[
1184
+ Annotated[StrictFloat, Field(gt=0)],
1185
+ Annotated[StrictFloat, Field(gt=0)]
1186
+ ]
1187
+ ] = None,
1188
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1189
+ _content_type: Optional[StrictStr] = None,
1190
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1191
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1192
+ ) -> object:
1193
+ """Post Resume Run
1194
+
1195
+
1196
+ :param run_rid: (required)
1197
+ :type run_rid: str
1198
+ :param worker_id: (required)
1199
+ :type worker_id: str
1200
+ :param post_worker_run_request: (required)
1201
+ :type post_worker_run_request: PostWorkerRunRequest
1202
+ :param _request_timeout: timeout setting for this request. If one
1203
+ number provided, it will be total request
1204
+ timeout. It can also be a pair (tuple) of
1205
+ (connection, read) timeouts.
1206
+ :type _request_timeout: int, tuple(int, int), optional
1207
+ :param _request_auth: set to override the auth_settings for an a single
1208
+ request; this effectively ignores the
1209
+ authentication in the spec for a single request.
1210
+ :type _request_auth: dict, optional
1211
+ :param _content_type: force content-type for the request.
1212
+ :type _content_type: str, Optional
1213
+ :param _headers: set to override the headers for a single
1214
+ request; this effectively ignores the headers
1215
+ in the spec for a single request.
1216
+ :type _headers: dict, optional
1217
+ :param _host_index: set to override the host_index for a single
1218
+ request; this effectively ignores the host_index
1219
+ in the spec for a single request.
1220
+ :type _host_index: int, optional
1221
+ :return: Returns the result object.
1222
+ """ # noqa: E501
1223
+
1224
+ _param = self._api_v1_workers_worker_id_runs_run_rid_resume_post_serialize(
1225
+ run_rid=run_rid,
1226
+ worker_id=worker_id,
1227
+ post_worker_run_request=post_worker_run_request,
1228
+ _request_auth=_request_auth,
1229
+ _content_type=_content_type,
1230
+ _headers=_headers,
1231
+ _host_index=_host_index
1232
+ )
1233
+
1234
+ _response_types_map: Dict[str, Optional[str]] = {
1235
+ '200': "object",
1236
+ '400': None,
1237
+ }
1238
+ response_data = self.api_client.call_api(
1239
+ *_param,
1240
+ _request_timeout=_request_timeout
1241
+ )
1242
+ response_data.read()
1243
+ return self.api_client.response_deserialize(
1244
+ response_data=response_data,
1245
+ response_types_map=_response_types_map,
1246
+ ).data
1247
+
1248
+
1249
+ @validate_call
1250
+ def api_v1_workers_worker_id_runs_run_rid_resume_post_with_http_info(
1251
+ self,
1252
+ run_rid: StrictStr,
1253
+ worker_id: StrictStr,
1254
+ post_worker_run_request: PostWorkerRunRequest,
1255
+ _request_timeout: Union[
1256
+ None,
1257
+ Annotated[StrictFloat, Field(gt=0)],
1258
+ Tuple[
1259
+ Annotated[StrictFloat, Field(gt=0)],
1260
+ Annotated[StrictFloat, Field(gt=0)]
1261
+ ]
1262
+ ] = None,
1263
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1264
+ _content_type: Optional[StrictStr] = None,
1265
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1266
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1267
+ ) -> ApiResponse[object]:
1268
+ """Post Resume Run
1269
+
1270
+
1271
+ :param run_rid: (required)
1272
+ :type run_rid: str
1273
+ :param worker_id: (required)
1274
+ :type worker_id: str
1275
+ :param post_worker_run_request: (required)
1276
+ :type post_worker_run_request: PostWorkerRunRequest
1277
+ :param _request_timeout: timeout setting for this request. If one
1278
+ number provided, it will be total request
1279
+ timeout. It can also be a pair (tuple) of
1280
+ (connection, read) timeouts.
1281
+ :type _request_timeout: int, tuple(int, int), optional
1282
+ :param _request_auth: set to override the auth_settings for an a single
1283
+ request; this effectively ignores the
1284
+ authentication in the spec for a single request.
1285
+ :type _request_auth: dict, optional
1286
+ :param _content_type: force content-type for the request.
1287
+ :type _content_type: str, Optional
1288
+ :param _headers: set to override the headers for a single
1289
+ request; this effectively ignores the headers
1290
+ in the spec for a single request.
1291
+ :type _headers: dict, optional
1292
+ :param _host_index: set to override the host_index for a single
1293
+ request; this effectively ignores the host_index
1294
+ in the spec for a single request.
1295
+ :type _host_index: int, optional
1296
+ :return: Returns the result object.
1297
+ """ # noqa: E501
1298
+
1299
+ _param = self._api_v1_workers_worker_id_runs_run_rid_resume_post_serialize(
1300
+ run_rid=run_rid,
1301
+ worker_id=worker_id,
1302
+ post_worker_run_request=post_worker_run_request,
1303
+ _request_auth=_request_auth,
1304
+ _content_type=_content_type,
1305
+ _headers=_headers,
1306
+ _host_index=_host_index
1307
+ )
1308
+
1309
+ _response_types_map: Dict[str, Optional[str]] = {
1310
+ '200': "object",
1311
+ '400': None,
1312
+ }
1313
+ response_data = self.api_client.call_api(
1314
+ *_param,
1315
+ _request_timeout=_request_timeout
1316
+ )
1317
+ response_data.read()
1318
+ return self.api_client.response_deserialize(
1319
+ response_data=response_data,
1320
+ response_types_map=_response_types_map,
1321
+ )
1322
+
1323
+
1324
+ @validate_call
1325
+ def api_v1_workers_worker_id_runs_run_rid_resume_post_without_preload_content(
1326
+ self,
1327
+ run_rid: StrictStr,
1328
+ worker_id: StrictStr,
1329
+ post_worker_run_request: PostWorkerRunRequest,
1330
+ _request_timeout: Union[
1331
+ None,
1332
+ Annotated[StrictFloat, Field(gt=0)],
1333
+ Tuple[
1334
+ Annotated[StrictFloat, Field(gt=0)],
1335
+ Annotated[StrictFloat, Field(gt=0)]
1336
+ ]
1337
+ ] = None,
1338
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1339
+ _content_type: Optional[StrictStr] = None,
1340
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1341
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1342
+ ) -> RESTResponseType:
1343
+ """Post Resume Run
1344
+
1345
+
1346
+ :param run_rid: (required)
1347
+ :type run_rid: str
1348
+ :param worker_id: (required)
1349
+ :type worker_id: str
1350
+ :param post_worker_run_request: (required)
1351
+ :type post_worker_run_request: PostWorkerRunRequest
1352
+ :param _request_timeout: timeout setting for this request. If one
1353
+ number provided, it will be total request
1354
+ timeout. It can also be a pair (tuple) of
1355
+ (connection, read) timeouts.
1356
+ :type _request_timeout: int, tuple(int, int), optional
1357
+ :param _request_auth: set to override the auth_settings for an a single
1358
+ request; this effectively ignores the
1359
+ authentication in the spec for a single request.
1360
+ :type _request_auth: dict, optional
1361
+ :param _content_type: force content-type for the request.
1362
+ :type _content_type: str, Optional
1363
+ :param _headers: set to override the headers for a single
1364
+ request; this effectively ignores the headers
1365
+ in the spec for a single request.
1366
+ :type _headers: dict, optional
1367
+ :param _host_index: set to override the host_index for a single
1368
+ request; this effectively ignores the host_index
1369
+ in the spec for a single request.
1370
+ :type _host_index: int, optional
1371
+ :return: Returns the result object.
1372
+ """ # noqa: E501
1373
+
1374
+ _param = self._api_v1_workers_worker_id_runs_run_rid_resume_post_serialize(
1375
+ run_rid=run_rid,
1376
+ worker_id=worker_id,
1377
+ post_worker_run_request=post_worker_run_request,
1378
+ _request_auth=_request_auth,
1379
+ _content_type=_content_type,
1380
+ _headers=_headers,
1381
+ _host_index=_host_index
1382
+ )
1383
+
1384
+ _response_types_map: Dict[str, Optional[str]] = {
1385
+ '200': "object",
1386
+ '400': None,
1387
+ }
1388
+ response_data = self.api_client.call_api(
1389
+ *_param,
1390
+ _request_timeout=_request_timeout
1391
+ )
1392
+ return response_data.response
1393
+
1394
+
1395
+ def _api_v1_workers_worker_id_runs_run_rid_resume_post_serialize(
1396
+ self,
1397
+ run_rid,
1398
+ worker_id,
1399
+ post_worker_run_request,
1400
+ _request_auth,
1401
+ _content_type,
1402
+ _headers,
1403
+ _host_index,
1404
+ ) -> RequestSerialized:
1405
+
1406
+ _host = None
1407
+
1408
+ _collection_formats: Dict[str, str] = {
1409
+ }
1410
+
1411
+ _path_params: Dict[str, str] = {}
1412
+ _query_params: List[Tuple[str, str]] = []
1413
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1414
+ _form_params: List[Tuple[str, str]] = []
1415
+ _files: Dict[
1416
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1417
+ ] = {}
1418
+ _body_params: Optional[bytes] = None
1419
+
1420
+ # process the path parameters
1421
+ if run_rid is not None:
1422
+ _path_params['runRid'] = run_rid
1423
+ if worker_id is not None:
1424
+ _path_params['workerId'] = worker_id
1425
+ # process the query parameters
1426
+ # process the header parameters
1427
+ # process the form parameters
1428
+ # process the body parameter
1429
+ if post_worker_run_request is not None:
1430
+ _body_params = post_worker_run_request
1431
+
1432
+
1433
+ # set the HTTP header `Accept`
1434
+ if 'Accept' not in _header_params:
1435
+ _header_params['Accept'] = self.api_client.select_header_accept(
1436
+ [
1437
+ 'application/json'
1438
+ ]
1439
+ )
1440
+
1441
+ # set the HTTP header `Content-Type`
1442
+ if _content_type:
1443
+ _header_params['Content-Type'] = _content_type
1444
+ else:
1445
+ _default_content_type = (
1446
+ self.api_client.select_header_content_type(
1447
+ [
1448
+ 'application/json'
1449
+ ]
1450
+ )
1451
+ )
1452
+ if _default_content_type is not None:
1453
+ _header_params['Content-Type'] = _default_content_type
1454
+
1455
+ # authentication setting
1456
+ _auth_settings: List[str] = [
1457
+ ]
1458
+
1459
+ return self.api_client.param_serialize(
1460
+ method='POST',
1461
+ resource_path='/api/v1/workers/{workerId}/runs/{runRid}/resume',
1462
+ path_params=_path_params,
1463
+ query_params=_query_params,
1464
+ header_params=_header_params,
1465
+ body=_body_params,
1466
+ post_params=_form_params,
1467
+ files=_files,
1468
+ auth_settings=_auth_settings,
1469
+ collection_formats=_collection_formats,
1470
+ _host=_host,
1471
+ _request_auth=_request_auth
1472
+ )
1473
+
1474
+
1475
+
1476
+
1477
+ @validate_call
1478
+ def api_v1_workers_worker_id_runs_run_rid_status_get(
1479
+ self,
1480
+ run_rid: StrictStr,
1481
+ worker_id: StrictStr,
1482
+ _request_timeout: Union[
1483
+ None,
1484
+ Annotated[StrictFloat, Field(gt=0)],
1485
+ Tuple[
1486
+ Annotated[StrictFloat, Field(gt=0)],
1487
+ Annotated[StrictFloat, Field(gt=0)]
1488
+ ]
1489
+ ] = None,
1490
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1491
+ _content_type: Optional[StrictStr] = None,
1492
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1493
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1494
+ ) -> GetWorkerStatusResponse:
1495
+ """Get Worker Run Status
1496
+
1497
+
1498
+ :param run_rid: (required)
1499
+ :type run_rid: str
1500
+ :param worker_id: (required)
1501
+ :type worker_id: str
1502
+ :param _request_timeout: timeout setting for this request. If one
1503
+ number provided, it will be total request
1504
+ timeout. It can also be a pair (tuple) of
1505
+ (connection, read) timeouts.
1506
+ :type _request_timeout: int, tuple(int, int), optional
1507
+ :param _request_auth: set to override the auth_settings for an a single
1508
+ request; this effectively ignores the
1509
+ authentication in the spec for a single request.
1510
+ :type _request_auth: dict, optional
1511
+ :param _content_type: force content-type for the request.
1512
+ :type _content_type: str, Optional
1513
+ :param _headers: set to override the headers for a single
1514
+ request; this effectively ignores the headers
1515
+ in the spec for a single request.
1516
+ :type _headers: dict, optional
1517
+ :param _host_index: set to override the host_index for a single
1518
+ request; this effectively ignores the host_index
1519
+ in the spec for a single request.
1520
+ :type _host_index: int, optional
1521
+ :return: Returns the result object.
1522
+ """ # noqa: E501
1523
+
1524
+ _param = self._api_v1_workers_worker_id_runs_run_rid_status_get_serialize(
1525
+ run_rid=run_rid,
1526
+ worker_id=worker_id,
1527
+ _request_auth=_request_auth,
1528
+ _content_type=_content_type,
1529
+ _headers=_headers,
1530
+ _host_index=_host_index
1531
+ )
1532
+
1533
+ _response_types_map: Dict[str, Optional[str]] = {
1534
+ '200': "GetWorkerStatusResponse",
1535
+ }
1536
+ response_data = self.api_client.call_api(
1537
+ *_param,
1538
+ _request_timeout=_request_timeout
1539
+ )
1540
+ response_data.read()
1541
+ return self.api_client.response_deserialize(
1542
+ response_data=response_data,
1543
+ response_types_map=_response_types_map,
1544
+ ).data
1545
+
1546
+
1547
+ @validate_call
1548
+ def api_v1_workers_worker_id_runs_run_rid_status_get_with_http_info(
1549
+ self,
1550
+ run_rid: StrictStr,
1551
+ worker_id: StrictStr,
1552
+ _request_timeout: Union[
1553
+ None,
1554
+ Annotated[StrictFloat, Field(gt=0)],
1555
+ Tuple[
1556
+ Annotated[StrictFloat, Field(gt=0)],
1557
+ Annotated[StrictFloat, Field(gt=0)]
1558
+ ]
1559
+ ] = None,
1560
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1561
+ _content_type: Optional[StrictStr] = None,
1562
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1563
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1564
+ ) -> ApiResponse[GetWorkerStatusResponse]:
1565
+ """Get Worker Run Status
1566
+
1567
+
1568
+ :param run_rid: (required)
1569
+ :type run_rid: str
1570
+ :param worker_id: (required)
1571
+ :type worker_id: str
1572
+ :param _request_timeout: timeout setting for this request. If one
1573
+ number provided, it will be total request
1574
+ timeout. It can also be a pair (tuple) of
1575
+ (connection, read) timeouts.
1576
+ :type _request_timeout: int, tuple(int, int), optional
1577
+ :param _request_auth: set to override the auth_settings for an a single
1578
+ request; this effectively ignores the
1579
+ authentication in the spec for a single request.
1580
+ :type _request_auth: dict, optional
1581
+ :param _content_type: force content-type for the request.
1582
+ :type _content_type: str, Optional
1583
+ :param _headers: set to override the headers for a single
1584
+ request; this effectively ignores the headers
1585
+ in the spec for a single request.
1586
+ :type _headers: dict, optional
1587
+ :param _host_index: set to override the host_index for a single
1588
+ request; this effectively ignores the host_index
1589
+ in the spec for a single request.
1590
+ :type _host_index: int, optional
1591
+ :return: Returns the result object.
1592
+ """ # noqa: E501
1593
+
1594
+ _param = self._api_v1_workers_worker_id_runs_run_rid_status_get_serialize(
1595
+ run_rid=run_rid,
1596
+ worker_id=worker_id,
1597
+ _request_auth=_request_auth,
1598
+ _content_type=_content_type,
1599
+ _headers=_headers,
1600
+ _host_index=_host_index
1601
+ )
1602
+
1603
+ _response_types_map: Dict[str, Optional[str]] = {
1604
+ '200': "GetWorkerStatusResponse",
1605
+ }
1606
+ response_data = self.api_client.call_api(
1607
+ *_param,
1608
+ _request_timeout=_request_timeout
1609
+ )
1610
+ response_data.read()
1611
+ return self.api_client.response_deserialize(
1612
+ response_data=response_data,
1613
+ response_types_map=_response_types_map,
1614
+ )
1615
+
1616
+
1617
+ @validate_call
1618
+ def api_v1_workers_worker_id_runs_run_rid_status_get_without_preload_content(
1619
+ self,
1620
+ run_rid: StrictStr,
1621
+ worker_id: StrictStr,
1622
+ _request_timeout: Union[
1623
+ None,
1624
+ Annotated[StrictFloat, Field(gt=0)],
1625
+ Tuple[
1626
+ Annotated[StrictFloat, Field(gt=0)],
1627
+ Annotated[StrictFloat, Field(gt=0)]
1628
+ ]
1629
+ ] = None,
1630
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1631
+ _content_type: Optional[StrictStr] = None,
1632
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1633
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1634
+ ) -> RESTResponseType:
1635
+ """Get Worker Run Status
1636
+
1637
+
1638
+ :param run_rid: (required)
1639
+ :type run_rid: str
1640
+ :param worker_id: (required)
1641
+ :type worker_id: str
1642
+ :param _request_timeout: timeout setting for this request. If one
1643
+ number provided, it will be total request
1644
+ timeout. It can also be a pair (tuple) of
1645
+ (connection, read) timeouts.
1646
+ :type _request_timeout: int, tuple(int, int), optional
1647
+ :param _request_auth: set to override the auth_settings for an a single
1648
+ request; this effectively ignores the
1649
+ authentication in the spec for a single request.
1650
+ :type _request_auth: dict, optional
1651
+ :param _content_type: force content-type for the request.
1652
+ :type _content_type: str, Optional
1653
+ :param _headers: set to override the headers for a single
1654
+ request; this effectively ignores the headers
1655
+ in the spec for a single request.
1656
+ :type _headers: dict, optional
1657
+ :param _host_index: set to override the host_index for a single
1658
+ request; this effectively ignores the host_index
1659
+ in the spec for a single request.
1660
+ :type _host_index: int, optional
1661
+ :return: Returns the result object.
1662
+ """ # noqa: E501
1663
+
1664
+ _param = self._api_v1_workers_worker_id_runs_run_rid_status_get_serialize(
1665
+ run_rid=run_rid,
1666
+ worker_id=worker_id,
1667
+ _request_auth=_request_auth,
1668
+ _content_type=_content_type,
1669
+ _headers=_headers,
1670
+ _host_index=_host_index
1671
+ )
1672
+
1673
+ _response_types_map: Dict[str, Optional[str]] = {
1674
+ '200': "GetWorkerStatusResponse",
1675
+ }
1676
+ response_data = self.api_client.call_api(
1677
+ *_param,
1678
+ _request_timeout=_request_timeout
1679
+ )
1680
+ return response_data.response
1681
+
1682
+
1683
+ def _api_v1_workers_worker_id_runs_run_rid_status_get_serialize(
1684
+ self,
1685
+ run_rid,
1686
+ worker_id,
1687
+ _request_auth,
1688
+ _content_type,
1689
+ _headers,
1690
+ _host_index,
1691
+ ) -> RequestSerialized:
1692
+
1693
+ _host = None
1694
+
1695
+ _collection_formats: Dict[str, str] = {
1696
+ }
1697
+
1698
+ _path_params: Dict[str, str] = {}
1699
+ _query_params: List[Tuple[str, str]] = []
1700
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1701
+ _form_params: List[Tuple[str, str]] = []
1702
+ _files: Dict[
1703
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1704
+ ] = {}
1705
+ _body_params: Optional[bytes] = None
1706
+
1707
+ # process the path parameters
1708
+ if run_rid is not None:
1709
+ _path_params['runRid'] = run_rid
1710
+ if worker_id is not None:
1711
+ _path_params['workerId'] = worker_id
1712
+ # process the query parameters
1713
+ # process the header parameters
1714
+ # process the form parameters
1715
+ # process the body parameter
1716
+
1717
+
1718
+ # set the HTTP header `Accept`
1719
+ if 'Accept' not in _header_params:
1720
+ _header_params['Accept'] = self.api_client.select_header_accept(
1721
+ [
1722
+ 'application/json'
1723
+ ]
1724
+ )
1725
+
1726
+
1727
+ # authentication setting
1728
+ _auth_settings: List[str] = [
1729
+ ]
1730
+
1731
+ return self.api_client.param_serialize(
1732
+ method='GET',
1733
+ resource_path='/api/v1/workers/{workerId}/runs/{runRid}/status',
1734
+ path_params=_path_params,
1735
+ query_params=_query_params,
1736
+ header_params=_header_params,
1737
+ body=_body_params,
1738
+ post_params=_form_params,
1739
+ files=_files,
1740
+ auth_settings=_auth_settings,
1741
+ collection_formats=_collection_formats,
1742
+ _host=_host,
1743
+ _request_auth=_request_auth
1744
+ )
1745
+
1746
+