windmill-api 1.509.1__py3-none-any.whl → 1.510.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.
Files changed (64) hide show
  1. windmill_api/api/script/get_script_by_hash.py +15 -0
  2. windmill_api/models/completed_job.py +18 -0
  3. windmill_api/models/{get_job_updates_response_200_flow_status_additional_property.py → completed_job_workflow_as_code_status.py} +5 -5
  4. windmill_api/models/delete_completed_job_response_200.py +24 -0
  5. windmill_api/models/delete_completed_job_response_200_workflow_as_code_status.py +100 -0
  6. windmill_api/models/extended_jobs_jobs_item_type_0.py +22 -0
  7. windmill_api/models/extended_jobs_jobs_item_type_0_workflow_as_code_status.py +100 -0
  8. windmill_api/models/extended_jobs_jobs_item_type_1.py +22 -0
  9. windmill_api/models/extended_jobs_jobs_item_type_1_workflow_as_code_status.py +100 -0
  10. windmill_api/models/get_completed_job_response_200.py +22 -0
  11. windmill_api/models/get_completed_job_response_200_workflow_as_code_status.py +100 -0
  12. windmill_api/models/get_job_response_200_type_0.py +20 -0
  13. windmill_api/models/get_job_response_200_type_0_workflow_as_code_status.py +100 -0
  14. windmill_api/models/get_job_response_200_type_1.py +20 -0
  15. windmill_api/models/get_job_response_200_type_1_workflow_as_code_status.py +100 -0
  16. windmill_api/models/get_job_updates_response_200.py +22 -0
  17. windmill_api/models/get_job_updates_response_200_flow_status.py +107 -25
  18. windmill_api/models/get_job_updates_response_200_flow_status_failure_module.py +241 -0
  19. windmill_api/models/get_job_updates_response_200_flow_status_failure_module_approvers_item.py +65 -0
  20. windmill_api/models/get_job_updates_response_200_flow_status_failure_module_branch_chosen.py +72 -0
  21. windmill_api/models/get_job_updates_response_200_flow_status_failure_module_branch_chosen_type.py +9 -0
  22. windmill_api/models/get_job_updates_response_200_flow_status_failure_module_branchall.py +65 -0
  23. windmill_api/models/get_job_updates_response_200_flow_status_failure_module_iterator.py +77 -0
  24. windmill_api/models/get_job_updates_response_200_flow_status_failure_module_type.py +13 -0
  25. windmill_api/models/get_job_updates_response_200_flow_status_modules_item.py +233 -0
  26. windmill_api/models/get_job_updates_response_200_flow_status_modules_item_approvers_item.py +65 -0
  27. windmill_api/models/get_job_updates_response_200_flow_status_modules_item_branch_chosen.py +72 -0
  28. windmill_api/models/get_job_updates_response_200_flow_status_modules_item_branch_chosen_type.py +9 -0
  29. windmill_api/models/get_job_updates_response_200_flow_status_modules_item_branchall.py +65 -0
  30. windmill_api/models/get_job_updates_response_200_flow_status_modules_item_iterator.py +77 -0
  31. windmill_api/models/get_job_updates_response_200_flow_status_modules_item_type.py +13 -0
  32. windmill_api/models/get_job_updates_response_200_flow_status_preprocessor_module.py +235 -0
  33. windmill_api/models/get_job_updates_response_200_flow_status_preprocessor_module_approvers_item.py +65 -0
  34. windmill_api/models/get_job_updates_response_200_flow_status_preprocessor_module_branch_chosen.py +72 -0
  35. windmill_api/models/get_job_updates_response_200_flow_status_preprocessor_module_branch_chosen_type.py +9 -0
  36. windmill_api/models/get_job_updates_response_200_flow_status_preprocessor_module_branchall.py +65 -0
  37. windmill_api/models/get_job_updates_response_200_flow_status_preprocessor_module_iterator.py +77 -0
  38. windmill_api/models/get_job_updates_response_200_flow_status_preprocessor_module_type.py +13 -0
  39. windmill_api/models/get_job_updates_response_200_flow_status_retry.py +68 -0
  40. windmill_api/models/get_job_updates_response_200_workflow_as_code_status.py +100 -0
  41. windmill_api/models/get_suspended_job_flow_response_200_job_type_0.py +24 -0
  42. windmill_api/models/get_suspended_job_flow_response_200_job_type_0_workflow_as_code_status.py +100 -0
  43. windmill_api/models/get_suspended_job_flow_response_200_job_type_1.py +24 -0
  44. windmill_api/models/get_suspended_job_flow_response_200_job_type_1_workflow_as_code_status.py +100 -0
  45. windmill_api/models/job_type_0_workflow_as_code_status.py +100 -0
  46. windmill_api/models/job_type_1_workflow_as_code_status.py +100 -0
  47. windmill_api/models/list_completed_jobs_response_200_item.py +24 -0
  48. windmill_api/models/list_completed_jobs_response_200_item_workflow_as_code_status.py +100 -0
  49. windmill_api/models/list_extended_jobs_response_200_jobs_item_type_0.py +24 -0
  50. windmill_api/models/list_extended_jobs_response_200_jobs_item_type_0_workflow_as_code_status.py +100 -0
  51. windmill_api/models/list_extended_jobs_response_200_jobs_item_type_1.py +24 -0
  52. windmill_api/models/list_extended_jobs_response_200_jobs_item_type_1_workflow_as_code_status.py +100 -0
  53. windmill_api/models/list_jobs_response_200_item_type_0.py +24 -0
  54. windmill_api/models/list_jobs_response_200_item_type_0_workflow_as_code_status.py +100 -0
  55. windmill_api/models/list_jobs_response_200_item_type_1.py +24 -0
  56. windmill_api/models/list_jobs_response_200_item_type_1_workflow_as_code_status.py +100 -0
  57. windmill_api/models/list_queue_response_200_item.py +22 -0
  58. windmill_api/models/list_queue_response_200_item_workflow_as_code_status.py +100 -0
  59. windmill_api/models/queued_job.py +18 -0
  60. windmill_api/models/queued_job_workflow_as_code_status.py +100 -0
  61. {windmill_api-1.509.1.dist-info → windmill_api-1.510.0.dist-info}/METADATA +1 -1
  62. {windmill_api-1.509.1.dist-info → windmill_api-1.510.0.dist-info}/RECORD +64 -24
  63. {windmill_api-1.509.1.dist-info → windmill_api-1.510.0.dist-info}/LICENSE +0 -0
  64. {windmill_api-1.509.1.dist-info → windmill_api-1.510.0.dist-info}/WHEEL +0 -0
