windmill-api 1.528.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.

Files changed (75) hide show
  1. windmill_api/api/job/run_flow_preview_and_wait_result.py +107 -0
  2. windmill_api/api/job/run_script_preview_and_wait_result.py +107 -0
  3. windmill_api/api/worker/get_counts_of_running_jobs_per_tag.py +126 -0
  4. windmill_api/models/get_counts_of_running_jobs_per_tag_response_200.py +44 -0
  5. windmill_api/models/preview.py +3 -3
  6. windmill_api/models/run_flow_preview_and_wait_result_json_body.py +114 -0
  7. windmill_api/models/run_flow_preview_and_wait_result_json_body_args.py +44 -0
  8. windmill_api/models/run_flow_preview_and_wait_result_json_body_restarted_from.py +74 -0
  9. windmill_api/models/run_flow_preview_and_wait_result_json_body_value.py +190 -0
  10. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module.py +334 -0
  11. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_mock.py +66 -0
  12. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_retry.py +97 -0
  13. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_retry_constant.py +66 -0
  14. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_retry_exponential.py +82 -0
  15. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_skip_if.py +58 -0
  16. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_sleep_type_0.py +69 -0
  17. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_sleep_type_0_type.py +8 -0
  18. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_sleep_type_1.py +69 -0
  19. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_sleep_type_1_type.py +8 -0
  20. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_stop_after_all_iters_if.py +78 -0
  21. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_stop_after_if.py +76 -0
  22. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend.py +215 -0
  23. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend_resume_form.py +75 -0
  24. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend_resume_form_schema.py +46 -0
  25. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend_user_groups_required_type_0.py +71 -0
  26. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend_user_groups_required_type_0_type.py +8 -0
  27. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend_user_groups_required_type_1.py +71 -0
  28. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_failure_module_suspend_user_groups_required_type_1_type.py +8 -0
  29. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item.py +331 -0
  30. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_mock.py +66 -0
  31. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_retry.py +97 -0
  32. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_retry_constant.py +66 -0
  33. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_retry_exponential.py +82 -0
  34. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_skip_if.py +58 -0
  35. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_sleep_type_0.py +69 -0
  36. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_sleep_type_0_type.py +8 -0
  37. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_sleep_type_1.py +69 -0
  38. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_sleep_type_1_type.py +8 -0
  39. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_stop_after_all_iters_if.py +76 -0
  40. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_stop_after_if.py +76 -0
  41. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend.py +213 -0
  42. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend_resume_form.py +75 -0
  43. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend_resume_form_schema.py +46 -0
  44. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend_user_groups_required_type_0.py +71 -0
  45. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend_user_groups_required_type_0_type.py +8 -0
  46. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend_user_groups_required_type_1.py +71 -0
  47. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_modules_item_suspend_user_groups_required_type_1_type.py +8 -0
  48. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module.py +340 -0
  49. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_mock.py +66 -0
  50. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_retry.py +99 -0
  51. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_retry_constant.py +66 -0
  52. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_retry_exponential.py +82 -0
  53. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_skip_if.py +58 -0
  54. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_sleep_type_0.py +69 -0
  55. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_sleep_type_0_type.py +8 -0
  56. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_sleep_type_1.py +69 -0
  57. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_sleep_type_1_type.py +8 -0
  58. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_stop_after_all_iters_if.py +78 -0
  59. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_stop_after_if.py +76 -0
  60. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend.py +215 -0
  61. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend_resume_form.py +79 -0
  62. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend_resume_form_schema.py +46 -0
  63. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend_user_groups_required_type_0.py +73 -0
  64. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend_user_groups_required_type_0_type.py +8 -0
  65. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend_user_groups_required_type_1.py +73 -0
  66. windmill_api/models/run_flow_preview_and_wait_result_json_body_value_preprocessor_module_suspend_user_groups_required_type_1_type.py +8 -0
  67. windmill_api/models/run_script_preview_and_wait_result_json_body.py +149 -0
  68. windmill_api/models/run_script_preview_and_wait_result_json_body_args.py +44 -0
  69. windmill_api/models/run_script_preview_and_wait_result_json_body_kind.py +10 -0
  70. windmill_api/models/run_script_preview_and_wait_result_json_body_language.py +29 -0
  71. windmill_api/models/run_script_preview_json_body.py +3 -3
  72. {windmill_api-1.528.0.dist-info → windmill_api-1.530.0.dist-info}/METADATA +1 -1
  73. {windmill_api-1.528.0.dist-info → windmill_api-1.530.0.dist-info}/RECORD +75 -6
  74. {windmill_api-1.528.0.dist-info → windmill_api-1.530.0.dist-info}/LICENSE +0 -0
  75. {windmill_api-1.528.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)
