hatchet-sdk 0.0.1 → 0.1.0.pre.alpha

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.
Files changed (443) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -2
  3. data/CLAUDE.md +20 -0
  4. data/INTEGRATION_TESTING.md +176 -0
  5. data/LICENSE.txt +1 -1
  6. data/REST_API_GENERATION.md +257 -0
  7. data/Rakefile +9 -0
  8. data/Rakefile.rest +133 -0
  9. data/config/openapi_generator_config.json +31 -0
  10. data/lib/hatchet/clients/rest/.gitignore +39 -0
  11. data/lib/hatchet/clients/rest/.gitlab-ci.yml +26 -0
  12. data/lib/hatchet/clients/rest/.openapi-generator/FILES +420 -0
  13. data/lib/hatchet/clients/rest/.openapi-generator/VERSION +1 -0
  14. data/lib/hatchet/clients/rest/.openapi-generator-ignore +23 -0
  15. data/lib/hatchet/clients/rest/.rspec +2 -0
  16. data/lib/hatchet/clients/rest/.rubocop.yml +148 -0
  17. data/lib/hatchet/clients/rest/.travis.yml +11 -0
  18. data/lib/hatchet/clients/rest/Gemfile +9 -0
  19. data/lib/hatchet/clients/rest/README.md +420 -0
  20. data/lib/hatchet/clients/rest/Rakefile +10 -0
  21. data/lib/hatchet/clients/rest/docs/APIError.md +24 -0
  22. data/lib/hatchet/clients/rest/docs/APIErrors.md +18 -0
  23. data/lib/hatchet/clients/rest/docs/APIMeta.md +30 -0
  24. data/lib/hatchet/clients/rest/docs/APIMetaAuth.md +18 -0
  25. data/lib/hatchet/clients/rest/docs/APIMetaIntegration.md +20 -0
  26. data/lib/hatchet/clients/rest/docs/APIMetaPosthog.md +20 -0
  27. data/lib/hatchet/clients/rest/docs/APIResourceMeta.md +22 -0
  28. data/lib/hatchet/clients/rest/docs/APIToken.md +22 -0
  29. data/lib/hatchet/clients/rest/docs/APITokenApi.md +235 -0
  30. data/lib/hatchet/clients/rest/docs/AcceptInviteRequest.md +18 -0
  31. data/lib/hatchet/clients/rest/docs/BulkCreateEventRequest.md +18 -0
  32. data/lib/hatchet/clients/rest/docs/CancelEventRequest.md +18 -0
  33. data/lib/hatchet/clients/rest/docs/ConcurrencyLimitStrategy.md +15 -0
  34. data/lib/hatchet/clients/rest/docs/CreateAPITokenRequest.md +20 -0
  35. data/lib/hatchet/clients/rest/docs/CreateAPITokenResponse.md +18 -0
  36. data/lib/hatchet/clients/rest/docs/CreateCronWorkflowTriggerRequest.md +26 -0
  37. data/lib/hatchet/clients/rest/docs/CreateEventRequest.md +26 -0
  38. data/lib/hatchet/clients/rest/docs/CreatePullRequestFromStepRun.md +18 -0
  39. data/lib/hatchet/clients/rest/docs/CreateSNSIntegrationRequest.md +18 -0
  40. data/lib/hatchet/clients/rest/docs/CreateTenantAlertEmailGroupRequest.md +18 -0
  41. data/lib/hatchet/clients/rest/docs/CreateTenantInviteRequest.md +20 -0
  42. data/lib/hatchet/clients/rest/docs/CreateTenantRequest.md +24 -0
  43. data/lib/hatchet/clients/rest/docs/CronWorkflows.md +40 -0
  44. data/lib/hatchet/clients/rest/docs/CronWorkflowsList.md +20 -0
  45. data/lib/hatchet/clients/rest/docs/CronWorkflowsMethod.md +15 -0
  46. data/lib/hatchet/clients/rest/docs/CronWorkflowsOrderByField.md +15 -0
  47. data/lib/hatchet/clients/rest/docs/DefaultApi.md +602 -0
  48. data/lib/hatchet/clients/rest/docs/Event.md +28 -0
  49. data/lib/hatchet/clients/rest/docs/EventApi.md +809 -0
  50. data/lib/hatchet/clients/rest/docs/EventData.md +18 -0
  51. data/lib/hatchet/clients/rest/docs/EventKeyList.md +20 -0
  52. data/lib/hatchet/clients/rest/docs/EventList.md +20 -0
  53. data/lib/hatchet/clients/rest/docs/EventOrderByDirection.md +15 -0
  54. data/lib/hatchet/clients/rest/docs/EventOrderByField.md +15 -0
  55. data/lib/hatchet/clients/rest/docs/EventUpdateCancel200Response.md +18 -0
  56. data/lib/hatchet/clients/rest/docs/EventWorkflowRunSummary.md +28 -0
  57. data/lib/hatchet/clients/rest/docs/Events.md +20 -0
  58. data/lib/hatchet/clients/rest/docs/FilterApi.md +402 -0
  59. data/lib/hatchet/clients/rest/docs/GetStepRunDiffResponse.md +18 -0
  60. data/lib/hatchet/clients/rest/docs/GithubApi.md +73 -0
  61. data/lib/hatchet/clients/rest/docs/HealthcheckApi.md +129 -0
  62. data/lib/hatchet/clients/rest/docs/InfoGetVersion200Response.md +18 -0
  63. data/lib/hatchet/clients/rest/docs/Job.md +30 -0
  64. data/lib/hatchet/clients/rest/docs/JobRun.md +48 -0
  65. data/lib/hatchet/clients/rest/docs/JobRunStatus.md +15 -0
  66. data/lib/hatchet/clients/rest/docs/ListAPITokensResponse.md +20 -0
  67. data/lib/hatchet/clients/rest/docs/ListPullRequestsResponse.md +18 -0
  68. data/lib/hatchet/clients/rest/docs/ListSNSIntegrations.md +20 -0
  69. data/lib/hatchet/clients/rest/docs/ListSlackWebhooks.md +20 -0
  70. data/lib/hatchet/clients/rest/docs/LogApi.md +171 -0
  71. data/lib/hatchet/clients/rest/docs/LogLine.md +22 -0
  72. data/lib/hatchet/clients/rest/docs/LogLineLevel.md +15 -0
  73. data/lib/hatchet/clients/rest/docs/LogLineList.md +20 -0
  74. data/lib/hatchet/clients/rest/docs/LogLineOrderByDirection.md +15 -0
  75. data/lib/hatchet/clients/rest/docs/LogLineOrderByField.md +15 -0
  76. data/lib/hatchet/clients/rest/docs/MetadataApi.md +203 -0
  77. data/lib/hatchet/clients/rest/docs/PaginationResponse.md +22 -0
  78. data/lib/hatchet/clients/rest/docs/PullRequest.md +32 -0
  79. data/lib/hatchet/clients/rest/docs/PullRequestState.md +15 -0
  80. data/lib/hatchet/clients/rest/docs/QueueMetrics.md +22 -0
  81. data/lib/hatchet/clients/rest/docs/RateLimit.md +28 -0
  82. data/lib/hatchet/clients/rest/docs/RateLimitList.md +20 -0
  83. data/lib/hatchet/clients/rest/docs/RateLimitOrderByDirection.md +15 -0
  84. data/lib/hatchet/clients/rest/docs/RateLimitOrderByField.md +15 -0
  85. data/lib/hatchet/clients/rest/docs/RateLimitsApi.md +94 -0
  86. data/lib/hatchet/clients/rest/docs/RecentStepRuns.md +30 -0
  87. data/lib/hatchet/clients/rest/docs/RejectInviteRequest.md +18 -0
  88. data/lib/hatchet/clients/rest/docs/ReplayEventRequest.md +18 -0
  89. data/lib/hatchet/clients/rest/docs/ReplayWorkflowRunsRequest.md +18 -0
  90. data/lib/hatchet/clients/rest/docs/ReplayWorkflowRunsResponse.md +18 -0
  91. data/lib/hatchet/clients/rest/docs/RerunStepRunRequest.md +18 -0
  92. data/lib/hatchet/clients/rest/docs/SNSApi.md +235 -0
  93. data/lib/hatchet/clients/rest/docs/SNSIntegration.md +24 -0
  94. data/lib/hatchet/clients/rest/docs/ScheduleWorkflowRunRequest.md +24 -0
  95. data/lib/hatchet/clients/rest/docs/ScheduledRunStatus.md +15 -0
  96. data/lib/hatchet/clients/rest/docs/ScheduledWorkflows.md +44 -0
  97. data/lib/hatchet/clients/rest/docs/ScheduledWorkflowsList.md +20 -0
  98. data/lib/hatchet/clients/rest/docs/ScheduledWorkflowsMethod.md +15 -0
  99. data/lib/hatchet/clients/rest/docs/ScheduledWorkflowsOrderByField.md +15 -0
  100. data/lib/hatchet/clients/rest/docs/SemaphoreSlots.md +28 -0
  101. data/lib/hatchet/clients/rest/docs/SlackApi.md +156 -0
  102. data/lib/hatchet/clients/rest/docs/SlackWebhook.md +28 -0
  103. data/lib/hatchet/clients/rest/docs/Step.md +32 -0
  104. data/lib/hatchet/clients/rest/docs/StepRun.md +68 -0
  105. data/lib/hatchet/clients/rest/docs/StepRunApi.md +560 -0
  106. data/lib/hatchet/clients/rest/docs/StepRunArchive.md +50 -0
  107. data/lib/hatchet/clients/rest/docs/StepRunArchiveList.md +20 -0
  108. data/lib/hatchet/clients/rest/docs/StepRunDiff.md +22 -0
  109. data/lib/hatchet/clients/rest/docs/StepRunEvent.md +36 -0
  110. data/lib/hatchet/clients/rest/docs/StepRunEventList.md +20 -0
  111. data/lib/hatchet/clients/rest/docs/StepRunEventReason.md +15 -0
  112. data/lib/hatchet/clients/rest/docs/StepRunEventSeverity.md +15 -0
  113. data/lib/hatchet/clients/rest/docs/StepRunStatus.md +15 -0
  114. data/lib/hatchet/clients/rest/docs/TaskApi.md +566 -0
  115. data/lib/hatchet/clients/rest/docs/Tenant.md +30 -0
  116. data/lib/hatchet/clients/rest/docs/TenantAlertEmailGroup.md +20 -0
  117. data/lib/hatchet/clients/rest/docs/TenantAlertEmailGroupList.md +20 -0
  118. data/lib/hatchet/clients/rest/docs/TenantAlertingSettings.md +30 -0
  119. data/lib/hatchet/clients/rest/docs/TenantApi.md +1362 -0
  120. data/lib/hatchet/clients/rest/docs/TenantInvite.md +28 -0
  121. data/lib/hatchet/clients/rest/docs/TenantInviteList.md +20 -0
  122. data/lib/hatchet/clients/rest/docs/TenantList.md +20 -0
  123. data/lib/hatchet/clients/rest/docs/TenantMember.md +24 -0
  124. data/lib/hatchet/clients/rest/docs/TenantMemberList.md +20 -0
  125. data/lib/hatchet/clients/rest/docs/TenantMemberRole.md +15 -0
  126. data/lib/hatchet/clients/rest/docs/TenantQueueMetrics.md +22 -0
  127. data/lib/hatchet/clients/rest/docs/TenantResource.md +15 -0
  128. data/lib/hatchet/clients/rest/docs/TenantResourceLimit.md +30 -0
  129. data/lib/hatchet/clients/rest/docs/TenantResourcePolicy.md +18 -0
  130. data/lib/hatchet/clients/rest/docs/TenantStepRunQueueMetrics.md +18 -0
  131. data/lib/hatchet/clients/rest/docs/TenantUIVersion.md +15 -0
  132. data/lib/hatchet/clients/rest/docs/TenantVersion.md +15 -0
  133. data/lib/hatchet/clients/rest/docs/TriggerWorkflowRunRequest.md +20 -0
  134. data/lib/hatchet/clients/rest/docs/UpdateTenantAlertEmailGroupRequest.md +18 -0
  135. data/lib/hatchet/clients/rest/docs/UpdateTenantInviteRequest.md +18 -0
  136. data/lib/hatchet/clients/rest/docs/UpdateTenantRequest.md +34 -0
  137. data/lib/hatchet/clients/rest/docs/UpdateWorkerRequest.md +18 -0
  138. data/lib/hatchet/clients/rest/docs/User.md +28 -0
  139. data/lib/hatchet/clients/rest/docs/UserApi.md +805 -0
  140. data/lib/hatchet/clients/rest/docs/UserChangePasswordRequest.md +20 -0
  141. data/lib/hatchet/clients/rest/docs/UserLoginRequest.md +20 -0
  142. data/lib/hatchet/clients/rest/docs/UserRegisterRequest.md +22 -0
  143. data/lib/hatchet/clients/rest/docs/UserTenantMembershipsList.md +20 -0
  144. data/lib/hatchet/clients/rest/docs/UserTenantPublic.md +20 -0
  145. data/lib/hatchet/clients/rest/docs/V1CancelTaskRequest.md +20 -0
  146. data/lib/hatchet/clients/rest/docs/V1CancelledTasks.md +18 -0
  147. data/lib/hatchet/clients/rest/docs/V1CreateFilterRequest.md +24 -0
  148. data/lib/hatchet/clients/rest/docs/V1DagChildren.md +20 -0
  149. data/lib/hatchet/clients/rest/docs/V1Event.md +36 -0
  150. data/lib/hatchet/clients/rest/docs/V1EventList.md +20 -0
  151. data/lib/hatchet/clients/rest/docs/V1EventTriggeredRun.md +20 -0
  152. data/lib/hatchet/clients/rest/docs/V1EventWorkflowRunSummary.md +26 -0
  153. data/lib/hatchet/clients/rest/docs/V1Filter.md +28 -0
  154. data/lib/hatchet/clients/rest/docs/V1FilterList.md +20 -0
  155. data/lib/hatchet/clients/rest/docs/V1LogLine.md +28 -0
  156. data/lib/hatchet/clients/rest/docs/V1LogLineLevel.md +15 -0
  157. data/lib/hatchet/clients/rest/docs/V1LogLineList.md +20 -0
  158. data/lib/hatchet/clients/rest/docs/V1ReplayTaskRequest.md +20 -0
  159. data/lib/hatchet/clients/rest/docs/V1ReplayedTasks.md +18 -0
  160. data/lib/hatchet/clients/rest/docs/V1TaskEvent.md +38 -0
  161. data/lib/hatchet/clients/rest/docs/V1TaskEventList.md +20 -0
  162. data/lib/hatchet/clients/rest/docs/V1TaskEventType.md +15 -0
  163. data/lib/hatchet/clients/rest/docs/V1TaskFilter.md +26 -0
  164. data/lib/hatchet/clients/rest/docs/V1TaskPointMetric.md +22 -0
  165. data/lib/hatchet/clients/rest/docs/V1TaskPointMetrics.md +18 -0
  166. data/lib/hatchet/clients/rest/docs/V1TaskRunMetric.md +20 -0
  167. data/lib/hatchet/clients/rest/docs/V1TaskRunStatus.md +15 -0
  168. data/lib/hatchet/clients/rest/docs/V1TaskStatus.md +15 -0
  169. data/lib/hatchet/clients/rest/docs/V1TaskSummary.md +72 -0
  170. data/lib/hatchet/clients/rest/docs/V1TaskSummaryList.md +20 -0
  171. data/lib/hatchet/clients/rest/docs/V1TaskTiming.md +46 -0
  172. data/lib/hatchet/clients/rest/docs/V1TaskTimingList.md +20 -0
  173. data/lib/hatchet/clients/rest/docs/V1TriggerWorkflowRunRequest.md +24 -0
  174. data/lib/hatchet/clients/rest/docs/V1UpdateFilterRequest.md +22 -0
  175. data/lib/hatchet/clients/rest/docs/V1WorkflowRun.md +46 -0
  176. data/lib/hatchet/clients/rest/docs/V1WorkflowRunDetails.md +26 -0
  177. data/lib/hatchet/clients/rest/docs/V1WorkflowRunDisplayName.md +20 -0
  178. data/lib/hatchet/clients/rest/docs/V1WorkflowRunDisplayNameList.md +20 -0
  179. data/lib/hatchet/clients/rest/docs/V1WorkflowType.md +15 -0
  180. data/lib/hatchet/clients/rest/docs/WebhookWorker.md +22 -0
  181. data/lib/hatchet/clients/rest/docs/WebhookWorkerCreateRequest.md +22 -0
  182. data/lib/hatchet/clients/rest/docs/WebhookWorkerCreateResponse.md +18 -0
  183. data/lib/hatchet/clients/rest/docs/WebhookWorkerCreated.md +24 -0
  184. data/lib/hatchet/clients/rest/docs/WebhookWorkerListResponse.md +20 -0
  185. data/lib/hatchet/clients/rest/docs/WebhookWorkerRequest.md +22 -0
  186. data/lib/hatchet/clients/rest/docs/WebhookWorkerRequestListResponse.md +18 -0
  187. data/lib/hatchet/clients/rest/docs/WebhookWorkerRequestMethod.md +15 -0
  188. data/lib/hatchet/clients/rest/docs/Worker.md +48 -0
  189. data/lib/hatchet/clients/rest/docs/WorkerApi.md +234 -0
  190. data/lib/hatchet/clients/rest/docs/WorkerLabel.md +22 -0
  191. data/lib/hatchet/clients/rest/docs/WorkerList.md +20 -0
  192. data/lib/hatchet/clients/rest/docs/WorkerRuntimeInfo.md +26 -0
  193. data/lib/hatchet/clients/rest/docs/WorkerRuntimeSDKs.md +15 -0
  194. data/lib/hatchet/clients/rest/docs/WorkerType.md +15 -0
  195. data/lib/hatchet/clients/rest/docs/Workflow.md +32 -0
  196. data/lib/hatchet/clients/rest/docs/WorkflowApi.md +1480 -0
  197. data/lib/hatchet/clients/rest/docs/WorkflowConcurrency.md +22 -0
  198. data/lib/hatchet/clients/rest/docs/WorkflowKind.md +15 -0
  199. data/lib/hatchet/clients/rest/docs/WorkflowList.md +22 -0
  200. data/lib/hatchet/clients/rest/docs/WorkflowMetrics.md +20 -0
  201. data/lib/hatchet/clients/rest/docs/WorkflowRun.md +48 -0
  202. data/lib/hatchet/clients/rest/docs/WorkflowRunApi.md +477 -0
  203. data/lib/hatchet/clients/rest/docs/WorkflowRunList.md +20 -0
  204. data/lib/hatchet/clients/rest/docs/WorkflowRunOrderByDirection.md +15 -0
  205. data/lib/hatchet/clients/rest/docs/WorkflowRunOrderByField.md +15 -0
  206. data/lib/hatchet/clients/rest/docs/WorkflowRunShape.md +50 -0
  207. data/lib/hatchet/clients/rest/docs/WorkflowRunShapeItemForWorkflowRunDetails.md +24 -0
  208. data/lib/hatchet/clients/rest/docs/WorkflowRunStatus.md +15 -0
  209. data/lib/hatchet/clients/rest/docs/WorkflowRunTriggeredBy.md +26 -0
  210. data/lib/hatchet/clients/rest/docs/WorkflowRunsApi.md +572 -0
  211. data/lib/hatchet/clients/rest/docs/WorkflowRunsCancelRequest.md +18 -0
  212. data/lib/hatchet/clients/rest/docs/WorkflowRunsMetrics.md +18 -0
  213. data/lib/hatchet/clients/rest/docs/WorkflowRunsMetricsCounts.md +28 -0
  214. data/lib/hatchet/clients/rest/docs/WorkflowTag.md +20 -0
  215. data/lib/hatchet/clients/rest/docs/WorkflowTriggerCronRef.md +20 -0
  216. data/lib/hatchet/clients/rest/docs/WorkflowTriggerEventRef.md +20 -0
  217. data/lib/hatchet/clients/rest/docs/WorkflowTriggers.md +26 -0
  218. data/lib/hatchet/clients/rest/docs/WorkflowUpdateRequest.md +18 -0
  219. data/lib/hatchet/clients/rest/docs/WorkflowVersion.md +40 -0
  220. data/lib/hatchet/clients/rest/docs/WorkflowVersionDefinition.md +18 -0
  221. data/lib/hatchet/clients/rest/docs/WorkflowVersionMeta.md +26 -0
  222. data/lib/hatchet/clients/rest/docs/WorkflowWorkersCount.md +22 -0
  223. data/lib/hatchet/clients/rest/git_push.sh +57 -0
  224. data/lib/hatchet/clients/rest/hatchet-sdk-rest.gemspec +41 -0
  225. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/api_token_api.rb +242 -0
  226. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/default_api.rb +622 -0
  227. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/event_api.rb +836 -0
  228. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/filter_api.rb +449 -0
  229. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/github_api.rb +107 -0
  230. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/healthcheck_api.rb +132 -0
  231. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/log_api.rb +182 -0
  232. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/metadata_api.rb +193 -0
  233. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/rate_limits_api.rb +108 -0
  234. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/slack_api.rb +164 -0
  235. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/sns_api.rb +242 -0
  236. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/step_run_api.rb +615 -0
  237. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb +599 -0
  238. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/tenant_api.rb +1327 -0
  239. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/user_api.rb +729 -0
  240. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/worker_api.rb +246 -0
  241. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_api.rb +1654 -0
  242. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_run_api.rb +540 -0
  243. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/workflow_runs_api.rb +614 -0
  244. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_client.rb +437 -0
  245. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api_error.rb +58 -0
  246. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/configuration.rb +399 -0
  247. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/accept_invite_request.rb +255 -0
  248. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_error.rb +268 -0
  249. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_errors.rb +239 -0
  250. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta.rb +279 -0
  251. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta_auth.rb +223 -0
  252. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta_integration.rb +265 -0
  253. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_meta_posthog.rb +231 -0
  254. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_resource_meta.rb +310 -0
  255. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_token.rb +300 -0
  256. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/bulk_create_event_request.rb +239 -0
  257. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cancel_event_request.rb +239 -0
  258. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/concurrency_limit_strategy.rb +42 -0
  259. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_api_token_request.rb +257 -0
  260. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_api_token_response.rb +238 -0
  261. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_cron_workflow_trigger_request.rb +352 -0
  262. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_event_request.rb +295 -0
  263. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_pull_request_from_step_run.rb +237 -0
  264. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_sns_integration_request.rb +238 -0
  265. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_tenant_alert_email_group_request.rb +240 -0
  266. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_tenant_invite_request.rb +287 -0
  267. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_tenant_request.rb +307 -0
  268. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cron_workflows.rb +509 -0
  269. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cron_workflows_list.rb +231 -0
  270. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cron_workflows_method.rb +40 -0
  271. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/cron_workflows_order_by_field.rb +40 -0
  272. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event.rb +321 -0
  273. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_data.rb +238 -0
  274. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_key_list.rb +231 -0
  275. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_list.rb +231 -0
  276. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_order_by_direction.rb +40 -0
  277. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_order_by_field.rb +39 -0
  278. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_update_cancel200_response.rb +222 -0
  279. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/event_workflow_run_summary.rb +271 -0
  280. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/events.rb +266 -0
  281. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/get_step_run_diff_response.rb +239 -0
  282. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/info_get_version200_response.rb +237 -0
  283. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/job.rb +363 -0
  284. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/job_run.rb +464 -0
  285. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/job_run_status.rb +44 -0
  286. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/list_api_tokens_response.rb +231 -0
  287. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/list_pull_requests_response.rb +239 -0
  288. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/list_slack_webhooks.rb +265 -0
  289. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/list_sns_integrations.rb +265 -0
  290. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line.rb +292 -0
  291. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_level.rb +42 -0
  292. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_list.rb +231 -0
  293. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_order_by_direction.rb +40 -0
  294. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/log_line_order_by_field.rb +39 -0
  295. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pagination_response.rb +241 -0
  296. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pull_request.rb +441 -0
  297. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/pull_request_state.rb +40 -0
  298. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/queue_metrics.rb +292 -0
  299. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit.rb +373 -0
  300. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit_list.rb +231 -0
  301. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit_order_by_direction.rb +40 -0
  302. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit_order_by_field.rb +41 -0
  303. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/recent_step_runs.rb +365 -0
  304. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/reject_invite_request.rb +255 -0
  305. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/replay_event_request.rb +239 -0
  306. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/replay_workflow_runs_request.rb +239 -0
  307. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/replay_workflow_runs_response.rb +239 -0
  308. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rerun_step_run_request.rb +237 -0
  309. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/schedule_workflow_run_request.rb +326 -0
  310. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_run_status.rb +45 -0
  311. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_workflows.rb +538 -0
  312. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_workflows_list.rb +231 -0
  313. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_workflows_method.rb +40 -0
  314. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/scheduled_workflows_order_by_field.rb +40 -0
  315. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/semaphore_slots.rb +343 -0
  316. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/slack_webhook.rb +372 -0
  317. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/sns_integration.rb +301 -0
  318. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step.rb +374 -0
  319. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run.rb +556 -0
  320. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive.rb +432 -0
  321. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_archive_list.rb +231 -0
  322. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_diff.rb +289 -0
  323. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_event.rb +442 -0
  324. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_event_list.rb +231 -0
  325. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_event_reason.rb +55 -0
  326. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_event_severity.rb +41 -0
  327. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/step_run_status.rb +47 -0
  328. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant.rb +370 -0
  329. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_alert_email_group.rb +266 -0
  330. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_alert_email_group_list.rb +231 -0
  331. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_alerting_settings.rb +314 -0
  332. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_invite.rb +377 -0
  333. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_invite_list.rb +231 -0
  334. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_list.rb +231 -0
  335. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member.rb +323 -0
  336. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member_list.rb +231 -0
  337. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_member_role.rb +41 -0
  338. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_queue_metrics.rb +243 -0
  339. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource.rb +45 -0
  340. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource_limit.rb +370 -0
  341. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_resource_policy.rb +240 -0
  342. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_step_run_queue_metrics.rb +220 -0
  343. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_ui_version.rb +40 -0
  344. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_version.rb +40 -0
  345. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/trigger_workflow_run_request.rb +246 -0
  346. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_tenant_alert_email_group_request.rb +240 -0
  347. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_tenant_invite_request.rb +260 -0
  348. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_tenant_request.rb +323 -0
  349. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/update_worker_request.rb +221 -0
  350. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user.rb +321 -0
  351. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_change_password_request.rb +265 -0
  352. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_login_request.rb +265 -0
  353. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_register_request.rb +292 -0
  354. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_tenant_memberships_list.rb +231 -0
  355. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/user_tenant_public.rb +248 -0
  356. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_cancel_task_request.rb +232 -0
  357. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_cancelled_tasks.rb +223 -0
  358. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_filter_request.rb +320 -0
  359. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_dag_children.rb +231 -0
  360. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event.rb +380 -0
  361. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event_list.rb +231 -0
  362. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event_triggered_run.rb +266 -0
  363. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_event_workflow_run_summary.rb +346 -0
  364. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_filter.rb +390 -0
  365. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_filter_list.rb +231 -0
  366. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line.rb +344 -0
  367. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line_level.rb +42 -0
  368. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_log_line_list.rb +231 -0
  369. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_replay_task_request.rb +232 -0
  370. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_replayed_tasks.rb +223 -0
  371. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event.rb +419 -0
  372. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event_list.rb +231 -0
  373. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_event_type.rb +58 -0
  374. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_filter.rb +279 -0
  375. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_point_metric.rb +289 -0
  376. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_point_metrics.rb +222 -0
  377. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_run_metric.rb +285 -0
  378. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_run_status.rb +43 -0
  379. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_status.rb +43 -0
  380. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary.rb +812 -0
  381. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_summary_list.rb +266 -0
  382. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_timing.rb +581 -0
  383. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_task_timing_list.rb +266 -0
  384. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_trigger_workflow_run_request.rb +283 -0
  385. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_filter_request.rb +241 -0
  386. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run.rb +544 -0
  387. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run_details.rb +331 -0
  388. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run_display_name.rb +263 -0
  389. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_run_display_name_list.rb +266 -0
  390. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_workflow_type.rb +40 -0
  391. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker.rb +291 -0
  392. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_create_request.rb +294 -0
  393. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_create_response.rb +220 -0
  394. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_created.rb +318 -0
  395. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_list_response.rb +231 -0
  396. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_request.rb +314 -0
  397. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_request_list_response.rb +223 -0
  398. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/webhook_worker_request_method.rb +41 -0
  399. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker.rb +489 -0
  400. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_label.rb +274 -0
  401. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_list.rb +231 -0
  402. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_runtime_info.rb +278 -0
  403. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_runtime_sdks.rb +41 -0
  404. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/worker_type.rb +41 -0
  405. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow.rb +346 -0
  406. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_concurrency.rb +314 -0
  407. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_kind.rb +41 -0
  408. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_list.rb +240 -0
  409. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_metrics.rb +231 -0
  410. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run.rb +524 -0
  411. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_list.rb +231 -0
  412. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_order_by_direction.rb +40 -0
  413. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_order_by_field.rb +42 -0
  414. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_shape.rb +533 -0
  415. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_shape_item_for_workflow_run_details.rb +353 -0
  416. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_status.rb +45 -0
  417. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_run_triggered_by.rb +273 -0
  418. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_runs_cancel_request.rb +239 -0
  419. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_runs_metrics.rb +220 -0
  420. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_runs_metrics_counts.rb +265 -0
  421. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_tag.rb +265 -0
  422. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_trigger_cron_ref.rb +229 -0
  423. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_trigger_event_ref.rb +229 -0
  424. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_triggers.rb +260 -0
  425. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_update_request.rb +221 -0
  426. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version.rb +392 -0
  427. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_definition.rb +238 -0
  428. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_version_meta.rb +325 -0
  429. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow_workers_count.rb +238 -0
  430. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/version.rb +15 -0
  431. data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +241 -0
  432. data/lib/hatchet/clients/rest/spec/spec_helper.rb +111 -0
  433. data/lib/hatchet/clients/rest.rb +126 -0
  434. data/lib/hatchet/clients.rb +71 -0
  435. data/lib/hatchet/config.rb +7 -7
  436. data/lib/hatchet/features/events.rb +265 -0
  437. data/lib/hatchet/features/runs.rb +423 -0
  438. data/lib/hatchet/version.rb +1 -1
  439. data/lib/hatchet-sdk.rb +21 -0
  440. data/scripts/generate.sh +167 -0
  441. data/scripts/generate_api.rb +174 -0
  442. data/sig/hatchet-sdk.rbs +425 -3
  443. metadata +490 -1
