hatchet-sdk 0.40.0a8__py3-none-any.whl → 0.41.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.
- hatchet_sdk/clients/admin.py +129 -59
- hatchet_sdk/clients/dispatcher/action_listener.py +25 -2
- hatchet_sdk/clients/events.py +91 -52
- hatchet_sdk/clients/rest/__init__.py +21 -0
- hatchet_sdk/clients/rest/api/api_token_api.py +12 -9
- hatchet_sdk/clients/rest/api/default_api.py +24 -18
- hatchet_sdk/clients/rest/api/event_api.py +32 -24
- hatchet_sdk/clients/rest/api/github_api.py +4 -3
- hatchet_sdk/clients/rest/api/log_api.py +4 -3
- hatchet_sdk/clients/rest/api/metadata_api.py +12 -9
- hatchet_sdk/clients/rest/api/rate_limits_api.py +7 -4
- hatchet_sdk/clients/rest/api/slack_api.py +8 -6
- hatchet_sdk/clients/rest/api/sns_api.py +12 -9
- hatchet_sdk/clients/rest/api/step_run_api.py +28 -21
- hatchet_sdk/clients/rest/api/tenant_api.py +67 -49
- hatchet_sdk/clients/rest/api/user_api.py +24 -18
- hatchet_sdk/clients/rest/api/worker_api.py +12 -9
- hatchet_sdk/clients/rest/api/workflow_api.py +3073 -936
- hatchet_sdk/clients/rest/api/workflow_run_api.py +669 -21
- hatchet_sdk/clients/rest/api_client.py +34 -11
- hatchet_sdk/clients/rest/configuration.py +161 -36
- hatchet_sdk/clients/rest/models/__init__.py +21 -0
- hatchet_sdk/clients/rest/models/api_errors.py +3 -3
- hatchet_sdk/clients/rest/models/bulk_create_event_request.py +3 -3
- hatchet_sdk/clients/rest/models/bulk_create_event_response.py +3 -3
- 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
- hatchet_sdk/clients/{cloud_rest/models/github_app_list_installations200_response_rows_inner.py → rest/models/cron_workflows.py} +54 -21
- hatchet_sdk/clients/{cloud_rest/models/log_list200_response.py → rest/models/cron_workflows_list.py} +13 -22
- hatchet_sdk/clients/rest/models/cron_workflows_order_by_field.py +37 -0
- hatchet_sdk/clients/rest/models/event_list.py +3 -3
- hatchet_sdk/clients/rest/models/get_step_run_diff_response.py +3 -3
- hatchet_sdk/clients/rest/models/job.py +3 -3
- hatchet_sdk/clients/rest/models/job_run.py +3 -3
- hatchet_sdk/clients/rest/models/list_api_tokens_response.py +3 -3
- hatchet_sdk/clients/rest/models/list_pull_requests_response.py +3 -3
- hatchet_sdk/clients/rest/models/list_slack_webhooks.py +3 -3
- hatchet_sdk/clients/rest/models/list_sns_integrations.py +3 -3
- hatchet_sdk/clients/rest/models/log_line_list.py +3 -3
- hatchet_sdk/clients/rest/models/rate_limit_list.py +3 -3
- hatchet_sdk/clients/rest/models/replay_workflow_runs_response.py +3 -3
- hatchet_sdk/clients/{cloud_rest/models/log_list200_response_rows_inner.py → rest/models/schedule_workflow_run_request.py} +12 -12
- hatchet_sdk/clients/rest/models/scheduled_run_status.py +42 -0
- hatchet_sdk/clients/rest/models/scheduled_workflows.py +153 -0
- hatchet_sdk/clients/{cloud_rest/models/managed_worker_list200_response.py → rest/models/scheduled_workflows_list.py} +13 -22
- hatchet_sdk/clients/rest/models/scheduled_workflows_order_by_field.py +37 -0
- hatchet_sdk/clients/rest/models/step_run_archive_list.py +3 -3
- hatchet_sdk/clients/rest/models/step_run_event_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_alert_email_group_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_invite_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_member_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_queue_metrics.py +16 -0
- hatchet_sdk/clients/rest/models/tenant_resource_policy.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_step_run_queue_metrics.py +1 -1
- hatchet_sdk/clients/rest/models/user_tenant_memberships_list.py +3 -3
- hatchet_sdk/clients/rest/models/webhook_worker_list_response.py +3 -3
- hatchet_sdk/clients/rest/models/webhook_worker_request_list_response.py +3 -3
- hatchet_sdk/clients/rest/models/worker.py +20 -9
- hatchet_sdk/clients/rest/models/worker_list.py +3 -3
- hatchet_sdk/clients/{cloud_rest/models/tenant_billing_state_get200_response_payment_methods_inner.py → rest/models/worker_runtime_info.py} +23 -19
- hatchet_sdk/clients/rest/models/worker_runtime_sdks.py +38 -0
- hatchet_sdk/clients/rest/models/workflow.py +9 -9
- hatchet_sdk/clients/rest/models/workflow_list.py +3 -3
- hatchet_sdk/clients/rest/models/workflow_run.py +3 -3
- hatchet_sdk/clients/rest/models/workflow_run_list.py +3 -3
- hatchet_sdk/clients/rest/models/workflow_run_shape.py +3 -3
- hatchet_sdk/clients/rest/models/workflow_runs_metrics.py +1 -5
- hatchet_sdk/clients/rest/models/workflow_triggers.py +6 -6
- hatchet_sdk/clients/rest/models/workflow_version.py +3 -3
- hatchet_sdk/clients/rest/rest.py +3 -3
- hatchet_sdk/clients/rest_client.py +200 -21
- hatchet_sdk/contracts/dispatcher_pb2.pyi +2 -0
- hatchet_sdk/contracts/events_pb2.pyi +2 -0
- hatchet_sdk/contracts/workflows_pb2.pyi +2 -0
- hatchet_sdk/features/cron.py +286 -0
- hatchet_sdk/features/scheduled.py +248 -0
- hatchet_sdk/hatchet.py +71 -79
- hatchet_sdk/loader.py +37 -14
- hatchet_sdk/utils/serialization.py +15 -0
- hatchet_sdk/utils/tracing.py +67 -0
- hatchet_sdk/worker/runner/runner.py +158 -112
- hatchet_sdk/worker/worker.py +1 -17
- {hatchet_sdk-0.40.0a8.dist-info → hatchet_sdk-0.41.0.dist-info}/METADATA +8 -2
- {hatchet_sdk-0.40.0a8.dist-info → hatchet_sdk-0.41.0.dist-info}/RECORD +86 -140
- {hatchet_sdk-0.40.0a8.dist-info → hatchet_sdk-0.41.0.dist-info}/entry_points.txt +0 -1
- hatchet_sdk/clients/cloud_rest/__init__.py +0 -186
- hatchet_sdk/clients/cloud_rest/api/__init__.py +0 -14
- hatchet_sdk/clients/cloud_rest/api/billing_api.py +0 -819
- hatchet_sdk/clients/cloud_rest/api/build_api.py +0 -298
- hatchet_sdk/clients/cloud_rest/api/feature_flags_api.py +0 -295
- hatchet_sdk/clients/cloud_rest/api/github_api.py +0 -1347
- hatchet_sdk/clients/cloud_rest/api/log_api.py +0 -971
- hatchet_sdk/clients/cloud_rest/api/managed_worker_api.py +0 -2546
- hatchet_sdk/clients/cloud_rest/api/metadata_api.py +0 -265
- hatchet_sdk/clients/cloud_rest/api/metrics_api.py +0 -1026
- hatchet_sdk/clients/cloud_rest/api/tenant_api.py +0 -301
- hatchet_sdk/clients/cloud_rest/api/user_api.py +0 -473
- hatchet_sdk/clients/cloud_rest/api/workflow_api.py +0 -369
- hatchet_sdk/clients/cloud_rest/api_client.py +0 -727
- hatchet_sdk/clients/cloud_rest/api_response.py +0 -22
- hatchet_sdk/clients/cloud_rest/configuration.py +0 -488
- hatchet_sdk/clients/cloud_rest/exceptions.py +0 -200
- hatchet_sdk/clients/cloud_rest/models/__init__.py +0 -157
- hatchet_sdk/clients/cloud_rest/models/billing_portal_link_get200_response.py +0 -85
- hatchet_sdk/clients/cloud_rest/models/build_get200_response.py +0 -121
- hatchet_sdk/clients/cloud_rest/models/github_app_list_branches200_response_inner.py +0 -86
- hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response.py +0 -119
- hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_pagination.py +0 -95
- hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_rows_inner_metadata.py +0 -98
- hatchet_sdk/clients/cloud_rest/models/github_app_list_repos200_response_inner.py +0 -86
- hatchet_sdk/clients/cloud_rest/models/infra_as_code_create_request.py +0 -107
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner.py +0 -136
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_event.py +0 -83
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly.py +0 -100
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly_app.py +0 -86
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_log.py +0 -83
- hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request.py +0 -128
- hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_build_config.py +0 -121
- hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_runtime_config.py +0 -166
- hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response.py +0 -119
- hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response_rows_inner.py +0 -117
- hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response.py +0 -119
- hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response_rows_inner.py +0 -113
- hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner.py +0 -154
- hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config.py +0 -151
- hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config_steps_inner.py +0 -109
- hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_runtime_configs_inner.py +0 -171
- hatchet_sdk/clients/cloud_rest/models/managed_worker_update_request.py +0 -131
- hatchet_sdk/clients/cloud_rest/models/metadata_get200_response.py +0 -101
- hatchet_sdk/clients/cloud_rest/models/metadata_get400_response.py +0 -105
- hatchet_sdk/clients/cloud_rest/models/metadata_get400_response_errors_inner.py +0 -102
- hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner.py +0 -108
- hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner.py +0 -102
- hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram.py +0 -113
- hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram_buckets_inner.py +0 -93
- hatchet_sdk/clients/cloud_rest/models/runtime_config_list_actions200_response.py +0 -83
- hatchet_sdk/clients/cloud_rest/models/subscription_upsert200_response.py +0 -114
- hatchet_sdk/clients/cloud_rest/models/subscription_upsert_request.py +0 -88
- hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response.py +0 -170
- hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_coupons_inner.py +0 -137
- hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_plans_inner.py +0 -103
- hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_subscription.py +0 -114
- hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response.py +0 -107
- hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response_results_inner.py +0 -105
- hatchet_sdk/clients/cloud_rest/rest.py +0 -182
- hatchet_sdk/compute/__init__.py +0 -0
- hatchet_sdk/compute/configs.py +0 -34
- hatchet_sdk/compute/managed_compute.py +0 -111
- {hatchet_sdk-0.40.0a8.dist-info → hatchet_sdk-0.41.0.dist-info}/WHEEL +0 -0
|
@@ -1,102 +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, StrictStr
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class MetadataGet400ResponseErrorsInner(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
MetadataGet400ResponseErrorsInner
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
|
|
31
|
-
code: Optional[StrictInt] = Field(
|
|
32
|
-
default=None, description="a custom Hatchet error code"
|
|
33
|
-
)
|
|
34
|
-
var_field: Optional[StrictStr] = Field(
|
|
35
|
-
default=None,
|
|
36
|
-
description="the field that this error is associated with, if applicable",
|
|
37
|
-
alias="field",
|
|
38
|
-
)
|
|
39
|
-
description: StrictStr = Field(description="a description for this error")
|
|
40
|
-
docs_link: Optional[StrictStr] = Field(
|
|
41
|
-
default=None,
|
|
42
|
-
description="a link to the documentation for this error, if it exists",
|
|
43
|
-
)
|
|
44
|
-
__properties: ClassVar[List[str]] = ["code", "field", "description", "docs_link"]
|
|
45
|
-
|
|
46
|
-
model_config = ConfigDict(
|
|
47
|
-
populate_by_name=True,
|
|
48
|
-
validate_assignment=True,
|
|
49
|
-
protected_namespaces=(),
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
def to_str(self) -> str:
|
|
53
|
-
"""Returns the string representation of the model using alias"""
|
|
54
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
55
|
-
|
|
56
|
-
def to_json(self) -> str:
|
|
57
|
-
"""Returns the JSON representation of the model using alias"""
|
|
58
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
59
|
-
return json.dumps(self.to_dict())
|
|
60
|
-
|
|
61
|
-
@classmethod
|
|
62
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
63
|
-
"""Create an instance of MetadataGet400ResponseErrorsInner from a JSON string"""
|
|
64
|
-
return cls.from_dict(json.loads(json_str))
|
|
65
|
-
|
|
66
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
67
|
-
"""Return the dictionary representation of the model using alias.
|
|
68
|
-
|
|
69
|
-
This has the following differences from calling pydantic's
|
|
70
|
-
`self.model_dump(by_alias=True)`:
|
|
71
|
-
|
|
72
|
-
* `None` is only added to the output dict for nullable fields that
|
|
73
|
-
were set at model initialization. Other fields with value `None`
|
|
74
|
-
are ignored.
|
|
75
|
-
"""
|
|
76
|
-
excluded_fields: Set[str] = set([])
|
|
77
|
-
|
|
78
|
-
_dict = self.model_dump(
|
|
79
|
-
by_alias=True,
|
|
80
|
-
exclude=excluded_fields,
|
|
81
|
-
exclude_none=True,
|
|
82
|
-
)
|
|
83
|
-
return _dict
|
|
84
|
-
|
|
85
|
-
@classmethod
|
|
86
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
-
"""Create an instance of MetadataGet400ResponseErrorsInner from a dict"""
|
|
88
|
-
if obj is None:
|
|
89
|
-
return None
|
|
90
|
-
|
|
91
|
-
if not isinstance(obj, dict):
|
|
92
|
-
return cls.model_validate(obj)
|
|
93
|
-
|
|
94
|
-
_obj = cls.model_validate(
|
|
95
|
-
{
|
|
96
|
-
"code": obj.get("code"),
|
|
97
|
-
"field": obj.get("field"),
|
|
98
|
-
"description": obj.get("description"),
|
|
99
|
-
"docs_link": obj.get("docs_link"),
|
|
100
|
-
}
|
|
101
|
-
)
|
|
102
|
-
return _obj
|
|
@@ -1,108 +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, StrictStr
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
-
|
|
25
|
-
from hatchet_sdk.clients.cloud_rest.models.metrics_cpu_get200_response_inner_histograms_inner import (
|
|
26
|
-
MetricsCpuGet200ResponseInnerHistogramsInner,
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class MetricsCpuGet200ResponseInner(BaseModel):
|
|
31
|
-
"""
|
|
32
|
-
MetricsCpuGet200ResponseInner
|
|
33
|
-
""" # noqa: E501
|
|
34
|
-
|
|
35
|
-
metric: Optional[Dict[str, StrictStr]] = None
|
|
36
|
-
values: Optional[List[List[StrictStr]]] = None
|
|
37
|
-
histograms: Optional[List[MetricsCpuGet200ResponseInnerHistogramsInner]] = None
|
|
38
|
-
__properties: ClassVar[List[str]] = ["metric", "values", "histograms"]
|
|
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 MetricsCpuGet200ResponseInner 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
|
-
# override the default output from pydantic by calling `to_dict()` of each item in histograms (list)
|
|
78
|
-
_items = []
|
|
79
|
-
if self.histograms:
|
|
80
|
-
for _item in self.histograms:
|
|
81
|
-
if _item:
|
|
82
|
-
_items.append(_item.to_dict())
|
|
83
|
-
_dict["histograms"] = _items
|
|
84
|
-
return _dict
|
|
85
|
-
|
|
86
|
-
@classmethod
|
|
87
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
-
"""Create an instance of MetricsCpuGet200ResponseInner from a dict"""
|
|
89
|
-
if obj is None:
|
|
90
|
-
return None
|
|
91
|
-
|
|
92
|
-
if not isinstance(obj, dict):
|
|
93
|
-
return cls.model_validate(obj)
|
|
94
|
-
|
|
95
|
-
_obj = cls.model_validate(
|
|
96
|
-
{
|
|
97
|
-
"values": obj.get("values"),
|
|
98
|
-
"histograms": (
|
|
99
|
-
[
|
|
100
|
-
MetricsCpuGet200ResponseInnerHistogramsInner.from_dict(_item)
|
|
101
|
-
for _item in obj["histograms"]
|
|
102
|
-
]
|
|
103
|
-
if obj.get("histograms") is not None
|
|
104
|
-
else None
|
|
105
|
-
),
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
return _obj
|
|
@@ -1,102 +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, StrictInt
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
-
|
|
25
|
-
from hatchet_sdk.clients.cloud_rest.models.metrics_cpu_get200_response_inner_histograms_inner_histogram import (
|
|
26
|
-
MetricsCpuGet200ResponseInnerHistogramsInnerHistogram,
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class MetricsCpuGet200ResponseInnerHistogramsInner(BaseModel):
|
|
31
|
-
"""
|
|
32
|
-
MetricsCpuGet200ResponseInnerHistogramsInner
|
|
33
|
-
""" # noqa: E501
|
|
34
|
-
|
|
35
|
-
timestamp: Optional[StrictInt] = None
|
|
36
|
-
histogram: Optional[MetricsCpuGet200ResponseInnerHistogramsInnerHistogram] = None
|
|
37
|
-
__properties: ClassVar[List[str]] = ["timestamp", "histogram"]
|
|
38
|
-
|
|
39
|
-
model_config = ConfigDict(
|
|
40
|
-
populate_by_name=True,
|
|
41
|
-
validate_assignment=True,
|
|
42
|
-
protected_namespaces=(),
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
def to_str(self) -> str:
|
|
46
|
-
"""Returns the string representation of the model using alias"""
|
|
47
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
-
|
|
49
|
-
def to_json(self) -> str:
|
|
50
|
-
"""Returns the JSON representation of the model using alias"""
|
|
51
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
-
return json.dumps(self.to_dict())
|
|
53
|
-
|
|
54
|
-
@classmethod
|
|
55
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
-
"""Create an instance of MetricsCpuGet200ResponseInnerHistogramsInner from a JSON string"""
|
|
57
|
-
return cls.from_dict(json.loads(json_str))
|
|
58
|
-
|
|
59
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
-
"""Return the dictionary representation of the model using alias.
|
|
61
|
-
|
|
62
|
-
This has the following differences from calling pydantic's
|
|
63
|
-
`self.model_dump(by_alias=True)`:
|
|
64
|
-
|
|
65
|
-
* `None` is only added to the output dict for nullable fields that
|
|
66
|
-
were set at model initialization. Other fields with value `None`
|
|
67
|
-
are ignored.
|
|
68
|
-
"""
|
|
69
|
-
excluded_fields: Set[str] = set([])
|
|
70
|
-
|
|
71
|
-
_dict = self.model_dump(
|
|
72
|
-
by_alias=True,
|
|
73
|
-
exclude=excluded_fields,
|
|
74
|
-
exclude_none=True,
|
|
75
|
-
)
|
|
76
|
-
# override the default output from pydantic by calling `to_dict()` of histogram
|
|
77
|
-
if self.histogram:
|
|
78
|
-
_dict["histogram"] = self.histogram.to_dict()
|
|
79
|
-
return _dict
|
|
80
|
-
|
|
81
|
-
@classmethod
|
|
82
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
-
"""Create an instance of MetricsCpuGet200ResponseInnerHistogramsInner from a dict"""
|
|
84
|
-
if obj is None:
|
|
85
|
-
return None
|
|
86
|
-
|
|
87
|
-
if not isinstance(obj, dict):
|
|
88
|
-
return cls.model_validate(obj)
|
|
89
|
-
|
|
90
|
-
_obj = cls.model_validate(
|
|
91
|
-
{
|
|
92
|
-
"timestamp": obj.get("timestamp"),
|
|
93
|
-
"histogram": (
|
|
94
|
-
MetricsCpuGet200ResponseInnerHistogramsInnerHistogram.from_dict(
|
|
95
|
-
obj["histogram"]
|
|
96
|
-
)
|
|
97
|
-
if obj.get("histogram") is not None
|
|
98
|
-
else None
|
|
99
|
-
),
|
|
100
|
-
}
|
|
101
|
-
)
|
|
102
|
-
return _obj
|
|
@@ -1,113 +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, Union
|
|
21
|
-
|
|
22
|
-
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
-
|
|
25
|
-
from hatchet_sdk.clients.cloud_rest.models.metrics_cpu_get200_response_inner_histograms_inner_histogram_buckets_inner import (
|
|
26
|
-
MetricsCpuGet200ResponseInnerHistogramsInnerHistogramBucketsInner,
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class MetricsCpuGet200ResponseInnerHistogramsInnerHistogram(BaseModel):
|
|
31
|
-
"""
|
|
32
|
-
MetricsCpuGet200ResponseInnerHistogramsInnerHistogram
|
|
33
|
-
""" # noqa: E501
|
|
34
|
-
|
|
35
|
-
count: Optional[Union[StrictFloat, StrictInt]] = None
|
|
36
|
-
sum: Optional[Union[StrictFloat, StrictInt]] = None
|
|
37
|
-
buckets: Optional[
|
|
38
|
-
List[MetricsCpuGet200ResponseInnerHistogramsInnerHistogramBucketsInner]
|
|
39
|
-
] = None
|
|
40
|
-
__properties: ClassVar[List[str]] = ["count", "sum", "buckets"]
|
|
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 MetricsCpuGet200ResponseInnerHistogramsInnerHistogram 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 each item in buckets (list)
|
|
80
|
-
_items = []
|
|
81
|
-
if self.buckets:
|
|
82
|
-
for _item in self.buckets:
|
|
83
|
-
if _item:
|
|
84
|
-
_items.append(_item.to_dict())
|
|
85
|
-
_dict["buckets"] = _items
|
|
86
|
-
return _dict
|
|
87
|
-
|
|
88
|
-
@classmethod
|
|
89
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
-
"""Create an instance of MetricsCpuGet200ResponseInnerHistogramsInnerHistogram from a dict"""
|
|
91
|
-
if obj is None:
|
|
92
|
-
return None
|
|
93
|
-
|
|
94
|
-
if not isinstance(obj, dict):
|
|
95
|
-
return cls.model_validate(obj)
|
|
96
|
-
|
|
97
|
-
_obj = cls.model_validate(
|
|
98
|
-
{
|
|
99
|
-
"count": obj.get("count"),
|
|
100
|
-
"sum": obj.get("sum"),
|
|
101
|
-
"buckets": (
|
|
102
|
-
[
|
|
103
|
-
MetricsCpuGet200ResponseInnerHistogramsInnerHistogramBucketsInner.from_dict(
|
|
104
|
-
_item
|
|
105
|
-
)
|
|
106
|
-
for _item in obj["buckets"]
|
|
107
|
-
]
|
|
108
|
-
if obj.get("buckets") is not None
|
|
109
|
-
else None
|
|
110
|
-
),
|
|
111
|
-
}
|
|
112
|
-
)
|
|
113
|
-
return _obj
|
|
@@ -1,93 +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, Union
|
|
21
|
-
|
|
22
|
-
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class MetricsCpuGet200ResponseInnerHistogramsInnerHistogramBucketsInner(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
MetricsCpuGet200ResponseInnerHistogramsInnerHistogramBucketsInner
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
|
|
31
|
-
boundaries: Optional[StrictInt] = None
|
|
32
|
-
lower: Optional[Union[StrictFloat, StrictInt]] = None
|
|
33
|
-
upper: Optional[Union[StrictFloat, StrictInt]] = None
|
|
34
|
-
count: Optional[Union[StrictFloat, StrictInt]] = None
|
|
35
|
-
__properties: ClassVar[List[str]] = ["boundaries", "lower", "upper", "count"]
|
|
36
|
-
|
|
37
|
-
model_config = ConfigDict(
|
|
38
|
-
populate_by_name=True,
|
|
39
|
-
validate_assignment=True,
|
|
40
|
-
protected_namespaces=(),
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
def to_str(self) -> str:
|
|
44
|
-
"""Returns the string representation of the model using alias"""
|
|
45
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
-
|
|
47
|
-
def to_json(self) -> str:
|
|
48
|
-
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
51
|
-
|
|
52
|
-
@classmethod
|
|
53
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
-
"""Create an instance of MetricsCpuGet200ResponseInnerHistogramsInnerHistogramBucketsInner from a JSON string"""
|
|
55
|
-
return cls.from_dict(json.loads(json_str))
|
|
56
|
-
|
|
57
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
-
"""Return the dictionary representation of the model using alias.
|
|
59
|
-
|
|
60
|
-
This has the following differences from calling pydantic's
|
|
61
|
-
`self.model_dump(by_alias=True)`:
|
|
62
|
-
|
|
63
|
-
* `None` is only added to the output dict for nullable fields that
|
|
64
|
-
were set at model initialization. Other fields with value `None`
|
|
65
|
-
are ignored.
|
|
66
|
-
"""
|
|
67
|
-
excluded_fields: Set[str] = set([])
|
|
68
|
-
|
|
69
|
-
_dict = self.model_dump(
|
|
70
|
-
by_alias=True,
|
|
71
|
-
exclude=excluded_fields,
|
|
72
|
-
exclude_none=True,
|
|
73
|
-
)
|
|
74
|
-
return _dict
|
|
75
|
-
|
|
76
|
-
@classmethod
|
|
77
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
-
"""Create an instance of MetricsCpuGet200ResponseInnerHistogramsInnerHistogramBucketsInner from a dict"""
|
|
79
|
-
if obj is None:
|
|
80
|
-
return None
|
|
81
|
-
|
|
82
|
-
if not isinstance(obj, dict):
|
|
83
|
-
return cls.model_validate(obj)
|
|
84
|
-
|
|
85
|
-
_obj = cls.model_validate(
|
|
86
|
-
{
|
|
87
|
-
"boundaries": obj.get("boundaries"),
|
|
88
|
-
"lower": obj.get("lower"),
|
|
89
|
-
"upper": obj.get("upper"),
|
|
90
|
-
"count": obj.get("count"),
|
|
91
|
-
}
|
|
92
|
-
)
|
|
93
|
-
return _obj
|
|
@@ -1,83 +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, StrictStr
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class RuntimeConfigListActions200Response(BaseModel):
|
|
27
|
-
"""
|
|
28
|
-
RuntimeConfigListActions200Response
|
|
29
|
-
""" # noqa: E501
|
|
30
|
-
|
|
31
|
-
actions: List[StrictStr]
|
|
32
|
-
__properties: ClassVar[List[str]] = ["actions"]
|
|
33
|
-
|
|
34
|
-
model_config = ConfigDict(
|
|
35
|
-
populate_by_name=True,
|
|
36
|
-
validate_assignment=True,
|
|
37
|
-
protected_namespaces=(),
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
def to_str(self) -> str:
|
|
41
|
-
"""Returns the string representation of the model using alias"""
|
|
42
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
-
|
|
44
|
-
def to_json(self) -> str:
|
|
45
|
-
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
-
|
|
49
|
-
@classmethod
|
|
50
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of RuntimeConfigListActions200Response from a JSON string"""
|
|
52
|
-
return cls.from_dict(json.loads(json_str))
|
|
53
|
-
|
|
54
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
-
"""Return the dictionary representation of the model using alias.
|
|
56
|
-
|
|
57
|
-
This has the following differences from calling pydantic's
|
|
58
|
-
`self.model_dump(by_alias=True)`:
|
|
59
|
-
|
|
60
|
-
* `None` is only added to the output dict for nullable fields that
|
|
61
|
-
were set at model initialization. Other fields with value `None`
|
|
62
|
-
are ignored.
|
|
63
|
-
"""
|
|
64
|
-
excluded_fields: Set[str] = set([])
|
|
65
|
-
|
|
66
|
-
_dict = self.model_dump(
|
|
67
|
-
by_alias=True,
|
|
68
|
-
exclude=excluded_fields,
|
|
69
|
-
exclude_none=True,
|
|
70
|
-
)
|
|
71
|
-
return _dict
|
|
72
|
-
|
|
73
|
-
@classmethod
|
|
74
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
-
"""Create an instance of RuntimeConfigListActions200Response from a dict"""
|
|
76
|
-
if obj is None:
|
|
77
|
-
return None
|
|
78
|
-
|
|
79
|
-
if not isinstance(obj, dict):
|
|
80
|
-
return cls.model_validate(obj)
|
|
81
|
-
|
|
82
|
-
_obj = cls.model_validate({"actions": obj.get("actions")})
|
|
83
|
-
return _obj
|