hatchet-sdk 0.40.0a9__py3-none-any.whl → 0.42.0__py3-none-any.whl

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

Potentially problematic release.


This version of hatchet-sdk might be problematic. Click here for more details.

Files changed (152) hide show
  1. hatchet_sdk/clients/admin.py +129 -59
  2. hatchet_sdk/clients/dispatcher/action_listener.py +25 -2
  3. hatchet_sdk/clients/events.py +91 -52
  4. hatchet_sdk/clients/rest/__init__.py +21 -0
  5. hatchet_sdk/clients/rest/api/api_token_api.py +12 -9
  6. hatchet_sdk/clients/rest/api/default_api.py +24 -18
  7. hatchet_sdk/clients/rest/api/event_api.py +32 -24
  8. hatchet_sdk/clients/rest/api/github_api.py +4 -3
  9. hatchet_sdk/clients/rest/api/log_api.py +4 -3
  10. hatchet_sdk/clients/rest/api/metadata_api.py +12 -9
  11. hatchet_sdk/clients/rest/api/rate_limits_api.py +7 -4
  12. hatchet_sdk/clients/rest/api/slack_api.py +8 -6
  13. hatchet_sdk/clients/rest/api/sns_api.py +12 -9
  14. hatchet_sdk/clients/rest/api/step_run_api.py +28 -21
  15. hatchet_sdk/clients/rest/api/tenant_api.py +67 -49
  16. hatchet_sdk/clients/rest/api/user_api.py +24 -18
  17. hatchet_sdk/clients/rest/api/worker_api.py +12 -9
  18. hatchet_sdk/clients/rest/api/workflow_api.py +3073 -936
  19. hatchet_sdk/clients/rest/api/workflow_run_api.py +669 -21
  20. hatchet_sdk/clients/rest/api_client.py +34 -11
  21. hatchet_sdk/clients/rest/configuration.py +161 -36
  22. hatchet_sdk/clients/rest/models/__init__.py +21 -0
  23. hatchet_sdk/clients/rest/models/api_errors.py +3 -3
  24. hatchet_sdk/clients/rest/models/bulk_create_event_request.py +3 -3
  25. hatchet_sdk/clients/rest/models/bulk_create_event_response.py +3 -3
  26. hatchet_sdk/clients/{cloud_rest/models/managed_worker_create_request_build_config_steps_inner.py → rest/models/create_cron_workflow_trigger_request.py} +18 -14
  27. hatchet_sdk/clients/{cloud_rest/models/github_app_list_installations200_response_rows_inner.py → rest/models/cron_workflows.py} +54 -21
  28. hatchet_sdk/clients/{cloud_rest/models/log_list200_response.py → rest/models/cron_workflows_list.py} +13 -22
  29. hatchet_sdk/clients/rest/models/cron_workflows_order_by_field.py +37 -0
  30. hatchet_sdk/clients/rest/models/event_list.py +3 -3
  31. hatchet_sdk/clients/rest/models/get_step_run_diff_response.py +3 -3
  32. hatchet_sdk/clients/rest/models/job.py +3 -3
  33. hatchet_sdk/clients/rest/models/job_run.py +3 -3
  34. hatchet_sdk/clients/rest/models/list_api_tokens_response.py +3 -3
  35. hatchet_sdk/clients/rest/models/list_pull_requests_response.py +3 -3
  36. hatchet_sdk/clients/rest/models/list_slack_webhooks.py +3 -3
  37. hatchet_sdk/clients/rest/models/list_sns_integrations.py +3 -3
  38. hatchet_sdk/clients/rest/models/log_line_list.py +3 -3
  39. hatchet_sdk/clients/rest/models/rate_limit_list.py +3 -3
  40. hatchet_sdk/clients/rest/models/replay_workflow_runs_response.py +3 -3
  41. hatchet_sdk/clients/{cloud_rest/models/log_list200_response_rows_inner.py → rest/models/schedule_workflow_run_request.py} +12 -12
  42. hatchet_sdk/clients/rest/models/scheduled_run_status.py +42 -0
  43. hatchet_sdk/clients/rest/models/scheduled_workflows.py +153 -0
  44. hatchet_sdk/clients/{cloud_rest/models/managed_worker_list200_response.py → rest/models/scheduled_workflows_list.py} +13 -22
  45. hatchet_sdk/clients/rest/models/scheduled_workflows_order_by_field.py +37 -0
  46. hatchet_sdk/clients/rest/models/step_run_archive_list.py +3 -3
  47. hatchet_sdk/clients/rest/models/step_run_event_list.py +3 -3
  48. hatchet_sdk/clients/rest/models/tenant_alert_email_group_list.py +3 -3
  49. hatchet_sdk/clients/rest/models/tenant_invite_list.py +3 -3
  50. hatchet_sdk/clients/rest/models/tenant_list.py +3 -3
  51. hatchet_sdk/clients/rest/models/tenant_member_list.py +3 -3
  52. hatchet_sdk/clients/rest/models/tenant_queue_metrics.py +16 -0
  53. hatchet_sdk/clients/rest/models/tenant_resource_policy.py +3 -3
  54. hatchet_sdk/clients/rest/models/tenant_step_run_queue_metrics.py +1 -1
  55. hatchet_sdk/clients/rest/models/user_tenant_memberships_list.py +3 -3
  56. hatchet_sdk/clients/rest/models/webhook_worker_list_response.py +3 -3
  57. hatchet_sdk/clients/rest/models/webhook_worker_request_list_response.py +3 -3
  58. hatchet_sdk/clients/rest/models/worker.py +20 -9
  59. hatchet_sdk/clients/rest/models/worker_list.py +3 -3
  60. hatchet_sdk/clients/{cloud_rest/models/tenant_billing_state_get200_response_payment_methods_inner.py → rest/models/worker_runtime_info.py} +23 -19
  61. hatchet_sdk/clients/rest/models/worker_runtime_sdks.py +38 -0
  62. hatchet_sdk/clients/rest/models/workflow.py +9 -9
  63. hatchet_sdk/clients/rest/models/workflow_list.py +3 -3
  64. hatchet_sdk/clients/rest/models/workflow_run.py +3 -3
  65. hatchet_sdk/clients/rest/models/workflow_run_list.py +3 -3
  66. hatchet_sdk/clients/rest/models/workflow_run_shape.py +3 -3
  67. hatchet_sdk/clients/rest/models/workflow_runs_metrics.py +1 -5
  68. hatchet_sdk/clients/rest/models/workflow_triggers.py +6 -6
  69. hatchet_sdk/clients/rest/models/workflow_version.py +3 -3
  70. hatchet_sdk/clients/rest/rest.py +3 -3
  71. hatchet_sdk/clients/rest_client.py +200 -21
  72. hatchet_sdk/contracts/dispatcher_pb2.py +71 -67
  73. hatchet_sdk/contracts/dispatcher_pb2.pyi +31 -2
  74. hatchet_sdk/contracts/events_pb2.pyi +2 -0
  75. hatchet_sdk/contracts/workflows_pb2.py +42 -40
  76. hatchet_sdk/contracts/workflows_pb2.pyi +24 -6
  77. hatchet_sdk/features/cron.py +286 -0
  78. hatchet_sdk/features/scheduled.py +248 -0
  79. hatchet_sdk/hatchet.py +80 -79
  80. hatchet_sdk/loader.py +37 -14
  81. hatchet_sdk/utils/serialization.py +15 -0
  82. hatchet_sdk/utils/tracing.py +67 -0
  83. hatchet_sdk/worker/runner/runner.py +158 -112
  84. hatchet_sdk/worker/worker.py +1 -17
  85. hatchet_sdk/workflow.py +4 -0
  86. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.42.0.dist-info}/METADATA +8 -2
  87. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.42.0.dist-info}/RECORD +89 -143
  88. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.42.0.dist-info}/entry_points.txt +1 -1
  89. hatchet_sdk/clients/cloud_rest/__init__.py +0 -186
  90. hatchet_sdk/clients/cloud_rest/api/__init__.py +0 -14
  91. hatchet_sdk/clients/cloud_rest/api/billing_api.py +0 -819
  92. hatchet_sdk/clients/cloud_rest/api/build_api.py +0 -298
  93. hatchet_sdk/clients/cloud_rest/api/feature_flags_api.py +0 -295
  94. hatchet_sdk/clients/cloud_rest/api/github_api.py +0 -1347
  95. hatchet_sdk/clients/cloud_rest/api/log_api.py +0 -971
  96. hatchet_sdk/clients/cloud_rest/api/managed_worker_api.py +0 -2546
  97. hatchet_sdk/clients/cloud_rest/api/metadata_api.py +0 -265
  98. hatchet_sdk/clients/cloud_rest/api/metrics_api.py +0 -1026
  99. hatchet_sdk/clients/cloud_rest/api/tenant_api.py +0 -301
  100. hatchet_sdk/clients/cloud_rest/api/user_api.py +0 -473
  101. hatchet_sdk/clients/cloud_rest/api/workflow_api.py +0 -369
  102. hatchet_sdk/clients/cloud_rest/api_client.py +0 -727
  103. hatchet_sdk/clients/cloud_rest/api_response.py +0 -22
  104. hatchet_sdk/clients/cloud_rest/configuration.py +0 -488
  105. hatchet_sdk/clients/cloud_rest/exceptions.py +0 -200
  106. hatchet_sdk/clients/cloud_rest/models/__init__.py +0 -157
  107. hatchet_sdk/clients/cloud_rest/models/billing_portal_link_get200_response.py +0 -85
  108. hatchet_sdk/clients/cloud_rest/models/build_get200_response.py +0 -121
  109. hatchet_sdk/clients/cloud_rest/models/github_app_list_branches200_response_inner.py +0 -86
  110. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response.py +0 -119
  111. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_pagination.py +0 -95
  112. hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_rows_inner_metadata.py +0 -98
  113. hatchet_sdk/clients/cloud_rest/models/github_app_list_repos200_response_inner.py +0 -86
  114. hatchet_sdk/clients/cloud_rest/models/infra_as_code_create_request.py +0 -107
  115. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner.py +0 -136
  116. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_event.py +0 -83
  117. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly.py +0 -100
  118. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly_app.py +0 -86
  119. hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_log.py +0 -83
  120. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request.py +0 -128
  121. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_build_config.py +0 -121
  122. hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_runtime_config.py +0 -166
  123. hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response.py +0 -119
  124. hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response_rows_inner.py +0 -117
  125. hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response.py +0 -119
  126. hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response_rows_inner.py +0 -113
  127. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner.py +0 -154
  128. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config.py +0 -151
  129. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config_steps_inner.py +0 -109
  130. hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_runtime_configs_inner.py +0 -171
  131. hatchet_sdk/clients/cloud_rest/models/managed_worker_update_request.py +0 -131
  132. hatchet_sdk/clients/cloud_rest/models/metadata_get200_response.py +0 -101
  133. hatchet_sdk/clients/cloud_rest/models/metadata_get400_response.py +0 -105
  134. hatchet_sdk/clients/cloud_rest/models/metadata_get400_response_errors_inner.py +0 -102
  135. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner.py +0 -108
  136. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner.py +0 -102
  137. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram.py +0 -113
  138. hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram_buckets_inner.py +0 -93
  139. hatchet_sdk/clients/cloud_rest/models/runtime_config_list_actions200_response.py +0 -83
  140. hatchet_sdk/clients/cloud_rest/models/subscription_upsert200_response.py +0 -114
  141. hatchet_sdk/clients/cloud_rest/models/subscription_upsert_request.py +0 -88
  142. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response.py +0 -170
  143. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_coupons_inner.py +0 -137
  144. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_plans_inner.py +0 -103
  145. hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_subscription.py +0 -114
  146. hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response.py +0 -107
  147. hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response_results_inner.py +0 -105
  148. hatchet_sdk/clients/cloud_rest/rest.py +0 -182
  149. hatchet_sdk/compute/__init__.py +0 -0
  150. hatchet_sdk/compute/configs.py +0 -34
  151. hatchet_sdk/compute/managed_compute.py +0 -111
  152. {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.42.0.dist-info}/WHEEL +0 -0