@@ -0,0 +1,812 @@
1
+ =begin
2
+ #Hatchet API
3
+
4
+ #The Hatchet API
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module HatchetSdkRest
17
+ class V1TaskSummary
18
+ attr_accessor :metadata
19
+
20
+ # The timestamp the task was created.
21
+ attr_accessor :created_at
22
+
23
+ # The display name of the task run.
24
+ attr_accessor :display_name
25
+
26
+ # The input of the task run.
27
+ attr_accessor :input
28
+
29
+ # The number of spawned children tasks
30
+ attr_accessor :num_spawned_children
31
+
32
+ # The output of the task run (for the latest run)
33
+ attr_accessor :output
34
+
35
+ attr_accessor :status
36
+
37
+ # The external ID of the task.
38
+ attr_accessor :task_external_id
39
+
40
+ # The ID of the task.
41
+ attr_accessor :task_id
42
+
43
+ # The timestamp the task was inserted.
44
+ attr_accessor :task_inserted_at
45
+
46
+ # The ID of the tenant.
47
+ attr_accessor :tenant_id
48
+
49
+ # The type of the workflow (whether it's a DAG or a task)
50
+ attr_accessor :type
51
+
52
+ attr_accessor :workflow_id
53
+
54
+ # The external ID of the workflow run
55
+ attr_accessor :workflow_run_external_id
56
+
57
+ # The action ID of the task.
58
+ attr_accessor :action_id
59
+
60
+ # The number of retries of the task.
61
+ attr_accessor :retry_count
62
+
63
+ # The attempt number of the task.
64
+ attr_accessor :attempt
65
+
66
+ # Additional metadata for the task run.
67
+ attr_accessor :additional_metadata
68
+
69
+ # The list of children tasks
70
+ attr_accessor :children
71
+
72
+ # The duration of the task run, in milliseconds.
73
+ attr_accessor :duration
74
+
75
+ # The error message of the task run (for the latest run)
76
+ attr_accessor :error_message
77
+
78
+ # The timestamp the task run finished.
79
+ attr_accessor :finished_at
80
+
81
+ # The timestamp the task run started.
82
+ attr_accessor :started_at
83
+
84
+ # The step ID of the task.
85
+ attr_accessor :step_id
86
+
87
+ attr_accessor :workflow_name
88
+
89
+ # The version ID of the workflow
90
+ attr_accessor :workflow_version_id
91
+
92
+ attr_accessor :workflow_config
93
+
94
+ # The external ID of the parent task.
95
+ attr_accessor :parent_task_external_id
96
+
97
+ class EnumAttributeValidator
98
+ attr_reader :datatype
99
+ attr_reader :allowable_values
100
+
101
+ def initialize(datatype, allowable_values)
102
+ @allowable_values = allowable_values.map do |value|
103
+ case datatype.to_s
104
+ when /Integer/i
105
+ value.to_i
106
+ when /Float/i
107
+ value.to_f
108
+ else
109
+ value
110
+ end
111
+ end
112
+ end
113
+
114
+ def valid?(value)
115
+ !value || allowable_values.include?(value)
116
+ end
117
+ end
118
+
119
+ # Attribute mapping from ruby-style variable name to JSON key.
120
+ def self.attribute_map
121
+ {
122
+ :'metadata' => :'metadata',
123
+ :'created_at' => :'createdAt',
124
+ :'display_name' => :'displayName',
125
+ :'input' => :'input',
126
+ :'num_spawned_children' => :'numSpawnedChildren',
127
+ :'output' => :'output',
128
+ :'status' => :'status',
129
+ :'task_external_id' => :'taskExternalId',
130
+ :'task_id' => :'taskId',
131
+ :'task_inserted_at' => :'taskInsertedAt',
132
+ :'tenant_id' => :'tenantId',
133
+ :'type' => :'type',
134
+ :'workflow_id' => :'workflowId',
135
+ :'workflow_run_external_id' => :'workflowRunExternalId',
136
+ :'action_id' => :'actionId',
137
+ :'retry_count' => :'retryCount',
138
+ :'attempt' => :'attempt',
139
+ :'additional_metadata' => :'additionalMetadata',
140
+ :'children' => :'children',
141
+ :'duration' => :'duration',
142
+ :'error_message' => :'errorMessage',
143
+ :'finished_at' => :'finishedAt',
144
+ :'started_at' => :'startedAt',
145
+ :'step_id' => :'stepId',
146
+ :'workflow_name' => :'workflowName',
147
+ :'workflow_version_id' => :'workflowVersionId',
148
+ :'workflow_config' => :'workflowConfig',
149
+ :'parent_task_external_id' => :'parentTaskExternalId'
150
+ }
151
+ end
152
+
153
+ # Returns attribute mapping this model knows about
154
+ def self.acceptable_attribute_map
155
+ attribute_map
156
+ end
157
+
158
+ # Returns all the JSON keys this model knows about
159
+ def self.acceptable_attributes
160
+ acceptable_attribute_map.values
161
+ end
162
+
163
+ # Attribute type mapping.
164
+ def self.openapi_types
165
+ {
166
+ :'metadata' => :'APIResourceMeta',
167
+ :'created_at' => :'Time',
168
+ :'display_name' => :'String',
169
+ :'input' => :'Object',
170
+ :'num_spawned_children' => :'Integer',
171
+ :'output' => :'Object',
172
+ :'status' => :'V1TaskStatus',
173
+ :'task_external_id' => :'String',
174
+ :'task_id' => :'Integer',
175
+ :'task_inserted_at' => :'Time',
176
+ :'tenant_id' => :'String',
177
+ :'type' => :'V1WorkflowType',
178
+ :'workflow_id' => :'String',
179
+ :'workflow_run_external_id' => :'String',
180
+ :'action_id' => :'String',
181
+ :'retry_count' => :'Integer',
182
+ :'attempt' => :'Integer',
183
+ :'additional_metadata' => :'Object',
184
+ :'children' => :'Array<V1TaskSummary>',
185
+ :'duration' => :'Integer',
186
+ :'error_message' => :'String',
187
+ :'finished_at' => :'Time',
188
+ :'started_at' => :'Time',
189
+ :'step_id' => :'String',
190
+ :'workflow_name' => :'String',
191
+ :'workflow_version_id' => :'String',
192
+ :'workflow_config' => :'Object',
193
+ :'parent_task_external_id' => :'String'
194
+ }
195
+ end
196
+
197
+ # List of attributes with nullable: true
198
+ def self.openapi_nullable
199
+ Set.new([
200
+ ])
201
+ end
202
+
203
+ # Initializes the object
204
+ # @param [Hash] attributes Model attributes in the form of hash
205
+ def initialize(attributes = {})
206
+ if (!attributes.is_a?(Hash))
207
+ fail ArgumentError, "The input argument (attributes) must be a hash in `HatchetSdkRest::V1TaskSummary` initialize method"
208
+ end
209
+
210
+ # check to see if the attribute exists and convert string to symbol for hash key
211
+ acceptable_attribute_map = self.class.acceptable_attribute_map
212
+ attributes = attributes.each_with_object({}) { |(k, v), h|
213
+ if (!acceptable_attribute_map.key?(k.to_sym))
214
+ fail ArgumentError, "`#{k}` is not a valid attribute in `HatchetSdkRest::V1TaskSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
215
+ end
216
+ h[k.to_sym] = v
217
+ }
218
+
219
+ if attributes.key?(:'metadata')
220
+ self.metadata = attributes[:'metadata']
221
+ else
222
+ self.metadata = nil
223
+ end
224
+
225
+ if attributes.key?(:'created_at')
226
+ self.created_at = attributes[:'created_at']
227
+ else
228
+ self.created_at = nil
229
+ end
230
+
231
+ if attributes.key?(:'display_name')
232
+ self.display_name = attributes[:'display_name']
233
+ else
234
+ self.display_name = nil
235
+ end
236
+
237
+ if attributes.key?(:'input')
238
+ self.input = attributes[:'input']
239
+ else
240
+ self.input = nil
241
+ end
242
+
243
+ if attributes.key?(:'num_spawned_children')
244
+ self.num_spawned_children = attributes[:'num_spawned_children']
245
+ else
246
+ self.num_spawned_children = nil
247
+ end
248
+
249
+ if attributes.key?(:'output')
250
+ self.output = attributes[:'output']
251
+ else
252
+ self.output = nil
253
+ end
254
+
255
+ if attributes.key?(:'status')
256
+ self.status = attributes[:'status']
257
+ else
258
+ self.status = nil
259
+ end
260
+
261
+ if attributes.key?(:'task_external_id')
262
+ self.task_external_id = attributes[:'task_external_id']
263
+ else
264
+ self.task_external_id = nil
265
+ end
266
+
267
+ if attributes.key?(:'task_id')
268
+ self.task_id = attributes[:'task_id']
269
+ else
270
+ self.task_id = nil
271
+ end
272
+
273
+ if attributes.key?(:'task_inserted_at')
274
+ self.task_inserted_at = attributes[:'task_inserted_at']
275
+ else
276
+ self.task_inserted_at = nil
277
+ end
278
+
279
+ if attributes.key?(:'tenant_id')
280
+ self.tenant_id = attributes[:'tenant_id']
281
+ else
282
+ self.tenant_id = nil
283
+ end
284
+
285
+ if attributes.key?(:'type')
286
+ self.type = attributes[:'type']
287
+ else
288
+ self.type = nil
289
+ end
290
+
291
+ if attributes.key?(:'workflow_id')
292
+ self.workflow_id = attributes[:'workflow_id']
293
+ else
294
+ self.workflow_id = nil
295
+ end
296
+
297
+ if attributes.key?(:'workflow_run_external_id')
298
+ self.workflow_run_external_id = attributes[:'workflow_run_external_id']
299
+ else
300
+ self.workflow_run_external_id = nil
301
+ end
302
+
303
+ if attributes.key?(:'action_id')
304
+ self.action_id = attributes[:'action_id']
305
+ end
306
+
307
+ if attributes.key?(:'retry_count')
308
+ self.retry_count = attributes[:'retry_count']
309
+ end
310
+
311
+ if attributes.key?(:'attempt')
312
+ self.attempt = attributes[:'attempt']
313
+ end
314
+
315
+ if attributes.key?(:'additional_metadata')
316
+ self.additional_metadata = attributes[:'additional_metadata']
317
+ end
318
+
319
+ if attributes.key?(:'children')
320
+ if (value = attributes[:'children']).is_a?(Array)
321
+ self.children = value
322
+ end
323
+ end
324
+
325
+ if attributes.key?(:'duration')
326
+ self.duration = attributes[:'duration']
327
+ end
328
+
329
+ if attributes.key?(:'error_message')
330
+ self.error_message = attributes[:'error_message']
331
+ end
332
+
333
+ if attributes.key?(:'finished_at')
334
+ self.finished_at = attributes[:'finished_at']
335
+ end
336
+
337
+ if attributes.key?(:'started_at')
338
+ self.started_at = attributes[:'started_at']
339
+ end
340
+
341
+ if attributes.key?(:'step_id')
342
+ self.step_id = attributes[:'step_id']
343
+ end
344
+
345
+ if attributes.key?(:'workflow_name')
346
+ self.workflow_name = attributes[:'workflow_name']
347
+ end
348
+
349
+ if attributes.key?(:'workflow_version_id')
350
+ self.workflow_version_id = attributes[:'workflow_version_id']
351
+ end
352
+
353
+ if attributes.key?(:'workflow_config')
354
+ self.workflow_config = attributes[:'workflow_config']
355
+ end
356
+
357
+ if attributes.key?(:'parent_task_external_id')
358
+ self.parent_task_external_id = attributes[:'parent_task_external_id']
359
+ end
360
+ end
361
+
362
+ # Show invalid properties with the reasons. Usually used together with valid?
363
+ # @return Array for valid properties with the reasons
364
+ def list_invalid_properties
365
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
366
+ invalid_properties = Array.new
367
+ if @metadata.nil?
368
+ invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
369
+ end
370
+
371
+ if @created_at.nil?
372
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
373
+ end
374
+
375
+ if @display_name.nil?
376
+ invalid_properties.push('invalid value for "display_name", display_name cannot be nil.')
377
+ end
378
+
379
+ if @input.nil?
380
+ invalid_properties.push('invalid value for "input", input cannot be nil.')
381
+ end
382
+
383
+ if @num_spawned_children.nil?
384
+ invalid_properties.push('invalid value for "num_spawned_children", num_spawned_children cannot be nil.')
385
+ end
386
+
387
+ if @output.nil?
388
+ invalid_properties.push('invalid value for "output", output cannot be nil.')
389
+ end
390
+
391
+ if @status.nil?
392
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
393
+ end
394
+
395
+ if @task_external_id.nil?
396
+ invalid_properties.push('invalid value for "task_external_id", task_external_id cannot be nil.')
397
+ end
398
+
399
+ if @task_external_id.to_s.length > 36
400
+ invalid_properties.push('invalid value for "task_external_id", the character length must be smaller than or equal to 36.')
401
+ end
402
+
403
+ if @task_external_id.to_s.length < 36
404
+ invalid_properties.push('invalid value for "task_external_id", the character length must be greater than or equal to 36.')
405
+ end
406
+
407
+ if @task_id.nil?
408
+ invalid_properties.push('invalid value for "task_id", task_id cannot be nil.')
409
+ end
410
+
411
+ if @task_inserted_at.nil?
412
+ invalid_properties.push('invalid value for "task_inserted_at", task_inserted_at cannot be nil.')
413
+ end
414
+
415
+ if @tenant_id.nil?
416
+ invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.')
417
+ end
418
+
419
+ if @tenant_id.to_s.length > 36
420
+ invalid_properties.push('invalid value for "tenant_id", the character length must be smaller than or equal to 36.')
421
+ end
422
+
423
+ if @tenant_id.to_s.length < 36
424
+ invalid_properties.push('invalid value for "tenant_id", the character length must be greater than or equal to 36.')
425
+ end
426
+
427
+ if @type.nil?
428
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
429
+ end
430
+
431
+ if @workflow_id.nil?
432
+ invalid_properties.push('invalid value for "workflow_id", workflow_id cannot be nil.')
433
+ end
434
+
435
+ if @workflow_run_external_id.nil?
436
+ invalid_properties.push('invalid value for "workflow_run_external_id", workflow_run_external_id cannot be nil.')
437
+ end
438
+
439
+ if !@step_id.nil? && @step_id.to_s.length > 36
440
+ invalid_properties.push('invalid value for "step_id", the character length must be smaller than or equal to 36.')
441
+ end
442
+
443
+ if !@step_id.nil? && @step_id.to_s.length < 36
444
+ invalid_properties.push('invalid value for "step_id", the character length must be greater than or equal to 36.')
445
+ end
446
+
447
+ invalid_properties
448
+ end
449
+
450
+ # Check to see if the all the properties in the model are valid
451
+ # @return true if the model is valid
452
+ def valid?
453
+ warn '[DEPRECATED] the `valid?` method is obsolete'
454
+ return false if @metadata.nil?
455
+ return false if @created_at.nil?
456
+ return false if @display_name.nil?
457
+ return false if @input.nil?
458
+ return false if @num_spawned_children.nil?
459
+ return false if @output.nil?
460
+ return false if @status.nil?
461
+ return false if @task_external_id.nil?
462
+ return false if @task_external_id.to_s.length > 36
463
+ return false if @task_external_id.to_s.length < 36
464
+ return false if @task_id.nil?
465
+ return false if @task_inserted_at.nil?
466
+ return false if @tenant_id.nil?
467
+ return false if @tenant_id.to_s.length > 36
468
+ return false if @tenant_id.to_s.length < 36
469
+ return false if @type.nil?
470
+ return false if @workflow_id.nil?
471
+ return false if @workflow_run_external_id.nil?
472
+ return false if !@step_id.nil? && @step_id.to_s.length > 36
473
+ return false if !@step_id.nil? && @step_id.to_s.length < 36
474
+ true
475
+ end
476
+
477
+ # Custom attribute writer method with validation
478
+ # @param [Object] metadata Value to be assigned
479
+ def metadata=(metadata)
480
+ if metadata.nil?
481
+ fail ArgumentError, 'metadata cannot be nil'
482
+ end
483
+
484
+ @metadata = metadata
485
+ end
486
+
487
+ # Custom attribute writer method with validation
488
+ # @param [Object] created_at Value to be assigned
489
+ def created_at=(created_at)
490
+ if created_at.nil?
491
+ fail ArgumentError, 'created_at cannot be nil'
492
+ end
493
+
494
+ @created_at = created_at
495
+ end
496
+
497
+ # Custom attribute writer method with validation
498
+ # @param [Object] display_name Value to be assigned
499
+ def display_name=(display_name)
500
+ if display_name.nil?
501
+ fail ArgumentError, 'display_name cannot be nil'
502
+ end
503
+
504
+ @display_name = display_name
505
+ end
506
+
507
+ # Custom attribute writer method with validation
508
+ # @param [Object] input Value to be assigned
509
+ def input=(input)
510
+ if input.nil?
511
+ fail ArgumentError, 'input cannot be nil'
512
+ end
513
+
514
+ @input = input
515
+ end
516
+
517
+ # Custom attribute writer method with validation
518
+ # @param [Object] num_spawned_children Value to be assigned
519
+ def num_spawned_children=(num_spawned_children)
520
+ if num_spawned_children.nil?
521
+ fail ArgumentError, 'num_spawned_children cannot be nil'
522
+ end
523
+
524
+ @num_spawned_children = num_spawned_children
525
+ end
526
+
527
+ # Custom attribute writer method with validation
528
+ # @param [Object] output Value to be assigned
529
+ def output=(output)
530
+ if output.nil?
531
+ fail ArgumentError, 'output cannot be nil'
532
+ end
533
+
534
+ @output = output
535
+ end
536
+
537
+ # Custom attribute writer method with validation
538
+ # @param [Object] status Value to be assigned
539
+ def status=(status)
540
+ if status.nil?
541
+ fail ArgumentError, 'status cannot be nil'
542
+ end
543
+
544
+ @status = status
545
+ end
546
+
547
+ # Custom attribute writer method with validation
548
+ # @param [Object] task_external_id Value to be assigned
549
+ def task_external_id=(task_external_id)
550
+ if task_external_id.nil?
551
+ fail ArgumentError, 'task_external_id cannot be nil'
552
+ end
553
+
554
+ if task_external_id.to_s.length > 36
555
+ fail ArgumentError, 'invalid value for "task_external_id", the character length must be smaller than or equal to 36.'
556
+ end
557
+
558
+ if task_external_id.to_s.length < 36
559
+ fail ArgumentError, 'invalid value for "task_external_id", the character length must be greater than or equal to 36.'
560
+ end
561
+
562
+ @task_external_id = task_external_id
563
+ end
564
+
565
+ # Custom attribute writer method with validation
566
+ # @param [Object] task_id Value to be assigned
567
+ def task_id=(task_id)
568
+ if task_id.nil?
569
+ fail ArgumentError, 'task_id cannot be nil'
570
+ end
571
+
572
+ @task_id = task_id
573
+ end
574
+
575
+ # Custom attribute writer method with validation
576
+ # @param [Object] task_inserted_at Value to be assigned
577
+ def task_inserted_at=(task_inserted_at)
578
+ if task_inserted_at.nil?
579
+ fail ArgumentError, 'task_inserted_at cannot be nil'
580
+ end
581
+
582
+ @task_inserted_at = task_inserted_at
583
+ end
584
+
585
+ # Custom attribute writer method with validation
586
+ # @param [Object] tenant_id Value to be assigned
587
+ def tenant_id=(tenant_id)
588
+ if tenant_id.nil?
589
+ fail ArgumentError, 'tenant_id cannot be nil'
590
+ end
591
+
592
+ if tenant_id.to_s.length > 36
593
+ fail ArgumentError, 'invalid value for "tenant_id", the character length must be smaller than or equal to 36.'
594
+ end
595
+
596
+ if tenant_id.to_s.length < 36
597
+ fail ArgumentError, 'invalid value for "tenant_id", the character length must be greater than or equal to 36.'
598
+ end
599
+
600
+ @tenant_id = tenant_id
601
+ end
602
+
603
+ # Custom attribute writer method with validation
604
+ # @param [Object] type Value to be assigned
605
+ def type=(type)
606
+ if type.nil?
607
+ fail ArgumentError, 'type cannot be nil'
608
+ end
609
+
610
+ @type = type
611
+ end
612
+
613
+ # Custom attribute writer method with validation
614
+ # @param [Object] workflow_id Value to be assigned
615
+ def workflow_id=(workflow_id)
616
+ if workflow_id.nil?
617
+ fail ArgumentError, 'workflow_id cannot be nil'
618
+ end
619
+
620
+ @workflow_id = workflow_id
621
+ end
622
+
623
+ # Custom attribute writer method with validation
624
+ # @param [Object] workflow_run_external_id Value to be assigned
625
+ def workflow_run_external_id=(workflow_run_external_id)
626
+ if workflow_run_external_id.nil?
627
+ fail ArgumentError, 'workflow_run_external_id cannot be nil'
628
+ end
629
+
630
+ @workflow_run_external_id = workflow_run_external_id
631
+ end
632
+
633
+ # Custom attribute writer method with validation
634
+ # @param [Object] step_id Value to be assigned
635
+ def step_id=(step_id)
636
+ if step_id.nil?
637
+ fail ArgumentError, 'step_id cannot be nil'
638
+ end
639
+
640
+ if step_id.to_s.length > 36
641
+ fail ArgumentError, 'invalid value for "step_id", the character length must be smaller than or equal to 36.'
642
+ end
643
+
644
+ if step_id.to_s.length < 36
645
+ fail ArgumentError, 'invalid value for "step_id", the character length must be greater than or equal to 36.'
646
+ end
647
+
648
+ @step_id = step_id
649
+ end
650
+
651
+ # Checks equality by comparing each attribute.
652
+ # @param [Object] Object to be compared
653
+ def ==(o)
654
+ return true if self.equal?(o)
655
+ self.class == o.class &&
656
+ metadata == o.metadata &&
657
+ created_at == o.created_at &&
658
+ display_name == o.display_name &&
659
+ input == o.input &&
660
+ num_spawned_children == o.num_spawned_children &&
661
+ output == o.output &&
662
+ status == o.status &&
663
+ task_external_id == o.task_external_id &&
664
+ task_id == o.task_id &&
665
+ task_inserted_at == o.task_inserted_at &&
666
+ tenant_id == o.tenant_id &&
667
+ type == o.type &&
668
+ workflow_id == o.workflow_id &&
669
+ workflow_run_external_id == o.workflow_run_external_id &&
670
+ action_id == o.action_id &&
671
+ retry_count == o.retry_count &&
672
+ attempt == o.attempt &&
673
+ additional_metadata == o.additional_metadata &&
674
+ children == o.children &&
675
+ duration == o.duration &&
676
+ error_message == o.error_message &&
677
+ finished_at == o.finished_at &&
678
+ started_at == o.started_at &&
679
+ step_id == o.step_id &&
680
+ workflow_name == o.workflow_name &&
681
+ workflow_version_id == o.workflow_version_id &&
682
+ workflow_config == o.workflow_config &&
683
+ parent_task_external_id == o.parent_task_external_id
684
+ end
685
+
686
+ # @see the `==` method
687
+ # @param [Object] Object to be compared
688
+ def eql?(o)
689
+ self == o
690
+ end
691
+
692
+ # Calculates hash code according to all attributes.
693
+ # @return [Integer] Hash code
694
+ def hash
695
+ [metadata, created_at, display_name, input, num_spawned_children, output, status, task_external_id, task_id, task_inserted_at, tenant_id, type, workflow_id, workflow_run_external_id, action_id, retry_count, attempt, additional_metadata, children, duration, error_message, finished_at, started_at, step_id, workflow_name, workflow_version_id, workflow_config, parent_task_external_id].hash
696
+ end
697
+
698
+ # Builds the object from hash
699
+ # @param [Hash] attributes Model attributes in the form of hash
700
+ # @return [Object] Returns the model itself
701
+ def self.build_from_hash(attributes)
702
+ return nil unless attributes.is_a?(Hash)
703
+ attributes = attributes.transform_keys(&:to_sym)
704
+ transformed_hash = {}
705
+ openapi_types.each_pair do |key, type|
706
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
707
+ transformed_hash["#{key}"] = nil
708
+ elsif type =~ /\AArray<(.*)>/i
709
+ # check to ensure the input is an array given that the attribute
710
+ # is documented as an array but the input is not
711
+ if attributes[attribute_map[key]].is_a?(Array)
712
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
713
+ end
714
+ elsif !attributes[attribute_map[key]].nil?
715
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
716
+ end
717
+ end
718
+ new(transformed_hash)
719
+ end
720
+
721
+ # Deserializes the data based on type
722
+ # @param string type Data type
723
+ # @param string value Value to be deserialized
724
+ # @return [Object] Deserialized data
725
+ def self._deserialize(type, value)
726
+ case type.to_sym
727
+ when :Time
728
+ Time.parse(value)
729
+ when :Date
730
+ Date.parse(value)
731
+ when :String
732
+ value.to_s
733
+ when :Integer
734
+ value.to_i
735
+ when :Float
736
+ value.to_f
737
+ when :Boolean
738
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
739
+ true
740
+ else
741
+ false
742
+ end
743
+ when :Object
744
+ # generic object (usually a Hash), return directly
745
+ value
746
+ when /\AArray<(?<inner_type>.+)>\z/
747
+ inner_type = Regexp.last_match[:inner_type]
748
+ value.map { |v| _deserialize(inner_type, v) }
749
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
750
+ k_type = Regexp.last_match[:k_type]
751
+ v_type = Regexp.last_match[:v_type]
752
+ {}.tap do |hash|
753
+ value.each do |k, v|
754
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
755
+ end
756
+ end
757
+ else # model
758
+ # models (e.g. Pet) or oneOf
759
+ klass = HatchetSdkRest.const_get(type)
760
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
761
+ end
762
+ end
763
+
764
+ # Returns the string representation of the object
765
+ # @return [String] String presentation of the object
766
+ def to_s
767
+ to_hash.to_s
768
+ end
769
+
770
+ # to_body is an alias to to_hash (backward compatibility)
771
+ # @return [Hash] Returns the object in the form of hash
772
+ def to_body
773
+ to_hash
774
+ end
775
+
776
+ # Returns the object in the form of hash
777
+ # @return [Hash] Returns the object in the form of hash
778
+ def to_hash
779
+ hash = {}
780
+ self.class.attribute_map.each_pair do |attr, param|
781
+ value = self.send(attr)
782
+ if value.nil?
783
+ is_nullable = self.class.openapi_nullable.include?(attr)
784
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
785
+ end
786
+
787
+ hash[param] = _to_hash(value)
788
+ end
789
+ hash
790
+ end
791
+
792
+ # Outputs non-array value in the form of hash
793
+ # For object, use to_hash. Otherwise, just return the value
794
+ # @param [Object] value Any valid value
795
+ # @return [Hash] Returns the value in the form of hash
796
+ def _to_hash(value)
797
+ if value.is_a?(Array)
798
+ value.compact.map { |v| _to_hash(v) }
799
+ elsif value.is_a?(Hash)
800
+ {}.tap do |hash|
801
+ value.each { |k, v| hash[k] = _to_hash(v) }
802
+ end
803
+ elsif value.respond_to? :to_hash
804
+ value.to_hash
805
+ else
806
+ value
807
+ end
808
+ end
809
+
810
+ end
811
+
812
+ end