@@ -0,0 +1,126 @@
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.get_counts_of_running_jobs_per_tag_response_200 import GetCountsOfRunningJobsPerTagResponse200
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs() -> Dict[str, Any]:
13
+ pass
14
+
15
+ return {
16
+ "method": "get",
17
+ "url": "/workers/queue_running_counts",
18
+ }
19
+
20
+
21
+ def _parse_response(
22
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
23
+ ) -> Optional[GetCountsOfRunningJobsPerTagResponse200]:
24
+ if response.status_code == HTTPStatus.OK:
25
+ response_200 = GetCountsOfRunningJobsPerTagResponse200.from_dict(response.json())
26
+
27
+ return response_200
28
+ if client.raise_on_unexpected_status:
29
+ raise errors.UnexpectedStatus(response.status_code, response.content)
30
+ else:
31
+ return None
32
+
33
+
34
+ def _build_response(
35
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
36
+ ) -> Response[GetCountsOfRunningJobsPerTagResponse200]:
37
+ return Response(
38
+ status_code=HTTPStatus(response.status_code),
39
+ content=response.content,
40
+ headers=response.headers,
41
+ parsed=_parse_response(client=client, response=response),
42
+ )
43
+
44
+
45
+ def sync_detailed(
46
+ *,
47
+ client: Union[AuthenticatedClient, Client],
48
+ ) -> Response[GetCountsOfRunningJobsPerTagResponse200]:
49
+ """get counts of currently running jobs per tag
50
+
51
+ Raises:
52
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
53
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
54
+
55
+ Returns:
56
+ Response[GetCountsOfRunningJobsPerTagResponse200]
57
+ """
58
+
59
+ kwargs = _get_kwargs()
60
+
61
+ response = client.get_httpx_client().request(
62
+ **kwargs,
63
+ )
64
+
65
+ return _build_response(client=client, response=response)
66
+
67
+
68
+ def sync(
69
+ *,
70
+ client: Union[AuthenticatedClient, Client],
71
+ ) -> Optional[GetCountsOfRunningJobsPerTagResponse200]:
72
+ """get counts of currently running jobs per tag
73
+
74
+ Raises:
75
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
76
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
77
+
78
+ Returns:
79
+ GetCountsOfRunningJobsPerTagResponse200
80
+ """
81
+
82
+ return sync_detailed(
83
+ client=client,
84
+ ).parsed
85
+
86
+
87
+ async def asyncio_detailed(
88
+ *,
89
+ client: Union[AuthenticatedClient, Client],
90
+ ) -> Response[GetCountsOfRunningJobsPerTagResponse200]:
91
+ """get counts of currently running jobs per tag
92
+
93
+ Raises:
94
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
95
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
96
+
97
+ Returns:
98
+ Response[GetCountsOfRunningJobsPerTagResponse200]
99
+ """
100
+
101
+ kwargs = _get_kwargs()
102
+
103
+ response = await client.get_async_httpx_client().request(**kwargs)
104
+
105
+ return _build_response(client=client, response=response)
106
+
107
+
108
+ async def asyncio(
109
+ *,
110
+ client: Union[AuthenticatedClient, Client],
111
+ ) -> Optional[GetCountsOfRunningJobsPerTagResponse200]:
112
+ """get counts of currently running jobs per tag
113
+
114
+ Raises:
115
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
116
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
117
+
118
+ Returns:
119
+ GetCountsOfRunningJobsPerTagResponse200
120
+ """
121
+
122
+ return (
123
+ await asyncio_detailed(
124
+ client=client,
125
+ )
126
+ ).parsed
@@ -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="GetCountsOfRunningJobsPerTagResponse200")
7
+
8
+
9
+ @_attrs_define
10
+ class GetCountsOfRunningJobsPerTagResponse200:
11
+ """ """
12
+
13
+ additional_properties: Dict[str, int] = _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
+ get_counts_of_running_jobs_per_tag_response_200 = cls()
26
+
27
+ get_counts_of_running_jobs_per_tag_response_200.additional_properties = d
28
+ return get_counts_of_running_jobs_per_tag_response_200
29
+
30
+ @property
31
+ def additional_keys(self) -> List[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> int:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: int) -> 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
@@ -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