windmill-api 1.529.0__py3-none-any.whl → 1.530.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 windmill-api might be problematic. Click here for more details.
- windmill_api/api/job/run_flow_preview_and_wait_result.py +107 -0
- windmill_api/api/job/run_script_preview_and_wait_result.py +107 -0
- windmill_api/models/preview.py +3 -3
- windmill_api/models/run_flow_preview_and_wait_result_json_body.py +114 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_args.py +44 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_restarted_from.py +74 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value.py +190 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module.py +334 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_mock.py +66 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_retry.py +97 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_retry_constant.py +66 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_retry_exponential.py +82 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_skip_if.py +58 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_sleep_type_0.py +69 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_sleep_type_0_type.py +8 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_sleep_type_1.py +69 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_sleep_type_1_type.py +8 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_stop_after_all_iters_if.py +78 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_stop_after_if.py +76 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend.py +215 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend_resume_form.py +75 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend_resume_form_schema.py +46 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend_user_groups_required_type_0.py +71 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend_user_groups_required_type_0_type.py +8 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend_user_groups_required_type_1.py +71 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend_user_groups_required_type_1_type.py +8 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item.py +331 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_mock.py +66 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_retry.py +97 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_retry_constant.py +66 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_retry_exponential.py +82 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_skip_if.py +58 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_sleep_type_0.py +69 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_sleep_type_0_type.py +8 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_sleep_type_1.py +69 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_sleep_type_1_type.py +8 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_stop_after_all_iters_if.py +76 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_stop_after_if.py +76 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend.py +213 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend_resume_form.py +75 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend_resume_form_schema.py +46 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend_user_groups_required_type_0.py +71 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend_user_groups_required_type_0_type.py +8 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend_user_groups_required_type_1.py +71 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend_user_groups_required_type_1_type.py +8 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module.py +340 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_mock.py +66 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_retry.py +99 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_retry_constant.py +66 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_retry_exponential.py +82 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_skip_if.py +58 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_sleep_type_0.py +69 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_sleep_type_0_type.py +8 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_sleep_type_1.py +69 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_sleep_type_1_type.py +8 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_stop_after_all_iters_if.py +78 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_stop_after_if.py +76 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend.py +215 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend_resume_form.py +79 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend_resume_form_schema.py +46 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend_user_groups_required_type_0.py +73 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend_user_groups_required_type_0_type.py +8 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend_user_groups_required_type_1.py +73 -0
- windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend_user_groups_required_type_1_type.py +8 -0
- windmill_api/models/run_script_preview_and_wait_result_json_body.py +149 -0
- windmill_api/models/run_script_preview_and_wait_result_json_body_args.py +44 -0
- windmill_api/models/run_script_preview_and_wait_result_json_body_kind.py +10 -0
- windmill_api/models/run_script_preview_and_wait_result_json_body_language.py +29 -0
- windmill_api/models/run_script_preview_json_body.py +3 -3
- {windmill_api-1.529.0.dist-info → windmill_api-1.530.0.dist-info}/METADATA +1 -1
- {windmill_api-1.529.0.dist-info → windmill_api-1.530.0.dist-info}/RECORD +73 -6
- {windmill_api-1.529.0.dist-info → windmill_api-1.530.0.dist-info}/LICENSE +0 -0
- {windmill_api-1.529.0.dist-info → windmill_api-1.530.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.run_flow_preview_and_wait_result_json_body import RunFlowPreviewAndWaitResultJsonBody
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
workspace: str,
|
|
14
|
+
*,
|
|
15
|
+
json_body: RunFlowPreviewAndWaitResultJsonBody,
|
|
16
|
+
) -> Dict[str, Any]:
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
json_json_body = json_body.to_dict()
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
"method": "post",
|
|
23
|
+
"url": "/w/{workspace}/jobs/run_wait_result/preview_flow".format(
|
|
24
|
+
workspace=workspace,
|
|
25
|
+
),
|
|
26
|
+
"json": json_json_body,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
31
|
+
if response.status_code == HTTPStatus.OK:
|
|
32
|
+
return None
|
|
33
|
+
if client.raise_on_unexpected_status:
|
|
34
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
35
|
+
else:
|
|
36
|
+
return None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
40
|
+
return Response(
|
|
41
|
+
status_code=HTTPStatus(response.status_code),
|
|
42
|
+
content=response.content,
|
|
43
|
+
headers=response.headers,
|
|
44
|
+
parsed=_parse_response(client=client, response=response),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def sync_detailed(
|
|
49
|
+
workspace: str,
|
|
50
|
+
*,
|
|
51
|
+
client: Union[AuthenticatedClient, Client],
|
|
52
|
+
json_body: RunFlowPreviewAndWaitResultJsonBody,
|
|
53
|
+
) -> Response[Any]:
|
|
54
|
+
"""run flow preview and wait for result
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
workspace (str):
|
|
58
|
+
json_body (RunFlowPreviewAndWaitResultJsonBody):
|
|
59
|
+
|
|
60
|
+
Raises:
|
|
61
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
62
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
63
|
+
|
|
64
|
+
Returns:
|
|
65
|
+
Response[Any]
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
kwargs = _get_kwargs(
|
|
69
|
+
workspace=workspace,
|
|
70
|
+
json_body=json_body,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
response = client.get_httpx_client().request(
|
|
74
|
+
**kwargs,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
return _build_response(client=client, response=response)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
async def asyncio_detailed(
|
|
81
|
+
workspace: str,
|
|
82
|
+
*,
|
|
83
|
+
client: Union[AuthenticatedClient, Client],
|
|
84
|
+
json_body: RunFlowPreviewAndWaitResultJsonBody,
|
|
85
|
+
) -> Response[Any]:
|
|
86
|
+
"""run flow preview and wait for result
|
|
87
|
+
|
|
88
|
+
Args:
|
|
89
|
+
workspace (str):
|
|
90
|
+
json_body (RunFlowPreviewAndWaitResultJsonBody):
|
|
91
|
+
|
|
92
|
+
Raises:
|
|
93
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
94
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
95
|
+
|
|
96
|
+
Returns:
|
|
97
|
+
Response[Any]
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
kwargs = _get_kwargs(
|
|
101
|
+
workspace=workspace,
|
|
102
|
+
json_body=json_body,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
106
|
+
|
|
107
|
+
return _build_response(client=client, response=response)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.run_script_preview_and_wait_result_json_body import RunScriptPreviewAndWaitResultJsonBody
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
workspace: str,
|
|
14
|
+
*,
|
|
15
|
+
json_body: RunScriptPreviewAndWaitResultJsonBody,
|
|
16
|
+
) -> Dict[str, Any]:
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
json_json_body = json_body.to_dict()
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
"method": "post",
|
|
23
|
+
"url": "/w/{workspace}/jobs/run_wait_result/preview".format(
|
|
24
|
+
workspace=workspace,
|
|
25
|
+
),
|
|
26
|
+
"json": json_json_body,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
31
|
+
if response.status_code == HTTPStatus.OK:
|
|
32
|
+
return None
|
|
33
|
+
if client.raise_on_unexpected_status:
|
|
34
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
35
|
+
else:
|
|
36
|
+
return None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
40
|
+
return Response(
|
|
41
|
+
status_code=HTTPStatus(response.status_code),
|
|
42
|
+
content=response.content,
|
|
43
|
+
headers=response.headers,
|
|
44
|
+
parsed=_parse_response(client=client, response=response),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def sync_detailed(
|
|
49
|
+
workspace: str,
|
|
50
|
+
*,
|
|
51
|
+
client: Union[AuthenticatedClient, Client],
|
|
52
|
+
json_body: RunScriptPreviewAndWaitResultJsonBody,
|
|
53
|
+
) -> Response[Any]:
|
|
54
|
+
"""run script preview and wait for result
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
workspace (str):
|
|
58
|
+
json_body (RunScriptPreviewAndWaitResultJsonBody):
|
|
59
|
+
|
|
60
|
+
Raises:
|
|
61
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
62
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
63
|
+
|
|
64
|
+
Returns:
|
|
65
|
+
Response[Any]
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
kwargs = _get_kwargs(
|
|
69
|
+
workspace=workspace,
|
|
70
|
+
json_body=json_body,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
response = client.get_httpx_client().request(
|
|
74
|
+
**kwargs,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
return _build_response(client=client, response=response)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
async def asyncio_detailed(
|
|
81
|
+
workspace: str,
|
|
82
|
+
*,
|
|
83
|
+
client: Union[AuthenticatedClient, Client],
|
|
84
|
+
json_body: RunScriptPreviewAndWaitResultJsonBody,
|
|
85
|
+
) -> Response[Any]:
|
|
86
|
+
"""run script preview and wait for result
|
|
87
|
+
|
|
88
|
+
Args:
|
|
89
|
+
workspace (str):
|
|
90
|
+
json_body (RunScriptPreviewAndWaitResultJsonBody):
|
|
91
|
+
|
|
92
|
+
Raises:
|
|
93
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
94
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
95
|
+
|
|
96
|
+
Returns:
|
|
97
|
+
Response[Any]
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
kwargs = _get_kwargs(
|
|
101
|
+
workspace=workspace,
|
|
102
|
+
json_body=json_body,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
106
|
+
|
|
107
|
+
return _build_response(client=client, response=response)
|
windmill_api/models/preview.py
CHANGED
|
@@ -19,9 +19,9 @@ class Preview:
|
|
|
19
19
|
"""
|
|
20
20
|
Attributes:
|
|
21
21
|
args (PreviewArgs): The arguments to pass to the script or flow
|
|
22
|
-
content (Union[Unset, str]):
|
|
23
|
-
path (Union[Unset, str]):
|
|
24
|
-
script_hash (Union[Unset, str]):
|
|
22
|
+
content (Union[Unset, str]): The code to run
|
|
23
|
+
path (Union[Unset, str]): The path to the script
|
|
24
|
+
script_hash (Union[Unset, str]): The hash of the script
|
|
25
25
|
language (Union[Unset, PreviewLanguage]):
|
|
26
26
|
tag (Union[Unset, str]):
|
|
27
27
|
kind (Union[Unset, PreviewKind]):
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from ..models.run_flow_preview_and_wait_result_json_body_args import RunFlowPreviewAndWaitResultJsonBodyArgs
|
|
10
|
+
from ..models.run_flow_preview_and_wait_result_json_body_restarted_from import (
|
|
11
|
+
RunFlowPreviewAndWaitResultJsonBodyRestartedFrom,
|
|
12
|
+
)
|
|
13
|
+
from ..models.run_flow_preview_and_wait_result_json_body_value import RunFlowPreviewAndWaitResultJsonBodyValue
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="RunFlowPreviewAndWaitResultJsonBody")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class RunFlowPreviewAndWaitResultJsonBody:
|
|
21
|
+
"""
|
|
22
|
+
Attributes:
|
|
23
|
+
value (RunFlowPreviewAndWaitResultJsonBodyValue):
|
|
24
|
+
args (RunFlowPreviewAndWaitResultJsonBodyArgs): The arguments to pass to the script or flow
|
|
25
|
+
path (Union[Unset, str]):
|
|
26
|
+
tag (Union[Unset, str]):
|
|
27
|
+
restarted_from (Union[Unset, RunFlowPreviewAndWaitResultJsonBodyRestartedFrom]):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
value: "RunFlowPreviewAndWaitResultJsonBodyValue"
|
|
31
|
+
args: "RunFlowPreviewAndWaitResultJsonBodyArgs"
|
|
32
|
+
path: Union[Unset, str] = UNSET
|
|
33
|
+
tag: Union[Unset, str] = UNSET
|
|
34
|
+
restarted_from: Union[Unset, "RunFlowPreviewAndWaitResultJsonBodyRestartedFrom"] = UNSET
|
|
35
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
36
|
+
|
|
37
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
38
|
+
value = self.value.to_dict()
|
|
39
|
+
|
|
40
|
+
args = self.args.to_dict()
|
|
41
|
+
|
|
42
|
+
path = self.path
|
|
43
|
+
tag = self.tag
|
|
44
|
+
restarted_from: Union[Unset, Dict[str, Any]] = UNSET
|
|
45
|
+
if not isinstance(self.restarted_from, Unset):
|
|
46
|
+
restarted_from = self.restarted_from.to_dict()
|
|
47
|
+
|
|
48
|
+
field_dict: Dict[str, Any] = {}
|
|
49
|
+
field_dict.update(self.additional_properties)
|
|
50
|
+
field_dict.update(
|
|
51
|
+
{
|
|
52
|
+
"value": value,
|
|
53
|
+
"args": args,
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
if path is not UNSET:
|
|
57
|
+
field_dict["path"] = path
|
|
58
|
+
if tag is not UNSET:
|
|
59
|
+
field_dict["tag"] = tag
|
|
60
|
+
if restarted_from is not UNSET:
|
|
61
|
+
field_dict["restarted_from"] = restarted_from
|
|
62
|
+
|
|
63
|
+
return field_dict
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
67
|
+
from ..models.run_flow_preview_and_wait_result_json_body_args import RunFlowPreviewAndWaitResultJsonBodyArgs
|
|
68
|
+
from ..models.run_flow_preview_and_wait_result_json_body_restarted_from import (
|
|
69
|
+
RunFlowPreviewAndWaitResultJsonBodyRestartedFrom,
|
|
70
|
+
)
|
|
71
|
+
from ..models.run_flow_preview_and_wait_result_json_body_value import RunFlowPreviewAndWaitResultJsonBodyValue
|
|
72
|
+
|
|
73
|
+
d = src_dict.copy()
|
|
74
|
+
value = RunFlowPreviewAndWaitResultJsonBodyValue.from_dict(d.pop("value"))
|
|
75
|
+
|
|
76
|
+
args = RunFlowPreviewAndWaitResultJsonBodyArgs.from_dict(d.pop("args"))
|
|
77
|
+
|
|
78
|
+
path = d.pop("path", UNSET)
|
|
79
|
+
|
|
80
|
+
tag = d.pop("tag", UNSET)
|
|
81
|
+
|
|
82
|
+
_restarted_from = d.pop("restarted_from", UNSET)
|
|
83
|
+
restarted_from: Union[Unset, RunFlowPreviewAndWaitResultJsonBodyRestartedFrom]
|
|
84
|
+
if isinstance(_restarted_from, Unset):
|
|
85
|
+
restarted_from = UNSET
|
|
86
|
+
else:
|
|
87
|
+
restarted_from = RunFlowPreviewAndWaitResultJsonBodyRestartedFrom.from_dict(_restarted_from)
|
|
88
|
+
|
|
89
|
+
run_flow_preview_and_wait_result_json_body = cls(
|
|
90
|
+
value=value,
|
|
91
|
+
args=args,
|
|
92
|
+
path=path,
|
|
93
|
+
tag=tag,
|
|
94
|
+
restarted_from=restarted_from,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
run_flow_preview_and_wait_result_json_body.additional_properties = d
|
|
98
|
+
return run_flow_preview_and_wait_result_json_body
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
def additional_keys(self) -> List[str]:
|
|
102
|
+
return list(self.additional_properties.keys())
|
|
103
|
+
|
|
104
|
+
def __getitem__(self, key: str) -> Any:
|
|
105
|
+
return self.additional_properties[key]
|
|
106
|
+
|
|
107
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
108
|
+
self.additional_properties[key] = value
|
|
109
|
+
|
|
110
|
+
def __delitem__(self, key: str) -> None:
|
|
111
|
+
del self.additional_properties[key]
|
|
112
|
+
|
|
113
|
+
def __contains__(self, key: str) -> bool:
|
|
114
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
T = TypeVar("T", bound="RunFlowPreviewAndWaitResultJsonBodyArgs")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class RunFlowPreviewAndWaitResultJsonBodyArgs:
|
|
11
|
+
"""The arguments to pass to the script or flow"""
|
|
12
|
+
|
|
13
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
14
|
+
|
|
15
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
16
|
+
field_dict: Dict[str, Any] = {}
|
|
17
|
+
field_dict.update(self.additional_properties)
|
|
18
|
+
field_dict.update({})
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
24
|
+
d = src_dict.copy()
|
|
25
|
+
run_flow_preview_and_wait_result_json_body_args = cls()
|
|
26
|
+
|
|
27
|
+
run_flow_preview_and_wait_result_json_body_args.additional_properties = d
|
|
28
|
+
return run_flow_preview_and_wait_result_json_body_args
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> List[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> Any:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar, Union
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
8
|
+
T = TypeVar("T", bound="RunFlowPreviewAndWaitResultJsonBodyRestartedFrom")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@_attrs_define
|
|
12
|
+
class RunFlowPreviewAndWaitResultJsonBodyRestartedFrom:
|
|
13
|
+
"""
|
|
14
|
+
Attributes:
|
|
15
|
+
flow_job_id (Union[Unset, str]):
|
|
16
|
+
step_id (Union[Unset, str]):
|
|
17
|
+
branch_or_iteration_n (Union[Unset, int]):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
flow_job_id: Union[Unset, str] = UNSET
|
|
21
|
+
step_id: Union[Unset, str] = UNSET
|
|
22
|
+
branch_or_iteration_n: Union[Unset, int] = UNSET
|
|
23
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
26
|
+
flow_job_id = self.flow_job_id
|
|
27
|
+
step_id = self.step_id
|
|
28
|
+
branch_or_iteration_n = self.branch_or_iteration_n
|
|
29
|
+
|
|
30
|
+
field_dict: Dict[str, Any] = {}
|
|
31
|
+
field_dict.update(self.additional_properties)
|
|
32
|
+
field_dict.update({})
|
|
33
|
+
if flow_job_id is not UNSET:
|
|
34
|
+
field_dict["flow_job_id"] = flow_job_id
|
|
35
|
+
if step_id is not UNSET:
|
|
36
|
+
field_dict["step_id"] = step_id
|
|
37
|
+
if branch_or_iteration_n is not UNSET:
|
|
38
|
+
field_dict["branch_or_iteration_n"] = branch_or_iteration_n
|
|
39
|
+
|
|
40
|
+
return field_dict
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
44
|
+
d = src_dict.copy()
|
|
45
|
+
flow_job_id = d.pop("flow_job_id", UNSET)
|
|
46
|
+
|
|
47
|
+
step_id = d.pop("step_id", UNSET)
|
|
48
|
+
|
|
49
|
+
branch_or_iteration_n = d.pop("branch_or_iteration_n", UNSET)
|
|
50
|
+
|
|
51
|
+
run_flow_preview_and_wait_result_json_body_restarted_from = cls(
|
|
52
|
+
flow_job_id=flow_job_id,
|
|
53
|
+
step_id=step_id,
|
|
54
|
+
branch_or_iteration_n=branch_or_iteration_n,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
run_flow_preview_and_wait_result_json_body_restarted_from.additional_properties = d
|
|
58
|
+
return run_flow_preview_and_wait_result_json_body_restarted_from
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def additional_keys(self) -> List[str]:
|
|
62
|
+
return list(self.additional_properties.keys())
|
|
63
|
+
|
|
64
|
+
def __getitem__(self, key: str) -> Any:
|
|
65
|
+
return self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
68
|
+
self.additional_properties[key] = value
|
|
69
|
+
|
|
70
|
+
def __delitem__(self, key: str) -> None:
|
|
71
|
+
del self.additional_properties[key]
|
|
72
|
+
|
|
73
|
+
def __contains__(self, key: str) -> bool:
|
|
74
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from ..models.run_flow_preview_and_wait_result_json_body_value_failure_module import (
|
|
10
|
+
RunFlowPreviewAndWaitResultJsonBodyValueFailureModule,
|
|
11
|
+
)
|
|
12
|
+
from ..models.run_flow_preview_and_wait_result_json_body_value_modules_item import (
|
|
13
|
+
RunFlowPreviewAndWaitResultJsonBodyValueModulesItem,
|
|
14
|
+
)
|
|
15
|
+
from ..models.run_flow_preview_and_wait_result_json_body_value_preprocessor_module import (
|
|
16
|
+
RunFlowPreviewAndWaitResultJsonBodyValuePreprocessorModule,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
T = TypeVar("T", bound="RunFlowPreviewAndWaitResultJsonBodyValue")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@_attrs_define
|
|
24
|
+
class RunFlowPreviewAndWaitResultJsonBodyValue:
|
|
25
|
+
"""
|
|
26
|
+
Attributes:
|
|
27
|
+
modules (List['RunFlowPreviewAndWaitResultJsonBodyValueModulesItem']):
|
|
28
|
+
failure_module (Union[Unset, RunFlowPreviewAndWaitResultJsonBodyValueFailureModule]):
|
|
29
|
+
preprocessor_module (Union[Unset, RunFlowPreviewAndWaitResultJsonBodyValuePreprocessorModule]):
|
|
30
|
+
same_worker (Union[Unset, bool]):
|
|
31
|
+
concurrent_limit (Union[Unset, float]):
|
|
32
|
+
concurrency_key (Union[Unset, str]):
|
|
33
|
+
concurrency_time_window_s (Union[Unset, float]):
|
|
34
|
+
skip_expr (Union[Unset, str]):
|
|
35
|
+
cache_ttl (Union[Unset, float]):
|
|
36
|
+
priority (Union[Unset, float]):
|
|
37
|
+
early_return (Union[Unset, str]):
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
modules: List["RunFlowPreviewAndWaitResultJsonBodyValueModulesItem"]
|
|
41
|
+
failure_module: Union[Unset, "RunFlowPreviewAndWaitResultJsonBodyValueFailureModule"] = UNSET
|
|
42
|
+
preprocessor_module: Union[Unset, "RunFlowPreviewAndWaitResultJsonBodyValuePreprocessorModule"] = UNSET
|
|
43
|
+
same_worker: Union[Unset, bool] = UNSET
|
|
44
|
+
concurrent_limit: Union[Unset, float] = UNSET
|
|
45
|
+
concurrency_key: Union[Unset, str] = UNSET
|
|
46
|
+
concurrency_time_window_s: Union[Unset, float] = UNSET
|
|
47
|
+
skip_expr: Union[Unset, str] = UNSET
|
|
48
|
+
cache_ttl: Union[Unset, float] = UNSET
|
|
49
|
+
priority: Union[Unset, float] = UNSET
|
|
50
|
+
early_return: Union[Unset, str] = UNSET
|
|
51
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
modules = []
|
|
55
|
+
for modules_item_data in self.modules:
|
|
56
|
+
modules_item = modules_item_data.to_dict()
|
|
57
|
+
|
|
58
|
+
modules.append(modules_item)
|
|
59
|
+
|
|
60
|
+
failure_module: Union[Unset, Dict[str, Any]] = UNSET
|
|
61
|
+
if not isinstance(self.failure_module, Unset):
|
|
62
|
+
failure_module = self.failure_module.to_dict()
|
|
63
|
+
|
|
64
|
+
preprocessor_module: Union[Unset, Dict[str, Any]] = UNSET
|
|
65
|
+
if not isinstance(self.preprocessor_module, Unset):
|
|
66
|
+
preprocessor_module = self.preprocessor_module.to_dict()
|
|
67
|
+
|
|
68
|
+
same_worker = self.same_worker
|
|
69
|
+
concurrent_limit = self.concurrent_limit
|
|
70
|
+
concurrency_key = self.concurrency_key
|
|
71
|
+
concurrency_time_window_s = self.concurrency_time_window_s
|
|
72
|
+
skip_expr = self.skip_expr
|
|
73
|
+
cache_ttl = self.cache_ttl
|
|
74
|
+
priority = self.priority
|
|
75
|
+
early_return = self.early_return
|
|
76
|
+
|
|
77
|
+
field_dict: Dict[str, Any] = {}
|
|
78
|
+
field_dict.update(self.additional_properties)
|
|
79
|
+
field_dict.update(
|
|
80
|
+
{
|
|
81
|
+
"modules": modules,
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
if failure_module is not UNSET:
|
|
85
|
+
field_dict["failure_module"] = failure_module
|
|
86
|
+
if preprocessor_module is not UNSET:
|
|
87
|
+
field_dict["preprocessor_module"] = preprocessor_module
|
|
88
|
+
if same_worker is not UNSET:
|
|
89
|
+
field_dict["same_worker"] = same_worker
|
|
90
|
+
if concurrent_limit is not UNSET:
|
|
91
|
+
field_dict["concurrent_limit"] = concurrent_limit
|
|
92
|
+
if concurrency_key is not UNSET:
|
|
93
|
+
field_dict["concurrency_key"] = concurrency_key
|
|
94
|
+
if concurrency_time_window_s is not UNSET:
|
|
95
|
+
field_dict["concurrency_time_window_s"] = concurrency_time_window_s
|
|
96
|
+
if skip_expr is not UNSET:
|
|
97
|
+
field_dict["skip_expr"] = skip_expr
|
|
98
|
+
if cache_ttl is not UNSET:
|
|
99
|
+
field_dict["cache_ttl"] = cache_ttl
|
|
100
|
+
if priority is not UNSET:
|
|
101
|
+
field_dict["priority"] = priority
|
|
102
|
+
if early_return is not UNSET:
|
|
103
|
+
field_dict["early_return"] = early_return
|
|
104
|
+
|
|
105
|
+
return field_dict
|
|
106
|
+
|
|
107
|
+
@classmethod
|
|
108
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
109
|
+
from ..models.run_flow_preview_and_wait_result_json_body_value_failure_module import (
|
|
110
|
+
RunFlowPreviewAndWaitResultJsonBodyValueFailureModule,
|
|
111
|
+
)
|
|
112
|
+
from ..models.run_flow_preview_and_wait_result_json_body_value_modules_item import (
|
|
113
|
+
RunFlowPreviewAndWaitResultJsonBodyValueModulesItem,
|
|
114
|
+
)
|
|
115
|
+
from ..models.run_flow_preview_and_wait_result_json_body_value_preprocessor_module import (
|
|
116
|
+
RunFlowPreviewAndWaitResultJsonBodyValuePreprocessorModule,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
d = src_dict.copy()
|
|
120
|
+
modules = []
|
|
121
|
+
_modules = d.pop("modules")
|
|
122
|
+
for modules_item_data in _modules:
|
|
123
|
+
modules_item = RunFlowPreviewAndWaitResultJsonBodyValueModulesItem.from_dict(modules_item_data)
|
|
124
|
+
|
|
125
|
+
modules.append(modules_item)
|
|
126
|
+
|
|
127
|
+
_failure_module = d.pop("failure_module", UNSET)
|
|
128
|
+
failure_module: Union[Unset, RunFlowPreviewAndWaitResultJsonBodyValueFailureModule]
|
|
129
|
+
if isinstance(_failure_module, Unset):
|
|
130
|
+
failure_module = UNSET
|
|
131
|
+
else:
|
|
132
|
+
failure_module = RunFlowPreviewAndWaitResultJsonBodyValueFailureModule.from_dict(_failure_module)
|
|
133
|
+
|
|
134
|
+
_preprocessor_module = d.pop("preprocessor_module", UNSET)
|
|
135
|
+
preprocessor_module: Union[Unset, RunFlowPreviewAndWaitResultJsonBodyValuePreprocessorModule]
|
|
136
|
+
if isinstance(_preprocessor_module, Unset):
|
|
137
|
+
preprocessor_module = UNSET
|
|
138
|
+
else:
|
|
139
|
+
preprocessor_module = RunFlowPreviewAndWaitResultJsonBodyValuePreprocessorModule.from_dict(
|
|
140
|
+
_preprocessor_module
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
same_worker = d.pop("same_worker", UNSET)
|
|
144
|
+
|
|
145
|
+
concurrent_limit = d.pop("concurrent_limit", UNSET)
|
|
146
|
+
|
|
147
|
+
concurrency_key = d.pop("concurrency_key", UNSET)
|
|
148
|
+
|
|
149
|
+
concurrency_time_window_s = d.pop("concurrency_time_window_s", UNSET)
|
|
150
|
+
|
|
151
|
+
skip_expr = d.pop("skip_expr", UNSET)
|
|
152
|
+
|
|
153
|
+
cache_ttl = d.pop("cache_ttl", UNSET)
|
|
154
|
+
|
|
155
|
+
priority = d.pop("priority", UNSET)
|
|
156
|
+
|
|
157
|
+
early_return = d.pop("early_return", UNSET)
|
|
158
|
+
|
|
159
|
+
run_flow_preview_and_wait_result_json_body_value = cls(
|
|
160
|
+
modules=modules,
|
|
161
|
+
failure_module=failure_module,
|
|
162
|
+
preprocessor_module=preprocessor_module,
|
|
163
|
+
same_worker=same_worker,
|
|
164
|
+
concurrent_limit=concurrent_limit,
|
|
165
|
+
concurrency_key=concurrency_key,
|
|
166
|
+
concurrency_time_window_s=concurrency_time_window_s,
|
|
167
|
+
skip_expr=skip_expr,
|
|
168
|
+
cache_ttl=cache_ttl,
|
|
169
|
+
priority=priority,
|
|
170
|
+
early_return=early_return,
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
run_flow_preview_and_wait_result_json_body_value.additional_properties = d
|
|
174
|
+
return run_flow_preview_and_wait_result_json_body_value
|
|
175
|
+
|
|
176
|
+
@property
|
|
177
|
+
def additional_keys(self) -> List[str]:
|
|
178
|
+
return list(self.additional_properties.keys())
|
|
179
|
+
|
|
180
|
+
def __getitem__(self, key: str) -> Any:
|
|
181
|
+
return self.additional_properties[key]
|
|
182
|
+
|
|
183
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
184
|
+
self.additional_properties[key] = value
|
|
185
|
+
|
|
186
|
+
def __delitem__(self, key: str) -> None:
|
|
187
|
+
del self.additional_properties[key]
|
|
188
|
+
|
|
189
|
+
def __contains__(self, key: str) -> bool:
|
|
190
|
+
return key in self.additional_properties
|