@@ -7,6 +7,9 @@ from ..types import UNSET, Unset
7
7
 
8
8
  if TYPE_CHECKING:
9
9
  from ..models.get_job_updates_response_200_flow_status import GetJobUpdatesResponse200FlowStatus
10
+ from ..models.get_job_updates_response_200_workflow_as_code_status import (
11
+ GetJobUpdatesResponse200WorkflowAsCodeStatus,
12
+ )
10
13
 
11
14
 
12
15
  T = TypeVar("T", bound="GetJobUpdatesResponse200")
@@ -23,6 +26,7 @@ class GetJobUpdatesResponse200:
23
26
  mem_peak (Union[Unset, int]):
24
27
  progress (Union[Unset, int]):
25
28
  flow_status (Union[Unset, GetJobUpdatesResponse200FlowStatus]):
29
+ workflow_as_code_status (Union[Unset, GetJobUpdatesResponse200WorkflowAsCodeStatus]):
26
30
  """
27
31
 
28
32
  running: Union[Unset, bool] = UNSET
@@ -32,6 +36,7 @@ class GetJobUpdatesResponse200:
32
36
  mem_peak: Union[Unset, int] = UNSET
33
37
  progress: Union[Unset, int] = UNSET
34
38
  flow_status: Union[Unset, "GetJobUpdatesResponse200FlowStatus"] = UNSET
39
+ workflow_as_code_status: Union[Unset, "GetJobUpdatesResponse200WorkflowAsCodeStatus"] = UNSET
35
40
  additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
36
41
 
37
42
  def to_dict(self) -> Dict[str, Any]:
@@ -45,6 +50,10 @@ class GetJobUpdatesResponse200:
45
50
  if not isinstance(self.flow_status, Unset):
46
51
  flow_status = self.flow_status.to_dict()
47
52
 
53
+ workflow_as_code_status: Union[Unset, Dict[str, Any]] = UNSET
54
+ if not isinstance(self.workflow_as_code_status, Unset):
55
+ workflow_as_code_status = self.workflow_as_code_status.to_dict()
56
+
48
57
  field_dict: Dict[str, Any] = {}
49
58
  field_dict.update(self.additional_properties)
50
59
  field_dict.update({})
@@ -62,12 +71,17 @@ class GetJobUpdatesResponse200:
62
71
  field_dict["progress"] = progress
63
72
  if flow_status is not UNSET:
64
73
  field_dict["flow_status"] = flow_status
74
+ if workflow_as_code_status is not UNSET:
75
+ field_dict["workflow_as_code_status"] = workflow_as_code_status
65
76
 
66
77
  return field_dict
67
78
 
68
79
  @classmethod
69
80
  def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
70
81
  from ..models.get_job_updates_response_200_flow_status import GetJobUpdatesResponse200FlowStatus
82
+ from ..models.get_job_updates_response_200_workflow_as_code_status import (
83
+ GetJobUpdatesResponse200WorkflowAsCodeStatus,
84
+ )
71
85
 
72
86
  d = src_dict.copy()
73
87
  running = d.pop("running", UNSET)
@@ -89,6 +103,13 @@ class GetJobUpdatesResponse200:
89
103
  else:
90
104
  flow_status = GetJobUpdatesResponse200FlowStatus.from_dict(_flow_status)
91
105
 
106
+ _workflow_as_code_status = d.pop("workflow_as_code_status", UNSET)
107
+ workflow_as_code_status: Union[Unset, GetJobUpdatesResponse200WorkflowAsCodeStatus]
108
+ if isinstance(_workflow_as_code_status, Unset):
109
+ workflow_as_code_status = UNSET
110
+ else:
111
+ workflow_as_code_status = GetJobUpdatesResponse200WorkflowAsCodeStatus.from_dict(_workflow_as_code_status)
112
+
92
113
  get_job_updates_response_200 = cls(
93
114
  running=running,
94
115
  completed=completed,
@@ -97,6 +118,7 @@ class GetJobUpdatesResponse200:
97
118
  mem_peak=mem_peak,
98
119
  progress=progress,
99
120
  flow_status=flow_status,
121
+ workflow_as_code_status=workflow_as_code_status,
100
122
  )
101
123
 
102
124
  get_job_updates_response_200.additional_properties = d
@@ -1,12 +1,21 @@
1
- from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
2
2
 
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
5
5
 
6
+ from ..types import UNSET, Unset
7
+
6
8
  if TYPE_CHECKING:
7
- from ..models.get_job_updates_response_200_flow_status_additional_property import (
8
- GetJobUpdatesResponse200FlowStatusAdditionalProperty,
9
+ from ..models.get_job_updates_response_200_flow_status_failure_module import (
10
+ GetJobUpdatesResponse200FlowStatusFailureModule,
11
+ )
12
+ from ..models.get_job_updates_response_200_flow_status_modules_item import (
13
+ GetJobUpdatesResponse200FlowStatusModulesItem,
9
14
  )
15
+ from ..models.get_job_updates_response_200_flow_status_preprocessor_module import (
16
+ GetJobUpdatesResponse200FlowStatusPreprocessorModule,
17
+ )
18
+ from ..models.get_job_updates_response_200_flow_status_retry import GetJobUpdatesResponse200FlowStatusRetry
10
19
 
11
20
 
12
21
  T = TypeVar("T", bound="GetJobUpdatesResponse200FlowStatus")
@@ -14,49 +23,122 @@ T = TypeVar("T", bound="GetJobUpdatesResponse200FlowStatus")
14
23
 
15
24
  @_attrs_define
16
25
  class GetJobUpdatesResponse200FlowStatus:
17
- """ """
18
-
19
- additional_properties: Dict[str, "GetJobUpdatesResponse200FlowStatusAdditionalProperty"] = _attrs_field(
20
- init=False, factory=dict
21
- )
26
+ """
27
+ Attributes:
28
+ step (int):
29
+ modules (List['GetJobUpdatesResponse200FlowStatusModulesItem']):
30
+ failure_module (GetJobUpdatesResponse200FlowStatusFailureModule):
31
+ user_states (Union[Unset, Any]):
32
+ preprocessor_module (Union[Unset, GetJobUpdatesResponse200FlowStatusPreprocessorModule]):
33
+ retry (Union[Unset, GetJobUpdatesResponse200FlowStatusRetry]):
34
+ """
35
+
36
+ step: int
37
+ modules: List["GetJobUpdatesResponse200FlowStatusModulesItem"]
38
+ failure_module: "GetJobUpdatesResponse200FlowStatusFailureModule"
39
+ user_states: Union[Unset, Any] = UNSET
40
+ preprocessor_module: Union[Unset, "GetJobUpdatesResponse200FlowStatusPreprocessorModule"] = UNSET
41
+ retry: Union[Unset, "GetJobUpdatesResponse200FlowStatusRetry"] = UNSET
42
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
22
43
 
23
44
  def to_dict(self) -> Dict[str, Any]:
24
- pass
45
+ step = self.step
46
+ modules = []
47
+ for modules_item_data in self.modules:
48
+ modules_item = modules_item_data.to_dict()
25
49
 
26
- field_dict: Dict[str, Any] = {}
27
- for prop_name, prop in self.additional_properties.items():
28
- field_dict[prop_name] = prop.to_dict()
50
+ modules.append(modules_item)
51
+
52
+ failure_module = self.failure_module.to_dict()
53
+
54
+ user_states = self.user_states
55
+ preprocessor_module: Union[Unset, Dict[str, Any]] = UNSET
56
+ if not isinstance(self.preprocessor_module, Unset):
57
+ preprocessor_module = self.preprocessor_module.to_dict()
29
58
 
30
- field_dict.update({})
59
+ retry: Union[Unset, Dict[str, Any]] = UNSET
60
+ if not isinstance(self.retry, Unset):
61
+ retry = self.retry.to_dict()
62
+
63
+ field_dict: Dict[str, Any] = {}
64
+ field_dict.update(self.additional_properties)
65
+ field_dict.update(
66
+ {
67
+ "step": step,
68
+ "modules": modules,
69
+ "failure_module": failure_module,
70
+ }
71
+ )
72
+ if user_states is not UNSET:
73
+ field_dict["user_states"] = user_states
74
+ if preprocessor_module is not UNSET:
75
+ field_dict["preprocessor_module"] = preprocessor_module
76
+ if retry is not UNSET:
77
+ field_dict["retry"] = retry
31
78
 
32
79
  return field_dict
33
80
 
34
81
  @classmethod
35
82
  def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
36
- from ..models.get_job_updates_response_200_flow_status_additional_property import (
37
- GetJobUpdatesResponse200FlowStatusAdditionalProperty,
83
+ from ..models.get_job_updates_response_200_flow_status_failure_module import (
84
+ GetJobUpdatesResponse200FlowStatusFailureModule,
85
+ )
86
+ from ..models.get_job_updates_response_200_flow_status_modules_item import (
87
+ GetJobUpdatesResponse200FlowStatusModulesItem,
38
88
  )
89
+ from ..models.get_job_updates_response_200_flow_status_preprocessor_module import (
90
+ GetJobUpdatesResponse200FlowStatusPreprocessorModule,
91
+ )
92
+ from ..models.get_job_updates_response_200_flow_status_retry import GetJobUpdatesResponse200FlowStatusRetry
39
93
 
40
94
  d = src_dict.copy()
41
- get_job_updates_response_200_flow_status = cls()
42
-
43
- additional_properties = {}
44
- for prop_name, prop_dict in d.items():
45
- additional_property = GetJobUpdatesResponse200FlowStatusAdditionalProperty.from_dict(prop_dict)
46
-
47
- additional_properties[prop_name] = additional_property
95
+ step = d.pop("step")
96
+
97
+ modules = []
98
+ _modules = d.pop("modules")
99
+ for modules_item_data in _modules:
100
+ modules_item = GetJobUpdatesResponse200FlowStatusModulesItem.from_dict(modules_item_data)
101
+
102
+ modules.append(modules_item)
103
+
104
+ failure_module = GetJobUpdatesResponse200FlowStatusFailureModule.from_dict(d.pop("failure_module"))
105
+
106
+ user_states = d.pop("user_states", UNSET)
107
+
108
+ _preprocessor_module = d.pop("preprocessor_module", UNSET)
109
+ preprocessor_module: Union[Unset, GetJobUpdatesResponse200FlowStatusPreprocessorModule]
110
+ if isinstance(_preprocessor_module, Unset):
111
+ preprocessor_module = UNSET
112
+ else:
113
+ preprocessor_module = GetJobUpdatesResponse200FlowStatusPreprocessorModule.from_dict(_preprocessor_module)
114
+
115
+ _retry = d.pop("retry", UNSET)
116
+ retry: Union[Unset, GetJobUpdatesResponse200FlowStatusRetry]
117
+ if isinstance(_retry, Unset):
118
+ retry = UNSET
119
+ else:
120
+ retry = GetJobUpdatesResponse200FlowStatusRetry.from_dict(_retry)
121
+
122
+ get_job_updates_response_200_flow_status = cls(
123
+ step=step,
124
+ modules=modules,
125
+ failure_module=failure_module,
126
+ user_states=user_states,
127
+ preprocessor_module=preprocessor_module,
128
+ retry=retry,
129
+ )
48
130
 
49
- get_job_updates_response_200_flow_status.additional_properties = additional_properties
131
+ get_job_updates_response_200_flow_status.additional_properties = d
50
132
  return get_job_updates_response_200_flow_status
51
133
 
52
134
  @property
53
135
  def additional_keys(self) -> List[str]:
54
136
  return list(self.additional_properties.keys())
55
137
 
56
- def __getitem__(self, key: str) -> "GetJobUpdatesResponse200FlowStatusAdditionalProperty":
138
+ def __getitem__(self, key: str) -> Any:
57
139
  return self.additional_properties[key]
58
140
 
59
- def __setitem__(self, key: str, value: "GetJobUpdatesResponse200FlowStatusAdditionalProperty") -> None:
141
+ def __setitem__(self, key: str, value: Any) -> None:
60
142
  self.additional_properties[key] = value
61
143
 
62
144
  def __delitem__(self, key: str) -> None:
@@ -0,0 +1,241 @@
1
+ from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..models.get_job_updates_response_200_flow_status_failure_module_type import (
7
+ GetJobUpdatesResponse200FlowStatusFailureModuleType,
8
+ )
9
+ from ..types import UNSET, Unset
10
+
11
+ if TYPE_CHECKING:
12
+ from ..models.get_job_updates_response_200_flow_status_failure_module_approvers_item import (
13
+ GetJobUpdatesResponse200FlowStatusFailureModuleApproversItem,
14
+ )
15
+ from ..models.get_job_updates_response_200_flow_status_failure_module_branch_chosen import (
16
+ GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosen,
17
+ )
18
+ from ..models.get_job_updates_response_200_flow_status_failure_module_branchall import (
19
+ GetJobUpdatesResponse200FlowStatusFailureModuleBranchall,
20
+ )
21
+ from ..models.get_job_updates_response_200_flow_status_failure_module_iterator import (
22
+ GetJobUpdatesResponse200FlowStatusFailureModuleIterator,
23
+ )
24
+
25
+
26
+ T = TypeVar("T", bound="GetJobUpdatesResponse200FlowStatusFailureModule")
27
+
28
+
29
+ @_attrs_define
30
+ class GetJobUpdatesResponse200FlowStatusFailureModule:
31
+ """
32
+ Attributes:
33
+ type (GetJobUpdatesResponse200FlowStatusFailureModuleType):
34
+ id (Union[Unset, str]):
35
+ job (Union[Unset, str]):
36
+ count (Union[Unset, int]):
37
+ progress (Union[Unset, int]):
38
+ iterator (Union[Unset, GetJobUpdatesResponse200FlowStatusFailureModuleIterator]):
39
+ flow_jobs (Union[Unset, List[str]]):
40
+ flow_jobs_success (Union[Unset, List[bool]]):
41
+ branch_chosen (Union[Unset, GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosen]):
42
+ branchall (Union[Unset, GetJobUpdatesResponse200FlowStatusFailureModuleBranchall]):
43
+ approvers (Union[Unset, List['GetJobUpdatesResponse200FlowStatusFailureModuleApproversItem']]):
44
+ failed_retries (Union[Unset, List[str]]):
45
+ skipped (Union[Unset, bool]):
46
+ parent_module (Union[Unset, str]):
47
+ """
48
+
49
+ type: GetJobUpdatesResponse200FlowStatusFailureModuleType
50
+ id: Union[Unset, str] = UNSET
51
+ job: Union[Unset, str] = UNSET
52
+ count: Union[Unset, int] = UNSET
53
+ progress: Union[Unset, int] = UNSET
54
+ iterator: Union[Unset, "GetJobUpdatesResponse200FlowStatusFailureModuleIterator"] = UNSET
55
+ flow_jobs: Union[Unset, List[str]] = UNSET
56
+ flow_jobs_success: Union[Unset, List[bool]] = UNSET
57
+ branch_chosen: Union[Unset, "GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosen"] = UNSET
58
+ branchall: Union[Unset, "GetJobUpdatesResponse200FlowStatusFailureModuleBranchall"] = UNSET
59
+ approvers: Union[Unset, List["GetJobUpdatesResponse200FlowStatusFailureModuleApproversItem"]] = UNSET
60
+ failed_retries: Union[Unset, List[str]] = UNSET
61
+ skipped: Union[Unset, bool] = UNSET
62
+ parent_module: Union[Unset, str] = UNSET
63
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
64
+
65
+ def to_dict(self) -> Dict[str, Any]:
66
+ type = self.type.value
67
+
68
+ id = self.id
69
+ job = self.job
70
+ count = self.count
71
+ progress = self.progress
72
+ iterator: Union[Unset, Dict[str, Any]] = UNSET
73
+ if not isinstance(self.iterator, Unset):
74
+ iterator = self.iterator.to_dict()
75
+
76
+ flow_jobs: Union[Unset, List[str]] = UNSET
77
+ if not isinstance(self.flow_jobs, Unset):
78
+ flow_jobs = self.flow_jobs
79
+
80
+ flow_jobs_success: Union[Unset, List[bool]] = UNSET
81
+ if not isinstance(self.flow_jobs_success, Unset):
82
+ flow_jobs_success = self.flow_jobs_success
83
+
84
+ branch_chosen: Union[Unset, Dict[str, Any]] = UNSET
85
+ if not isinstance(self.branch_chosen, Unset):
86
+ branch_chosen = self.branch_chosen.to_dict()
87
+
88
+ branchall: Union[Unset, Dict[str, Any]] = UNSET
89
+ if not isinstance(self.branchall, Unset):
90
+ branchall = self.branchall.to_dict()
91
+
92
+ approvers: Union[Unset, List[Dict[str, Any]]] = UNSET
93
+ if not isinstance(self.approvers, Unset):
94
+ approvers = []
95
+ for approvers_item_data in self.approvers:
96
+ approvers_item = approvers_item_data.to_dict()
97
+
98
+ approvers.append(approvers_item)
99
+
100
+ failed_retries: Union[Unset, List[str]] = UNSET
101
+ if not isinstance(self.failed_retries, Unset):
102
+ failed_retries = self.failed_retries
103
+
104
+ skipped = self.skipped
105
+ parent_module = self.parent_module
106
+
107
+ field_dict: Dict[str, Any] = {}
108
+ field_dict.update(self.additional_properties)
109
+ field_dict.update(
110
+ {
111
+ "type": type,
112
+ }
113
+ )
114
+ if id is not UNSET:
115
+ field_dict["id"] = id
116
+ if job is not UNSET:
117
+ field_dict["job"] = job
118
+ if count is not UNSET:
119
+ field_dict["count"] = count
120
+ if progress is not UNSET:
121
+ field_dict["progress"] = progress
122
+ if iterator is not UNSET:
123
+ field_dict["iterator"] = iterator
124
+ if flow_jobs is not UNSET:
125
+ field_dict["flow_jobs"] = flow_jobs
126
+ if flow_jobs_success is not UNSET:
127
+ field_dict["flow_jobs_success"] = flow_jobs_success
128
+ if branch_chosen is not UNSET:
129
+ field_dict["branch_chosen"] = branch_chosen
130
+ if branchall is not UNSET:
131
+ field_dict["branchall"] = branchall
132
+ if approvers is not UNSET:
133
+ field_dict["approvers"] = approvers
134
+ if failed_retries is not UNSET:
135
+ field_dict["failed_retries"] = failed_retries
136
+ if skipped is not UNSET:
137
+ field_dict["skipped"] = skipped
138
+ if parent_module is not UNSET:
139
+ field_dict["parent_module"] = parent_module
140
+
141
+ return field_dict
142
+
143
+ @classmethod
144
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
145
+ from ..models.get_job_updates_response_200_flow_status_failure_module_approvers_item import (
146
+ GetJobUpdatesResponse200FlowStatusFailureModuleApproversItem,
147
+ )
148
+ from ..models.get_job_updates_response_200_flow_status_failure_module_branch_chosen import (
149
+ GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosen,
150
+ )
151
+ from ..models.get_job_updates_response_200_flow_status_failure_module_branchall import (
152
+ GetJobUpdatesResponse200FlowStatusFailureModuleBranchall,
153
+ )
154
+ from ..models.get_job_updates_response_200_flow_status_failure_module_iterator import (
155
+ GetJobUpdatesResponse200FlowStatusFailureModuleIterator,
156
+ )
157
+
158
+ d = src_dict.copy()
159
+ type = GetJobUpdatesResponse200FlowStatusFailureModuleType(d.pop("type"))
160
+
161
+ id = d.pop("id", UNSET)
162
+
163
+ job = d.pop("job", UNSET)
164
+
165
+ count = d.pop("count", UNSET)
166
+
167
+ progress = d.pop("progress", UNSET)
168
+
169
+ _iterator = d.pop("iterator", UNSET)
170
+ iterator: Union[Unset, GetJobUpdatesResponse200FlowStatusFailureModuleIterator]
171
+ if isinstance(_iterator, Unset):
172
+ iterator = UNSET
173
+ else:
174
+ iterator = GetJobUpdatesResponse200FlowStatusFailureModuleIterator.from_dict(_iterator)
175
+
176
+ flow_jobs = cast(List[str], d.pop("flow_jobs", UNSET))
177
+
178
+ flow_jobs_success = cast(List[bool], d.pop("flow_jobs_success", UNSET))
179
+
180
+ _branch_chosen = d.pop("branch_chosen", UNSET)
181
+ branch_chosen: Union[Unset, GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosen]
182
+ if isinstance(_branch_chosen, Unset):
183
+ branch_chosen = UNSET
184
+ else:
185
+ branch_chosen = GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosen.from_dict(_branch_chosen)
186
+
187
+ _branchall = d.pop("branchall", UNSET)
188
+ branchall: Union[Unset, GetJobUpdatesResponse200FlowStatusFailureModuleBranchall]
189
+ if isinstance(_branchall, Unset):
190
+ branchall = UNSET
191
+ else:
192
+ branchall = GetJobUpdatesResponse200FlowStatusFailureModuleBranchall.from_dict(_branchall)
193
+
194
+ approvers = []
195
+ _approvers = d.pop("approvers", UNSET)
196
+ for approvers_item_data in _approvers or []:
197
+ approvers_item = GetJobUpdatesResponse200FlowStatusFailureModuleApproversItem.from_dict(approvers_item_data)
198
+
199
+ approvers.append(approvers_item)
200
+
201
+ failed_retries = cast(List[str], d.pop("failed_retries", UNSET))
202
+
203
+ skipped = d.pop("skipped", UNSET)
204
+
205
+ parent_module = d.pop("parent_module", UNSET)
206
+
207
+ get_job_updates_response_200_flow_status_failure_module = cls(
208
+ type=type,
209
+ id=id,
210
+ job=job,
211
+ count=count,
212
+ progress=progress,
213
+ iterator=iterator,
214
+ flow_jobs=flow_jobs,
215
+ flow_jobs_success=flow_jobs_success,
216
+ branch_chosen=branch_chosen,
217
+ branchall=branchall,
218
+ approvers=approvers,
219
+ failed_retries=failed_retries,
220
+ skipped=skipped,
221
+ parent_module=parent_module,
222
+ )
223
+
224
+ get_job_updates_response_200_flow_status_failure_module.additional_properties = d
225
+ return get_job_updates_response_200_flow_status_failure_module
226
+
227
+ @property
228
+ def additional_keys(self) -> List[str]:
229
+ return list(self.additional_properties.keys())
230
+
231
+ def __getitem__(self, key: str) -> Any:
232
+ return self.additional_properties[key]
233
+
234
+ def __setitem__(self, key: str, value: Any) -> None:
235
+ self.additional_properties[key] = value
236
+
237
+ def __delitem__(self, key: str) -> None:
238
+ del self.additional_properties[key]
239
+
240
+ def __contains__(self, key: str) -> bool:
241
+ return key in self.additional_properties
@@ -0,0 +1,65 @@
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="GetJobUpdatesResponse200FlowStatusFailureModuleApproversItem")
7
+
8
+
9
+ @_attrs_define
10
+ class GetJobUpdatesResponse200FlowStatusFailureModuleApproversItem:
11
+ """
12
+ Attributes:
13
+ resume_id (int):
14
+ approver (str):
15
+ """
16
+
17
+ resume_id: int
18
+ approver: str
19
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> Dict[str, Any]:
22
+ resume_id = self.resume_id
23
+ approver = self.approver
24
+
25
+ field_dict: Dict[str, Any] = {}
26
+ field_dict.update(self.additional_properties)
27
+ field_dict.update(
28
+ {
29
+ "resume_id": resume_id,
30
+ "approver": approver,
31
+ }
32
+ )
33
+
34
+ return field_dict
35
+
36
+ @classmethod
37
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
38
+ d = src_dict.copy()
39
+ resume_id = d.pop("resume_id")
40
+
41
+ approver = d.pop("approver")
42
+
43
+ get_job_updates_response_200_flow_status_failure_module_approvers_item = cls(
44
+ resume_id=resume_id,
45
+ approver=approver,
46
+ )
47
+
48
+ get_job_updates_response_200_flow_status_failure_module_approvers_item.additional_properties = d
49
+ return get_job_updates_response_200_flow_status_failure_module_approvers_item
50
+
51
+ @property
52
+ def additional_keys(self) -> List[str]:
53
+ return list(self.additional_properties.keys())
54
+
55
+ def __getitem__(self, key: str) -> Any:
56
+ return self.additional_properties[key]
57
+
58
+ def __setitem__(self, key: str, value: Any) -> None:
59
+ self.additional_properties[key] = value
60
+
61
+ def __delitem__(self, key: str) -> None:
62
+ del self.additional_properties[key]
63
+
64
+ def __contains__(self, key: str) -> bool:
65
+ return key in self.additional_properties
@@ -0,0 +1,72 @@
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 ..models.get_job_updates_response_200_flow_status_failure_module_branch_chosen_type import (
7
+ GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosenType,
8
+ )
9
+ from ..types import UNSET, Unset
10
+
11
+ T = TypeVar("T", bound="GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosen")
12
+
13
+
14
+ @_attrs_define
15
+ class GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosen:
16
+ """
17
+ Attributes:
18
+ type (GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosenType):
19
+ branch (Union[Unset, int]):
20
+ """
21
+
22
+ type: GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosenType
23
+ branch: Union[Unset, int] = UNSET
24
+ additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> Dict[str, Any]:
27
+ type = self.type.value
28
+
29
+ branch = self.branch
30
+
31
+ field_dict: Dict[str, Any] = {}
32
+ field_dict.update(self.additional_properties)
33
+ field_dict.update(
34
+ {
35
+ "type": type,
36
+ }
37
+ )
38
+ if branch is not UNSET:
39
+ field_dict["branch"] = branch
40
+
41
+ return field_dict
42
+
43
+ @classmethod
44
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
45
+ d = src_dict.copy()
46
+ type = GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosenType(d.pop("type"))
47
+
48
+ branch = d.pop("branch", UNSET)
49
+
50
+ get_job_updates_response_200_flow_status_failure_module_branch_chosen = cls(
51
+ type=type,
52
+ branch=branch,
53
+ )
54
+
55
+ get_job_updates_response_200_flow_status_failure_module_branch_chosen.additional_properties = d
56
+ return get_job_updates_response_200_flow_status_failure_module_branch_chosen
57
+
58
+ @property
59
+ def additional_keys(self) -> List[str]:
60
+ return list(self.additional_properties.keys())
61
+
62
+ def __getitem__(self, key: str) -> Any:
63
+ return self.additional_properties[key]
64
+
65
+ def __setitem__(self, key: str, value: Any) -> None:
66
+ self.additional_properties[key] = value
67
+
68
+ def __delitem__(self, key: str) -> None:
69
+ del self.additional_properties[key]
70
+
71
+ def __contains__(self, key: str) -> bool:
72
+ return key in self.additional_properties
@@ -0,0 +1,9 @@
1
+ from enum import Enum
2
+
3
+
4
+ class GetJobUpdatesResponse200FlowStatusFailureModuleBranchChosenType(str, Enum):
5
+ BRANCH = "branch"
6
+ DEFAULT = "default"
7
+
8
+ def __str__(self) -> str:
9
+ return str(self.value)