lsp
This commit is contained in:
2409
python-client/windmill-api/windmill_api/models/__init__.py
Normal file
2409
python-client/windmill-api/windmill_api/models/__init__.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,64 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="AcceptInviteJsonBody")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class AcceptInviteJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
workspace_id (str):
|
||||
username (str):
|
||||
"""
|
||||
|
||||
workspace_id: str
|
||||
username: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
workspace_id = self.workspace_id
|
||||
username = self.username
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"workspace_id": workspace_id,
|
||||
"username": username,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
workspace_id = d.pop("workspace_id")
|
||||
|
||||
username = d.pop("username")
|
||||
|
||||
accept_invite_json_body = cls(
|
||||
workspace_id=workspace_id,
|
||||
username=username,
|
||||
)
|
||||
|
||||
accept_invite_json_body.additional_properties = d
|
||||
return accept_invite_json_body
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,67 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="AddGranularAclsJsonBody")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class AddGranularAclsJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
owner (str):
|
||||
write (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
owner: str
|
||||
write: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
owner = self.owner
|
||||
write = self.write
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"owner": owner,
|
||||
}
|
||||
)
|
||||
if write is not UNSET:
|
||||
field_dict["write"] = write
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
owner = d.pop("owner")
|
||||
|
||||
write = d.pop("write", UNSET)
|
||||
|
||||
add_granular_acls_json_body = cls(
|
||||
owner=owner,
|
||||
write=write,
|
||||
)
|
||||
|
||||
add_granular_acls_json_body.additional_properties = d
|
||||
return add_granular_acls_json_body
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,13 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class AddGranularAclsKind(str, Enum):
|
||||
SCRIPT = "script"
|
||||
GROUP = "group_"
|
||||
RESOURCE = "resource"
|
||||
SCHEDULE = "schedule"
|
||||
VARIABLE = "variable"
|
||||
FLOW = "flow"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,57 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="AddUserToGroupJsonBody")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class AddUserToGroupJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
username (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
username: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
username = self.username
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if username is not UNSET:
|
||||
field_dict["username"] = username
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
username = d.pop("username", UNSET)
|
||||
|
||||
add_user_to_group_json_body = cls(
|
||||
username=username,
|
||||
)
|
||||
|
||||
add_user_to_group_json_body.additional_properties = d
|
||||
return add_user_to_group_json_body
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,206 @@
|
||||
import datetime
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.archive_script_by_hash_response_200_extra_perms import ArchiveScriptByHashResponse200ExtraPerms
|
||||
from ..models.archive_script_by_hash_response_200_kind import ArchiveScriptByHashResponse200Kind
|
||||
from ..models.archive_script_by_hash_response_200_language import ArchiveScriptByHashResponse200Language
|
||||
from ..models.archive_script_by_hash_response_200_schema import ArchiveScriptByHashResponse200Schema
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ArchiveScriptByHashResponse200")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ArchiveScriptByHashResponse200:
|
||||
"""
|
||||
Attributes:
|
||||
hash_ (str):
|
||||
path (str):
|
||||
summary (str):
|
||||
content (str):
|
||||
created_by (str):
|
||||
created_at (datetime.datetime):
|
||||
archived (bool):
|
||||
deleted (bool):
|
||||
is_template (bool):
|
||||
extra_perms (ArchiveScriptByHashResponse200ExtraPerms):
|
||||
language (ArchiveScriptByHashResponse200Language):
|
||||
kind (ArchiveScriptByHashResponse200Kind):
|
||||
workspace_id (Union[Unset, str]):
|
||||
parent_hashes (Union[Unset, List[str]]): The first element is the direct parent of the script, the second is the
|
||||
parent of the first, etc
|
||||
description (Union[Unset, str]):
|
||||
schema (Union[Unset, ArchiveScriptByHashResponse200Schema]):
|
||||
lock (Union[Unset, str]):
|
||||
lock_error_logs (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
hash_: str
|
||||
path: str
|
||||
summary: str
|
||||
content: str
|
||||
created_by: str
|
||||
created_at: datetime.datetime
|
||||
archived: bool
|
||||
deleted: bool
|
||||
is_template: bool
|
||||
extra_perms: ArchiveScriptByHashResponse200ExtraPerms
|
||||
language: ArchiveScriptByHashResponse200Language
|
||||
kind: ArchiveScriptByHashResponse200Kind
|
||||
workspace_id: Union[Unset, str] = UNSET
|
||||
parent_hashes: Union[Unset, List[str]] = UNSET
|
||||
description: Union[Unset, str] = UNSET
|
||||
schema: Union[Unset, ArchiveScriptByHashResponse200Schema] = UNSET
|
||||
lock: Union[Unset, str] = UNSET
|
||||
lock_error_logs: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
hash_ = self.hash_
|
||||
path = self.path
|
||||
summary = self.summary
|
||||
content = self.content
|
||||
created_by = self.created_by
|
||||
created_at = self.created_at.isoformat()
|
||||
|
||||
archived = self.archived
|
||||
deleted = self.deleted
|
||||
is_template = self.is_template
|
||||
extra_perms = self.extra_perms.to_dict()
|
||||
|
||||
language = self.language.value
|
||||
|
||||
kind = self.kind.value
|
||||
|
||||
workspace_id = self.workspace_id
|
||||
parent_hashes: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.parent_hashes, Unset):
|
||||
parent_hashes = self.parent_hashes
|
||||
|
||||
description = self.description
|
||||
schema: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.schema, Unset):
|
||||
schema = self.schema.to_dict()
|
||||
|
||||
lock = self.lock
|
||||
lock_error_logs = self.lock_error_logs
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"hash": hash_,
|
||||
"path": path,
|
||||
"summary": summary,
|
||||
"content": content,
|
||||
"created_by": created_by,
|
||||
"created_at": created_at,
|
||||
"archived": archived,
|
||||
"deleted": deleted,
|
||||
"is_template": is_template,
|
||||
"extra_perms": extra_perms,
|
||||
"language": language,
|
||||
"kind": kind,
|
||||
}
|
||||
)
|
||||
if workspace_id is not UNSET:
|
||||
field_dict["workspace_id"] = workspace_id
|
||||
if parent_hashes is not UNSET:
|
||||
field_dict["parent_hashes"] = parent_hashes
|
||||
if description is not UNSET:
|
||||
field_dict["description"] = description
|
||||
if schema is not UNSET:
|
||||
field_dict["schema"] = schema
|
||||
if lock is not UNSET:
|
||||
field_dict["lock"] = lock
|
||||
if lock_error_logs is not UNSET:
|
||||
field_dict["lock_error_logs"] = lock_error_logs
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
hash_ = d.pop("hash")
|
||||
|
||||
path = d.pop("path")
|
||||
|
||||
summary = d.pop("summary")
|
||||
|
||||
content = d.pop("content")
|
||||
|
||||
created_by = d.pop("created_by")
|
||||
|
||||
created_at = isoparse(d.pop("created_at"))
|
||||
|
||||
archived = d.pop("archived")
|
||||
|
||||
deleted = d.pop("deleted")
|
||||
|
||||
is_template = d.pop("is_template")
|
||||
|
||||
extra_perms = ArchiveScriptByHashResponse200ExtraPerms.from_dict(d.pop("extra_perms"))
|
||||
|
||||
language = ArchiveScriptByHashResponse200Language(d.pop("language"))
|
||||
|
||||
kind = ArchiveScriptByHashResponse200Kind(d.pop("kind"))
|
||||
|
||||
workspace_id = d.pop("workspace_id", UNSET)
|
||||
|
||||
parent_hashes = cast(List[str], d.pop("parent_hashes", UNSET))
|
||||
|
||||
description = d.pop("description", UNSET)
|
||||
|
||||
_schema = d.pop("schema", UNSET)
|
||||
schema: Union[Unset, ArchiveScriptByHashResponse200Schema]
|
||||
if isinstance(_schema, Unset):
|
||||
schema = UNSET
|
||||
else:
|
||||
schema = ArchiveScriptByHashResponse200Schema.from_dict(_schema)
|
||||
|
||||
lock = d.pop("lock", UNSET)
|
||||
|
||||
lock_error_logs = d.pop("lock_error_logs", UNSET)
|
||||
|
||||
archive_script_by_hash_response_200 = cls(
|
||||
hash_=hash_,
|
||||
path=path,
|
||||
summary=summary,
|
||||
content=content,
|
||||
created_by=created_by,
|
||||
created_at=created_at,
|
||||
archived=archived,
|
||||
deleted=deleted,
|
||||
is_template=is_template,
|
||||
extra_perms=extra_perms,
|
||||
language=language,
|
||||
kind=kind,
|
||||
workspace_id=workspace_id,
|
||||
parent_hashes=parent_hashes,
|
||||
description=description,
|
||||
schema=schema,
|
||||
lock=lock,
|
||||
lock_error_logs=lock_error_logs,
|
||||
)
|
||||
|
||||
archive_script_by_hash_response_200.additional_properties = d
|
||||
return archive_script_by_hash_response_200
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,44 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="ArchiveScriptByHashResponse200ExtraPerms")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ArchiveScriptByHashResponse200ExtraPerms:
|
||||
""" """
|
||||
|
||||
additional_properties: Dict[str, bool] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
archive_script_by_hash_response_200_extra_perms = cls()
|
||||
|
||||
archive_script_by_hash_response_200_extra_perms.additional_properties = d
|
||||
return archive_script_by_hash_response_200_extra_perms
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> bool:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: bool) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,11 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class ArchiveScriptByHashResponse200Kind(str, Enum):
|
||||
SCRIPT = "script"
|
||||
FAILURE = "failure"
|
||||
TRIGGER = "trigger"
|
||||
COMMAND = "command"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,10 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class ArchiveScriptByHashResponse200Language(str, Enum):
|
||||
PYTHON3 = "python3"
|
||||
DENO = "deno"
|
||||
GO = "go"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,44 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="ArchiveScriptByHashResponse200Schema")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ArchiveScriptByHashResponse200Schema:
|
||||
""" """
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
archive_script_by_hash_response_200_schema = cls()
|
||||
|
||||
archive_script_by_hash_response_200_schema.additional_properties = d
|
||||
return archive_script_by_hash_response_200_schema
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
118
python-client/windmill-api/windmill_api/models/audit_log.py
Normal file
118
python-client/windmill-api/windmill_api/models/audit_log.py
Normal file
@@ -0,0 +1,118 @@
|
||||
import datetime
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.audit_log_action_kind import AuditLogActionKind
|
||||
from ..models.audit_log_operation import AuditLogOperation
|
||||
from ..models.audit_log_parameters import AuditLogParameters
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="AuditLog")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class AuditLog:
|
||||
"""
|
||||
Attributes:
|
||||
id (int):
|
||||
timestamp (datetime.datetime):
|
||||
username (str):
|
||||
operation (AuditLogOperation):
|
||||
action_kind (AuditLogActionKind):
|
||||
resource (Union[Unset, str]):
|
||||
parameters (Union[Unset, AuditLogParameters]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
timestamp: datetime.datetime
|
||||
username: str
|
||||
operation: AuditLogOperation
|
||||
action_kind: AuditLogActionKind
|
||||
resource: Union[Unset, str] = UNSET
|
||||
parameters: Union[Unset, AuditLogParameters] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
id = self.id
|
||||
timestamp = self.timestamp.isoformat()
|
||||
|
||||
username = self.username
|
||||
operation = self.operation.value
|
||||
|
||||
action_kind = self.action_kind.value
|
||||
|
||||
resource = self.resource
|
||||
parameters: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.parameters, Unset):
|
||||
parameters = self.parameters.to_dict()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"timestamp": timestamp,
|
||||
"username": username,
|
||||
"operation": operation,
|
||||
"action_kind": action_kind,
|
||||
}
|
||||
)
|
||||
if resource is not UNSET:
|
||||
field_dict["resource"] = resource
|
||||
if parameters is not UNSET:
|
||||
field_dict["parameters"] = parameters
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
timestamp = isoparse(d.pop("timestamp"))
|
||||
|
||||
username = d.pop("username")
|
||||
|
||||
operation = AuditLogOperation(d.pop("operation"))
|
||||
|
||||
action_kind = AuditLogActionKind(d.pop("action_kind"))
|
||||
|
||||
resource = d.pop("resource", UNSET)
|
||||
|
||||
_parameters = d.pop("parameters", UNSET)
|
||||
parameters: Union[Unset, AuditLogParameters]
|
||||
if isinstance(_parameters, Unset):
|
||||
parameters = UNSET
|
||||
else:
|
||||
parameters = AuditLogParameters.from_dict(_parameters)
|
||||
|
||||
audit_log = cls(
|
||||
id=id,
|
||||
timestamp=timestamp,
|
||||
username=username,
|
||||
operation=operation,
|
||||
action_kind=action_kind,
|
||||
resource=resource,
|
||||
parameters=parameters,
|
||||
)
|
||||
|
||||
audit_log.additional_properties = d
|
||||
return audit_log
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,11 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class AuditLogActionKind(str, Enum):
|
||||
CREATED = "Created"
|
||||
UPDATED = "Updated"
|
||||
DELETE = "Delete"
|
||||
EXECUTE = "Execute"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,20 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class AuditLogOperation(str, Enum):
|
||||
JOBS_RUN = "jobs.run"
|
||||
SCRIPTS_CREATE = "scripts.create"
|
||||
SCRIPTS_UPDATE = "scripts.update"
|
||||
USERS_CREATE = "users.create"
|
||||
USERS_DELETE = "users.delete"
|
||||
USERS_SETPASSWORD = "users.setpassword"
|
||||
USERS_UPDATE = "users.update"
|
||||
USERS_LOGIN = "users.login"
|
||||
USERS_TOKEN_CREATE = "users.token.create"
|
||||
USERS_TOKEN_DELETE = "users.token.delete"
|
||||
VARIABLES_CREATE = "variables.create"
|
||||
VARIABLES_DELETE = "variables.delete"
|
||||
VARIABLES_UPDATE = "variables.update"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,44 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="AuditLogParameters")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class AuditLogParameters:
|
||||
""" """
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
audit_log_parameters = cls()
|
||||
|
||||
audit_log_parameters.additional_properties = d
|
||||
return audit_log_parameters
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,57 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CancelQueuedJobJsonBody")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CancelQueuedJobJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
reason (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
reason: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
reason = self.reason
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if reason is not UNSET:
|
||||
field_dict["reason"] = reason
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
reason = d.pop("reason", UNSET)
|
||||
|
||||
cancel_queued_job_json_body = cls(
|
||||
reason=reason,
|
||||
)
|
||||
|
||||
cancel_queued_job_json_body.additional_properties = d
|
||||
return cancel_queued_job_json_body
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,44 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="CancelSuspendedJobJsonBody")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CancelSuspendedJobJsonBody:
|
||||
""" """
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
cancel_suspended_job_json_body = cls()
|
||||
|
||||
cancel_suspended_job_json_body.additional_properties = d
|
||||
return cancel_suspended_job_json_body
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,44 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="CancelSuspendedJobPayload")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CancelSuspendedJobPayload:
|
||||
""" """
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
cancel_suspended_job_payload = cls()
|
||||
|
||||
cancel_suspended_job_payload.additional_properties = d
|
||||
return cancel_suspended_job_payload
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
300
python-client/windmill-api/windmill_api/models/completed_job.py
Normal file
300
python-client/windmill-api/windmill_api/models/completed_job.py
Normal file
@@ -0,0 +1,300 @@
|
||||
import datetime
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.completed_job_args import CompletedJobArgs
|
||||
from ..models.completed_job_flow_status import CompletedJobFlowStatus
|
||||
from ..models.completed_job_job_kind import CompletedJobJobKind
|
||||
from ..models.completed_job_language import CompletedJobLanguage
|
||||
from ..models.completed_job_raw_flow import CompletedJobRawFlow
|
||||
from ..models.completed_job_result import CompletedJobResult
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJob")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJob:
|
||||
"""
|
||||
Attributes:
|
||||
id (str):
|
||||
created_by (str):
|
||||
created_at (datetime.datetime):
|
||||
started_at (datetime.datetime):
|
||||
duration_ms (int):
|
||||
success (bool):
|
||||
canceled (bool):
|
||||
job_kind (CompletedJobJobKind):
|
||||
permissioned_as (str): The user (u/userfoo) or group (g/groupfoo) whom
|
||||
the execution of this script will be permissioned_as and by extension its DT_TOKEN.
|
||||
is_flow_step (bool):
|
||||
is_skipped (bool):
|
||||
workspace_id (Union[Unset, str]):
|
||||
parent_job (Union[Unset, str]):
|
||||
script_path (Union[Unset, str]):
|
||||
script_hash (Union[Unset, str]):
|
||||
args (Union[Unset, CompletedJobArgs]):
|
||||
result (Union[Unset, CompletedJobResult]):
|
||||
logs (Union[Unset, str]):
|
||||
deleted (Union[Unset, bool]):
|
||||
raw_code (Union[Unset, str]):
|
||||
canceled_by (Union[Unset, str]):
|
||||
canceled_reason (Union[Unset, str]):
|
||||
schedule_path (Union[Unset, str]):
|
||||
flow_status (Union[Unset, CompletedJobFlowStatus]):
|
||||
raw_flow (Union[Unset, CompletedJobRawFlow]):
|
||||
language (Union[Unset, CompletedJobLanguage]):
|
||||
"""
|
||||
|
||||
id: str
|
||||
created_by: str
|
||||
created_at: datetime.datetime
|
||||
started_at: datetime.datetime
|
||||
duration_ms: int
|
||||
success: bool
|
||||
canceled: bool
|
||||
job_kind: CompletedJobJobKind
|
||||
permissioned_as: str
|
||||
is_flow_step: bool
|
||||
is_skipped: bool
|
||||
workspace_id: Union[Unset, str] = UNSET
|
||||
parent_job: Union[Unset, str] = UNSET
|
||||
script_path: Union[Unset, str] = UNSET
|
||||
script_hash: Union[Unset, str] = UNSET
|
||||
args: Union[Unset, CompletedJobArgs] = UNSET
|
||||
result: Union[Unset, CompletedJobResult] = UNSET
|
||||
logs: Union[Unset, str] = UNSET
|
||||
deleted: Union[Unset, bool] = UNSET
|
||||
raw_code: Union[Unset, str] = UNSET
|
||||
canceled_by: Union[Unset, str] = UNSET
|
||||
canceled_reason: Union[Unset, str] = UNSET
|
||||
schedule_path: Union[Unset, str] = UNSET
|
||||
flow_status: Union[Unset, CompletedJobFlowStatus] = UNSET
|
||||
raw_flow: Union[Unset, CompletedJobRawFlow] = UNSET
|
||||
language: Union[Unset, CompletedJobLanguage] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
id = self.id
|
||||
created_by = self.created_by
|
||||
created_at = self.created_at.isoformat()
|
||||
|
||||
started_at = self.started_at.isoformat()
|
||||
|
||||
duration_ms = self.duration_ms
|
||||
success = self.success
|
||||
canceled = self.canceled
|
||||
job_kind = self.job_kind.value
|
||||
|
||||
permissioned_as = self.permissioned_as
|
||||
is_flow_step = self.is_flow_step
|
||||
is_skipped = self.is_skipped
|
||||
workspace_id = self.workspace_id
|
||||
parent_job = self.parent_job
|
||||
script_path = self.script_path
|
||||
script_hash = self.script_hash
|
||||
args: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.args, Unset):
|
||||
args = self.args.to_dict()
|
||||
|
||||
result: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.result, Unset):
|
||||
result = self.result.to_dict()
|
||||
|
||||
logs = self.logs
|
||||
deleted = self.deleted
|
||||
raw_code = self.raw_code
|
||||
canceled_by = self.canceled_by
|
||||
canceled_reason = self.canceled_reason
|
||||
schedule_path = self.schedule_path
|
||||
flow_status: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.flow_status, Unset):
|
||||
flow_status = self.flow_status.to_dict()
|
||||
|
||||
raw_flow: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.raw_flow, Unset):
|
||||
raw_flow = self.raw_flow.to_dict()
|
||||
|
||||
language: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.language, Unset):
|
||||
language = self.language.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"created_by": created_by,
|
||||
"created_at": created_at,
|
||||
"started_at": started_at,
|
||||
"duration_ms": duration_ms,
|
||||
"success": success,
|
||||
"canceled": canceled,
|
||||
"job_kind": job_kind,
|
||||
"permissioned_as": permissioned_as,
|
||||
"is_flow_step": is_flow_step,
|
||||
"is_skipped": is_skipped,
|
||||
}
|
||||
)
|
||||
if workspace_id is not UNSET:
|
||||
field_dict["workspace_id"] = workspace_id
|
||||
if parent_job is not UNSET:
|
||||
field_dict["parent_job"] = parent_job
|
||||
if script_path is not UNSET:
|
||||
field_dict["script_path"] = script_path
|
||||
if script_hash is not UNSET:
|
||||
field_dict["script_hash"] = script_hash
|
||||
if args is not UNSET:
|
||||
field_dict["args"] = args
|
||||
if result is not UNSET:
|
||||
field_dict["result"] = result
|
||||
if logs is not UNSET:
|
||||
field_dict["logs"] = logs
|
||||
if deleted is not UNSET:
|
||||
field_dict["deleted"] = deleted
|
||||
if raw_code is not UNSET:
|
||||
field_dict["raw_code"] = raw_code
|
||||
if canceled_by is not UNSET:
|
||||
field_dict["canceled_by"] = canceled_by
|
||||
if canceled_reason is not UNSET:
|
||||
field_dict["canceled_reason"] = canceled_reason
|
||||
if schedule_path is not UNSET:
|
||||
field_dict["schedule_path"] = schedule_path
|
||||
if flow_status is not UNSET:
|
||||
field_dict["flow_status"] = flow_status
|
||||
if raw_flow is not UNSET:
|
||||
field_dict["raw_flow"] = raw_flow
|
||||
if language is not UNSET:
|
||||
field_dict["language"] = language
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
created_by = d.pop("created_by")
|
||||
|
||||
created_at = isoparse(d.pop("created_at"))
|
||||
|
||||
started_at = isoparse(d.pop("started_at"))
|
||||
|
||||
duration_ms = d.pop("duration_ms")
|
||||
|
||||
success = d.pop("success")
|
||||
|
||||
canceled = d.pop("canceled")
|
||||
|
||||
job_kind = CompletedJobJobKind(d.pop("job_kind"))
|
||||
|
||||
permissioned_as = d.pop("permissioned_as")
|
||||
|
||||
is_flow_step = d.pop("is_flow_step")
|
||||
|
||||
is_skipped = d.pop("is_skipped")
|
||||
|
||||
workspace_id = d.pop("workspace_id", UNSET)
|
||||
|
||||
parent_job = d.pop("parent_job", UNSET)
|
||||
|
||||
script_path = d.pop("script_path", UNSET)
|
||||
|
||||
script_hash = d.pop("script_hash", UNSET)
|
||||
|
||||
_args = d.pop("args", UNSET)
|
||||
args: Union[Unset, CompletedJobArgs]
|
||||
if isinstance(_args, Unset):
|
||||
args = UNSET
|
||||
else:
|
||||
args = CompletedJobArgs.from_dict(_args)
|
||||
|
||||
_result = d.pop("result", UNSET)
|
||||
result: Union[Unset, CompletedJobResult]
|
||||
if isinstance(_result, Unset):
|
||||
result = UNSET
|
||||
else:
|
||||
result = CompletedJobResult.from_dict(_result)
|
||||
|
||||
logs = d.pop("logs", UNSET)
|
||||
|
||||
deleted = d.pop("deleted", UNSET)
|
||||
|
||||
raw_code = d.pop("raw_code", UNSET)
|
||||
|
||||
canceled_by = d.pop("canceled_by", UNSET)
|
||||
|
||||
canceled_reason = d.pop("canceled_reason", UNSET)
|
||||
|
||||
schedule_path = d.pop("schedule_path", UNSET)
|
||||
|
||||
_flow_status = d.pop("flow_status", UNSET)
|
||||
flow_status: Union[Unset, CompletedJobFlowStatus]
|
||||
if isinstance(_flow_status, Unset):
|
||||
flow_status = UNSET
|
||||
else:
|
||||
flow_status = CompletedJobFlowStatus.from_dict(_flow_status)
|
||||
|
||||
_raw_flow = d.pop("raw_flow", UNSET)
|
||||
raw_flow: Union[Unset, CompletedJobRawFlow]
|
||||
if isinstance(_raw_flow, Unset):
|
||||
raw_flow = UNSET
|
||||
else:
|
||||
raw_flow = CompletedJobRawFlow.from_dict(_raw_flow)
|
||||
|
||||
_language = d.pop("language", UNSET)
|
||||
language: Union[Unset, CompletedJobLanguage]
|
||||
if isinstance(_language, Unset):
|
||||
language = UNSET
|
||||
else:
|
||||
language = CompletedJobLanguage(_language)
|
||||
|
||||
completed_job = cls(
|
||||
id=id,
|
||||
created_by=created_by,
|
||||
created_at=created_at,
|
||||
started_at=started_at,
|
||||
duration_ms=duration_ms,
|
||||
success=success,
|
||||
canceled=canceled,
|
||||
job_kind=job_kind,
|
||||
permissioned_as=permissioned_as,
|
||||
is_flow_step=is_flow_step,
|
||||
is_skipped=is_skipped,
|
||||
workspace_id=workspace_id,
|
||||
parent_job=parent_job,
|
||||
script_path=script_path,
|
||||
script_hash=script_hash,
|
||||
args=args,
|
||||
result=result,
|
||||
logs=logs,
|
||||
deleted=deleted,
|
||||
raw_code=raw_code,
|
||||
canceled_by=canceled_by,
|
||||
canceled_reason=canceled_reason,
|
||||
schedule_path=schedule_path,
|
||||
flow_status=flow_status,
|
||||
raw_flow=raw_flow,
|
||||
language=language,
|
||||
)
|
||||
|
||||
completed_job.additional_properties = d
|
||||
return completed_job
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,44 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobArgs")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobArgs:
|
||||
""" """
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
completed_job_args = cls()
|
||||
|
||||
completed_job_args.additional_properties = d
|
||||
return completed_job_args
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,102 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_flow_status_failure_module import CompletedJobFlowStatusFailureModule
|
||||
from ..models.completed_job_flow_status_modules_item import CompletedJobFlowStatusModulesItem
|
||||
from ..models.completed_job_flow_status_retry import CompletedJobFlowStatusRetry
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobFlowStatus")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobFlowStatus:
|
||||
"""
|
||||
Attributes:
|
||||
step (int):
|
||||
modules (List[CompletedJobFlowStatusModulesItem]):
|
||||
failure_module (CompletedJobFlowStatusFailureModule):
|
||||
retry (Union[Unset, CompletedJobFlowStatusRetry]):
|
||||
"""
|
||||
|
||||
step: int
|
||||
modules: List[CompletedJobFlowStatusModulesItem]
|
||||
failure_module: CompletedJobFlowStatusFailureModule
|
||||
retry: Union[Unset, CompletedJobFlowStatusRetry] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
step = self.step
|
||||
modules = []
|
||||
for modules_item_data in self.modules:
|
||||
modules_item = modules_item_data.to_dict()
|
||||
|
||||
modules.append(modules_item)
|
||||
|
||||
failure_module = self.failure_module.to_dict()
|
||||
|
||||
retry: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.retry, Unset):
|
||||
retry = self.retry.to_dict()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"step": step,
|
||||
"modules": modules,
|
||||
"failure_module": failure_module,
|
||||
}
|
||||
)
|
||||
if retry is not UNSET:
|
||||
field_dict["retry"] = retry
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
step = d.pop("step")
|
||||
|
||||
modules = []
|
||||
_modules = d.pop("modules")
|
||||
for modules_item_data in _modules:
|
||||
modules_item = CompletedJobFlowStatusModulesItem.from_dict(modules_item_data)
|
||||
|
||||
modules.append(modules_item)
|
||||
|
||||
failure_module = CompletedJobFlowStatusFailureModule.from_dict(d.pop("failure_module"))
|
||||
|
||||
_retry = d.pop("retry", UNSET)
|
||||
retry: Union[Unset, CompletedJobFlowStatusRetry]
|
||||
if isinstance(_retry, Unset):
|
||||
retry = UNSET
|
||||
else:
|
||||
retry = CompletedJobFlowStatusRetry.from_dict(_retry)
|
||||
|
||||
completed_job_flow_status = cls(
|
||||
step=step,
|
||||
modules=modules,
|
||||
failure_module=failure_module,
|
||||
retry=retry,
|
||||
)
|
||||
|
||||
completed_job_flow_status.additional_properties = d
|
||||
return completed_job_flow_status
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,104 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_flow_status_failure_module_iterator import CompletedJobFlowStatusFailureModuleIterator
|
||||
from ..models.completed_job_flow_status_failure_module_type import CompletedJobFlowStatusFailureModuleType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobFlowStatusFailureModule")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobFlowStatusFailureModule:
|
||||
"""
|
||||
Attributes:
|
||||
type (CompletedJobFlowStatusFailureModuleType):
|
||||
job (Union[Unset, str]):
|
||||
count (Union[Unset, int]):
|
||||
iterator (Union[Unset, CompletedJobFlowStatusFailureModuleIterator]):
|
||||
forloop_jobs (Union[Unset, List[str]]):
|
||||
"""
|
||||
|
||||
type: CompletedJobFlowStatusFailureModuleType
|
||||
job: Union[Unset, str] = UNSET
|
||||
count: Union[Unset, int] = UNSET
|
||||
iterator: Union[Unset, CompletedJobFlowStatusFailureModuleIterator] = UNSET
|
||||
forloop_jobs: Union[Unset, List[str]] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type.value
|
||||
|
||||
job = self.job
|
||||
count = self.count
|
||||
iterator: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.iterator, Unset):
|
||||
iterator = self.iterator.to_dict()
|
||||
|
||||
forloop_jobs: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.forloop_jobs, Unset):
|
||||
forloop_jobs = self.forloop_jobs
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if job is not UNSET:
|
||||
field_dict["job"] = job
|
||||
if count is not UNSET:
|
||||
field_dict["count"] = count
|
||||
if iterator is not UNSET:
|
||||
field_dict["iterator"] = iterator
|
||||
if forloop_jobs is not UNSET:
|
||||
field_dict["forloop_jobs"] = forloop_jobs
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
type = CompletedJobFlowStatusFailureModuleType(d.pop("type"))
|
||||
|
||||
job = d.pop("job", UNSET)
|
||||
|
||||
count = d.pop("count", UNSET)
|
||||
|
||||
_iterator = d.pop("iterator", UNSET)
|
||||
iterator: Union[Unset, CompletedJobFlowStatusFailureModuleIterator]
|
||||
if isinstance(_iterator, Unset):
|
||||
iterator = UNSET
|
||||
else:
|
||||
iterator = CompletedJobFlowStatusFailureModuleIterator.from_dict(_iterator)
|
||||
|
||||
forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET))
|
||||
|
||||
completed_job_flow_status_failure_module = cls(
|
||||
type=type,
|
||||
job=job,
|
||||
count=count,
|
||||
iterator=iterator,
|
||||
forloop_jobs=forloop_jobs,
|
||||
)
|
||||
|
||||
completed_job_flow_status_failure_module.additional_properties = d
|
||||
return completed_job_flow_status_failure_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,76 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobFlowStatusFailureModuleIterator")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobFlowStatusFailureModuleIterator:
|
||||
"""
|
||||
Attributes:
|
||||
index (Union[Unset, int]):
|
||||
itered (Union[Unset, List[Any]]):
|
||||
args (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
index: Union[Unset, int] = UNSET
|
||||
itered: Union[Unset, List[Any]] = UNSET
|
||||
args: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
index = self.index
|
||||
itered: Union[Unset, List[Any]] = UNSET
|
||||
if not isinstance(self.itered, Unset):
|
||||
itered = self.itered
|
||||
|
||||
args = self.args
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if index is not UNSET:
|
||||
field_dict["index"] = index
|
||||
if itered is not UNSET:
|
||||
field_dict["itered"] = itered
|
||||
if args is not UNSET:
|
||||
field_dict["args"] = args
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
index = d.pop("index", UNSET)
|
||||
|
||||
itered = cast(List[Any], d.pop("itered", UNSET))
|
||||
|
||||
args = d.pop("args", UNSET)
|
||||
|
||||
completed_job_flow_status_failure_module_iterator = cls(
|
||||
index=index,
|
||||
itered=itered,
|
||||
args=args,
|
||||
)
|
||||
|
||||
completed_job_flow_status_failure_module_iterator.additional_properties = d
|
||||
return completed_job_flow_status_failure_module_iterator
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,13 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobFlowStatusFailureModuleType(str, Enum):
|
||||
WAITINGFORPRIORSTEPS = "WaitingForPriorSteps"
|
||||
WAITINGFOREVENT = "WaitingForEvent"
|
||||
WAITINGFOREXECUTOR = "WaitingForExecutor"
|
||||
INPROGRESS = "InProgress"
|
||||
SUCCESS = "Success"
|
||||
FAILURE = "Failure"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,104 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_flow_status_modules_item_iterator import CompletedJobFlowStatusModulesItemIterator
|
||||
from ..models.completed_job_flow_status_modules_item_type import CompletedJobFlowStatusModulesItemType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobFlowStatusModulesItem")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobFlowStatusModulesItem:
|
||||
"""
|
||||
Attributes:
|
||||
type (CompletedJobFlowStatusModulesItemType):
|
||||
job (Union[Unset, str]):
|
||||
count (Union[Unset, int]):
|
||||
iterator (Union[Unset, CompletedJobFlowStatusModulesItemIterator]):
|
||||
forloop_jobs (Union[Unset, List[str]]):
|
||||
"""
|
||||
|
||||
type: CompletedJobFlowStatusModulesItemType
|
||||
job: Union[Unset, str] = UNSET
|
||||
count: Union[Unset, int] = UNSET
|
||||
iterator: Union[Unset, CompletedJobFlowStatusModulesItemIterator] = UNSET
|
||||
forloop_jobs: Union[Unset, List[str]] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type.value
|
||||
|
||||
job = self.job
|
||||
count = self.count
|
||||
iterator: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.iterator, Unset):
|
||||
iterator = self.iterator.to_dict()
|
||||
|
||||
forloop_jobs: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.forloop_jobs, Unset):
|
||||
forloop_jobs = self.forloop_jobs
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if job is not UNSET:
|
||||
field_dict["job"] = job
|
||||
if count is not UNSET:
|
||||
field_dict["count"] = count
|
||||
if iterator is not UNSET:
|
||||
field_dict["iterator"] = iterator
|
||||
if forloop_jobs is not UNSET:
|
||||
field_dict["forloop_jobs"] = forloop_jobs
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
type = CompletedJobFlowStatusModulesItemType(d.pop("type"))
|
||||
|
||||
job = d.pop("job", UNSET)
|
||||
|
||||
count = d.pop("count", UNSET)
|
||||
|
||||
_iterator = d.pop("iterator", UNSET)
|
||||
iterator: Union[Unset, CompletedJobFlowStatusModulesItemIterator]
|
||||
if isinstance(_iterator, Unset):
|
||||
iterator = UNSET
|
||||
else:
|
||||
iterator = CompletedJobFlowStatusModulesItemIterator.from_dict(_iterator)
|
||||
|
||||
forloop_jobs = cast(List[str], d.pop("forloop_jobs", UNSET))
|
||||
|
||||
completed_job_flow_status_modules_item = cls(
|
||||
type=type,
|
||||
job=job,
|
||||
count=count,
|
||||
iterator=iterator,
|
||||
forloop_jobs=forloop_jobs,
|
||||
)
|
||||
|
||||
completed_job_flow_status_modules_item.additional_properties = d
|
||||
return completed_job_flow_status_modules_item
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,76 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobFlowStatusModulesItemIterator")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobFlowStatusModulesItemIterator:
|
||||
"""
|
||||
Attributes:
|
||||
index (Union[Unset, int]):
|
||||
itered (Union[Unset, List[Any]]):
|
||||
args (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
index: Union[Unset, int] = UNSET
|
||||
itered: Union[Unset, List[Any]] = UNSET
|
||||
args: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
index = self.index
|
||||
itered: Union[Unset, List[Any]] = UNSET
|
||||
if not isinstance(self.itered, Unset):
|
||||
itered = self.itered
|
||||
|
||||
args = self.args
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if index is not UNSET:
|
||||
field_dict["index"] = index
|
||||
if itered is not UNSET:
|
||||
field_dict["itered"] = itered
|
||||
if args is not UNSET:
|
||||
field_dict["args"] = args
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
index = d.pop("index", UNSET)
|
||||
|
||||
itered = cast(List[Any], d.pop("itered", UNSET))
|
||||
|
||||
args = d.pop("args", UNSET)
|
||||
|
||||
completed_job_flow_status_modules_item_iterator = cls(
|
||||
index=index,
|
||||
itered=itered,
|
||||
args=args,
|
||||
)
|
||||
|
||||
completed_job_flow_status_modules_item_iterator.additional_properties = d
|
||||
return completed_job_flow_status_modules_item_iterator
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,13 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobFlowStatusModulesItemType(str, Enum):
|
||||
WAITINGFORPRIORSTEPS = "WaitingForPriorSteps"
|
||||
WAITINGFOREVENT = "WaitingForEvent"
|
||||
WAITINGFOREXECUTOR = "WaitingForExecutor"
|
||||
INPROGRESS = "InProgress"
|
||||
SUCCESS = "Success"
|
||||
FAILURE = "Failure"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,57 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobFlowStatusRetry")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobFlowStatusRetry:
|
||||
"""
|
||||
Attributes:
|
||||
fail_count (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
fail_count: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
fail_count = self.fail_count
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if fail_count is not UNSET:
|
||||
field_dict["fail_count"] = fail_count
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
fail_count = d.pop("fail_count", UNSET)
|
||||
|
||||
completed_job_flow_status_retry = cls(
|
||||
fail_count=fail_count,
|
||||
)
|
||||
|
||||
completed_job_flow_status_retry.additional_properties = d
|
||||
return completed_job_flow_status_retry
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,13 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobJobKind(str, Enum):
|
||||
SCRIPT = "script"
|
||||
PREVIEW = "preview"
|
||||
DEPENDENCIES = "dependencies"
|
||||
FLOW = "flow"
|
||||
FLOWPREVIEW = "flowpreview"
|
||||
SCRIPT_HUB = "script_hub"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,10 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobLanguage(str, Enum):
|
||||
PYTHON3 = "python3"
|
||||
DENO = "deno"
|
||||
GO = "go"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,95 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module import CompletedJobRawFlowFailureModule
|
||||
from ..models.completed_job_raw_flow_modules_item import CompletedJobRawFlowModulesItem
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlow")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlow:
|
||||
"""
|
||||
Attributes:
|
||||
modules (List[CompletedJobRawFlowModulesItem]):
|
||||
failure_module (Union[Unset, CompletedJobRawFlowFailureModule]):
|
||||
same_worker (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
modules: List[CompletedJobRawFlowModulesItem]
|
||||
failure_module: Union[Unset, CompletedJobRawFlowFailureModule] = UNSET
|
||||
same_worker: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
modules = []
|
||||
for modules_item_data in self.modules:
|
||||
modules_item = modules_item_data.to_dict()
|
||||
|
||||
modules.append(modules_item)
|
||||
|
||||
failure_module: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.failure_module, Unset):
|
||||
failure_module = self.failure_module.to_dict()
|
||||
|
||||
same_worker = self.same_worker
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"modules": modules,
|
||||
}
|
||||
)
|
||||
if failure_module is not UNSET:
|
||||
field_dict["failure_module"] = failure_module
|
||||
if same_worker is not UNSET:
|
||||
field_dict["same_worker"] = same_worker
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
modules = []
|
||||
_modules = d.pop("modules")
|
||||
for modules_item_data in _modules:
|
||||
modules_item = CompletedJobRawFlowModulesItem.from_dict(modules_item_data)
|
||||
|
||||
modules.append(modules_item)
|
||||
|
||||
_failure_module = d.pop("failure_module", UNSET)
|
||||
failure_module: Union[Unset, CompletedJobRawFlowFailureModule]
|
||||
if isinstance(_failure_module, Unset):
|
||||
failure_module = UNSET
|
||||
else:
|
||||
failure_module = CompletedJobRawFlowFailureModule.from_dict(_failure_module)
|
||||
|
||||
same_worker = d.pop("same_worker", UNSET)
|
||||
|
||||
completed_job_raw_flow = cls(
|
||||
modules=modules,
|
||||
failure_module=failure_module,
|
||||
same_worker=same_worker,
|
||||
)
|
||||
|
||||
completed_job_raw_flow.additional_properties = d
|
||||
return completed_job_raw_flow
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,230 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_input_transforms import (
|
||||
CompletedJobRawFlowFailureModuleInputTransforms,
|
||||
)
|
||||
from ..models.completed_job_raw_flow_failure_module_retry import CompletedJobRawFlowFailureModuleRetry
|
||||
from ..models.completed_job_raw_flow_failure_module_sleep_type_0 import CompletedJobRawFlowFailureModuleSleepType0
|
||||
from ..models.completed_job_raw_flow_failure_module_sleep_type_1 import CompletedJobRawFlowFailureModuleSleepType1
|
||||
from ..models.completed_job_raw_flow_failure_module_stop_after_if import CompletedJobRawFlowFailureModuleStopAfterIf
|
||||
from ..models.completed_job_raw_flow_failure_module_value_type_0 import CompletedJobRawFlowFailureModuleValueType0
|
||||
from ..models.completed_job_raw_flow_failure_module_value_type_1 import CompletedJobRawFlowFailureModuleValueType1
|
||||
from ..models.completed_job_raw_flow_failure_module_value_type_2 import CompletedJobRawFlowFailureModuleValueType2
|
||||
from ..models.completed_job_raw_flow_failure_module_value_type_3 import CompletedJobRawFlowFailureModuleValueType3
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModule")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModule:
|
||||
"""
|
||||
Attributes:
|
||||
input_transforms (CompletedJobRawFlowFailureModuleInputTransforms):
|
||||
value (Union[CompletedJobRawFlowFailureModuleValueType0, CompletedJobRawFlowFailureModuleValueType1,
|
||||
CompletedJobRawFlowFailureModuleValueType2, CompletedJobRawFlowFailureModuleValueType3]):
|
||||
stop_after_if (Union[Unset, CompletedJobRawFlowFailureModuleStopAfterIf]):
|
||||
sleep (Union[CompletedJobRawFlowFailureModuleSleepType0, CompletedJobRawFlowFailureModuleSleepType1, Unset]):
|
||||
summary (Union[Unset, str]):
|
||||
suspend (Union[Unset, int]):
|
||||
retry (Union[Unset, CompletedJobRawFlowFailureModuleRetry]):
|
||||
"""
|
||||
|
||||
input_transforms: CompletedJobRawFlowFailureModuleInputTransforms
|
||||
value: Union[
|
||||
CompletedJobRawFlowFailureModuleValueType0,
|
||||
CompletedJobRawFlowFailureModuleValueType1,
|
||||
CompletedJobRawFlowFailureModuleValueType2,
|
||||
CompletedJobRawFlowFailureModuleValueType3,
|
||||
]
|
||||
stop_after_if: Union[Unset, CompletedJobRawFlowFailureModuleStopAfterIf] = UNSET
|
||||
sleep: Union[CompletedJobRawFlowFailureModuleSleepType0, CompletedJobRawFlowFailureModuleSleepType1, Unset] = UNSET
|
||||
summary: Union[Unset, str] = UNSET
|
||||
suspend: Union[Unset, int] = UNSET
|
||||
retry: Union[Unset, CompletedJobRawFlowFailureModuleRetry] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
input_transforms = self.input_transforms.to_dict()
|
||||
|
||||
if isinstance(self.value, CompletedJobRawFlowFailureModuleValueType0):
|
||||
value = self.value.to_dict()
|
||||
|
||||
elif isinstance(self.value, CompletedJobRawFlowFailureModuleValueType1):
|
||||
value = self.value.to_dict()
|
||||
|
||||
elif isinstance(self.value, CompletedJobRawFlowFailureModuleValueType2):
|
||||
value = self.value.to_dict()
|
||||
|
||||
else:
|
||||
value = self.value.to_dict()
|
||||
|
||||
stop_after_if: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.stop_after_if, Unset):
|
||||
stop_after_if = self.stop_after_if.to_dict()
|
||||
|
||||
sleep: Union[Dict[str, Any], Unset]
|
||||
if isinstance(self.sleep, Unset):
|
||||
sleep = UNSET
|
||||
|
||||
elif isinstance(self.sleep, CompletedJobRawFlowFailureModuleSleepType0):
|
||||
sleep = UNSET
|
||||
if not isinstance(self.sleep, Unset):
|
||||
sleep = self.sleep.to_dict()
|
||||
|
||||
else:
|
||||
sleep = UNSET
|
||||
if not isinstance(self.sleep, Unset):
|
||||
sleep = self.sleep.to_dict()
|
||||
|
||||
summary = self.summary
|
||||
suspend = self.suspend
|
||||
retry: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.retry, Unset):
|
||||
retry = self.retry.to_dict()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"input_transforms": input_transforms,
|
||||
"value": value,
|
||||
}
|
||||
)
|
||||
if stop_after_if is not UNSET:
|
||||
field_dict["stop_after_if"] = stop_after_if
|
||||
if sleep is not UNSET:
|
||||
field_dict["sleep"] = sleep
|
||||
if summary is not UNSET:
|
||||
field_dict["summary"] = summary
|
||||
if suspend is not UNSET:
|
||||
field_dict["suspend"] = suspend
|
||||
if retry is not UNSET:
|
||||
field_dict["retry"] = retry
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
input_transforms = CompletedJobRawFlowFailureModuleInputTransforms.from_dict(d.pop("input_transforms"))
|
||||
|
||||
def _parse_value(
|
||||
data: object,
|
||||
) -> Union[
|
||||
CompletedJobRawFlowFailureModuleValueType0,
|
||||
CompletedJobRawFlowFailureModuleValueType1,
|
||||
CompletedJobRawFlowFailureModuleValueType2,
|
||||
CompletedJobRawFlowFailureModuleValueType3,
|
||||
]:
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
value_type_0 = CompletedJobRawFlowFailureModuleValueType0.from_dict(data)
|
||||
|
||||
return value_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
value_type_1 = CompletedJobRawFlowFailureModuleValueType1.from_dict(data)
|
||||
|
||||
return value_type_1
|
||||
except: # noqa: E722
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
value_type_2 = CompletedJobRawFlowFailureModuleValueType2.from_dict(data)
|
||||
|
||||
return value_type_2
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
value_type_3 = CompletedJobRawFlowFailureModuleValueType3.from_dict(data)
|
||||
|
||||
return value_type_3
|
||||
|
||||
value = _parse_value(d.pop("value"))
|
||||
|
||||
_stop_after_if = d.pop("stop_after_if", UNSET)
|
||||
stop_after_if: Union[Unset, CompletedJobRawFlowFailureModuleStopAfterIf]
|
||||
if isinstance(_stop_after_if, Unset):
|
||||
stop_after_if = UNSET
|
||||
else:
|
||||
stop_after_if = CompletedJobRawFlowFailureModuleStopAfterIf.from_dict(_stop_after_if)
|
||||
|
||||
def _parse_sleep(
|
||||
data: object,
|
||||
) -> Union[CompletedJobRawFlowFailureModuleSleepType0, CompletedJobRawFlowFailureModuleSleepType1, Unset]:
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_sleep_type_0 = data
|
||||
sleep_type_0: Union[Unset, CompletedJobRawFlowFailureModuleSleepType0]
|
||||
if isinstance(_sleep_type_0, Unset):
|
||||
sleep_type_0 = UNSET
|
||||
else:
|
||||
sleep_type_0 = CompletedJobRawFlowFailureModuleSleepType0.from_dict(_sleep_type_0)
|
||||
|
||||
return sleep_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_sleep_type_1 = data
|
||||
sleep_type_1: Union[Unset, CompletedJobRawFlowFailureModuleSleepType1]
|
||||
if isinstance(_sleep_type_1, Unset):
|
||||
sleep_type_1 = UNSET
|
||||
else:
|
||||
sleep_type_1 = CompletedJobRawFlowFailureModuleSleepType1.from_dict(_sleep_type_1)
|
||||
|
||||
return sleep_type_1
|
||||
|
||||
sleep = _parse_sleep(d.pop("sleep", UNSET))
|
||||
|
||||
summary = d.pop("summary", UNSET)
|
||||
|
||||
suspend = d.pop("suspend", UNSET)
|
||||
|
||||
_retry = d.pop("retry", UNSET)
|
||||
retry: Union[Unset, CompletedJobRawFlowFailureModuleRetry]
|
||||
if isinstance(_retry, Unset):
|
||||
retry = UNSET
|
||||
else:
|
||||
retry = CompletedJobRawFlowFailureModuleRetry.from_dict(_retry)
|
||||
|
||||
completed_job_raw_flow_failure_module = cls(
|
||||
input_transforms=input_transforms,
|
||||
value=value,
|
||||
stop_after_if=stop_after_if,
|
||||
sleep=sleep,
|
||||
summary=summary,
|
||||
suspend=suspend,
|
||||
retry=retry,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,107 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0 import (
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0,
|
||||
)
|
||||
from ..models.completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1 import (
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1,
|
||||
)
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleInputTransforms")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleInputTransforms:
|
||||
""" """
|
||||
|
||||
additional_properties: Dict[
|
||||
str,
|
||||
Union[
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0,
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1,
|
||||
],
|
||||
] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
|
||||
if isinstance(prop, CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0):
|
||||
field_dict[prop_name] = prop.to_dict()
|
||||
|
||||
else:
|
||||
field_dict[prop_name] = prop.to_dict()
|
||||
|
||||
field_dict.update({})
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
completed_job_raw_flow_failure_module_input_transforms = cls()
|
||||
|
||||
additional_properties = {}
|
||||
for prop_name, prop_dict in d.items():
|
||||
|
||||
def _parse_additional_property(
|
||||
data: object,
|
||||
) -> Union[
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0,
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1,
|
||||
]:
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
additional_property_type_0 = (
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0.from_dict(data)
|
||||
)
|
||||
|
||||
return additional_property_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
additional_property_type_1 = (
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data)
|
||||
)
|
||||
|
||||
return additional_property_type_1
|
||||
|
||||
additional_property = _parse_additional_property(prop_dict)
|
||||
|
||||
additional_properties[prop_name] = additional_property
|
||||
|
||||
completed_job_raw_flow_failure_module_input_transforms.additional_properties = additional_properties
|
||||
return completed_job_raw_flow_failure_module_input_transforms
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(
|
||||
self, key: str
|
||||
) -> Union[
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0,
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1,
|
||||
]:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(
|
||||
self,
|
||||
key: str,
|
||||
value: Union[
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0,
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1,
|
||||
],
|
||||
) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0_type import (
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type.value
|
||||
|
||||
value = self.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if value is not UNSET:
|
||||
field_dict["value"] = value
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
type = CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type"))
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_input_transforms_additional_property_type_0
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,68 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1_type import (
|
||||
CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type,
|
||||
)
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
expr = self.expr
|
||||
type = self.type.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"expr": expr,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
expr = d.pop("expr")
|
||||
|
||||
type = CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type"))
|
||||
|
||||
completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_input_transforms_additional_property_type_1
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,84 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_retry_constant import CompletedJobRawFlowFailureModuleRetryConstant
|
||||
from ..models.completed_job_raw_flow_failure_module_retry_exponential import (
|
||||
CompletedJobRawFlowFailureModuleRetryExponential,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleRetry")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleRetry:
|
||||
"""
|
||||
Attributes:
|
||||
constant (Union[Unset, CompletedJobRawFlowFailureModuleRetryConstant]):
|
||||
exponential (Union[Unset, CompletedJobRawFlowFailureModuleRetryExponential]):
|
||||
"""
|
||||
|
||||
constant: Union[Unset, CompletedJobRawFlowFailureModuleRetryConstant] = UNSET
|
||||
exponential: Union[Unset, CompletedJobRawFlowFailureModuleRetryExponential] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
constant: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.constant, Unset):
|
||||
constant = self.constant.to_dict()
|
||||
|
||||
exponential: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.exponential, Unset):
|
||||
exponential = self.exponential.to_dict()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if constant is not UNSET:
|
||||
field_dict["constant"] = constant
|
||||
if exponential is not UNSET:
|
||||
field_dict["exponential"] = exponential
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
_constant = d.pop("constant", UNSET)
|
||||
constant: Union[Unset, CompletedJobRawFlowFailureModuleRetryConstant]
|
||||
if isinstance(_constant, Unset):
|
||||
constant = UNSET
|
||||
else:
|
||||
constant = CompletedJobRawFlowFailureModuleRetryConstant.from_dict(_constant)
|
||||
|
||||
_exponential = d.pop("exponential", UNSET)
|
||||
exponential: Union[Unset, CompletedJobRawFlowFailureModuleRetryExponential]
|
||||
if isinstance(_exponential, Unset):
|
||||
exponential = UNSET
|
||||
else:
|
||||
exponential = CompletedJobRawFlowFailureModuleRetryExponential.from_dict(_exponential)
|
||||
|
||||
completed_job_raw_flow_failure_module_retry = cls(
|
||||
constant=constant,
|
||||
exponential=exponential,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_retry.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_retry
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,65 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleRetryConstant")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleRetryConstant:
|
||||
"""
|
||||
Attributes:
|
||||
attempts (Union[Unset, int]):
|
||||
seconds (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
attempts: Union[Unset, int] = UNSET
|
||||
seconds: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
attempts = self.attempts
|
||||
seconds = self.seconds
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if attempts is not UNSET:
|
||||
field_dict["attempts"] = attempts
|
||||
if seconds is not UNSET:
|
||||
field_dict["seconds"] = seconds
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
attempts = d.pop("attempts", UNSET)
|
||||
|
||||
seconds = d.pop("seconds", UNSET)
|
||||
|
||||
completed_job_raw_flow_failure_module_retry_constant = cls(
|
||||
attempts=attempts,
|
||||
seconds=seconds,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_retry_constant.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_retry_constant
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,73 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleRetryExponential")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleRetryExponential:
|
||||
"""
|
||||
Attributes:
|
||||
attempts (Union[Unset, int]):
|
||||
multiplier (Union[Unset, int]):
|
||||
seconds (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
attempts: Union[Unset, int] = UNSET
|
||||
multiplier: Union[Unset, int] = UNSET
|
||||
seconds: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
attempts = self.attempts
|
||||
multiplier = self.multiplier
|
||||
seconds = self.seconds
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if attempts is not UNSET:
|
||||
field_dict["attempts"] = attempts
|
||||
if multiplier is not UNSET:
|
||||
field_dict["multiplier"] = multiplier
|
||||
if seconds is not UNSET:
|
||||
field_dict["seconds"] = seconds
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
attempts = d.pop("attempts", UNSET)
|
||||
|
||||
multiplier = d.pop("multiplier", UNSET)
|
||||
|
||||
seconds = d.pop("seconds", UNSET)
|
||||
|
||||
completed_job_raw_flow_failure_module_retry_exponential = cls(
|
||||
attempts=attempts,
|
||||
multiplier=multiplier,
|
||||
seconds=seconds,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_retry_exponential.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_retry_exponential
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_sleep_type_0_type import (
|
||||
CompletedJobRawFlowFailureModuleSleepType0Type,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleSleepType0")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleSleepType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (CompletedJobRawFlowFailureModuleSleepType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: CompletedJobRawFlowFailureModuleSleepType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type.value
|
||||
|
||||
value = self.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if value is not UNSET:
|
||||
field_dict["value"] = value
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
type = CompletedJobRawFlowFailureModuleSleepType0Type(d.pop("type"))
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
completed_job_raw_flow_failure_module_sleep_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_sleep_type_0.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_sleep_type_0
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowFailureModuleSleepType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,68 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_sleep_type_1_type import (
|
||||
CompletedJobRawFlowFailureModuleSleepType1Type,
|
||||
)
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleSleepType1")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleSleepType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (CompletedJobRawFlowFailureModuleSleepType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: CompletedJobRawFlowFailureModuleSleepType1Type
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
expr = self.expr
|
||||
type = self.type.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"expr": expr,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
expr = d.pop("expr")
|
||||
|
||||
type = CompletedJobRawFlowFailureModuleSleepType1Type(d.pop("type"))
|
||||
|
||||
completed_job_raw_flow_failure_module_sleep_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_sleep_type_1.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_sleep_type_1
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowFailureModuleSleepType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,67 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleStopAfterIf")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleStopAfterIf:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
skip_if_stopped (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
skip_if_stopped: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
expr = self.expr
|
||||
skip_if_stopped = self.skip_if_stopped
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"expr": expr,
|
||||
}
|
||||
)
|
||||
if skip_if_stopped is not UNSET:
|
||||
field_dict["skip_if_stopped"] = skip_if_stopped
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
expr = d.pop("expr")
|
||||
|
||||
skip_if_stopped = d.pop("skip_if_stopped", UNSET)
|
||||
|
||||
completed_job_raw_flow_failure_module_stop_after_if = cls(
|
||||
expr=expr,
|
||||
skip_if_stopped=skip_if_stopped,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_stop_after_if.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_stop_after_if
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,85 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_value_type_0_language import (
|
||||
CompletedJobRawFlowFailureModuleValueType0Language,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleValueType0")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleValueType0:
|
||||
"""
|
||||
Attributes:
|
||||
content (str):
|
||||
language (CompletedJobRawFlowFailureModuleValueType0Language):
|
||||
type (str):
|
||||
path (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
content: str
|
||||
language: CompletedJobRawFlowFailureModuleValueType0Language
|
||||
type: str
|
||||
path: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
content = self.content
|
||||
language = self.language.value
|
||||
|
||||
type = self.type
|
||||
path = self.path
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"content": content,
|
||||
"language": language,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if path is not UNSET:
|
||||
field_dict["path"] = path
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
content = d.pop("content")
|
||||
|
||||
language = CompletedJobRawFlowFailureModuleValueType0Language(d.pop("language"))
|
||||
|
||||
type = d.pop("type")
|
||||
|
||||
path = d.pop("path", UNSET)
|
||||
|
||||
completed_job_raw_flow_failure_module_value_type_0 = cls(
|
||||
content=content,
|
||||
language=language,
|
||||
type=type,
|
||||
path=path,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_value_type_0.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_value_type_0
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,10 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowFailureModuleValueType0Language(str, Enum):
|
||||
DENO = "deno"
|
||||
PYTHON3 = "python3"
|
||||
GO = "go"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,68 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_value_type_1_type import (
|
||||
CompletedJobRawFlowFailureModuleValueType1Type,
|
||||
)
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleValueType1")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleValueType1:
|
||||
"""
|
||||
Attributes:
|
||||
path (str):
|
||||
type (CompletedJobRawFlowFailureModuleValueType1Type):
|
||||
"""
|
||||
|
||||
path: str
|
||||
type: CompletedJobRawFlowFailureModuleValueType1Type
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
path = self.path
|
||||
type = self.type.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"path": path,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
path = d.pop("path")
|
||||
|
||||
type = CompletedJobRawFlowFailureModuleValueType1Type(d.pop("type"))
|
||||
|
||||
completed_job_raw_flow_failure_module_value_type_1 = cls(
|
||||
path=path,
|
||||
type=type,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_value_type_1.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_value_type_1
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowFailureModuleValueType1Type(str, Enum):
|
||||
SCRIPT = "script"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,111 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_value_type_2_iterator_type_0 import (
|
||||
CompletedJobRawFlowFailureModuleValueType2IteratorType0,
|
||||
)
|
||||
from ..models.completed_job_raw_flow_failure_module_value_type_2_iterator_type_1 import (
|
||||
CompletedJobRawFlowFailureModuleValueType2IteratorType1,
|
||||
)
|
||||
from ..models.completed_job_raw_flow_failure_module_value_type_2_type import (
|
||||
CompletedJobRawFlowFailureModuleValueType2Type,
|
||||
)
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleValueType2")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleValueType2:
|
||||
"""
|
||||
Attributes:
|
||||
iterator (Union[CompletedJobRawFlowFailureModuleValueType2IteratorType0,
|
||||
CompletedJobRawFlowFailureModuleValueType2IteratorType1]):
|
||||
skip_failures (bool):
|
||||
type (CompletedJobRawFlowFailureModuleValueType2Type):
|
||||
"""
|
||||
|
||||
iterator: Union[
|
||||
CompletedJobRawFlowFailureModuleValueType2IteratorType0, CompletedJobRawFlowFailureModuleValueType2IteratorType1
|
||||
]
|
||||
skip_failures: bool
|
||||
type: CompletedJobRawFlowFailureModuleValueType2Type
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
if isinstance(self.iterator, CompletedJobRawFlowFailureModuleValueType2IteratorType0):
|
||||
iterator = self.iterator.to_dict()
|
||||
|
||||
else:
|
||||
iterator = self.iterator.to_dict()
|
||||
|
||||
skip_failures = self.skip_failures
|
||||
type = self.type.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"iterator": iterator,
|
||||
"skip_failures": skip_failures,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
|
||||
def _parse_iterator(
|
||||
data: object,
|
||||
) -> Union[
|
||||
CompletedJobRawFlowFailureModuleValueType2IteratorType0,
|
||||
CompletedJobRawFlowFailureModuleValueType2IteratorType1,
|
||||
]:
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
iterator_type_0 = CompletedJobRawFlowFailureModuleValueType2IteratorType0.from_dict(data)
|
||||
|
||||
return iterator_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
iterator_type_1 = CompletedJobRawFlowFailureModuleValueType2IteratorType1.from_dict(data)
|
||||
|
||||
return iterator_type_1
|
||||
|
||||
iterator = _parse_iterator(d.pop("iterator"))
|
||||
|
||||
skip_failures = d.pop("skip_failures")
|
||||
|
||||
type = CompletedJobRawFlowFailureModuleValueType2Type(d.pop("type"))
|
||||
|
||||
completed_job_raw_flow_failure_module_value_type_2 = cls(
|
||||
iterator=iterator,
|
||||
skip_failures=skip_failures,
|
||||
type=type,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_value_type_2.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_value_type_2
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_value_type_2_iterator_type_0_type import (
|
||||
CompletedJobRawFlowFailureModuleValueType2IteratorType0Type,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleValueType2IteratorType0")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleValueType2IteratorType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (CompletedJobRawFlowFailureModuleValueType2IteratorType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: CompletedJobRawFlowFailureModuleValueType2IteratorType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type.value
|
||||
|
||||
value = self.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if value is not UNSET:
|
||||
field_dict["value"] = value
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
type = CompletedJobRawFlowFailureModuleValueType2IteratorType0Type(d.pop("type"))
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
completed_job_raw_flow_failure_module_value_type_2_iterator_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_value_type_2_iterator_type_0.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_value_type_2_iterator_type_0
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowFailureModuleValueType2IteratorType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,68 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_value_type_2_iterator_type_1_type import (
|
||||
CompletedJobRawFlowFailureModuleValueType2IteratorType1Type,
|
||||
)
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleValueType2IteratorType1")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleValueType2IteratorType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (CompletedJobRawFlowFailureModuleValueType2IteratorType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: CompletedJobRawFlowFailureModuleValueType2IteratorType1Type
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
expr = self.expr
|
||||
type = self.type.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"expr": expr,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
expr = d.pop("expr")
|
||||
|
||||
type = CompletedJobRawFlowFailureModuleValueType2IteratorType1Type(d.pop("type"))
|
||||
|
||||
completed_job_raw_flow_failure_module_value_type_2_iterator_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_value_type_2_iterator_type_1.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_value_type_2_iterator_type_1
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowFailureModuleValueType2IteratorType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowFailureModuleValueType2Type(str, Enum):
|
||||
FORLOOPFLOW = "forloopflow"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_failure_module_value_type_3_type import (
|
||||
CompletedJobRawFlowFailureModuleValueType3Type,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowFailureModuleValueType3")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowFailureModuleValueType3:
|
||||
"""
|
||||
Attributes:
|
||||
type (CompletedJobRawFlowFailureModuleValueType3Type):
|
||||
path (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
type: CompletedJobRawFlowFailureModuleValueType3Type
|
||||
path: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type.value
|
||||
|
||||
path = self.path
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if path is not UNSET:
|
||||
field_dict["path"] = path
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
type = CompletedJobRawFlowFailureModuleValueType3Type(d.pop("type"))
|
||||
|
||||
path = d.pop("path", UNSET)
|
||||
|
||||
completed_job_raw_flow_failure_module_value_type_3 = cls(
|
||||
type=type,
|
||||
path=path,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_failure_module_value_type_3.additional_properties = d
|
||||
return completed_job_raw_flow_failure_module_value_type_3
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowFailureModuleValueType3Type(str, Enum):
|
||||
FLOW = "flow"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,228 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_input_transforms import CompletedJobRawFlowModulesItemInputTransforms
|
||||
from ..models.completed_job_raw_flow_modules_item_retry import CompletedJobRawFlowModulesItemRetry
|
||||
from ..models.completed_job_raw_flow_modules_item_sleep_type_0 import CompletedJobRawFlowModulesItemSleepType0
|
||||
from ..models.completed_job_raw_flow_modules_item_sleep_type_1 import CompletedJobRawFlowModulesItemSleepType1
|
||||
from ..models.completed_job_raw_flow_modules_item_stop_after_if import CompletedJobRawFlowModulesItemStopAfterIf
|
||||
from ..models.completed_job_raw_flow_modules_item_value_type_0 import CompletedJobRawFlowModulesItemValueType0
|
||||
from ..models.completed_job_raw_flow_modules_item_value_type_1 import CompletedJobRawFlowModulesItemValueType1
|
||||
from ..models.completed_job_raw_flow_modules_item_value_type_2 import CompletedJobRawFlowModulesItemValueType2
|
||||
from ..models.completed_job_raw_flow_modules_item_value_type_3 import CompletedJobRawFlowModulesItemValueType3
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItem")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItem:
|
||||
"""
|
||||
Attributes:
|
||||
input_transforms (CompletedJobRawFlowModulesItemInputTransforms):
|
||||
value (Union[CompletedJobRawFlowModulesItemValueType0, CompletedJobRawFlowModulesItemValueType1,
|
||||
CompletedJobRawFlowModulesItemValueType2, CompletedJobRawFlowModulesItemValueType3]):
|
||||
stop_after_if (Union[Unset, CompletedJobRawFlowModulesItemStopAfterIf]):
|
||||
sleep (Union[CompletedJobRawFlowModulesItemSleepType0, CompletedJobRawFlowModulesItemSleepType1, Unset]):
|
||||
summary (Union[Unset, str]):
|
||||
suspend (Union[Unset, int]):
|
||||
retry (Union[Unset, CompletedJobRawFlowModulesItemRetry]):
|
||||
"""
|
||||
|
||||
input_transforms: CompletedJobRawFlowModulesItemInputTransforms
|
||||
value: Union[
|
||||
CompletedJobRawFlowModulesItemValueType0,
|
||||
CompletedJobRawFlowModulesItemValueType1,
|
||||
CompletedJobRawFlowModulesItemValueType2,
|
||||
CompletedJobRawFlowModulesItemValueType3,
|
||||
]
|
||||
stop_after_if: Union[Unset, CompletedJobRawFlowModulesItemStopAfterIf] = UNSET
|
||||
sleep: Union[CompletedJobRawFlowModulesItemSleepType0, CompletedJobRawFlowModulesItemSleepType1, Unset] = UNSET
|
||||
summary: Union[Unset, str] = UNSET
|
||||
suspend: Union[Unset, int] = UNSET
|
||||
retry: Union[Unset, CompletedJobRawFlowModulesItemRetry] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
input_transforms = self.input_transforms.to_dict()
|
||||
|
||||
if isinstance(self.value, CompletedJobRawFlowModulesItemValueType0):
|
||||
value = self.value.to_dict()
|
||||
|
||||
elif isinstance(self.value, CompletedJobRawFlowModulesItemValueType1):
|
||||
value = self.value.to_dict()
|
||||
|
||||
elif isinstance(self.value, CompletedJobRawFlowModulesItemValueType2):
|
||||
value = self.value.to_dict()
|
||||
|
||||
else:
|
||||
value = self.value.to_dict()
|
||||
|
||||
stop_after_if: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.stop_after_if, Unset):
|
||||
stop_after_if = self.stop_after_if.to_dict()
|
||||
|
||||
sleep: Union[Dict[str, Any], Unset]
|
||||
if isinstance(self.sleep, Unset):
|
||||
sleep = UNSET
|
||||
|
||||
elif isinstance(self.sleep, CompletedJobRawFlowModulesItemSleepType0):
|
||||
sleep = UNSET
|
||||
if not isinstance(self.sleep, Unset):
|
||||
sleep = self.sleep.to_dict()
|
||||
|
||||
else:
|
||||
sleep = UNSET
|
||||
if not isinstance(self.sleep, Unset):
|
||||
sleep = self.sleep.to_dict()
|
||||
|
||||
summary = self.summary
|
||||
suspend = self.suspend
|
||||
retry: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.retry, Unset):
|
||||
retry = self.retry.to_dict()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"input_transforms": input_transforms,
|
||||
"value": value,
|
||||
}
|
||||
)
|
||||
if stop_after_if is not UNSET:
|
||||
field_dict["stop_after_if"] = stop_after_if
|
||||
if sleep is not UNSET:
|
||||
field_dict["sleep"] = sleep
|
||||
if summary is not UNSET:
|
||||
field_dict["summary"] = summary
|
||||
if suspend is not UNSET:
|
||||
field_dict["suspend"] = suspend
|
||||
if retry is not UNSET:
|
||||
field_dict["retry"] = retry
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
input_transforms = CompletedJobRawFlowModulesItemInputTransforms.from_dict(d.pop("input_transforms"))
|
||||
|
||||
def _parse_value(
|
||||
data: object,
|
||||
) -> Union[
|
||||
CompletedJobRawFlowModulesItemValueType0,
|
||||
CompletedJobRawFlowModulesItemValueType1,
|
||||
CompletedJobRawFlowModulesItemValueType2,
|
||||
CompletedJobRawFlowModulesItemValueType3,
|
||||
]:
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
value_type_0 = CompletedJobRawFlowModulesItemValueType0.from_dict(data)
|
||||
|
||||
return value_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
value_type_1 = CompletedJobRawFlowModulesItemValueType1.from_dict(data)
|
||||
|
||||
return value_type_1
|
||||
except: # noqa: E722
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
value_type_2 = CompletedJobRawFlowModulesItemValueType2.from_dict(data)
|
||||
|
||||
return value_type_2
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
value_type_3 = CompletedJobRawFlowModulesItemValueType3.from_dict(data)
|
||||
|
||||
return value_type_3
|
||||
|
||||
value = _parse_value(d.pop("value"))
|
||||
|
||||
_stop_after_if = d.pop("stop_after_if", UNSET)
|
||||
stop_after_if: Union[Unset, CompletedJobRawFlowModulesItemStopAfterIf]
|
||||
if isinstance(_stop_after_if, Unset):
|
||||
stop_after_if = UNSET
|
||||
else:
|
||||
stop_after_if = CompletedJobRawFlowModulesItemStopAfterIf.from_dict(_stop_after_if)
|
||||
|
||||
def _parse_sleep(
|
||||
data: object,
|
||||
) -> Union[CompletedJobRawFlowModulesItemSleepType0, CompletedJobRawFlowModulesItemSleepType1, Unset]:
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_sleep_type_0 = data
|
||||
sleep_type_0: Union[Unset, CompletedJobRawFlowModulesItemSleepType0]
|
||||
if isinstance(_sleep_type_0, Unset):
|
||||
sleep_type_0 = UNSET
|
||||
else:
|
||||
sleep_type_0 = CompletedJobRawFlowModulesItemSleepType0.from_dict(_sleep_type_0)
|
||||
|
||||
return sleep_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_sleep_type_1 = data
|
||||
sleep_type_1: Union[Unset, CompletedJobRawFlowModulesItemSleepType1]
|
||||
if isinstance(_sleep_type_1, Unset):
|
||||
sleep_type_1 = UNSET
|
||||
else:
|
||||
sleep_type_1 = CompletedJobRawFlowModulesItemSleepType1.from_dict(_sleep_type_1)
|
||||
|
||||
return sleep_type_1
|
||||
|
||||
sleep = _parse_sleep(d.pop("sleep", UNSET))
|
||||
|
||||
summary = d.pop("summary", UNSET)
|
||||
|
||||
suspend = d.pop("suspend", UNSET)
|
||||
|
||||
_retry = d.pop("retry", UNSET)
|
||||
retry: Union[Unset, CompletedJobRawFlowModulesItemRetry]
|
||||
if isinstance(_retry, Unset):
|
||||
retry = UNSET
|
||||
else:
|
||||
retry = CompletedJobRawFlowModulesItemRetry.from_dict(_retry)
|
||||
|
||||
completed_job_raw_flow_modules_item = cls(
|
||||
input_transforms=input_transforms,
|
||||
value=value,
|
||||
stop_after_if=stop_after_if,
|
||||
sleep=sleep,
|
||||
summary=summary,
|
||||
suspend=suspend,
|
||||
retry=retry,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,107 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0 import (
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0,
|
||||
)
|
||||
from ..models.completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1 import (
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1,
|
||||
)
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemInputTransforms")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemInputTransforms:
|
||||
""" """
|
||||
|
||||
additional_properties: Dict[
|
||||
str,
|
||||
Union[
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0,
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1,
|
||||
],
|
||||
] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
|
||||
if isinstance(prop, CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0):
|
||||
field_dict[prop_name] = prop.to_dict()
|
||||
|
||||
else:
|
||||
field_dict[prop_name] = prop.to_dict()
|
||||
|
||||
field_dict.update({})
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
completed_job_raw_flow_modules_item_input_transforms = cls()
|
||||
|
||||
additional_properties = {}
|
||||
for prop_name, prop_dict in d.items():
|
||||
|
||||
def _parse_additional_property(
|
||||
data: object,
|
||||
) -> Union[
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0,
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1,
|
||||
]:
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
additional_property_type_0 = (
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0.from_dict(data)
|
||||
)
|
||||
|
||||
return additional_property_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
additional_property_type_1 = (
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1.from_dict(data)
|
||||
)
|
||||
|
||||
return additional_property_type_1
|
||||
|
||||
additional_property = _parse_additional_property(prop_dict)
|
||||
|
||||
additional_properties[prop_name] = additional_property
|
||||
|
||||
completed_job_raw_flow_modules_item_input_transforms.additional_properties = additional_properties
|
||||
return completed_job_raw_flow_modules_item_input_transforms
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(
|
||||
self, key: str
|
||||
) -> Union[
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0,
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1,
|
||||
]:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(
|
||||
self,
|
||||
key: str,
|
||||
value: Union[
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0,
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1,
|
||||
],
|
||||
) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0_type import (
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type.value
|
||||
|
||||
value = self.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if value is not UNSET:
|
||||
field_dict["value"] = value
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
type = CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type(d.pop("type"))
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_input_transforms_additional_property_type_0
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,68 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1_type import (
|
||||
CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type,
|
||||
)
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
expr = self.expr
|
||||
type = self.type.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"expr": expr,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
expr = d.pop("expr")
|
||||
|
||||
type = CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type(d.pop("type"))
|
||||
|
||||
completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_input_transforms_additional_property_type_1
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowModulesItemInputTransformsAdditionalPropertyType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,84 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_retry_constant import CompletedJobRawFlowModulesItemRetryConstant
|
||||
from ..models.completed_job_raw_flow_modules_item_retry_exponential import (
|
||||
CompletedJobRawFlowModulesItemRetryExponential,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemRetry")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemRetry:
|
||||
"""
|
||||
Attributes:
|
||||
constant (Union[Unset, CompletedJobRawFlowModulesItemRetryConstant]):
|
||||
exponential (Union[Unset, CompletedJobRawFlowModulesItemRetryExponential]):
|
||||
"""
|
||||
|
||||
constant: Union[Unset, CompletedJobRawFlowModulesItemRetryConstant] = UNSET
|
||||
exponential: Union[Unset, CompletedJobRawFlowModulesItemRetryExponential] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
constant: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.constant, Unset):
|
||||
constant = self.constant.to_dict()
|
||||
|
||||
exponential: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.exponential, Unset):
|
||||
exponential = self.exponential.to_dict()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if constant is not UNSET:
|
||||
field_dict["constant"] = constant
|
||||
if exponential is not UNSET:
|
||||
field_dict["exponential"] = exponential
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
_constant = d.pop("constant", UNSET)
|
||||
constant: Union[Unset, CompletedJobRawFlowModulesItemRetryConstant]
|
||||
if isinstance(_constant, Unset):
|
||||
constant = UNSET
|
||||
else:
|
||||
constant = CompletedJobRawFlowModulesItemRetryConstant.from_dict(_constant)
|
||||
|
||||
_exponential = d.pop("exponential", UNSET)
|
||||
exponential: Union[Unset, CompletedJobRawFlowModulesItemRetryExponential]
|
||||
if isinstance(_exponential, Unset):
|
||||
exponential = UNSET
|
||||
else:
|
||||
exponential = CompletedJobRawFlowModulesItemRetryExponential.from_dict(_exponential)
|
||||
|
||||
completed_job_raw_flow_modules_item_retry = cls(
|
||||
constant=constant,
|
||||
exponential=exponential,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_retry.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_retry
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,65 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemRetryConstant")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemRetryConstant:
|
||||
"""
|
||||
Attributes:
|
||||
attempts (Union[Unset, int]):
|
||||
seconds (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
attempts: Union[Unset, int] = UNSET
|
||||
seconds: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
attempts = self.attempts
|
||||
seconds = self.seconds
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if attempts is not UNSET:
|
||||
field_dict["attempts"] = attempts
|
||||
if seconds is not UNSET:
|
||||
field_dict["seconds"] = seconds
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
attempts = d.pop("attempts", UNSET)
|
||||
|
||||
seconds = d.pop("seconds", UNSET)
|
||||
|
||||
completed_job_raw_flow_modules_item_retry_constant = cls(
|
||||
attempts=attempts,
|
||||
seconds=seconds,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_retry_constant.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_retry_constant
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,73 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemRetryExponential")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemRetryExponential:
|
||||
"""
|
||||
Attributes:
|
||||
attempts (Union[Unset, int]):
|
||||
multiplier (Union[Unset, int]):
|
||||
seconds (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
attempts: Union[Unset, int] = UNSET
|
||||
multiplier: Union[Unset, int] = UNSET
|
||||
seconds: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
attempts = self.attempts
|
||||
multiplier = self.multiplier
|
||||
seconds = self.seconds
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if attempts is not UNSET:
|
||||
field_dict["attempts"] = attempts
|
||||
if multiplier is not UNSET:
|
||||
field_dict["multiplier"] = multiplier
|
||||
if seconds is not UNSET:
|
||||
field_dict["seconds"] = seconds
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
attempts = d.pop("attempts", UNSET)
|
||||
|
||||
multiplier = d.pop("multiplier", UNSET)
|
||||
|
||||
seconds = d.pop("seconds", UNSET)
|
||||
|
||||
completed_job_raw_flow_modules_item_retry_exponential = cls(
|
||||
attempts=attempts,
|
||||
multiplier=multiplier,
|
||||
seconds=seconds,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_retry_exponential.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_retry_exponential
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,69 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_sleep_type_0_type import CompletedJobRawFlowModulesItemSleepType0Type
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemSleepType0")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemSleepType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (CompletedJobRawFlowModulesItemSleepType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: CompletedJobRawFlowModulesItemSleepType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type.value
|
||||
|
||||
value = self.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if value is not UNSET:
|
||||
field_dict["value"] = value
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
type = CompletedJobRawFlowModulesItemSleepType0Type(d.pop("type"))
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
completed_job_raw_flow_modules_item_sleep_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_sleep_type_0.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_sleep_type_0
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowModulesItemSleepType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,66 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_sleep_type_1_type import CompletedJobRawFlowModulesItemSleepType1Type
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemSleepType1")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemSleepType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (CompletedJobRawFlowModulesItemSleepType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: CompletedJobRawFlowModulesItemSleepType1Type
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
expr = self.expr
|
||||
type = self.type.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"expr": expr,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
expr = d.pop("expr")
|
||||
|
||||
type = CompletedJobRawFlowModulesItemSleepType1Type(d.pop("type"))
|
||||
|
||||
completed_job_raw_flow_modules_item_sleep_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_sleep_type_1.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_sleep_type_1
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowModulesItemSleepType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,67 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemStopAfterIf")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemStopAfterIf:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
skip_if_stopped (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
skip_if_stopped: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
expr = self.expr
|
||||
skip_if_stopped = self.skip_if_stopped
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"expr": expr,
|
||||
}
|
||||
)
|
||||
if skip_if_stopped is not UNSET:
|
||||
field_dict["skip_if_stopped"] = skip_if_stopped
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
expr = d.pop("expr")
|
||||
|
||||
skip_if_stopped = d.pop("skip_if_stopped", UNSET)
|
||||
|
||||
completed_job_raw_flow_modules_item_stop_after_if = cls(
|
||||
expr=expr,
|
||||
skip_if_stopped=skip_if_stopped,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_stop_after_if.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_stop_after_if
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,85 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_value_type_0_language import (
|
||||
CompletedJobRawFlowModulesItemValueType0Language,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemValueType0")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemValueType0:
|
||||
"""
|
||||
Attributes:
|
||||
content (str):
|
||||
language (CompletedJobRawFlowModulesItemValueType0Language):
|
||||
type (str):
|
||||
path (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
content: str
|
||||
language: CompletedJobRawFlowModulesItemValueType0Language
|
||||
type: str
|
||||
path: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
content = self.content
|
||||
language = self.language.value
|
||||
|
||||
type = self.type
|
||||
path = self.path
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"content": content,
|
||||
"language": language,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if path is not UNSET:
|
||||
field_dict["path"] = path
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
content = d.pop("content")
|
||||
|
||||
language = CompletedJobRawFlowModulesItemValueType0Language(d.pop("language"))
|
||||
|
||||
type = d.pop("type")
|
||||
|
||||
path = d.pop("path", UNSET)
|
||||
|
||||
completed_job_raw_flow_modules_item_value_type_0 = cls(
|
||||
content=content,
|
||||
language=language,
|
||||
type=type,
|
||||
path=path,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_value_type_0.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_value_type_0
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,10 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowModulesItemValueType0Language(str, Enum):
|
||||
DENO = "deno"
|
||||
PYTHON3 = "python3"
|
||||
GO = "go"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,66 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_value_type_1_type import CompletedJobRawFlowModulesItemValueType1Type
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemValueType1")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemValueType1:
|
||||
"""
|
||||
Attributes:
|
||||
path (str):
|
||||
type (CompletedJobRawFlowModulesItemValueType1Type):
|
||||
"""
|
||||
|
||||
path: str
|
||||
type: CompletedJobRawFlowModulesItemValueType1Type
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
path = self.path
|
||||
type = self.type.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"path": path,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
path = d.pop("path")
|
||||
|
||||
type = CompletedJobRawFlowModulesItemValueType1Type(d.pop("type"))
|
||||
|
||||
completed_job_raw_flow_modules_item_value_type_1 = cls(
|
||||
path=path,
|
||||
type=type,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_value_type_1.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_value_type_1
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowModulesItemValueType1Type(str, Enum):
|
||||
SCRIPT = "script"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,108 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_value_type_2_iterator_type_0 import (
|
||||
CompletedJobRawFlowModulesItemValueType2IteratorType0,
|
||||
)
|
||||
from ..models.completed_job_raw_flow_modules_item_value_type_2_iterator_type_1 import (
|
||||
CompletedJobRawFlowModulesItemValueType2IteratorType1,
|
||||
)
|
||||
from ..models.completed_job_raw_flow_modules_item_value_type_2_type import CompletedJobRawFlowModulesItemValueType2Type
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemValueType2")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemValueType2:
|
||||
"""
|
||||
Attributes:
|
||||
iterator (Union[CompletedJobRawFlowModulesItemValueType2IteratorType0,
|
||||
CompletedJobRawFlowModulesItemValueType2IteratorType1]):
|
||||
skip_failures (bool):
|
||||
type (CompletedJobRawFlowModulesItemValueType2Type):
|
||||
"""
|
||||
|
||||
iterator: Union[
|
||||
CompletedJobRawFlowModulesItemValueType2IteratorType0, CompletedJobRawFlowModulesItemValueType2IteratorType1
|
||||
]
|
||||
skip_failures: bool
|
||||
type: CompletedJobRawFlowModulesItemValueType2Type
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
if isinstance(self.iterator, CompletedJobRawFlowModulesItemValueType2IteratorType0):
|
||||
iterator = self.iterator.to_dict()
|
||||
|
||||
else:
|
||||
iterator = self.iterator.to_dict()
|
||||
|
||||
skip_failures = self.skip_failures
|
||||
type = self.type.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"iterator": iterator,
|
||||
"skip_failures": skip_failures,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
|
||||
def _parse_iterator(
|
||||
data: object,
|
||||
) -> Union[
|
||||
CompletedJobRawFlowModulesItemValueType2IteratorType0, CompletedJobRawFlowModulesItemValueType2IteratorType1
|
||||
]:
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
iterator_type_0 = CompletedJobRawFlowModulesItemValueType2IteratorType0.from_dict(data)
|
||||
|
||||
return iterator_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
iterator_type_1 = CompletedJobRawFlowModulesItemValueType2IteratorType1.from_dict(data)
|
||||
|
||||
return iterator_type_1
|
||||
|
||||
iterator = _parse_iterator(d.pop("iterator"))
|
||||
|
||||
skip_failures = d.pop("skip_failures")
|
||||
|
||||
type = CompletedJobRawFlowModulesItemValueType2Type(d.pop("type"))
|
||||
|
||||
completed_job_raw_flow_modules_item_value_type_2 = cls(
|
||||
iterator=iterator,
|
||||
skip_failures=skip_failures,
|
||||
type=type,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_value_type_2.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_value_type_2
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_value_type_2_iterator_type_0_type import (
|
||||
CompletedJobRawFlowModulesItemValueType2IteratorType0Type,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemValueType2IteratorType0")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemValueType2IteratorType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (CompletedJobRawFlowModulesItemValueType2IteratorType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: CompletedJobRawFlowModulesItemValueType2IteratorType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type.value
|
||||
|
||||
value = self.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if value is not UNSET:
|
||||
field_dict["value"] = value
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
type = CompletedJobRawFlowModulesItemValueType2IteratorType0Type(d.pop("type"))
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
completed_job_raw_flow_modules_item_value_type_2_iterator_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_value_type_2_iterator_type_0.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_value_type_2_iterator_type_0
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowModulesItemValueType2IteratorType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,68 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_value_type_2_iterator_type_1_type import (
|
||||
CompletedJobRawFlowModulesItemValueType2IteratorType1Type,
|
||||
)
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemValueType2IteratorType1")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemValueType2IteratorType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (CompletedJobRawFlowModulesItemValueType2IteratorType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: CompletedJobRawFlowModulesItemValueType2IteratorType1Type
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
expr = self.expr
|
||||
type = self.type.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"expr": expr,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
expr = d.pop("expr")
|
||||
|
||||
type = CompletedJobRawFlowModulesItemValueType2IteratorType1Type(d.pop("type"))
|
||||
|
||||
completed_job_raw_flow_modules_item_value_type_2_iterator_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_value_type_2_iterator_type_1.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_value_type_2_iterator_type_1
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowModulesItemValueType2IteratorType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowModulesItemValueType2Type(str, Enum):
|
||||
FORLOOPFLOW = "forloopflow"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,69 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.completed_job_raw_flow_modules_item_value_type_3_type import CompletedJobRawFlowModulesItemValueType3Type
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobRawFlowModulesItemValueType3")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobRawFlowModulesItemValueType3:
|
||||
"""
|
||||
Attributes:
|
||||
type (CompletedJobRawFlowModulesItemValueType3Type):
|
||||
path (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
type: CompletedJobRawFlowModulesItemValueType3Type
|
||||
path: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type.value
|
||||
|
||||
path = self.path
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if path is not UNSET:
|
||||
field_dict["path"] = path
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
type = CompletedJobRawFlowModulesItemValueType3Type(d.pop("type"))
|
||||
|
||||
path = d.pop("path", UNSET)
|
||||
|
||||
completed_job_raw_flow_modules_item_value_type_3 = cls(
|
||||
type=type,
|
||||
path=path,
|
||||
)
|
||||
|
||||
completed_job_raw_flow_modules_item_value_type_3.additional_properties = d
|
||||
return completed_job_raw_flow_modules_item_value_type_3
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CompletedJobRawFlowModulesItemValueType3Type(str, Enum):
|
||||
FLOW = "flow"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,44 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobResult")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CompletedJobResult:
|
||||
""" """
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
completed_job_result = cls()
|
||||
|
||||
completed_job_result.additional_properties = d
|
||||
return completed_job_result
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,64 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="ConnectCallbackJsonBody")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ConnectCallbackJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
code (str):
|
||||
state (str):
|
||||
"""
|
||||
|
||||
code: str
|
||||
state: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
code = self.code
|
||||
state = self.state
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"code": code,
|
||||
"state": state,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
code = d.pop("code")
|
||||
|
||||
state = d.pop("state")
|
||||
|
||||
connect_callback_json_body = cls(
|
||||
code=code,
|
||||
state=state,
|
||||
)
|
||||
|
||||
connect_callback_json_body.additional_properties = d
|
||||
return connect_callback_json_body
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,85 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ConnectCallbackResponse200")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ConnectCallbackResponse200:
|
||||
"""
|
||||
Attributes:
|
||||
access_token (str):
|
||||
expires_in (Union[Unset, int]):
|
||||
refresh_token (Union[Unset, str]):
|
||||
scope (Union[Unset, List[str]]):
|
||||
"""
|
||||
|
||||
access_token: str
|
||||
expires_in: Union[Unset, int] = UNSET
|
||||
refresh_token: Union[Unset, str] = UNSET
|
||||
scope: Union[Unset, List[str]] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
access_token = self.access_token
|
||||
expires_in = self.expires_in
|
||||
refresh_token = self.refresh_token
|
||||
scope: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.scope, Unset):
|
||||
scope = self.scope
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"access_token": access_token,
|
||||
}
|
||||
)
|
||||
if expires_in is not UNSET:
|
||||
field_dict["expires_in"] = expires_in
|
||||
if refresh_token is not UNSET:
|
||||
field_dict["refresh_token"] = refresh_token
|
||||
if scope is not UNSET:
|
||||
field_dict["scope"] = scope
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
access_token = d.pop("access_token")
|
||||
|
||||
expires_in = d.pop("expires_in", UNSET)
|
||||
|
||||
refresh_token = d.pop("refresh_token", UNSET)
|
||||
|
||||
scope = cast(List[str], d.pop("scope", UNSET))
|
||||
|
||||
connect_callback_response_200 = cls(
|
||||
access_token=access_token,
|
||||
expires_in=expires_in,
|
||||
refresh_token=refresh_token,
|
||||
scope=scope,
|
||||
)
|
||||
|
||||
connect_callback_response_200.additional_properties = d
|
||||
return connect_callback_response_200
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,64 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="ConnectSlackCallbackJsonBody")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ConnectSlackCallbackJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
code (str):
|
||||
state (str):
|
||||
"""
|
||||
|
||||
code: str
|
||||
state: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
code = self.code
|
||||
state = self.state
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"code": code,
|
||||
"state": state,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
code = d.pop("code")
|
||||
|
||||
state = d.pop("state")
|
||||
|
||||
connect_slack_callback_json_body = cls(
|
||||
code=code,
|
||||
state=state,
|
||||
)
|
||||
|
||||
connect_slack_callback_json_body.additional_properties = d
|
||||
return connect_slack_callback_json_body
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,80 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.connect_slack_callback_response_200_bot import ConnectSlackCallbackResponse200Bot
|
||||
|
||||
T = TypeVar("T", bound="ConnectSlackCallbackResponse200")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ConnectSlackCallbackResponse200:
|
||||
"""
|
||||
Attributes:
|
||||
access_token (str):
|
||||
team_id (str):
|
||||
team_name (str):
|
||||
bot (ConnectSlackCallbackResponse200Bot):
|
||||
"""
|
||||
|
||||
access_token: str
|
||||
team_id: str
|
||||
team_name: str
|
||||
bot: ConnectSlackCallbackResponse200Bot
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
access_token = self.access_token
|
||||
team_id = self.team_id
|
||||
team_name = self.team_name
|
||||
bot = self.bot.to_dict()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"access_token": access_token,
|
||||
"team_id": team_id,
|
||||
"team_name": team_name,
|
||||
"bot": bot,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
access_token = d.pop("access_token")
|
||||
|
||||
team_id = d.pop("team_id")
|
||||
|
||||
team_name = d.pop("team_name")
|
||||
|
||||
bot = ConnectSlackCallbackResponse200Bot.from_dict(d.pop("bot"))
|
||||
|
||||
connect_slack_callback_response_200 = cls(
|
||||
access_token=access_token,
|
||||
team_id=team_id,
|
||||
team_name=team_name,
|
||||
bot=bot,
|
||||
)
|
||||
|
||||
connect_slack_callback_response_200.additional_properties = d
|
||||
return connect_slack_callback_response_200
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,57 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ConnectSlackCallbackResponse200Bot")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ConnectSlackCallbackResponse200Bot:
|
||||
"""
|
||||
Attributes:
|
||||
bot_access_token (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
bot_access_token: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
bot_access_token = self.bot_access_token
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if bot_access_token is not UNSET:
|
||||
field_dict["bot_access_token"] = bot_access_token
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
bot_access_token = d.pop("bot_access_token", UNSET)
|
||||
|
||||
connect_slack_callback_response_200_bot = cls(
|
||||
bot_access_token=bot_access_token,
|
||||
)
|
||||
|
||||
connect_slack_callback_response_200_bot.additional_properties = d
|
||||
return connect_slack_callback_response_200_bot
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="ContextualVariable")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ContextualVariable:
|
||||
"""
|
||||
Attributes:
|
||||
name (str):
|
||||
value (str):
|
||||
description (str):
|
||||
"""
|
||||
|
||||
name: str
|
||||
value: str
|
||||
description: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
name = self.name
|
||||
value = self.value
|
||||
description = self.description
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"name": name,
|
||||
"value": value,
|
||||
"description": description,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
name = d.pop("name")
|
||||
|
||||
value = d.pop("value")
|
||||
|
||||
description = d.pop("description")
|
||||
|
||||
contextual_variable = cls(
|
||||
name=name,
|
||||
value=value,
|
||||
description=description,
|
||||
)
|
||||
|
||||
contextual_variable.additional_properties = d
|
||||
return contextual_variable
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,78 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="CreateAccountJsonBody")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CreateAccountJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
refresh_token (str):
|
||||
expires_in (int):
|
||||
owner (str):
|
||||
client (str):
|
||||
"""
|
||||
|
||||
refresh_token: str
|
||||
expires_in: int
|
||||
owner: str
|
||||
client: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
refresh_token = self.refresh_token
|
||||
expires_in = self.expires_in
|
||||
owner = self.owner
|
||||
client = self.client
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"refresh_token": refresh_token,
|
||||
"expires_in": expires_in,
|
||||
"owner": owner,
|
||||
"client": client,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
refresh_token = d.pop("refresh_token")
|
||||
|
||||
expires_in = d.pop("expires_in")
|
||||
|
||||
owner = d.pop("owner")
|
||||
|
||||
client = d.pop("client")
|
||||
|
||||
create_account_json_body = cls(
|
||||
refresh_token=refresh_token,
|
||||
expires_in=expires_in,
|
||||
owner=owner,
|
||||
client=client,
|
||||
)
|
||||
|
||||
create_account_json_body.additional_properties = d
|
||||
return create_account_json_body
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,99 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.create_flow_json_body_schema import CreateFlowJsonBodySchema
|
||||
from ..models.create_flow_json_body_value import CreateFlowJsonBodyValue
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CreateFlowJsonBody")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CreateFlowJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
summary (str):
|
||||
value (CreateFlowJsonBodyValue):
|
||||
path (str):
|
||||
description (Union[Unset, str]):
|
||||
schema (Union[Unset, CreateFlowJsonBodySchema]):
|
||||
"""
|
||||
|
||||
summary: str
|
||||
value: CreateFlowJsonBodyValue
|
||||
path: str
|
||||
description: Union[Unset, str] = UNSET
|
||||
schema: Union[Unset, CreateFlowJsonBodySchema] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
summary = self.summary
|
||||
value = self.value.to_dict()
|
||||
|
||||
path = self.path
|
||||
description = self.description
|
||||
schema: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.schema, Unset):
|
||||
schema = self.schema.to_dict()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"summary": summary,
|
||||
"value": value,
|
||||
"path": path,
|
||||
}
|
||||
)
|
||||
if description is not UNSET:
|
||||
field_dict["description"] = description
|
||||
if schema is not UNSET:
|
||||
field_dict["schema"] = schema
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
summary = d.pop("summary")
|
||||
|
||||
value = CreateFlowJsonBodyValue.from_dict(d.pop("value"))
|
||||
|
||||
path = d.pop("path")
|
||||
|
||||
description = d.pop("description", UNSET)
|
||||
|
||||
_schema = d.pop("schema", UNSET)
|
||||
schema: Union[Unset, CreateFlowJsonBodySchema]
|
||||
if isinstance(_schema, Unset):
|
||||
schema = UNSET
|
||||
else:
|
||||
schema = CreateFlowJsonBodySchema.from_dict(_schema)
|
||||
|
||||
create_flow_json_body = cls(
|
||||
summary=summary,
|
||||
value=value,
|
||||
path=path,
|
||||
description=description,
|
||||
schema=schema,
|
||||
)
|
||||
|
||||
create_flow_json_body.additional_properties = d
|
||||
return create_flow_json_body
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,44 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="CreateFlowJsonBodySchema")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CreateFlowJsonBodySchema:
|
||||
""" """
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
create_flow_json_body_schema = cls()
|
||||
|
||||
create_flow_json_body_schema.additional_properties = d
|
||||
return create_flow_json_body_schema
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,95 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.create_flow_json_body_value_failure_module import CreateFlowJsonBodyValueFailureModule
|
||||
from ..models.create_flow_json_body_value_modules_item import CreateFlowJsonBodyValueModulesItem
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CreateFlowJsonBodyValue")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CreateFlowJsonBodyValue:
|
||||
"""
|
||||
Attributes:
|
||||
modules (List[CreateFlowJsonBodyValueModulesItem]):
|
||||
failure_module (Union[Unset, CreateFlowJsonBodyValueFailureModule]):
|
||||
same_worker (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
modules: List[CreateFlowJsonBodyValueModulesItem]
|
||||
failure_module: Union[Unset, CreateFlowJsonBodyValueFailureModule] = UNSET
|
||||
same_worker: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
modules = []
|
||||
for modules_item_data in self.modules:
|
||||
modules_item = modules_item_data.to_dict()
|
||||
|
||||
modules.append(modules_item)
|
||||
|
||||
failure_module: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.failure_module, Unset):
|
||||
failure_module = self.failure_module.to_dict()
|
||||
|
||||
same_worker = self.same_worker
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"modules": modules,
|
||||
}
|
||||
)
|
||||
if failure_module is not UNSET:
|
||||
field_dict["failure_module"] = failure_module
|
||||
if same_worker is not UNSET:
|
||||
field_dict["same_worker"] = same_worker
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
modules = []
|
||||
_modules = d.pop("modules")
|
||||
for modules_item_data in _modules:
|
||||
modules_item = CreateFlowJsonBodyValueModulesItem.from_dict(modules_item_data)
|
||||
|
||||
modules.append(modules_item)
|
||||
|
||||
_failure_module = d.pop("failure_module", UNSET)
|
||||
failure_module: Union[Unset, CreateFlowJsonBodyValueFailureModule]
|
||||
if isinstance(_failure_module, Unset):
|
||||
failure_module = UNSET
|
||||
else:
|
||||
failure_module = CreateFlowJsonBodyValueFailureModule.from_dict(_failure_module)
|
||||
|
||||
same_worker = d.pop("same_worker", UNSET)
|
||||
|
||||
create_flow_json_body_value = cls(
|
||||
modules=modules,
|
||||
failure_module=failure_module,
|
||||
same_worker=same_worker,
|
||||
)
|
||||
|
||||
create_flow_json_body_value.additional_properties = d
|
||||
return create_flow_json_body_value
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,249 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.create_flow_json_body_value_failure_module_input_transforms import (
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransforms,
|
||||
)
|
||||
from ..models.create_flow_json_body_value_failure_module_retry import CreateFlowJsonBodyValueFailureModuleRetry
|
||||
from ..models.create_flow_json_body_value_failure_module_sleep_type_0 import (
|
||||
CreateFlowJsonBodyValueFailureModuleSleepType0,
|
||||
)
|
||||
from ..models.create_flow_json_body_value_failure_module_sleep_type_1 import (
|
||||
CreateFlowJsonBodyValueFailureModuleSleepType1,
|
||||
)
|
||||
from ..models.create_flow_json_body_value_failure_module_stop_after_if import (
|
||||
CreateFlowJsonBodyValueFailureModuleStopAfterIf,
|
||||
)
|
||||
from ..models.create_flow_json_body_value_failure_module_value_type_0 import (
|
||||
CreateFlowJsonBodyValueFailureModuleValueType0,
|
||||
)
|
||||
from ..models.create_flow_json_body_value_failure_module_value_type_1 import (
|
||||
CreateFlowJsonBodyValueFailureModuleValueType1,
|
||||
)
|
||||
from ..models.create_flow_json_body_value_failure_module_value_type_2 import (
|
||||
CreateFlowJsonBodyValueFailureModuleValueType2,
|
||||
)
|
||||
from ..models.create_flow_json_body_value_failure_module_value_type_3 import (
|
||||
CreateFlowJsonBodyValueFailureModuleValueType3,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModule")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CreateFlowJsonBodyValueFailureModule:
|
||||
"""
|
||||
Attributes:
|
||||
input_transforms (CreateFlowJsonBodyValueFailureModuleInputTransforms):
|
||||
value (Union[CreateFlowJsonBodyValueFailureModuleValueType0, CreateFlowJsonBodyValueFailureModuleValueType1,
|
||||
CreateFlowJsonBodyValueFailureModuleValueType2, CreateFlowJsonBodyValueFailureModuleValueType3]):
|
||||
stop_after_if (Union[Unset, CreateFlowJsonBodyValueFailureModuleStopAfterIf]):
|
||||
sleep (Union[CreateFlowJsonBodyValueFailureModuleSleepType0, CreateFlowJsonBodyValueFailureModuleSleepType1,
|
||||
Unset]):
|
||||
summary (Union[Unset, str]):
|
||||
suspend (Union[Unset, int]):
|
||||
retry (Union[Unset, CreateFlowJsonBodyValueFailureModuleRetry]):
|
||||
"""
|
||||
|
||||
input_transforms: CreateFlowJsonBodyValueFailureModuleInputTransforms
|
||||
value: Union[
|
||||
CreateFlowJsonBodyValueFailureModuleValueType0,
|
||||
CreateFlowJsonBodyValueFailureModuleValueType1,
|
||||
CreateFlowJsonBodyValueFailureModuleValueType2,
|
||||
CreateFlowJsonBodyValueFailureModuleValueType3,
|
||||
]
|
||||
stop_after_if: Union[Unset, CreateFlowJsonBodyValueFailureModuleStopAfterIf] = UNSET
|
||||
sleep: Union[
|
||||
CreateFlowJsonBodyValueFailureModuleSleepType0, CreateFlowJsonBodyValueFailureModuleSleepType1, Unset
|
||||
] = UNSET
|
||||
summary: Union[Unset, str] = UNSET
|
||||
suspend: Union[Unset, int] = UNSET
|
||||
retry: Union[Unset, CreateFlowJsonBodyValueFailureModuleRetry] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
input_transforms = self.input_transforms.to_dict()
|
||||
|
||||
if isinstance(self.value, CreateFlowJsonBodyValueFailureModuleValueType0):
|
||||
value = self.value.to_dict()
|
||||
|
||||
elif isinstance(self.value, CreateFlowJsonBodyValueFailureModuleValueType1):
|
||||
value = self.value.to_dict()
|
||||
|
||||
elif isinstance(self.value, CreateFlowJsonBodyValueFailureModuleValueType2):
|
||||
value = self.value.to_dict()
|
||||
|
||||
else:
|
||||
value = self.value.to_dict()
|
||||
|
||||
stop_after_if: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.stop_after_if, Unset):
|
||||
stop_after_if = self.stop_after_if.to_dict()
|
||||
|
||||
sleep: Union[Dict[str, Any], Unset]
|
||||
if isinstance(self.sleep, Unset):
|
||||
sleep = UNSET
|
||||
|
||||
elif isinstance(self.sleep, CreateFlowJsonBodyValueFailureModuleSleepType0):
|
||||
sleep = UNSET
|
||||
if not isinstance(self.sleep, Unset):
|
||||
sleep = self.sleep.to_dict()
|
||||
|
||||
else:
|
||||
sleep = UNSET
|
||||
if not isinstance(self.sleep, Unset):
|
||||
sleep = self.sleep.to_dict()
|
||||
|
||||
summary = self.summary
|
||||
suspend = self.suspend
|
||||
retry: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.retry, Unset):
|
||||
retry = self.retry.to_dict()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"input_transforms": input_transforms,
|
||||
"value": value,
|
||||
}
|
||||
)
|
||||
if stop_after_if is not UNSET:
|
||||
field_dict["stop_after_if"] = stop_after_if
|
||||
if sleep is not UNSET:
|
||||
field_dict["sleep"] = sleep
|
||||
if summary is not UNSET:
|
||||
field_dict["summary"] = summary
|
||||
if suspend is not UNSET:
|
||||
field_dict["suspend"] = suspend
|
||||
if retry is not UNSET:
|
||||
field_dict["retry"] = retry
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
input_transforms = CreateFlowJsonBodyValueFailureModuleInputTransforms.from_dict(d.pop("input_transforms"))
|
||||
|
||||
def _parse_value(
|
||||
data: object,
|
||||
) -> Union[
|
||||
CreateFlowJsonBodyValueFailureModuleValueType0,
|
||||
CreateFlowJsonBodyValueFailureModuleValueType1,
|
||||
CreateFlowJsonBodyValueFailureModuleValueType2,
|
||||
CreateFlowJsonBodyValueFailureModuleValueType3,
|
||||
]:
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
value_type_0 = CreateFlowJsonBodyValueFailureModuleValueType0.from_dict(data)
|
||||
|
||||
return value_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
value_type_1 = CreateFlowJsonBodyValueFailureModuleValueType1.from_dict(data)
|
||||
|
||||
return value_type_1
|
||||
except: # noqa: E722
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
value_type_2 = CreateFlowJsonBodyValueFailureModuleValueType2.from_dict(data)
|
||||
|
||||
return value_type_2
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
value_type_3 = CreateFlowJsonBodyValueFailureModuleValueType3.from_dict(data)
|
||||
|
||||
return value_type_3
|
||||
|
||||
value = _parse_value(d.pop("value"))
|
||||
|
||||
_stop_after_if = d.pop("stop_after_if", UNSET)
|
||||
stop_after_if: Union[Unset, CreateFlowJsonBodyValueFailureModuleStopAfterIf]
|
||||
if isinstance(_stop_after_if, Unset):
|
||||
stop_after_if = UNSET
|
||||
else:
|
||||
stop_after_if = CreateFlowJsonBodyValueFailureModuleStopAfterIf.from_dict(_stop_after_if)
|
||||
|
||||
def _parse_sleep(
|
||||
data: object,
|
||||
) -> Union[
|
||||
CreateFlowJsonBodyValueFailureModuleSleepType0, CreateFlowJsonBodyValueFailureModuleSleepType1, Unset
|
||||
]:
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_sleep_type_0 = data
|
||||
sleep_type_0: Union[Unset, CreateFlowJsonBodyValueFailureModuleSleepType0]
|
||||
if isinstance(_sleep_type_0, Unset):
|
||||
sleep_type_0 = UNSET
|
||||
else:
|
||||
sleep_type_0 = CreateFlowJsonBodyValueFailureModuleSleepType0.from_dict(_sleep_type_0)
|
||||
|
||||
return sleep_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_sleep_type_1 = data
|
||||
sleep_type_1: Union[Unset, CreateFlowJsonBodyValueFailureModuleSleepType1]
|
||||
if isinstance(_sleep_type_1, Unset):
|
||||
sleep_type_1 = UNSET
|
||||
else:
|
||||
sleep_type_1 = CreateFlowJsonBodyValueFailureModuleSleepType1.from_dict(_sleep_type_1)
|
||||
|
||||
return sleep_type_1
|
||||
|
||||
sleep = _parse_sleep(d.pop("sleep", UNSET))
|
||||
|
||||
summary = d.pop("summary", UNSET)
|
||||
|
||||
suspend = d.pop("suspend", UNSET)
|
||||
|
||||
_retry = d.pop("retry", UNSET)
|
||||
retry: Union[Unset, CreateFlowJsonBodyValueFailureModuleRetry]
|
||||
if isinstance(_retry, Unset):
|
||||
retry = UNSET
|
||||
else:
|
||||
retry = CreateFlowJsonBodyValueFailureModuleRetry.from_dict(_retry)
|
||||
|
||||
create_flow_json_body_value_failure_module = cls(
|
||||
input_transforms=input_transforms,
|
||||
value=value,
|
||||
stop_after_if=stop_after_if,
|
||||
sleep=sleep,
|
||||
summary=summary,
|
||||
suspend=suspend,
|
||||
retry=retry,
|
||||
)
|
||||
|
||||
create_flow_json_body_value_failure_module.additional_properties = d
|
||||
return create_flow_json_body_value_failure_module
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,107 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0 import (
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0,
|
||||
)
|
||||
from ..models.create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1 import (
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1,
|
||||
)
|
||||
|
||||
T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleInputTransforms")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CreateFlowJsonBodyValueFailureModuleInputTransforms:
|
||||
""" """
|
||||
|
||||
additional_properties: Dict[
|
||||
str,
|
||||
Union[
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0,
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1,
|
||||
],
|
||||
] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
|
||||
if isinstance(prop, CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0):
|
||||
field_dict[prop_name] = prop.to_dict()
|
||||
|
||||
else:
|
||||
field_dict[prop_name] = prop.to_dict()
|
||||
|
||||
field_dict.update({})
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
create_flow_json_body_value_failure_module_input_transforms = cls()
|
||||
|
||||
additional_properties = {}
|
||||
for prop_name, prop_dict in d.items():
|
||||
|
||||
def _parse_additional_property(
|
||||
data: object,
|
||||
) -> Union[
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0,
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1,
|
||||
]:
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
additional_property_type_0 = (
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0.from_dict(data)
|
||||
)
|
||||
|
||||
return additional_property_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
additional_property_type_1 = (
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1.from_dict(data)
|
||||
)
|
||||
|
||||
return additional_property_type_1
|
||||
|
||||
additional_property = _parse_additional_property(prop_dict)
|
||||
|
||||
additional_properties[prop_name] = additional_property
|
||||
|
||||
create_flow_json_body_value_failure_module_input_transforms.additional_properties = additional_properties
|
||||
return create_flow_json_body_value_failure_module_input_transforms
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(
|
||||
self, key: str
|
||||
) -> Union[
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0,
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1,
|
||||
]:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(
|
||||
self,
|
||||
key: str,
|
||||
value: Union[
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0,
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1,
|
||||
],
|
||||
) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0_type import (
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type.value
|
||||
|
||||
value = self.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
if value is not UNSET:
|
||||
field_dict["value"] = value
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
type = CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type(d.pop("type"))
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0.additional_properties = d
|
||||
return create_flow_json_body_value_failure_module_input_transforms_additional_property_type_0
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,68 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1_type import (
|
||||
CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type,
|
||||
)
|
||||
|
||||
T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
expr = self.expr
|
||||
type = self.type.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"expr": expr,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
expr = d.pop("expr")
|
||||
|
||||
type = CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type(d.pop("type"))
|
||||
|
||||
create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1.additional_properties = d
|
||||
return create_flow_json_body_value_failure_module_input_transforms_additional_property_type_1
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CreateFlowJsonBodyValueFailureModuleInputTransformsAdditionalPropertyType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,86 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.create_flow_json_body_value_failure_module_retry_constant import (
|
||||
CreateFlowJsonBodyValueFailureModuleRetryConstant,
|
||||
)
|
||||
from ..models.create_flow_json_body_value_failure_module_retry_exponential import (
|
||||
CreateFlowJsonBodyValueFailureModuleRetryExponential,
|
||||
)
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="CreateFlowJsonBodyValueFailureModuleRetry")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CreateFlowJsonBodyValueFailureModuleRetry:
|
||||
"""
|
||||
Attributes:
|
||||
constant (Union[Unset, CreateFlowJsonBodyValueFailureModuleRetryConstant]):
|
||||
exponential (Union[Unset, CreateFlowJsonBodyValueFailureModuleRetryExponential]):
|
||||
"""
|
||||
|
||||
constant: Union[Unset, CreateFlowJsonBodyValueFailureModuleRetryConstant] = UNSET
|
||||
exponential: Union[Unset, CreateFlowJsonBodyValueFailureModuleRetryExponential] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
constant: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.constant, Unset):
|
||||
constant = self.constant.to_dict()
|
||||
|
||||
exponential: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.exponential, Unset):
|
||||
exponential = self.exponential.to_dict()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if constant is not UNSET:
|
||||
field_dict["constant"] = constant
|
||||
if exponential is not UNSET:
|
||||
field_dict["exponential"] = exponential
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
_constant = d.pop("constant", UNSET)
|
||||
constant: Union[Unset, CreateFlowJsonBodyValueFailureModuleRetryConstant]
|
||||
if isinstance(_constant, Unset):
|
||||
constant = UNSET
|
||||
else:
|
||||
constant = CreateFlowJsonBodyValueFailureModuleRetryConstant.from_dict(_constant)
|
||||
|
||||
_exponential = d.pop("exponential", UNSET)
|
||||
exponential: Union[Unset, CreateFlowJsonBodyValueFailureModuleRetryExponential]
|
||||
if isinstance(_exponential, Unset):
|
||||
exponential = UNSET
|
||||
else:
|
||||
exponential = CreateFlowJsonBodyValueFailureModuleRetryExponential.from_dict(_exponential)
|
||||
|
||||
create_flow_json_body_value_failure_module_retry = cls(
|
||||
constant=constant,
|
||||
exponential=exponential,
|
||||
)
|
||||
|
||||
create_flow_json_body_value_failure_module_retry.additional_properties = d
|
||||
return create_flow_json_body_value_failure_module_retry
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user