Skip to content

Commit 07c38ec

Browse files
committed
pojo sync poc
1 parent f228526 commit 07c38ec

5 files changed

Lines changed: 201 additions & 16 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"serverPojoMappings": [
3+
{
4+
"server": {
5+
"owner": "orkes-io",
6+
"repo": "orkes-conductor",
7+
"module": "server",
8+
"className": "io.orkes.conductor.server.rest.model.requests.AuthorizationRequest"
9+
},
10+
"sdk": {
11+
"owner": "conductor-sdk",
12+
"repo": "conductor-python",
13+
"className": "conductor.client.http.models.authorization_request.py"
14+
}
15+
}
16+
]
17+
}

src/conductor/client/http/models/action.py

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,34 @@ class Action(object):
1818
"""
1919
swagger_types = {
2020
'action': 'str',
21-
'start_workflow': 'StartWorkflow',
21+
'start_workflow': 'StartWorkflowRequest',
2222
'complete_task': 'TaskDetails',
2323
'fail_task': 'TaskDetails',
24-
'expand_inline_json': 'bool'
24+
'expand_inline_json': 'bool',
25+
'terminate_workflow': 'TerminateWorkflow',
26+
'update_workflow_variables': 'UpdateWorkflowVariables'
2527
}
2628

2729
attribute_map = {
2830
'action': 'action',
2931
'start_workflow': 'start_workflow',
3032
'complete_task': 'complete_task',
3133
'fail_task': 'fail_task',
32-
'expand_inline_json': 'expandInlineJSON'
34+
'expand_inline_json': 'expandInlineJSON',
35+
'terminate_workflow': 'terminate_workflow',
36+
'update_workflow_variables': 'update_workflow_variables'
3337
}
3438

3539
def __init__(self, action=None, start_workflow=None, complete_task=None, fail_task=None,
36-
expand_inline_json=None): # noqa: E501
40+
expand_inline_json=None, terminate_workflow=None, update_workflow_variables=None): # noqa: E501
3741
"""Action - a model defined in Swagger""" # noqa: E501
3842
self._action = None
3943
self._start_workflow = None
4044
self._complete_task = None
4145
self._fail_task = None
4246
self._expand_inline_json = None
47+
self._terminate_workflow = None
48+
self._update_workflow_variables = None
4349
self.discriminator = None
4450
if action is not None:
4551
self.action = action
@@ -51,6 +57,10 @@ def __init__(self, action=None, start_workflow=None, complete_task=None, fail_ta
5157
self.fail_task = fail_task
5258
if expand_inline_json is not None:
5359
self.expand_inline_json = expand_inline_json
60+
if terminate_workflow is not None:
61+
self.terminate_workflow = terminate_workflow
62+
if update_workflow_variables is not None:
63+
self.update_workflow_variables = update_workflow_variables
5464

5565
@property
5666
def action(self):
@@ -70,7 +80,7 @@ def action(self, action):
7080
:param action: The action of this Action. # noqa: E501
7181
:type: str
7282
"""
73-
allowed_values = ["start_workflow", "complete_task", "fail_task"] # noqa: E501
83+
allowed_values = ["start_workflow", "complete_task", "fail_task", "terminate_workflow", "update_workflow_variables"] # noqa: E501
7484
if action not in allowed_values:
7585
raise ValueError(
7686
"Invalid value for `action` ({0}), must be one of {1}" # noqa: E501
@@ -85,7 +95,7 @@ def start_workflow(self):
8595
8696
8797
:return: The start_workflow of this Action. # noqa: E501
88-
:rtype: StartWorkflow
98+
:rtype: StartWorkflowRequest
8999
"""
90100
return self._start_workflow
91101

@@ -95,7 +105,7 @@ def start_workflow(self, start_workflow):
95105
96106
97107
:param start_workflow: The start_workflow of this Action. # noqa: E501
98-
:type: StartWorkflow
108+
:type: StartWorkflowRequest
99109
"""
100110

101111
self._start_workflow = start_workflow
@@ -163,6 +173,48 @@ def expand_inline_json(self, expand_inline_json):
163173

164174
self._expand_inline_json = expand_inline_json
165175

176+
@property
177+
def terminate_workflow(self):
178+
"""Gets the terminate_workflow of this Action. # noqa: E501
179+
180+
181+
:return: The terminate_workflow of this Action. # noqa: E501
182+
:rtype: TerminateWorkflow
183+
"""
184+
return self._terminate_workflow
185+
186+
@terminate_workflow.setter
187+
def terminate_workflow(self, terminate_workflow):
188+
"""Sets the terminate_workflow of this Action.
189+
190+
191+
:param terminate_workflow: The terminate_workflow of this Action. # noqa: E501
192+
:type: TerminateWorkflow
193+
"""
194+
195+
self._terminate_workflow = terminate_workflow
196+
197+
@property
198+
def update_workflow_variables(self):
199+
"""Gets the update_workflow_variables of this Action. # noqa: E501
200+
201+
202+
:return: The update_workflow_variables of this Action. # noqa: E501
203+
:rtype: UpdateWorkflowVariables
204+
"""
205+
return self._update_workflow_variables
206+
207+
@update_workflow_variables.setter
208+
def update_workflow_variables(self, update_workflow_variables):
209+
"""Sets the update_workflow_variables of this Action.
210+
211+
212+
:param update_workflow_variables: The update_workflow_variables of this Action. # noqa: E501
213+
:type: UpdateWorkflowVariables
214+
"""
215+
216+
self._update_workflow_variables = update_workflow_variables
217+
166218
def to_dict(self):
167219
"""Returns the model properties as a dict"""
168220
result = {}
@@ -207,4 +259,4 @@ def __eq__(self, other):
207259

208260
def __ne__(self, other):
209261
"""Returns true if both objects are not equal"""
210-
return not self == other
262+
return not self == other

src/conductor/client/http/models/bulk_response.py

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,21 @@ class BulkResponse(object):
1818
"""
1919
swagger_types = {
2020
'bulk_error_results': 'dict(str, str)',
21-
'bulk_successful_results': 'list[str]'
21+
'bulk_successful_results': 'list[str]',
22+
'message': 'str'
2223
}
2324

2425
attribute_map = {
2526
'bulk_error_results': 'bulkErrorResults',
26-
'bulk_successful_results': 'bulkSuccessfulResults'
27+
'bulk_successful_results': 'bulkSuccessfulResults',
28+
'message': 'message'
2729
}
2830

2931
def __init__(self, bulk_error_results=None, bulk_successful_results=None): # noqa: E501
3032
"""BulkResponse - a model defined in Swagger""" # noqa: E501
3133
self._bulk_error_results = None
3234
self._bulk_successful_results = None
35+
self._message = "Bulk Request has been processed."
3336
self.discriminator = None
3437
if bulk_error_results is not None:
3538
self.bulk_error_results = bulk_error_results
@@ -40,6 +43,7 @@ def __init__(self, bulk_error_results=None, bulk_successful_results=None): # no
4043
def bulk_error_results(self):
4144
"""Gets the bulk_error_results of this BulkResponse. # noqa: E501
4245
46+
Key - entityId Value - error message processing this entity
4347
4448
:return: The bulk_error_results of this BulkResponse. # noqa: E501
4549
:rtype: dict(str, str)
@@ -50,6 +54,7 @@ def bulk_error_results(self):
5054
def bulk_error_results(self, bulk_error_results):
5155
"""Sets the bulk_error_results of this BulkResponse.
5256
57+
Key - entityId Value - error message processing this entity
5358
5459
:param bulk_error_results: The bulk_error_results of this BulkResponse. # noqa: E501
5560
:type: dict(str, str)
@@ -78,6 +83,35 @@ def bulk_successful_results(self, bulk_successful_results):
7883

7984
self._bulk_successful_results = bulk_successful_results
8085

86+
@property
87+
def message(self):
88+
"""Gets the message of this BulkResponse. # noqa: E501
89+
90+
91+
:return: The message of this BulkResponse. # noqa: E501
92+
:rtype: str
93+
"""
94+
return self._message
95+
96+
def append_success_response(self, result):
97+
"""Appends a successful result to bulk_successful_results. # noqa: E501
98+
99+
:param result: The result to append to bulk_successful_results
100+
"""
101+
if self._bulk_successful_results is None:
102+
self._bulk_successful_results = []
103+
self._bulk_successful_results.append(result)
104+
105+
def append_failed_response(self, id, error_message):
106+
"""Appends a failed result to bulk_error_results. # noqa: E501
107+
108+
:param id: The entity ID that failed
109+
:param error_message: The error message for the failed entity
110+
"""
111+
if self._bulk_error_results is None:
112+
self._bulk_error_results = {}
113+
self._bulk_error_results[id] = error_message
114+
81115
def to_dict(self):
82116
"""Returns the model properties as a dict"""
83117
result = {}
@@ -122,4 +156,4 @@ def __eq__(self, other):
122156

123157
def __ne__(self, other):
124158
"""Returns true if both objects are not equal"""
125-
return not self == other
159+
return not self == other

src/conductor/client/http/models/conductor_application.py

Lines changed: 83 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import re # noqa: F401
33

44
import six
5+
from deprecated import deprecated
56

67

78
class ConductorApplication(object):
@@ -19,27 +20,42 @@ class ConductorApplication(object):
1920
swagger_types = {
2021
'id': 'str',
2122
'name': 'str',
22-
'created_by': 'str'
23+
'created_by': 'str',
24+
'create_time': 'int',
25+
'update_time': 'int',
26+
'updated_by': 'str'
2327
}
2428

2529
attribute_map = {
2630
'id': 'id',
2731
'name': 'name',
28-
'created_by': 'createdBy'
32+
'created_by': 'createdBy',
33+
'create_time': 'createTime',
34+
'update_time': 'updateTime',
35+
'updated_by': 'updatedBy'
2936
}
3037

31-
def __init__(self, id=None, name=None, created_by=None): # noqa: E501
38+
def __init__(self, id=None, name=None, created_by=None, create_time=None, update_time=None, updated_by=None): # noqa: E501
3239
"""ConductorApplication - a model defined in Swagger""" # noqa: E501
3340
self._id = None
3441
self._name = None
3542
self._created_by = None
43+
self._create_time = None
44+
self._update_time = None
45+
self._updated_by = None
3646
self.discriminator = None
3747
if id is not None:
3848
self.id = id
3949
if name is not None:
4050
self.name = name
4151
if created_by is not None:
4252
self.created_by = created_by
53+
if create_time is not None:
54+
self.create_time = create_time
55+
if update_time is not None:
56+
self.update_time = update_time
57+
if updated_by is not None:
58+
self.updated_by = updated_by
4359

4460
@property
4561
def id(self):
@@ -104,6 +120,69 @@ def created_by(self, created_by):
104120

105121
self._created_by = created_by
106122

123+
@property
124+
def create_time(self):
125+
"""Gets the create_time of this ConductorApplication. # noqa: E501
126+
127+
128+
:return: The create_time of this ConductorApplication. # noqa: E501
129+
:rtype: int
130+
"""
131+
return self._create_time
132+
133+
@create_time.setter
134+
def create_time(self, create_time):
135+
"""Sets the create_time of this ConductorApplication.
136+
137+
138+
:param create_time: The create_time of this ConductorApplication. # noqa: E501
139+
:type: int
140+
"""
141+
142+
self._create_time = create_time
143+
144+
@property
145+
def update_time(self):
146+
"""Gets the update_time of this ConductorApplication. # noqa: E501
147+
148+
149+
:return: The update_time of this ConductorApplication. # noqa: E501
150+
:rtype: int
151+
"""
152+
return self._update_time
153+
154+
@update_time.setter
155+
def update_time(self, update_time):
156+
"""Sets the update_time of this ConductorApplication.
157+
158+
159+
:param update_time: The update_time of this ConductorApplication. # noqa: E501
160+
:type: int
161+
"""
162+
163+
self._update_time = update_time
164+
165+
@property
166+
def updated_by(self):
167+
"""Gets the updated_by of this ConductorApplication. # noqa: E501
168+
169+
170+
:return: The updated_by of this ConductorApplication. # noqa: E501
171+
:rtype: str
172+
"""
173+
return self._updated_by
174+
175+
@updated_by.setter
176+
def updated_by(self, updated_by):
177+
"""Sets the updated_by of this ConductorApplication.
178+
179+
180+
:param updated_by: The updated_by of this ConductorApplication. # noqa: E501
181+
:type: str
182+
"""
183+
184+
self._updated_by = updated_by
185+
107186
def to_dict(self):
108187
"""Returns the model properties as a dict"""
109188
result = {}
@@ -148,4 +227,4 @@ def __eq__(self, other):
148227

149228
def __ne__(self, other):
150229
"""Returns true if both objects are not equal"""
151-
return not self == other
230+
return not self == other

src/conductor/client/http/models/conductor_user.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import pprint
22
import re # noqa: F401
3+
from deprecated import deprecated
34

45
import six
56

@@ -173,6 +174,7 @@ def uuid(self, uuid):
173174
self._uuid = uuid
174175

175176
@property
177+
@deprecated
176178
def application_user(self):
177179
"""Gets the application_user of this ConductorUser. # noqa: E501
178180
@@ -183,6 +185,7 @@ def application_user(self):
183185
return self._application_user
184186

185187
@application_user.setter
188+
@deprecated
186189
def application_user(self, application_user):
187190
"""Sets the application_user of this ConductorUser.
188191
@@ -279,4 +282,4 @@ def __eq__(self, other):
279282

280283
def __ne__(self, other):
281284
"""Returns true if both objects are not equal"""
282-
return not self == other
285+
return not self == other

0 commit comments

Comments
 (0)