Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions python_sdk_server_pojo_mapping.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"serverPojoMappings": [
{
"server": {
"owner": "orkes-io",
"repo": "orkes-conductor",
"module": "server",
"className": "io.orkes.conductor.server.rest.model.requests.AuthorizationRequest"
},
"sdk": {
"owner": "conductor-sdk",
"repo": "conductor-python",
"className": "conductor.client.http.models.authorization_request.py"
}
}
]
}
122 changes: 109 additions & 13 deletions src/conductor/client/http/models/action.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import pprint
import re # noqa: F401
from dataclasses import dataclass, field, InitVar
from typing import Optional, Dict, List, Any, Union
from deprecated import deprecated

import six


class Action(object):
@dataclass
class Action:
"""NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually.
Expand All @@ -16,30 +20,57 @@ class Action(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
# Initialize private fields
_action: Optional[str] = field(default=None, init=False)
_start_workflow: Any = field(default=None, init=False)
_complete_task: Any = field(default=None, init=False)
_fail_task: Any = field(default=None, init=False)
_expand_inline_json: Optional[bool] = field(default=None, init=False)
_terminate_workflow: Any = field(default=None, init=False)
_update_workflow_variables: Any = field(default=None, init=False)

# Init variables for backward compatibility
action: InitVar[Optional[str]] = None
start_workflow: InitVar[Any] = None
complete_task: InitVar[Any] = None
fail_task: InitVar[Any] = None
expand_inline_json: InitVar[Optional[bool]] = None
terminate_workflow: InitVar[Any] = None
update_workflow_variables: InitVar[Any] = None

# Class variables
swagger_types: Dict[str, str] = field(default_factory=lambda: {
'action': 'str',
'start_workflow': 'StartWorkflow',
'start_workflow': 'StartWorkflowRequest',
'complete_task': 'TaskDetails',
'fail_task': 'TaskDetails',
'expand_inline_json': 'bool'
}
'expand_inline_json': 'bool',
'terminate_workflow': 'TerminateWorkflow',
'update_workflow_variables': 'UpdateWorkflowVariables'
})

attribute_map = {
attribute_map: Dict[str, str] = field(default_factory=lambda: {
'action': 'action',
'start_workflow': 'start_workflow',
'complete_task': 'complete_task',
'fail_task': 'fail_task',
'expand_inline_json': 'expandInlineJSON'
}
'expand_inline_json': 'expandInlineJSON',
'terminate_workflow': 'terminate_workflow',
'update_workflow_variables': 'update_workflow_variables'
})

discriminator = None

def __init__(self, action=None, start_workflow=None, complete_task=None, fail_task=None,
expand_inline_json=None): # noqa: E501
expand_inline_json=None, terminate_workflow=None, update_workflow_variables=None): # noqa: E501
"""Action - a model defined in Swagger""" # noqa: E501
self._action = None
self._start_workflow = None
self._complete_task = None
self._fail_task = None
self._expand_inline_json = None
self._terminate_workflow = None
self._update_workflow_variables = None
self.discriminator = None
if action is not None:
self.action = action
Expand All @@ -51,6 +82,28 @@ def __init__(self, action=None, start_workflow=None, complete_task=None, fail_ta
self.fail_task = fail_task
if expand_inline_json is not None:
self.expand_inline_json = expand_inline_json
if terminate_workflow is not None:
self.terminate_workflow = terminate_workflow
if update_workflow_variables is not None:
self.update_workflow_variables = update_workflow_variables

def __post_init__(self, action, start_workflow, complete_task, fail_task,
expand_inline_json, terminate_workflow, update_workflow_variables):
"""Handle initialization for dataclass compatibility"""
if action is not None:
self.action = action
if start_workflow is not None:
self.start_workflow = start_workflow
if complete_task is not None:
self.complete_task = complete_task
if fail_task is not None:
self.fail_task = fail_task
if expand_inline_json is not None:
self.expand_inline_json = expand_inline_json
if terminate_workflow is not None:
self.terminate_workflow = terminate_workflow
if update_workflow_variables is not None:
self.update_workflow_variables = update_workflow_variables

@property
def action(self):
Expand All @@ -70,7 +123,8 @@ def action(self, action):
:param action: The action of this Action. # noqa: E501
:type: str
"""
allowed_values = ["start_workflow", "complete_task", "fail_task"] # noqa: E501
allowed_values = ["start_workflow", "complete_task", "fail_task", "terminate_workflow",
"update_workflow_variables"] # noqa: E501
if action not in allowed_values:
raise ValueError(
"Invalid value for `action` ({0}), must be one of {1}" # noqa: E501
Expand All @@ -85,7 +139,7 @@ def start_workflow(self):


:return: The start_workflow of this Action. # noqa: E501
:rtype: StartWorkflow
:rtype: StartWorkflowRequest
"""
return self._start_workflow

Expand All @@ -95,7 +149,7 @@ def start_workflow(self, start_workflow):


:param start_workflow: The start_workflow of this Action. # noqa: E501
:type: StartWorkflow
:type: StartWorkflowRequest
"""

self._start_workflow = start_workflow
Expand Down Expand Up @@ -163,6 +217,48 @@ def expand_inline_json(self, expand_inline_json):

self._expand_inline_json = expand_inline_json

@property
def terminate_workflow(self):
"""Gets the terminate_workflow of this Action. # noqa: E501


:return: The terminate_workflow of this Action. # noqa: E501
:rtype: TerminateWorkflow
"""
return self._terminate_workflow

@terminate_workflow.setter
def terminate_workflow(self, terminate_workflow):
"""Sets the terminate_workflow of this Action.


:param terminate_workflow: The terminate_workflow of this Action. # noqa: E501
:type: TerminateWorkflow
"""

self._terminate_workflow = terminate_workflow

@property
def update_workflow_variables(self):
"""Gets the update_workflow_variables of this Action. # noqa: E501


:return: The update_workflow_variables of this Action. # noqa: E501
:rtype: UpdateWorkflowVariables
"""
return self._update_workflow_variables

@update_workflow_variables.setter
def update_workflow_variables(self, update_workflow_variables):
"""Sets the update_workflow_variables of this Action.


:param update_workflow_variables: The update_workflow_variables of this Action. # noqa: E501
:type: UpdateWorkflowVariables
"""

self._update_workflow_variables = update_workflow_variables

def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
Expand Down Expand Up @@ -207,4 +303,4 @@ def __eq__(self, other):

def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
return not self == other
34 changes: 27 additions & 7 deletions src/conductor/client/http/models/authorization_request.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import pprint
import re # noqa: F401

from dataclasses import dataclass, field, InitVar
from typing import List, Optional, Dict, Any
import six
from deprecated import deprecated


class AuthorizationRequest(object):
@dataclass
class AuthorizationRequest:
"""NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually.
Expand All @@ -16,17 +19,34 @@ class AuthorizationRequest(object):
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
subject: InitVar[Any] = None
target: InitVar[Any] = None
access: InitVar[List[str]] = None

_subject = None
_target = None
_access = None

# Class variables
swagger_types: Dict[str, str] = field(default_factory=lambda: {
'subject': 'SubjectRef',
'target': 'TargetRef',
'access': 'list[str]'
}
})

attribute_map = {
attribute_map: Dict[str, str] = field(default_factory=lambda: {
'subject': 'subject',
'target': 'target',
'access': 'access'
}
})

discriminator = None

def __post_init__(self, subject, target, access):
"""Initialize fields after dataclass initialization"""
self.subject = subject
self.target = target
self.access = access

def __init__(self, subject=None, target=None, access=None): # noqa: E501
"""AuthorizationRequest - a model defined in Swagger""" # noqa: E501
Expand Down Expand Up @@ -152,4 +172,4 @@ def __eq__(self, other):

def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
return not self == other
Loading
Loading