@@ -1,157 +0,0 @@
1
- # coding: utf-8
2
-
3
- # flake8: noqa
4
- """
5
- Hatchet API
6
-
7
- The Hatchet API
8
-
9
- The version of the OpenAPI document: 1.0.0
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
-
16
- # import models into model package
17
- from hatchet_sdk.clients.cloud_rest.models.billing_portal_link_get200_response import (
18
- BillingPortalLinkGet200Response,
19
- )
20
- from hatchet_sdk.clients.cloud_rest.models.build_get200_response import (
21
- BuildGet200Response,
22
- )
23
- from hatchet_sdk.clients.cloud_rest.models.github_app_list_branches200_response_inner import (
24
- GithubAppListBranches200ResponseInner,
25
- )
26
- from hatchet_sdk.clients.cloud_rest.models.github_app_list_installations200_response import (
27
- GithubAppListInstallations200Response,
28
- )
29
- from hatchet_sdk.clients.cloud_rest.models.github_app_list_installations200_response_pagination import (
30
- GithubAppListInstallations200ResponsePagination,
31
- )
32
- from hatchet_sdk.clients.cloud_rest.models.github_app_list_installations200_response_rows_inner import (
33
- GithubAppListInstallations200ResponseRowsInner,
34
- )
35
- from hatchet_sdk.clients.cloud_rest.models.github_app_list_installations200_response_rows_inner_metadata import (
36
- GithubAppListInstallations200ResponseRowsInnerMetadata,
37
- )
38
- from hatchet_sdk.clients.cloud_rest.models.github_app_list_repos200_response_inner import (
39
- GithubAppListRepos200ResponseInner,
40
- )
41
- from hatchet_sdk.clients.cloud_rest.models.infra_as_code_create_request import (
42
- InfraAsCodeCreateRequest,
43
- )
44
- from hatchet_sdk.clients.cloud_rest.models.log_create_request_inner import (
45
- LogCreateRequestInner,
46
- )
47
- from hatchet_sdk.clients.cloud_rest.models.log_create_request_inner_event import (
48
- LogCreateRequestInnerEvent,
49
- )
50
- from hatchet_sdk.clients.cloud_rest.models.log_create_request_inner_fly import (
51
- LogCreateRequestInnerFly,
52
- )
53
- from hatchet_sdk.clients.cloud_rest.models.log_create_request_inner_fly_app import (
54
- LogCreateRequestInnerFlyApp,
55
- )
56
- from hatchet_sdk.clients.cloud_rest.models.log_create_request_inner_log import (
57
- LogCreateRequestInnerLog,
58
- )
59
- from hatchet_sdk.clients.cloud_rest.models.log_list200_response import (
60
- LogList200Response,
61
- )
62
- from hatchet_sdk.clients.cloud_rest.models.log_list200_response_rows_inner import (
63
- LogList200ResponseRowsInner,
64
- )
65
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_create_request import (
66
- ManagedWorkerCreateRequest,
67
- )
68
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_create_request_build_config import (
69
- ManagedWorkerCreateRequestBuildConfig,
70
- )
71
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_create_request_build_config_steps_inner import (
72
- ManagedWorkerCreateRequestBuildConfigStepsInner,
73
- )
74
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_create_request_runtime_config import (
75
- ManagedWorkerCreateRequestRuntimeConfig,
76
- )
77
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_events_list200_response import (
78
- ManagedWorkerEventsList200Response,
79
- )
80
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_events_list200_response_rows_inner import (
81
- ManagedWorkerEventsList200ResponseRowsInner,
82
- )
83
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_instances_list200_response import (
84
- ManagedWorkerInstancesList200Response,
85
- )
86
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_instances_list200_response_rows_inner import (
87
- ManagedWorkerInstancesList200ResponseRowsInner,
88
- )
89
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_list200_response import (
90
- ManagedWorkerList200Response,
91
- )
92
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_list200_response_rows_inner import (
93
- ManagedWorkerList200ResponseRowsInner,
94
- )
95
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_list200_response_rows_inner_build_config import (
96
- ManagedWorkerList200ResponseRowsInnerBuildConfig,
97
- )
98
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_list200_response_rows_inner_build_config_steps_inner import (
99
- ManagedWorkerList200ResponseRowsInnerBuildConfigStepsInner,
100
- )
101
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_list200_response_rows_inner_runtime_configs_inner import (
102
- ManagedWorkerList200ResponseRowsInnerRuntimeConfigsInner,
103
- )
104
- from hatchet_sdk.clients.cloud_rest.models.managed_worker_update_request import (
105
- ManagedWorkerUpdateRequest,
106
- )
107
- from hatchet_sdk.clients.cloud_rest.models.metadata_get200_response import (
108
- MetadataGet200Response,
109
- )
110
- from hatchet_sdk.clients.cloud_rest.models.metadata_get400_response import (
111
- MetadataGet400Response,
112
- )
113
- from hatchet_sdk.clients.cloud_rest.models.metadata_get400_response_errors_inner import (
114
- MetadataGet400ResponseErrorsInner,
115
- )
116
- from hatchet_sdk.clients.cloud_rest.models.metrics_cpu_get200_response_inner import (
117
- MetricsCpuGet200ResponseInner,
118
- )
119
- from hatchet_sdk.clients.cloud_rest.models.metrics_cpu_get200_response_inner_histograms_inner import (
120
- MetricsCpuGet200ResponseInnerHistogramsInner,
121
- )
122
- from hatchet_sdk.clients.cloud_rest.models.metrics_cpu_get200_response_inner_histograms_inner_histogram import (
123
- MetricsCpuGet200ResponseInnerHistogramsInnerHistogram,
124
- )
125
- from hatchet_sdk.clients.cloud_rest.models.metrics_cpu_get200_response_inner_histograms_inner_histogram_buckets_inner import (
126
- MetricsCpuGet200ResponseInnerHistogramsInnerHistogramBucketsInner,
127
- )
128
- from hatchet_sdk.clients.cloud_rest.models.runtime_config_list_actions200_response import (
129
- RuntimeConfigListActions200Response,
130
- )
131
- from hatchet_sdk.clients.cloud_rest.models.subscription_upsert200_response import (
132
- SubscriptionUpsert200Response,
133
- )
134
- from hatchet_sdk.clients.cloud_rest.models.subscription_upsert_request import (
135
- SubscriptionUpsertRequest,
136
- )
137
- from hatchet_sdk.clients.cloud_rest.models.tenant_billing_state_get200_response import (
138
- TenantBillingStateGet200Response,
139
- )
140
- from hatchet_sdk.clients.cloud_rest.models.tenant_billing_state_get200_response_coupons_inner import (
141
- TenantBillingStateGet200ResponseCouponsInner,
142
- )
143
- from hatchet_sdk.clients.cloud_rest.models.tenant_billing_state_get200_response_payment_methods_inner import (
144
- TenantBillingStateGet200ResponsePaymentMethodsInner,
145
- )
146
- from hatchet_sdk.clients.cloud_rest.models.tenant_billing_state_get200_response_plans_inner import (
147
- TenantBillingStateGet200ResponsePlansInner,
148
- )
149
- from hatchet_sdk.clients.cloud_rest.models.tenant_billing_state_get200_response_subscription import (
150
- TenantBillingStateGet200ResponseSubscription,
151
- )
152
- from hatchet_sdk.clients.cloud_rest.models.workflow_run_events_get_metrics200_response import (
153
- WorkflowRunEventsGetMetrics200Response,
154
- )
155
- from hatchet_sdk.clients.cloud_rest.models.workflow_run_events_get_metrics200_response_results_inner import (
156
- WorkflowRunEventsGetMetrics200ResponseResultsInner,
157
- )
@@ -1,85 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Hatchet API
5
-
6
- The Hatchet API
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
-
11
- Do not edit the class manually.
12
- """ # noqa: E501
13
-
14
-
15
- from __future__ import annotations
16
-
17
- import json
18
- import pprint
19
- import re # noqa: F401
20
- from typing import Any, ClassVar, Dict, List, Optional, Set
21
-
22
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
- from typing_extensions import Self
24
-
25
-
26
- class BillingPortalLinkGet200Response(BaseModel):
27
- """
28
- BillingPortalLinkGet200Response
29
- """ # noqa: E501
30
-
31
- url: Optional[StrictStr] = Field(
32
- default=None, description="The url to the billing portal"
33
- )
34
- __properties: ClassVar[List[str]] = ["url"]
35
-
36
- model_config = ConfigDict(
37
- populate_by_name=True,
38
- validate_assignment=True,
39
- protected_namespaces=(),
40
- )
41
-
42
- def to_str(self) -> str:
43
- """Returns the string representation of the model using alias"""
44
- return pprint.pformat(self.model_dump(by_alias=True))
45
-
46
- def to_json(self) -> str:
47
- """Returns the JSON representation of the model using alias"""
48
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
- return json.dumps(self.to_dict())
50
-
51
- @classmethod
52
- def from_json(cls, json_str: str) -> Optional[Self]:
53
- """Create an instance of BillingPortalLinkGet200Response from a JSON string"""
54
- return cls.from_dict(json.loads(json_str))
55
-
56
- def to_dict(self) -> Dict[str, Any]:
57
- """Return the dictionary representation of the model using alias.
58
-
59
- This has the following differences from calling pydantic's
60
- `self.model_dump(by_alias=True)`:
61
-
62
- * `None` is only added to the output dict for nullable fields that
63
- were set at model initialization. Other fields with value `None`
64
- are ignored.
65
- """
66
- excluded_fields: Set[str] = set([])
67
-
68
- _dict = self.model_dump(
69
- by_alias=True,
70
- exclude=excluded_fields,
71
- exclude_none=True,
72
- )
73
- return _dict
74
-
75
- @classmethod
76
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
- """Create an instance of BillingPortalLinkGet200Response from a dict"""
78
- if obj is None:
79
- return None
80
-
81
- if not isinstance(obj, dict):
82
- return cls.model_validate(obj)
83
-
84
- _obj = cls.model_validate({"url": obj.get("url")})
85
- return _obj
@@ -1,121 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Hatchet API
5
-
6
- The Hatchet API
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
-
11
- Do not edit the class manually.
12
- """ # noqa: E501
13
-
14
-
15
- from __future__ import annotations
16
-
17
- import json
18
- import pprint
19
- import re # noqa: F401
20
- from datetime import datetime
21
- from typing import Any, ClassVar, Dict, List, Optional, Set
22
-
23
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
24
- from typing_extensions import Self
25
-
26
- from hatchet_sdk.clients.cloud_rest.models.github_app_list_installations200_response_rows_inner_metadata import (
27
- GithubAppListInstallations200ResponseRowsInnerMetadata,
28
- )
29
-
30
-
31
- class BuildGet200Response(BaseModel):
32
- """
33
- BuildGet200Response
34
- """ # noqa: E501
35
-
36
- metadata: Optional[GithubAppListInstallations200ResponseRowsInnerMetadata] = None
37
- status: StrictStr
38
- status_detail: Optional[StrictStr] = Field(default=None, alias="statusDetail")
39
- create_time: datetime = Field(alias="createTime")
40
- start_time: Optional[datetime] = Field(default=None, alias="startTime")
41
- finish_time: Optional[datetime] = Field(default=None, alias="finishTime")
42
- build_config_id: StrictStr = Field(alias="buildConfigId")
43
- __properties: ClassVar[List[str]] = [
44
- "metadata",
45
- "status",
46
- "statusDetail",
47
- "createTime",
48
- "startTime",
49
- "finishTime",
50
- "buildConfigId",
51
- ]
52
-
53
- model_config = ConfigDict(
54
- populate_by_name=True,
55
- validate_assignment=True,
56
- protected_namespaces=(),
57
- )
58
-
59
- def to_str(self) -> str:
60
- """Returns the string representation of the model using alias"""
61
- return pprint.pformat(self.model_dump(by_alias=True))
62
-
63
- def to_json(self) -> str:
64
- """Returns the JSON representation of the model using alias"""
65
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
66
- return json.dumps(self.to_dict())
67
-
68
- @classmethod
69
- def from_json(cls, json_str: str) -> Optional[Self]:
70
- """Create an instance of BuildGet200Response from a JSON string"""
71
- return cls.from_dict(json.loads(json_str))
72
-
73
- def to_dict(self) -> Dict[str, Any]:
74
- """Return the dictionary representation of the model using alias.
75
-
76
- This has the following differences from calling pydantic's
77
- `self.model_dump(by_alias=True)`:
78
-
79
- * `None` is only added to the output dict for nullable fields that
80
- were set at model initialization. Other fields with value `None`
81
- are ignored.
82
- """
83
- excluded_fields: Set[str] = set([])
84
-
85
- _dict = self.model_dump(
86
- by_alias=True,
87
- exclude=excluded_fields,
88
- exclude_none=True,
89
- )
90
- # override the default output from pydantic by calling `to_dict()` of metadata
91
- if self.metadata:
92
- _dict["metadata"] = self.metadata.to_dict()
93
- return _dict
94
-
95
- @classmethod
96
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
97
- """Create an instance of BuildGet200Response from a dict"""
98
- if obj is None:
99
- return None
100
-
101
- if not isinstance(obj, dict):
102
- return cls.model_validate(obj)
103
-
104
- _obj = cls.model_validate(
105
- {
106
- "metadata": (
107
- GithubAppListInstallations200ResponseRowsInnerMetadata.from_dict(
108
- obj["metadata"]
109
- )
110
- if obj.get("metadata") is not None
111
- else None
112
- ),
113
- "status": obj.get("status"),
114
- "statusDetail": obj.get("statusDetail"),
115
- "createTime": obj.get("createTime"),
116
- "startTime": obj.get("startTime"),
117
- "finishTime": obj.get("finishTime"),
118
- "buildConfigId": obj.get("buildConfigId"),
119
- }
120
- )
121
- return _obj
@@ -1,86 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Hatchet API
5
-
6
- The Hatchet API
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
-
11
- Do not edit the class manually.
12
- """ # noqa: E501
13
-
14
-
15
- from __future__ import annotations
16
-
17
- import json
18
- import pprint
19
- import re # noqa: F401
20
- from typing import Any, ClassVar, Dict, List, Optional, Set
21
-
22
- from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
23
- from typing_extensions import Self
24
-
25
-
26
- class GithubAppListBranches200ResponseInner(BaseModel):
27
- """
28
- GithubAppListBranches200ResponseInner
29
- """ # noqa: E501
30
-
31
- branch_name: StrictStr
32
- is_default: StrictBool
33
- __properties: ClassVar[List[str]] = ["branch_name", "is_default"]
34
-
35
- model_config = ConfigDict(
36
- populate_by_name=True,
37
- validate_assignment=True,
38
- protected_namespaces=(),
39
- )
40
-
41
- def to_str(self) -> str:
42
- """Returns the string representation of the model using alias"""
43
- return pprint.pformat(self.model_dump(by_alias=True))
44
-
45
- def to_json(self) -> str:
46
- """Returns the JSON representation of the model using alias"""
47
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
- return json.dumps(self.to_dict())
49
-
50
- @classmethod
51
- def from_json(cls, json_str: str) -> Optional[Self]:
52
- """Create an instance of GithubAppListBranches200ResponseInner from a JSON string"""
53
- return cls.from_dict(json.loads(json_str))
54
-
55
- def to_dict(self) -> Dict[str, Any]:
56
- """Return the dictionary representation of the model using alias.
57
-
58
- This has the following differences from calling pydantic's
59
- `self.model_dump(by_alias=True)`:
60
-
61
- * `None` is only added to the output dict for nullable fields that
62
- were set at model initialization. Other fields with value `None`
63
- are ignored.
64
- """
65
- excluded_fields: Set[str] = set([])
66
-
67
- _dict = self.model_dump(
68
- by_alias=True,
69
- exclude=excluded_fields,
70
- exclude_none=True,
71
- )
72
- return _dict
73
-
74
- @classmethod
75
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of GithubAppListBranches200ResponseInner from a dict"""
77
- if obj is None:
78
- return None
79
-
80
- if not isinstance(obj, dict):
81
- return cls.model_validate(obj)
82
-
83
- _obj = cls.model_validate(
84
- {"branch_name": obj.get("branch_name"), "is_default": obj.get("is_default")}
85
- )
86
- return _obj
@@ -1,119 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Hatchet API
5
-
6
- The Hatchet API
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
-
11
- Do not edit the class manually.
12
- """ # noqa: E501
13
-
14
-
15
- from __future__ import annotations
16
-
17
- import json
18
- import pprint
19
- import re # noqa: F401
20
- from typing import Any, ClassVar, Dict, List, Optional, Set
21
-
22
- from pydantic import BaseModel, ConfigDict
23
- from typing_extensions import Self
24
-
25
- from hatchet_sdk.clients.cloud_rest.models.github_app_list_installations200_response_pagination import (
26
- GithubAppListInstallations200ResponsePagination,
27
- )
28
- from hatchet_sdk.clients.cloud_rest.models.github_app_list_installations200_response_rows_inner import (
29
- GithubAppListInstallations200ResponseRowsInner,
30
- )
31
-
32
-
33
- class GithubAppListInstallations200Response(BaseModel):
34
- """
35
- GithubAppListInstallations200Response
36
- """ # noqa: E501
37
-
38
- pagination: GithubAppListInstallations200ResponsePagination
39
- rows: List[GithubAppListInstallations200ResponseRowsInner]
40
- __properties: ClassVar[List[str]] = ["pagination", "rows"]
41
-
42
- model_config = ConfigDict(
43
- populate_by_name=True,
44
- validate_assignment=True,
45
- protected_namespaces=(),
46
- )
47
-
48
- def to_str(self) -> str:
49
- """Returns the string representation of the model using alias"""
50
- return pprint.pformat(self.model_dump(by_alias=True))
51
-
52
- def to_json(self) -> str:
53
- """Returns the JSON representation of the model using alias"""
54
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
- return json.dumps(self.to_dict())
56
-
57
- @classmethod
58
- def from_json(cls, json_str: str) -> Optional[Self]:
59
- """Create an instance of GithubAppListInstallations200Response from a JSON string"""
60
- return cls.from_dict(json.loads(json_str))
61
-
62
- def to_dict(self) -> Dict[str, Any]:
63
- """Return the dictionary representation of the model using alias.
64
-
65
- This has the following differences from calling pydantic's
66
- `self.model_dump(by_alias=True)`:
67
-
68
- * `None` is only added to the output dict for nullable fields that
69
- were set at model initialization. Other fields with value `None`
70
- are ignored.
71
- """
72
- excluded_fields: Set[str] = set([])
73
-
74
- _dict = self.model_dump(
75
- by_alias=True,
76
- exclude=excluded_fields,
77
- exclude_none=True,
78
- )
79
- # override the default output from pydantic by calling `to_dict()` of pagination
80
- if self.pagination:
81
- _dict["pagination"] = self.pagination.to_dict()
82
- # override the default output from pydantic by calling `to_dict()` of each item in rows (list)
83
- _items = []
84
- if self.rows:
85
- for _item in self.rows:
86
- if _item:
87
- _items.append(_item.to_dict())
88
- _dict["rows"] = _items
89
- return _dict
90
-
91
- @classmethod
92
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
- """Create an instance of GithubAppListInstallations200Response from a dict"""
94
- if obj is None:
95
- return None
96
-
97
- if not isinstance(obj, dict):
98
- return cls.model_validate(obj)
99
-
100
- _obj = cls.model_validate(
101
- {
102
- "pagination": (
103
- GithubAppListInstallations200ResponsePagination.from_dict(
104
- obj["pagination"]
105
- )
106
- if obj.get("pagination") is not None
107
- else None
108
- ),
109
- "rows": (
110
- [
111
- GithubAppListInstallations200ResponseRowsInner.from_dict(_item)
112
- for _item in obj["rows"]
113
- ]
114
- if obj.get("rows") is not None
115
- else None
116
- ),
117
- }
118
- )
119
- return _obj
@@ -1,95 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Hatchet API
5
-
6
- The Hatchet API
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
-
11
- Do not edit the class manually.
12
- """ # noqa: E501
13
-
14
-
15
- from __future__ import annotations
16
-
17
- import json
18
- import pprint
19
- import re # noqa: F401
20
- from typing import Any, ClassVar, Dict, List, Optional, Set
21
-
22
- from pydantic import BaseModel, ConfigDict, Field, StrictInt
23
- from typing_extensions import Self
24
-
25
-
26
- class GithubAppListInstallations200ResponsePagination(BaseModel):
27
- """
28
- GithubAppListInstallations200ResponsePagination
29
- """ # noqa: E501
30
-
31
- current_page: Optional[StrictInt] = Field(
32
- default=None, description="the current page"
33
- )
34
- next_page: Optional[StrictInt] = Field(default=None, description="the next page")
35
- num_pages: Optional[StrictInt] = Field(
36
- default=None, description="the total number of pages for listing"
37
- )
38
- __properties: ClassVar[List[str]] = ["current_page", "next_page", "num_pages"]
39
-
40
- model_config = ConfigDict(
41
- populate_by_name=True,
42
- validate_assignment=True,
43
- protected_namespaces=(),
44
- )
45
-
46
- def to_str(self) -> str:
47
- """Returns the string representation of the model using alias"""
48
- return pprint.pformat(self.model_dump(by_alias=True))
49
-
50
- def to_json(self) -> str:
51
- """Returns the JSON representation of the model using alias"""
52
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
- return json.dumps(self.to_dict())
54
-
55
- @classmethod
56
- def from_json(cls, json_str: str) -> Optional[Self]:
57
- """Create an instance of GithubAppListInstallations200ResponsePagination from a JSON string"""
58
- return cls.from_dict(json.loads(json_str))
59
-
60
- def to_dict(self) -> Dict[str, Any]:
61
- """Return the dictionary representation of the model using alias.
62
-
63
- This has the following differences from calling pydantic's
64
- `self.model_dump(by_alias=True)`:
65
-
66
- * `None` is only added to the output dict for nullable fields that
67
- were set at model initialization. Other fields with value `None`
68
- are ignored.
69
- """
70
- excluded_fields: Set[str] = set([])
71
-
72
- _dict = self.model_dump(
73
- by_alias=True,
74
- exclude=excluded_fields,
75
- exclude_none=True,
76
- )
77
- return _dict
78
-
79
- @classmethod
80
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
- """Create an instance of GithubAppListInstallations200ResponsePagination from a dict"""
82
- if obj is None:
83
- return None
84
-
85
- if not isinstance(obj, dict):
86
- return cls.model_validate(obj)
87
-
88
- _obj = cls.model_validate(
89
- {
90
- "current_page": obj.get("current_page"),
91
- "next_page": obj.get("next_page"),
92
- "num_pages": obj.get("num_pages"),
93
- }
94
- )
95
- return _obj