mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 00:02:19 +00:00
sqlx
This commit is contained in:
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AcceptInviteJsonBody")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AcceptInviteJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
workspace_id (str):
|
||||
username (str):
|
||||
"""
|
||||
|
||||
workspace_id: str
|
||||
username: str
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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,80 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AddGranularAclsJsonBody")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AddGranularAclsJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
owner (str):
|
||||
write (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
owner: str
|
||||
write: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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,15 @@
|
||||
from enum import Enum
|
||||
|
||||
class AddGranularAclsKind(str, Enum):
|
||||
APP = "app"
|
||||
FLOW = "flow"
|
||||
FOLDER = "folder"
|
||||
GROUP = "group_"
|
||||
RAW_APP = "raw_app"
|
||||
RESOURCE = "resource"
|
||||
SCHEDULE = "schedule"
|
||||
SCRIPT = "script"
|
||||
VARIABLE = "variable"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,73 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AddOwnerToFolderJsonBody")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AddOwnerToFolderJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
owner (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
owner: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
owner = self.owner
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
})
|
||||
if owner is not UNSET:
|
||||
field_dict["owner"] = owner
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
owner = d.pop("owner", UNSET)
|
||||
|
||||
add_owner_to_folder_json_body = cls(
|
||||
owner=owner,
|
||||
)
|
||||
|
||||
add_owner_to_folder_json_body.additional_properties = d
|
||||
return add_owner_to_folder_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,91 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AddUserJsonBody")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AddUserJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
email (str):
|
||||
is_admin (bool):
|
||||
username (str):
|
||||
operator (bool):
|
||||
"""
|
||||
|
||||
email: str
|
||||
is_admin: bool
|
||||
username: str
|
||||
operator: bool
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
email = self.email
|
||||
is_admin = self.is_admin
|
||||
username = self.username
|
||||
operator = self.operator
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"email": email,
|
||||
"is_admin": is_admin,
|
||||
"username": username,
|
||||
"operator": operator,
|
||||
})
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
email = d.pop("email")
|
||||
|
||||
is_admin = d.pop("is_admin")
|
||||
|
||||
username = d.pop("username")
|
||||
|
||||
operator = d.pop("operator")
|
||||
|
||||
add_user_json_body = cls(
|
||||
email=email,
|
||||
is_admin=is_admin,
|
||||
username=username,
|
||||
operator=operator,
|
||||
)
|
||||
|
||||
add_user_json_body.additional_properties = d
|
||||
return add_user_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,73 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AddUserToGroupJsonBody")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AddUserToGroupJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
username (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
username: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AddUserToInstanceGroupJsonBody")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AddUserToInstanceGroupJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
email (str):
|
||||
"""
|
||||
|
||||
email: str
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
email = self.email
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"email": email,
|
||||
})
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
email = d.pop("email")
|
||||
|
||||
add_user_to_instance_group_json_body = cls(
|
||||
email=email,
|
||||
)
|
||||
|
||||
add_user_to_instance_group_json_body.additional_properties = d
|
||||
return add_user_to_instance_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,80 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AppHistory")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AppHistory:
|
||||
"""
|
||||
Attributes:
|
||||
version (int):
|
||||
deployment_msg (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
version: int
|
||||
deployment_msg: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
version = self.version
|
||||
deployment_msg = self.deployment_msg
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"version": version,
|
||||
})
|
||||
if deployment_msg is not UNSET:
|
||||
field_dict["deployment_msg"] = deployment_msg
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
version = d.pop("version")
|
||||
|
||||
deployment_msg = d.pop("deployment_msg", UNSET)
|
||||
|
||||
app_history = cls(
|
||||
version=version,
|
||||
deployment_msg=deployment_msg,
|
||||
)
|
||||
|
||||
app_history.additional_properties = d
|
||||
return app_history
|
||||
|
||||
@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,174 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import cast
|
||||
from typing import cast, List
|
||||
from ..models.app_with_last_version_execution_mode import AppWithLastVersionExecutionMode
|
||||
from typing import Dict
|
||||
import datetime
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.app_with_last_version_policy import AppWithLastVersionPolicy
|
||||
from ..models.app_with_last_version_extra_perms import AppWithLastVersionExtraPerms
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AppWithLastVersion")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AppWithLastVersion:
|
||||
"""
|
||||
Attributes:
|
||||
id (int):
|
||||
workspace_id (str):
|
||||
path (str):
|
||||
summary (str):
|
||||
versions (List[int]):
|
||||
created_by (str):
|
||||
created_at (datetime.datetime):
|
||||
value (Any):
|
||||
policy (AppWithLastVersionPolicy):
|
||||
execution_mode (AppWithLastVersionExecutionMode):
|
||||
extra_perms (AppWithLastVersionExtraPerms):
|
||||
"""
|
||||
|
||||
id: int
|
||||
workspace_id: str
|
||||
path: str
|
||||
summary: str
|
||||
versions: List[int]
|
||||
created_by: str
|
||||
created_at: datetime.datetime
|
||||
value: Any
|
||||
policy: 'AppWithLastVersionPolicy'
|
||||
execution_mode: AppWithLastVersionExecutionMode
|
||||
extra_perms: 'AppWithLastVersionExtraPerms'
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.app_with_last_version_policy import AppWithLastVersionPolicy
|
||||
from ..models.app_with_last_version_extra_perms import AppWithLastVersionExtraPerms
|
||||
id = self.id
|
||||
workspace_id = self.workspace_id
|
||||
path = self.path
|
||||
summary = self.summary
|
||||
versions = self.versions
|
||||
|
||||
|
||||
|
||||
|
||||
created_by = self.created_by
|
||||
created_at = self.created_at.isoformat()
|
||||
|
||||
value = self.value
|
||||
policy = self.policy.to_dict()
|
||||
|
||||
execution_mode = self.execution_mode.value
|
||||
|
||||
extra_perms = self.extra_perms.to_dict()
|
||||
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"id": id,
|
||||
"workspace_id": workspace_id,
|
||||
"path": path,
|
||||
"summary": summary,
|
||||
"versions": versions,
|
||||
"created_by": created_by,
|
||||
"created_at": created_at,
|
||||
"value": value,
|
||||
"policy": policy,
|
||||
"execution_mode": execution_mode,
|
||||
"extra_perms": extra_perms,
|
||||
})
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.app_with_last_version_policy import AppWithLastVersionPolicy
|
||||
from ..models.app_with_last_version_extra_perms import AppWithLastVersionExtraPerms
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
workspace_id = d.pop("workspace_id")
|
||||
|
||||
path = d.pop("path")
|
||||
|
||||
summary = d.pop("summary")
|
||||
|
||||
versions = cast(List[int], d.pop("versions"))
|
||||
|
||||
|
||||
created_by = d.pop("created_by")
|
||||
|
||||
created_at = isoparse(d.pop("created_at"))
|
||||
|
||||
|
||||
|
||||
|
||||
value = d.pop("value")
|
||||
|
||||
policy = AppWithLastVersionPolicy.from_dict(d.pop("policy"))
|
||||
|
||||
|
||||
|
||||
|
||||
execution_mode = AppWithLastVersionExecutionMode(d.pop("execution_mode"))
|
||||
|
||||
|
||||
|
||||
|
||||
extra_perms = AppWithLastVersionExtraPerms.from_dict(d.pop("extra_perms"))
|
||||
|
||||
|
||||
|
||||
|
||||
app_with_last_version = cls(
|
||||
id=id,
|
||||
workspace_id=workspace_id,
|
||||
path=path,
|
||||
summary=summary,
|
||||
versions=versions,
|
||||
created_by=created_by,
|
||||
created_at=created_at,
|
||||
value=value,
|
||||
policy=policy,
|
||||
execution_mode=execution_mode,
|
||||
extra_perms=extra_perms,
|
||||
)
|
||||
|
||||
app_with_last_version.additional_properties = d
|
||||
return app_with_last_version
|
||||
|
||||
@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,9 @@
|
||||
from enum import Enum
|
||||
|
||||
class AppWithLastVersionExecutionMode(str, Enum):
|
||||
ANONYMOUS = "anonymous"
|
||||
PUBLISHER = "publisher"
|
||||
VIEWER = "viewer"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,63 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AppWithLastVersionExtraPerms")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AppWithLastVersionExtraPerms:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, bool] = _attrs_field(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()
|
||||
app_with_last_version_extra_perms = cls(
|
||||
)
|
||||
|
||||
|
||||
app_with_last_version_extra_perms.additional_properties = d
|
||||
return app_with_last_version_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,126 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
from ..models.app_with_last_version_policy_execution_mode import AppWithLastVersionPolicyExecutionMode
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.app_with_last_version_policy_triggerables import AppWithLastVersionPolicyTriggerables
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AppWithLastVersionPolicy")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AppWithLastVersionPolicy:
|
||||
"""
|
||||
Attributes:
|
||||
triggerables (Union[Unset, AppWithLastVersionPolicyTriggerables]):
|
||||
execution_mode (Union[Unset, AppWithLastVersionPolicyExecutionMode]):
|
||||
on_behalf_of (Union[Unset, str]):
|
||||
on_behalf_of_email (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
triggerables: Union[Unset, 'AppWithLastVersionPolicyTriggerables'] = UNSET
|
||||
execution_mode: Union[Unset, AppWithLastVersionPolicyExecutionMode] = UNSET
|
||||
on_behalf_of: Union[Unset, str] = UNSET
|
||||
on_behalf_of_email: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.app_with_last_version_policy_triggerables import AppWithLastVersionPolicyTriggerables
|
||||
triggerables: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.triggerables, Unset):
|
||||
triggerables = self.triggerables.to_dict()
|
||||
|
||||
execution_mode: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.execution_mode, Unset):
|
||||
execution_mode = self.execution_mode.value
|
||||
|
||||
on_behalf_of = self.on_behalf_of
|
||||
on_behalf_of_email = self.on_behalf_of_email
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
})
|
||||
if triggerables is not UNSET:
|
||||
field_dict["triggerables"] = triggerables
|
||||
if execution_mode is not UNSET:
|
||||
field_dict["execution_mode"] = execution_mode
|
||||
if on_behalf_of is not UNSET:
|
||||
field_dict["on_behalf_of"] = on_behalf_of
|
||||
if on_behalf_of_email is not UNSET:
|
||||
field_dict["on_behalf_of_email"] = on_behalf_of_email
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.app_with_last_version_policy_triggerables import AppWithLastVersionPolicyTriggerables
|
||||
d = src_dict.copy()
|
||||
_triggerables = d.pop("triggerables", UNSET)
|
||||
triggerables: Union[Unset, AppWithLastVersionPolicyTriggerables]
|
||||
if isinstance(_triggerables, Unset):
|
||||
triggerables = UNSET
|
||||
else:
|
||||
triggerables = AppWithLastVersionPolicyTriggerables.from_dict(_triggerables)
|
||||
|
||||
|
||||
|
||||
|
||||
_execution_mode = d.pop("execution_mode", UNSET)
|
||||
execution_mode: Union[Unset, AppWithLastVersionPolicyExecutionMode]
|
||||
if isinstance(_execution_mode, Unset):
|
||||
execution_mode = UNSET
|
||||
else:
|
||||
execution_mode = AppWithLastVersionPolicyExecutionMode(_execution_mode)
|
||||
|
||||
|
||||
|
||||
|
||||
on_behalf_of = d.pop("on_behalf_of", UNSET)
|
||||
|
||||
on_behalf_of_email = d.pop("on_behalf_of_email", UNSET)
|
||||
|
||||
app_with_last_version_policy = cls(
|
||||
triggerables=triggerables,
|
||||
execution_mode=execution_mode,
|
||||
on_behalf_of=on_behalf_of,
|
||||
on_behalf_of_email=on_behalf_of_email,
|
||||
)
|
||||
|
||||
app_with_last_version_policy.additional_properties = d
|
||||
return app_with_last_version_policy
|
||||
|
||||
@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
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
from enum import Enum
|
||||
|
||||
class AppWithLastVersionPolicyExecutionMode(str, Enum):
|
||||
ANONYMOUS = "anonymous"
|
||||
PUBLISHER = "publisher"
|
||||
VIEWER = "viewer"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.app_with_last_version_policy_triggerables_additional_property import AppWithLastVersionPolicyTriggerablesAdditionalProperty
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AppWithLastVersionPolicyTriggerables")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AppWithLastVersionPolicyTriggerables:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, 'AppWithLastVersionPolicyTriggerablesAdditionalProperty'] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.app_with_last_version_policy_triggerables_additional_property import AppWithLastVersionPolicyTriggerablesAdditionalProperty
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
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:
|
||||
from ..models.app_with_last_version_policy_triggerables_additional_property import AppWithLastVersionPolicyTriggerablesAdditionalProperty
|
||||
d = src_dict.copy()
|
||||
app_with_last_version_policy_triggerables = cls(
|
||||
)
|
||||
|
||||
|
||||
additional_properties = {}
|
||||
for prop_name, prop_dict in d.items():
|
||||
additional_property = AppWithLastVersionPolicyTriggerablesAdditionalProperty.from_dict(prop_dict)
|
||||
|
||||
|
||||
|
||||
additional_properties[prop_name] = additional_property
|
||||
|
||||
app_with_last_version_policy_triggerables.additional_properties = additional_properties
|
||||
return app_with_last_version_policy_triggerables
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> 'AppWithLastVersionPolicyTriggerablesAdditionalProperty':
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: 'AppWithLastVersionPolicyTriggerablesAdditionalProperty') -> 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
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AppWithLastVersionPolicyTriggerablesAdditionalProperty")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AppWithLastVersionPolicyTriggerablesAdditionalProperty:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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()
|
||||
app_with_last_version_policy_triggerables_additional_property = cls(
|
||||
)
|
||||
|
||||
app_with_last_version_policy_triggerables_additional_property.additional_properties = d
|
||||
return app_with_last_version_policy_triggerables_additional_property
|
||||
|
||||
@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,192 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import cast, List
|
||||
from typing import Dict
|
||||
from ..models.app_with_last_version_w_draft_execution_mode import AppWithLastVersionWDraftExecutionMode
|
||||
import datetime
|
||||
from dateutil.parser import isoparse
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.app_with_last_version_w_draft_policy import AppWithLastVersionWDraftPolicy
|
||||
from ..models.app_with_last_version_w_draft_extra_perms import AppWithLastVersionWDraftExtraPerms
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AppWithLastVersionWDraft")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AppWithLastVersionWDraft:
|
||||
"""
|
||||
Attributes:
|
||||
id (int):
|
||||
workspace_id (str):
|
||||
path (str):
|
||||
summary (str):
|
||||
versions (List[int]):
|
||||
created_by (str):
|
||||
created_at (datetime.datetime):
|
||||
value (Any):
|
||||
policy (AppWithLastVersionWDraftPolicy):
|
||||
execution_mode (AppWithLastVersionWDraftExecutionMode):
|
||||
extra_perms (AppWithLastVersionWDraftExtraPerms):
|
||||
draft_only (Union[Unset, bool]):
|
||||
draft (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
id: int
|
||||
workspace_id: str
|
||||
path: str
|
||||
summary: str
|
||||
versions: List[int]
|
||||
created_by: str
|
||||
created_at: datetime.datetime
|
||||
value: Any
|
||||
policy: 'AppWithLastVersionWDraftPolicy'
|
||||
execution_mode: AppWithLastVersionWDraftExecutionMode
|
||||
extra_perms: 'AppWithLastVersionWDraftExtraPerms'
|
||||
draft_only: Union[Unset, bool] = UNSET
|
||||
draft: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.app_with_last_version_w_draft_policy import AppWithLastVersionWDraftPolicy
|
||||
from ..models.app_with_last_version_w_draft_extra_perms import AppWithLastVersionWDraftExtraPerms
|
||||
id = self.id
|
||||
workspace_id = self.workspace_id
|
||||
path = self.path
|
||||
summary = self.summary
|
||||
versions = self.versions
|
||||
|
||||
|
||||
|
||||
|
||||
created_by = self.created_by
|
||||
created_at = self.created_at.isoformat()
|
||||
|
||||
value = self.value
|
||||
policy = self.policy.to_dict()
|
||||
|
||||
execution_mode = self.execution_mode.value
|
||||
|
||||
extra_perms = self.extra_perms.to_dict()
|
||||
|
||||
draft_only = self.draft_only
|
||||
draft = self.draft
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"id": id,
|
||||
"workspace_id": workspace_id,
|
||||
"path": path,
|
||||
"summary": summary,
|
||||
"versions": versions,
|
||||
"created_by": created_by,
|
||||
"created_at": created_at,
|
||||
"value": value,
|
||||
"policy": policy,
|
||||
"execution_mode": execution_mode,
|
||||
"extra_perms": extra_perms,
|
||||
})
|
||||
if draft_only is not UNSET:
|
||||
field_dict["draft_only"] = draft_only
|
||||
if draft is not UNSET:
|
||||
field_dict["draft"] = draft
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.app_with_last_version_w_draft_policy import AppWithLastVersionWDraftPolicy
|
||||
from ..models.app_with_last_version_w_draft_extra_perms import AppWithLastVersionWDraftExtraPerms
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
workspace_id = d.pop("workspace_id")
|
||||
|
||||
path = d.pop("path")
|
||||
|
||||
summary = d.pop("summary")
|
||||
|
||||
versions = cast(List[int], d.pop("versions"))
|
||||
|
||||
|
||||
created_by = d.pop("created_by")
|
||||
|
||||
created_at = isoparse(d.pop("created_at"))
|
||||
|
||||
|
||||
|
||||
|
||||
value = d.pop("value")
|
||||
|
||||
policy = AppWithLastVersionWDraftPolicy.from_dict(d.pop("policy"))
|
||||
|
||||
|
||||
|
||||
|
||||
execution_mode = AppWithLastVersionWDraftExecutionMode(d.pop("execution_mode"))
|
||||
|
||||
|
||||
|
||||
|
||||
extra_perms = AppWithLastVersionWDraftExtraPerms.from_dict(d.pop("extra_perms"))
|
||||
|
||||
|
||||
|
||||
|
||||
draft_only = d.pop("draft_only", UNSET)
|
||||
|
||||
draft = d.pop("draft", UNSET)
|
||||
|
||||
app_with_last_version_w_draft = cls(
|
||||
id=id,
|
||||
workspace_id=workspace_id,
|
||||
path=path,
|
||||
summary=summary,
|
||||
versions=versions,
|
||||
created_by=created_by,
|
||||
created_at=created_at,
|
||||
value=value,
|
||||
policy=policy,
|
||||
execution_mode=execution_mode,
|
||||
extra_perms=extra_perms,
|
||||
draft_only=draft_only,
|
||||
draft=draft,
|
||||
)
|
||||
|
||||
app_with_last_version_w_draft.additional_properties = d
|
||||
return app_with_last_version_w_draft
|
||||
|
||||
@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
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
from enum import Enum
|
||||
|
||||
class AppWithLastVersionWDraftExecutionMode(str, Enum):
|
||||
ANONYMOUS = "anonymous"
|
||||
PUBLISHER = "publisher"
|
||||
VIEWER = "viewer"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AppWithLastVersionWDraftExtraPerms")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AppWithLastVersionWDraftExtraPerms:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, bool] = _attrs_field(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()
|
||||
app_with_last_version_w_draft_extra_perms = cls(
|
||||
)
|
||||
|
||||
|
||||
app_with_last_version_w_draft_extra_perms.additional_properties = d
|
||||
return app_with_last_version_w_draft_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
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from ..models.app_with_last_version_w_draft_policy_execution_mode import AppWithLastVersionWDraftPolicyExecutionMode
|
||||
from typing import Dict
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.app_with_last_version_w_draft_policy_triggerables import AppWithLastVersionWDraftPolicyTriggerables
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AppWithLastVersionWDraftPolicy")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AppWithLastVersionWDraftPolicy:
|
||||
"""
|
||||
Attributes:
|
||||
triggerables (Union[Unset, AppWithLastVersionWDraftPolicyTriggerables]):
|
||||
execution_mode (Union[Unset, AppWithLastVersionWDraftPolicyExecutionMode]):
|
||||
on_behalf_of (Union[Unset, str]):
|
||||
on_behalf_of_email (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
triggerables: Union[Unset, 'AppWithLastVersionWDraftPolicyTriggerables'] = UNSET
|
||||
execution_mode: Union[Unset, AppWithLastVersionWDraftPolicyExecutionMode] = UNSET
|
||||
on_behalf_of: Union[Unset, str] = UNSET
|
||||
on_behalf_of_email: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.app_with_last_version_w_draft_policy_triggerables import AppWithLastVersionWDraftPolicyTriggerables
|
||||
triggerables: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.triggerables, Unset):
|
||||
triggerables = self.triggerables.to_dict()
|
||||
|
||||
execution_mode: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.execution_mode, Unset):
|
||||
execution_mode = self.execution_mode.value
|
||||
|
||||
on_behalf_of = self.on_behalf_of
|
||||
on_behalf_of_email = self.on_behalf_of_email
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
})
|
||||
if triggerables is not UNSET:
|
||||
field_dict["triggerables"] = triggerables
|
||||
if execution_mode is not UNSET:
|
||||
field_dict["execution_mode"] = execution_mode
|
||||
if on_behalf_of is not UNSET:
|
||||
field_dict["on_behalf_of"] = on_behalf_of
|
||||
if on_behalf_of_email is not UNSET:
|
||||
field_dict["on_behalf_of_email"] = on_behalf_of_email
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.app_with_last_version_w_draft_policy_triggerables import AppWithLastVersionWDraftPolicyTriggerables
|
||||
d = src_dict.copy()
|
||||
_triggerables = d.pop("triggerables", UNSET)
|
||||
triggerables: Union[Unset, AppWithLastVersionWDraftPolicyTriggerables]
|
||||
if isinstance(_triggerables, Unset):
|
||||
triggerables = UNSET
|
||||
else:
|
||||
triggerables = AppWithLastVersionWDraftPolicyTriggerables.from_dict(_triggerables)
|
||||
|
||||
|
||||
|
||||
|
||||
_execution_mode = d.pop("execution_mode", UNSET)
|
||||
execution_mode: Union[Unset, AppWithLastVersionWDraftPolicyExecutionMode]
|
||||
if isinstance(_execution_mode, Unset):
|
||||
execution_mode = UNSET
|
||||
else:
|
||||
execution_mode = AppWithLastVersionWDraftPolicyExecutionMode(_execution_mode)
|
||||
|
||||
|
||||
|
||||
|
||||
on_behalf_of = d.pop("on_behalf_of", UNSET)
|
||||
|
||||
on_behalf_of_email = d.pop("on_behalf_of_email", UNSET)
|
||||
|
||||
app_with_last_version_w_draft_policy = cls(
|
||||
triggerables=triggerables,
|
||||
execution_mode=execution_mode,
|
||||
on_behalf_of=on_behalf_of,
|
||||
on_behalf_of_email=on_behalf_of_email,
|
||||
)
|
||||
|
||||
app_with_last_version_w_draft_policy.additional_properties = d
|
||||
return app_with_last_version_w_draft_policy
|
||||
|
||||
@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
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
from enum import Enum
|
||||
|
||||
class AppWithLastVersionWDraftPolicyExecutionMode(str, Enum):
|
||||
ANONYMOUS = "anonymous"
|
||||
PUBLISHER = "publisher"
|
||||
VIEWER = "viewer"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.app_with_last_version_w_draft_policy_triggerables_additional_property import AppWithLastVersionWDraftPolicyTriggerablesAdditionalProperty
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AppWithLastVersionWDraftPolicyTriggerables")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AppWithLastVersionWDraftPolicyTriggerables:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, 'AppWithLastVersionWDraftPolicyTriggerablesAdditionalProperty'] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.app_with_last_version_w_draft_policy_triggerables_additional_property import AppWithLastVersionWDraftPolicyTriggerablesAdditionalProperty
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
for prop_name, prop in self.additional_properties.items():
|
||||
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:
|
||||
from ..models.app_with_last_version_w_draft_policy_triggerables_additional_property import AppWithLastVersionWDraftPolicyTriggerablesAdditionalProperty
|
||||
d = src_dict.copy()
|
||||
app_with_last_version_w_draft_policy_triggerables = cls(
|
||||
)
|
||||
|
||||
|
||||
additional_properties = {}
|
||||
for prop_name, prop_dict in d.items():
|
||||
additional_property = AppWithLastVersionWDraftPolicyTriggerablesAdditionalProperty.from_dict(prop_dict)
|
||||
|
||||
|
||||
|
||||
additional_properties[prop_name] = additional_property
|
||||
|
||||
app_with_last_version_w_draft_policy_triggerables.additional_properties = additional_properties
|
||||
return app_with_last_version_w_draft_policy_triggerables
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> 'AppWithLastVersionWDraftPolicyTriggerablesAdditionalProperty':
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: 'AppWithLastVersionWDraftPolicyTriggerablesAdditionalProperty') -> 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
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AppWithLastVersionWDraftPolicyTriggerablesAdditionalProperty")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AppWithLastVersionWDraftPolicyTriggerablesAdditionalProperty:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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()
|
||||
app_with_last_version_w_draft_policy_triggerables_additional_property = cls(
|
||||
)
|
||||
|
||||
app_with_last_version_w_draft_policy_triggerables_additional_property.additional_properties = d
|
||||
return app_with_last_version_w_draft_policy_triggerables_additional_property
|
||||
|
||||
@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, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ArchiveFlowByPathJsonBody")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ArchiveFlowByPathJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
archived (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
archived: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
archived = self.archived
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
})
|
||||
if archived is not UNSET:
|
||||
field_dict["archived"] = archived
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
archived = d.pop("archived", UNSET)
|
||||
|
||||
archive_flow_by_path_json_body = cls(
|
||||
archived=archived,
|
||||
)
|
||||
|
||||
archive_flow_by_path_json_body.additional_properties = d
|
||||
return archive_flow_by_path_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
|
||||
+363
@@ -0,0 +1,363 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import cast, List
|
||||
from typing import Dict
|
||||
from ..models.archive_script_by_hash_response_200_kind import ArchiveScriptByHashResponse200Kind
|
||||
import datetime
|
||||
from dateutil.parser import isoparse
|
||||
from ..types import UNSET, Unset
|
||||
from ..models.archive_script_by_hash_response_200_language import ArchiveScriptByHashResponse200Language
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.archive_script_by_hash_response_200_extra_perms import ArchiveScriptByHashResponse200ExtraPerms
|
||||
from ..models.archive_script_by_hash_response_200_schema import ArchiveScriptByHashResponse200Schema
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ArchiveScriptByHashResponse200")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ArchiveScriptByHashResponse200:
|
||||
"""
|
||||
Attributes:
|
||||
hash_ (str):
|
||||
path (str):
|
||||
summary (str):
|
||||
description (str):
|
||||
content (str):
|
||||
created_by (str):
|
||||
created_at (datetime.datetime):
|
||||
archived (bool):
|
||||
deleted (bool):
|
||||
is_template (bool):
|
||||
extra_perms (ArchiveScriptByHashResponse200ExtraPerms):
|
||||
language (ArchiveScriptByHashResponse200Language):
|
||||
kind (ArchiveScriptByHashResponse200Kind):
|
||||
starred (bool):
|
||||
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
|
||||
schema (Union[Unset, ArchiveScriptByHashResponse200Schema]):
|
||||
lock (Union[Unset, str]):
|
||||
lock_error_logs (Union[Unset, str]):
|
||||
tag (Union[Unset, str]):
|
||||
has_draft (Union[Unset, bool]):
|
||||
draft_only (Union[Unset, bool]):
|
||||
envs (Union[Unset, List[str]]):
|
||||
concurrent_limit (Union[Unset, int]):
|
||||
concurrency_time_window_s (Union[Unset, int]):
|
||||
cache_ttl (Union[Unset, float]):
|
||||
dedicated_worker (Union[Unset, bool]):
|
||||
ws_error_handler_muted (Union[Unset, bool]):
|
||||
priority (Union[Unset, int]):
|
||||
restart_unless_cancelled (Union[Unset, bool]):
|
||||
timeout (Union[Unset, int]):
|
||||
delete_after_use (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
hash_: str
|
||||
path: str
|
||||
summary: str
|
||||
description: str
|
||||
content: str
|
||||
created_by: str
|
||||
created_at: datetime.datetime
|
||||
archived: bool
|
||||
deleted: bool
|
||||
is_template: bool
|
||||
extra_perms: 'ArchiveScriptByHashResponse200ExtraPerms'
|
||||
language: ArchiveScriptByHashResponse200Language
|
||||
kind: ArchiveScriptByHashResponse200Kind
|
||||
starred: bool
|
||||
workspace_id: Union[Unset, str] = UNSET
|
||||
parent_hashes: Union[Unset, List[str]] = UNSET
|
||||
schema: Union[Unset, 'ArchiveScriptByHashResponse200Schema'] = UNSET
|
||||
lock: Union[Unset, str] = UNSET
|
||||
lock_error_logs: Union[Unset, str] = UNSET
|
||||
tag: Union[Unset, str] = UNSET
|
||||
has_draft: Union[Unset, bool] = UNSET
|
||||
draft_only: Union[Unset, bool] = UNSET
|
||||
envs: Union[Unset, List[str]] = UNSET
|
||||
concurrent_limit: Union[Unset, int] = UNSET
|
||||
concurrency_time_window_s: Union[Unset, int] = UNSET
|
||||
cache_ttl: Union[Unset, float] = UNSET
|
||||
dedicated_worker: Union[Unset, bool] = UNSET
|
||||
ws_error_handler_muted: Union[Unset, bool] = UNSET
|
||||
priority: Union[Unset, int] = UNSET
|
||||
restart_unless_cancelled: Union[Unset, bool] = UNSET
|
||||
timeout: Union[Unset, int] = UNSET
|
||||
delete_after_use: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.archive_script_by_hash_response_200_extra_perms import ArchiveScriptByHashResponse200ExtraPerms
|
||||
from ..models.archive_script_by_hash_response_200_schema import ArchiveScriptByHashResponse200Schema
|
||||
hash_ = self.hash_
|
||||
path = self.path
|
||||
summary = self.summary
|
||||
description = self.description
|
||||
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
|
||||
|
||||
starred = self.starred
|
||||
workspace_id = self.workspace_id
|
||||
parent_hashes: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.parent_hashes, Unset):
|
||||
parent_hashes = self.parent_hashes
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
tag = self.tag
|
||||
has_draft = self.has_draft
|
||||
draft_only = self.draft_only
|
||||
envs: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.envs, Unset):
|
||||
envs = self.envs
|
||||
|
||||
|
||||
|
||||
|
||||
concurrent_limit = self.concurrent_limit
|
||||
concurrency_time_window_s = self.concurrency_time_window_s
|
||||
cache_ttl = self.cache_ttl
|
||||
dedicated_worker = self.dedicated_worker
|
||||
ws_error_handler_muted = self.ws_error_handler_muted
|
||||
priority = self.priority
|
||||
restart_unless_cancelled = self.restart_unless_cancelled
|
||||
timeout = self.timeout
|
||||
delete_after_use = self.delete_after_use
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"hash": hash_,
|
||||
"path": path,
|
||||
"summary": summary,
|
||||
"description": description,
|
||||
"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,
|
||||
"starred": starred,
|
||||
})
|
||||
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 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
|
||||
if tag is not UNSET:
|
||||
field_dict["tag"] = tag
|
||||
if has_draft is not UNSET:
|
||||
field_dict["has_draft"] = has_draft
|
||||
if draft_only is not UNSET:
|
||||
field_dict["draft_only"] = draft_only
|
||||
if envs is not UNSET:
|
||||
field_dict["envs"] = envs
|
||||
if concurrent_limit is not UNSET:
|
||||
field_dict["concurrent_limit"] = concurrent_limit
|
||||
if concurrency_time_window_s is not UNSET:
|
||||
field_dict["concurrency_time_window_s"] = concurrency_time_window_s
|
||||
if cache_ttl is not UNSET:
|
||||
field_dict["cache_ttl"] = cache_ttl
|
||||
if dedicated_worker is not UNSET:
|
||||
field_dict["dedicated_worker"] = dedicated_worker
|
||||
if ws_error_handler_muted is not UNSET:
|
||||
field_dict["ws_error_handler_muted"] = ws_error_handler_muted
|
||||
if priority is not UNSET:
|
||||
field_dict["priority"] = priority
|
||||
if restart_unless_cancelled is not UNSET:
|
||||
field_dict["restart_unless_cancelled"] = restart_unless_cancelled
|
||||
if timeout is not UNSET:
|
||||
field_dict["timeout"] = timeout
|
||||
if delete_after_use is not UNSET:
|
||||
field_dict["delete_after_use"] = delete_after_use
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.archive_script_by_hash_response_200_extra_perms import ArchiveScriptByHashResponse200ExtraPerms
|
||||
from ..models.archive_script_by_hash_response_200_schema import ArchiveScriptByHashResponse200Schema
|
||||
d = src_dict.copy()
|
||||
hash_ = d.pop("hash")
|
||||
|
||||
path = d.pop("path")
|
||||
|
||||
summary = d.pop("summary")
|
||||
|
||||
description = d.pop("description")
|
||||
|
||||
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"))
|
||||
|
||||
|
||||
|
||||
|
||||
starred = d.pop("starred")
|
||||
|
||||
workspace_id = d.pop("workspace_id", UNSET)
|
||||
|
||||
parent_hashes = cast(List[str], d.pop("parent_hashes", 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)
|
||||
|
||||
tag = d.pop("tag", UNSET)
|
||||
|
||||
has_draft = d.pop("has_draft", UNSET)
|
||||
|
||||
draft_only = d.pop("draft_only", UNSET)
|
||||
|
||||
envs = cast(List[str], d.pop("envs", UNSET))
|
||||
|
||||
|
||||
concurrent_limit = d.pop("concurrent_limit", UNSET)
|
||||
|
||||
concurrency_time_window_s = d.pop("concurrency_time_window_s", UNSET)
|
||||
|
||||
cache_ttl = d.pop("cache_ttl", UNSET)
|
||||
|
||||
dedicated_worker = d.pop("dedicated_worker", UNSET)
|
||||
|
||||
ws_error_handler_muted = d.pop("ws_error_handler_muted", UNSET)
|
||||
|
||||
priority = d.pop("priority", UNSET)
|
||||
|
||||
restart_unless_cancelled = d.pop("restart_unless_cancelled", UNSET)
|
||||
|
||||
timeout = d.pop("timeout", UNSET)
|
||||
|
||||
delete_after_use = d.pop("delete_after_use", UNSET)
|
||||
|
||||
archive_script_by_hash_response_200 = cls(
|
||||
hash_=hash_,
|
||||
path=path,
|
||||
summary=summary,
|
||||
description=description,
|
||||
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,
|
||||
starred=starred,
|
||||
workspace_id=workspace_id,
|
||||
parent_hashes=parent_hashes,
|
||||
schema=schema,
|
||||
lock=lock,
|
||||
lock_error_logs=lock_error_logs,
|
||||
tag=tag,
|
||||
has_draft=has_draft,
|
||||
draft_only=draft_only,
|
||||
envs=envs,
|
||||
concurrent_limit=concurrent_limit,
|
||||
concurrency_time_window_s=concurrency_time_window_s,
|
||||
cache_ttl=cache_ttl,
|
||||
dedicated_worker=dedicated_worker,
|
||||
ws_error_handler_muted=ws_error_handler_muted,
|
||||
priority=priority,
|
||||
restart_unless_cancelled=restart_unless_cancelled,
|
||||
timeout=timeout,
|
||||
delete_after_use=delete_after_use,
|
||||
)
|
||||
|
||||
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
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ArchiveScriptByHashResponse200ExtraPerms")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ArchiveScriptByHashResponse200ExtraPerms:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, bool] = _attrs_field(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
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
from enum import Enum
|
||||
|
||||
class ArchiveScriptByHashResponse200Kind(str, Enum):
|
||||
APPROVAL = "approval"
|
||||
COMMAND = "command"
|
||||
FAILURE = "failure"
|
||||
SCRIPT = "script"
|
||||
TRIGGER = "trigger"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
from enum import Enum
|
||||
|
||||
class ArchiveScriptByHashResponse200Language(str, Enum):
|
||||
BASH = "bash"
|
||||
BIGQUERY = "bigquery"
|
||||
BUN = "bun"
|
||||
DENO = "deno"
|
||||
GO = "go"
|
||||
GRAPHQL = "graphql"
|
||||
MSSQL = "mssql"
|
||||
MYSQL = "mysql"
|
||||
NATIVETS = "nativets"
|
||||
POSTGRESQL = "postgresql"
|
||||
POWERSHELL = "powershell"
|
||||
PYTHON3 = "python3"
|
||||
SNOWFLAKE = "snowflake"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="ArchiveScriptByHashResponse200Schema")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class ArchiveScriptByHashResponse200Schema:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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
|
||||
@@ -0,0 +1,149 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
import datetime
|
||||
from ..models.audit_log_operation import AuditLogOperation
|
||||
from dateutil.parser import isoparse
|
||||
from ..types import UNSET, Unset
|
||||
from ..models.audit_log_action_kind import AuditLogActionKind
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.audit_log_parameters import AuditLogParameters
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AuditLog")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
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] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.audit_log_parameters import AuditLogParameters
|
||||
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:
|
||||
from ..models.audit_log_parameters import AuditLogParameters
|
||||
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,10 @@
|
||||
from enum import Enum
|
||||
|
||||
class AuditLogActionKind(str, Enum):
|
||||
CREATED = "Created"
|
||||
DELETE = "Delete"
|
||||
EXECUTE = "Execute"
|
||||
UPDATED = "Updated"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,89 @@
|
||||
from enum import Enum
|
||||
|
||||
class AuditLogOperation(str, Enum):
|
||||
ACCOUNT_DELETE = "account.delete"
|
||||
APPS_CREATE = "apps.create"
|
||||
APPS_DELETE = "apps.delete"
|
||||
APPS_UPDATE = "apps.update"
|
||||
FLOWS_ARCHIVE = "flows.archive"
|
||||
FLOWS_CREATE = "flows.create"
|
||||
FLOWS_DELETE = "flows.delete"
|
||||
FLOWS_UPDATE = "flows.update"
|
||||
FOLDER_ADD_OWNER = "folder.add_owner"
|
||||
FOLDER_CREATE = "folder.create"
|
||||
FOLDER_DELETE = "folder.delete"
|
||||
FOLDER_REMOVE_OWNER = "folder.remove_owner"
|
||||
FOLDER_UPDATE = "folder.update"
|
||||
GROUP_ADDUSER = "group.adduser"
|
||||
GROUP_CREATE = "group.create"
|
||||
GROUP_DELETE = "group.delete"
|
||||
GROUP_EDIT = "group.edit"
|
||||
GROUP_REMOVEUSER = "group.removeuser"
|
||||
IGROUP_ADDUSER = "igroup.adduser"
|
||||
IGROUP_CREATE = "igroup.create"
|
||||
IGROUP_DELETE = "igroup.delete"
|
||||
IGROUP_REMOVEUSER = "igroup.removeuser"
|
||||
JOBS = "jobs"
|
||||
JOBS_CANCEL = "jobs.cancel"
|
||||
JOBS_DELETE = "jobs.delete"
|
||||
JOBS_DISAPPROVAL = "jobs.disapproval"
|
||||
JOBS_FLOW_DEPENDENCIES = "jobs.flow_dependencies"
|
||||
JOBS_FORCE_CANCEL = "jobs.force_cancel"
|
||||
JOBS_RUN = "jobs.run"
|
||||
JOBS_RUN_DEPENDENCIES = "jobs.run.dependencies"
|
||||
JOBS_RUN_FLOW = "jobs.run.flow"
|
||||
JOBS_RUN_FLOW_PREVIEW = "jobs.run.flow_preview"
|
||||
JOBS_RUN_IDENTITY = "jobs.run.identity"
|
||||
JOBS_RUN_NOOP = "jobs.run.noop"
|
||||
JOBS_RUN_PREVIEW = "jobs.run.preview"
|
||||
JOBS_RUN_SCRIPT = "jobs.run.script"
|
||||
JOBS_RUN_SCRIPT_HUB = "jobs.run.script_hub"
|
||||
OAUTH_LOGIN = "oauth.login"
|
||||
OAUTH_SIGNUP = "oauth.signup"
|
||||
OPENAI_REQUEST = "openai.request"
|
||||
RESOURCES_CREATE = "resources.create"
|
||||
RESOURCES_DELETE = "resources.delete"
|
||||
RESOURCES_UPDATE = "resources.update"
|
||||
RESOURCE_TYPES_CREATE = "resource_types.create"
|
||||
RESOURCE_TYPES_DELETE = "resource_types.delete"
|
||||
RESOURCE_TYPES_UPDATE = "resource_types.update"
|
||||
SCHEDULE_CREATE = "schedule.create"
|
||||
SCHEDULE_DELETE = "schedule.delete"
|
||||
SCHEDULE_EDIT = "schedule.edit"
|
||||
SCHEDULE_SETENABLED = "schedule.setenabled"
|
||||
SCRIPTS_ARCHIVE = "scripts.archive"
|
||||
SCRIPTS_CREATE = "scripts.create"
|
||||
SCRIPTS_DELETE = "scripts.delete"
|
||||
SCRIPTS_UPDATE = "scripts.update"
|
||||
USERS_ACCEPT_INVITE = "users.accept_invite"
|
||||
USERS_ADD_GLOBAL = "users.add_global"
|
||||
USERS_ADD_TO_WORKSPACE = "users.add_to_workspace"
|
||||
USERS_CREATE = "users.create"
|
||||
USERS_DECLINE_INVITE = "users.decline_invite"
|
||||
USERS_DELETE = "users.delete"
|
||||
USERS_IMPERSONATE = "users.impersonate"
|
||||
USERS_LEAVE_WORKSPACE = "users.leave_workspace"
|
||||
USERS_LOGIN = "users.login"
|
||||
USERS_LOGOUT = "users.logout"
|
||||
USERS_SETPASSWORD = "users.setpassword"
|
||||
USERS_TOKEN_CREATE = "users.token.create"
|
||||
USERS_TOKEN_DELETE = "users.token.delete"
|
||||
USERS_UPDATE = "users.update"
|
||||
VARIABLES_CREATE = "variables.create"
|
||||
VARIABLES_DECRYPT_SECRET = "variables.decrypt_secret"
|
||||
VARIABLES_DELETE = "variables.delete"
|
||||
VARIABLES_UPDATE = "variables.update"
|
||||
WORKSPACES_ARCHIVE = "workspaces.archive"
|
||||
WORKSPACES_CREATE = "workspaces.create"
|
||||
WORKSPACES_DELETE = "workspaces.delete"
|
||||
WORKSPACES_EDIT_AUTO_INVITE_DOMAIN = "workspaces.edit_auto_invite_domain"
|
||||
WORKSPACES_EDIT_COMMAND_SCRIPT = "workspaces.edit_command_script"
|
||||
WORKSPACES_EDIT_COPILOT_CONFIG = "workspaces.edit_copilot_config"
|
||||
WORKSPACES_EDIT_DEPLOY_TO = "workspaces.edit_deploy_to"
|
||||
WORKSPACES_EDIT_ERROR_HANDLER = "workspaces.edit_error_handler"
|
||||
WORKSPACES_EDIT_WEBHOOK = "workspaces.edit_webhook"
|
||||
WORKSPACES_UNARCHIVE = "workspaces.unarchive"
|
||||
WORKSPACES_UPDATE = "workspaces.update"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,62 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="AuditLogParameters")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class AuditLogParameters:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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,115 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import cast, List
|
||||
from typing import Dict
|
||||
from ..types import UNSET, Unset
|
||||
from ..models.branch_all_type import BranchAllType
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_all_branches_item import BranchAllBranchesItem
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAll")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAll:
|
||||
"""
|
||||
Attributes:
|
||||
branches (List['BranchAllBranchesItem']):
|
||||
type (BranchAllType):
|
||||
parallel (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
branches: List['BranchAllBranchesItem']
|
||||
type: BranchAllType
|
||||
parallel: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_all_branches_item import BranchAllBranchesItem
|
||||
branches = []
|
||||
for branches_item_data in self.branches:
|
||||
branches_item = branches_item_data.to_dict()
|
||||
|
||||
branches.append(branches_item)
|
||||
|
||||
|
||||
|
||||
|
||||
type = self.type.value
|
||||
|
||||
parallel = self.parallel
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"branches": branches,
|
||||
"type": type,
|
||||
})
|
||||
if parallel is not UNSET:
|
||||
field_dict["parallel"] = parallel
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.branch_all_branches_item import BranchAllBranchesItem
|
||||
d = src_dict.copy()
|
||||
branches = []
|
||||
_branches = d.pop("branches")
|
||||
for branches_item_data in (_branches):
|
||||
branches_item = BranchAllBranchesItem.from_dict(branches_item_data)
|
||||
|
||||
|
||||
|
||||
branches.append(branches_item)
|
||||
|
||||
|
||||
type = BranchAllType(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
parallel = d.pop("parallel", UNSET)
|
||||
|
||||
branch_all = cls(
|
||||
branches=branches,
|
||||
type=type,
|
||||
parallel=parallel,
|
||||
)
|
||||
|
||||
branch_all.additional_properties = d
|
||||
return branch_all
|
||||
|
||||
@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,111 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import cast, List
|
||||
from typing import Dict
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_all_branches_item_modules_item import BranchAllBranchesItemModulesItem
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItem")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItem:
|
||||
"""
|
||||
Attributes:
|
||||
modules (List['BranchAllBranchesItemModulesItem']):
|
||||
summary (Union[Unset, str]):
|
||||
skip_failure (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
modules: List['BranchAllBranchesItemModulesItem']
|
||||
summary: Union[Unset, str] = UNSET
|
||||
skip_failure: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_all_branches_item_modules_item import BranchAllBranchesItemModulesItem
|
||||
modules = []
|
||||
for modules_item_data in self.modules:
|
||||
modules_item = modules_item_data.to_dict()
|
||||
|
||||
modules.append(modules_item)
|
||||
|
||||
|
||||
|
||||
|
||||
summary = self.summary
|
||||
skip_failure = self.skip_failure
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"modules": modules,
|
||||
})
|
||||
if summary is not UNSET:
|
||||
field_dict["summary"] = summary
|
||||
if skip_failure is not UNSET:
|
||||
field_dict["skip_failure"] = skip_failure
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.branch_all_branches_item_modules_item import BranchAllBranchesItemModulesItem
|
||||
d = src_dict.copy()
|
||||
modules = []
|
||||
_modules = d.pop("modules")
|
||||
for modules_item_data in (_modules):
|
||||
modules_item = BranchAllBranchesItemModulesItem.from_dict(modules_item_data)
|
||||
|
||||
|
||||
|
||||
modules.append(modules_item)
|
||||
|
||||
|
||||
summary = d.pop("summary", UNSET)
|
||||
|
||||
skip_failure = d.pop("skip_failure", UNSET)
|
||||
|
||||
branch_all_branches_item = cls(
|
||||
modules=modules,
|
||||
summary=summary,
|
||||
skip_failure=skip_failure,
|
||||
)
|
||||
|
||||
branch_all_branches_item.additional_properties = d
|
||||
return branch_all_branches_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
|
||||
+273
@@ -0,0 +1,273 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
from typing import cast, Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_all_branches_item_modules_item_sleep_type_1 import BranchAllBranchesItemModulesItemSleepType1
|
||||
from ..models.branch_all_branches_item_modules_item_stop_after_if import BranchAllBranchesItemModulesItemStopAfterIf
|
||||
from ..models.branch_all_branches_item_modules_item_retry import BranchAllBranchesItemModulesItemRetry
|
||||
from ..models.branch_all_branches_item_modules_item_mock import BranchAllBranchesItemModulesItemMock
|
||||
from ..models.branch_all_branches_item_modules_item_sleep_type_0 import BranchAllBranchesItemModulesItemSleepType0
|
||||
from ..models.branch_all_branches_item_modules_item_suspend import BranchAllBranchesItemModulesItemSuspend
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItem")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItem:
|
||||
"""
|
||||
Attributes:
|
||||
id (str):
|
||||
value (Any):
|
||||
stop_after_if (Union[Unset, BranchAllBranchesItemModulesItemStopAfterIf]):
|
||||
sleep (Union['BranchAllBranchesItemModulesItemSleepType0', 'BranchAllBranchesItemModulesItemSleepType1',
|
||||
Unset]):
|
||||
cache_ttl (Union[Unset, float]):
|
||||
timeout (Union[Unset, float]):
|
||||
delete_after_use (Union[Unset, bool]):
|
||||
summary (Union[Unset, str]):
|
||||
mock (Union[Unset, BranchAllBranchesItemModulesItemMock]):
|
||||
suspend (Union[Unset, BranchAllBranchesItemModulesItemSuspend]):
|
||||
priority (Union[Unset, float]):
|
||||
retry (Union[Unset, BranchAllBranchesItemModulesItemRetry]):
|
||||
"""
|
||||
|
||||
id: str
|
||||
value: Any
|
||||
stop_after_if: Union[Unset, 'BranchAllBranchesItemModulesItemStopAfterIf'] = UNSET
|
||||
sleep: Union['BranchAllBranchesItemModulesItemSleepType0', 'BranchAllBranchesItemModulesItemSleepType1', Unset] = UNSET
|
||||
cache_ttl: Union[Unset, float] = UNSET
|
||||
timeout: Union[Unset, float] = UNSET
|
||||
delete_after_use: Union[Unset, bool] = UNSET
|
||||
summary: Union[Unset, str] = UNSET
|
||||
mock: Union[Unset, 'BranchAllBranchesItemModulesItemMock'] = UNSET
|
||||
suspend: Union[Unset, 'BranchAllBranchesItemModulesItemSuspend'] = UNSET
|
||||
priority: Union[Unset, float] = UNSET
|
||||
retry: Union[Unset, 'BranchAllBranchesItemModulesItemRetry'] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_all_branches_item_modules_item_sleep_type_1 import BranchAllBranchesItemModulesItemSleepType1
|
||||
from ..models.branch_all_branches_item_modules_item_stop_after_if import BranchAllBranchesItemModulesItemStopAfterIf
|
||||
from ..models.branch_all_branches_item_modules_item_retry import BranchAllBranchesItemModulesItemRetry
|
||||
from ..models.branch_all_branches_item_modules_item_mock import BranchAllBranchesItemModulesItemMock
|
||||
from ..models.branch_all_branches_item_modules_item_sleep_type_0 import BranchAllBranchesItemModulesItemSleepType0
|
||||
from ..models.branch_all_branches_item_modules_item_suspend import BranchAllBranchesItemModulesItemSuspend
|
||||
id = self.id
|
||||
value = self.value
|
||||
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, BranchAllBranchesItemModulesItemSleepType0):
|
||||
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()
|
||||
|
||||
|
||||
|
||||
cache_ttl = self.cache_ttl
|
||||
timeout = self.timeout
|
||||
delete_after_use = self.delete_after_use
|
||||
summary = self.summary
|
||||
mock: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.mock, Unset):
|
||||
mock = self.mock.to_dict()
|
||||
|
||||
suspend: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.suspend, Unset):
|
||||
suspend = self.suspend.to_dict()
|
||||
|
||||
priority = self.priority
|
||||
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({
|
||||
"id": id,
|
||||
"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 cache_ttl is not UNSET:
|
||||
field_dict["cache_ttl"] = cache_ttl
|
||||
if timeout is not UNSET:
|
||||
field_dict["timeout"] = timeout
|
||||
if delete_after_use is not UNSET:
|
||||
field_dict["delete_after_use"] = delete_after_use
|
||||
if summary is not UNSET:
|
||||
field_dict["summary"] = summary
|
||||
if mock is not UNSET:
|
||||
field_dict["mock"] = mock
|
||||
if suspend is not UNSET:
|
||||
field_dict["suspend"] = suspend
|
||||
if priority is not UNSET:
|
||||
field_dict["priority"] = priority
|
||||
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:
|
||||
from ..models.branch_all_branches_item_modules_item_sleep_type_1 import BranchAllBranchesItemModulesItemSleepType1
|
||||
from ..models.branch_all_branches_item_modules_item_stop_after_if import BranchAllBranchesItemModulesItemStopAfterIf
|
||||
from ..models.branch_all_branches_item_modules_item_retry import BranchAllBranchesItemModulesItemRetry
|
||||
from ..models.branch_all_branches_item_modules_item_mock import BranchAllBranchesItemModulesItemMock
|
||||
from ..models.branch_all_branches_item_modules_item_sleep_type_0 import BranchAllBranchesItemModulesItemSleepType0
|
||||
from ..models.branch_all_branches_item_modules_item_suspend import BranchAllBranchesItemModulesItemSuspend
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
value = d.pop("value")
|
||||
|
||||
_stop_after_if = d.pop("stop_after_if", UNSET)
|
||||
stop_after_if: Union[Unset, BranchAllBranchesItemModulesItemStopAfterIf]
|
||||
if isinstance(_stop_after_if, Unset):
|
||||
stop_after_if = UNSET
|
||||
else:
|
||||
stop_after_if = BranchAllBranchesItemModulesItemStopAfterIf.from_dict(_stop_after_if)
|
||||
|
||||
|
||||
|
||||
|
||||
def _parse_sleep(data: object) -> Union['BranchAllBranchesItemModulesItemSleepType0', 'BranchAllBranchesItemModulesItemSleepType1', Unset]:
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_sleep_type_0 = data
|
||||
sleep_type_0: Union[Unset, BranchAllBranchesItemModulesItemSleepType0]
|
||||
if isinstance(_sleep_type_0, Unset):
|
||||
sleep_type_0 = UNSET
|
||||
else:
|
||||
sleep_type_0 = BranchAllBranchesItemModulesItemSleepType0.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, BranchAllBranchesItemModulesItemSleepType1]
|
||||
if isinstance(_sleep_type_1, Unset):
|
||||
sleep_type_1 = UNSET
|
||||
else:
|
||||
sleep_type_1 = BranchAllBranchesItemModulesItemSleepType1.from_dict(_sleep_type_1)
|
||||
|
||||
|
||||
|
||||
return sleep_type_1
|
||||
|
||||
sleep = _parse_sleep(d.pop("sleep", UNSET))
|
||||
|
||||
|
||||
cache_ttl = d.pop("cache_ttl", UNSET)
|
||||
|
||||
timeout = d.pop("timeout", UNSET)
|
||||
|
||||
delete_after_use = d.pop("delete_after_use", UNSET)
|
||||
|
||||
summary = d.pop("summary", UNSET)
|
||||
|
||||
_mock = d.pop("mock", UNSET)
|
||||
mock: Union[Unset, BranchAllBranchesItemModulesItemMock]
|
||||
if isinstance(_mock, Unset):
|
||||
mock = UNSET
|
||||
else:
|
||||
mock = BranchAllBranchesItemModulesItemMock.from_dict(_mock)
|
||||
|
||||
|
||||
|
||||
|
||||
_suspend = d.pop("suspend", UNSET)
|
||||
suspend: Union[Unset, BranchAllBranchesItemModulesItemSuspend]
|
||||
if isinstance(_suspend, Unset):
|
||||
suspend = UNSET
|
||||
else:
|
||||
suspend = BranchAllBranchesItemModulesItemSuspend.from_dict(_suspend)
|
||||
|
||||
|
||||
|
||||
|
||||
priority = d.pop("priority", UNSET)
|
||||
|
||||
_retry = d.pop("retry", UNSET)
|
||||
retry: Union[Unset, BranchAllBranchesItemModulesItemRetry]
|
||||
if isinstance(_retry, Unset):
|
||||
retry = UNSET
|
||||
else:
|
||||
retry = BranchAllBranchesItemModulesItemRetry.from_dict(_retry)
|
||||
|
||||
|
||||
|
||||
|
||||
branch_all_branches_item_modules_item = cls(
|
||||
id=id,
|
||||
value=value,
|
||||
stop_after_if=stop_after_if,
|
||||
sleep=sleep,
|
||||
cache_ttl=cache_ttl,
|
||||
timeout=timeout,
|
||||
delete_after_use=delete_after_use,
|
||||
summary=summary,
|
||||
mock=mock,
|
||||
suspend=suspend,
|
||||
priority=priority,
|
||||
retry=retry,
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item.additional_properties = d
|
||||
return branch_all_branches_item_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
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItemMock")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItemMock:
|
||||
"""
|
||||
Attributes:
|
||||
enabled (Union[Unset, bool]):
|
||||
return_value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
enabled: Union[Unset, bool] = UNSET
|
||||
return_value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
enabled = self.enabled
|
||||
return_value = self.return_value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
})
|
||||
if enabled is not UNSET:
|
||||
field_dict["enabled"] = enabled
|
||||
if return_value is not UNSET:
|
||||
field_dict["return_value"] = return_value
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
enabled = d.pop("enabled", UNSET)
|
||||
|
||||
return_value = d.pop("return_value", UNSET)
|
||||
|
||||
branch_all_branches_item_modules_item_mock = cls(
|
||||
enabled=enabled,
|
||||
return_value=return_value,
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item_mock.additional_properties = d
|
||||
return branch_all_branches_item_modules_item_mock
|
||||
|
||||
@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
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from ..types import UNSET, Unset
|
||||
from typing import Dict
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_all_branches_item_modules_item_retry_constant import BranchAllBranchesItemModulesItemRetryConstant
|
||||
from ..models.branch_all_branches_item_modules_item_retry_exponential import BranchAllBranchesItemModulesItemRetryExponential
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItemRetry")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItemRetry:
|
||||
"""
|
||||
Attributes:
|
||||
constant (Union[Unset, BranchAllBranchesItemModulesItemRetryConstant]):
|
||||
exponential (Union[Unset, BranchAllBranchesItemModulesItemRetryExponential]):
|
||||
"""
|
||||
|
||||
constant: Union[Unset, 'BranchAllBranchesItemModulesItemRetryConstant'] = UNSET
|
||||
exponential: Union[Unset, 'BranchAllBranchesItemModulesItemRetryExponential'] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_all_branches_item_modules_item_retry_constant import BranchAllBranchesItemModulesItemRetryConstant
|
||||
from ..models.branch_all_branches_item_modules_item_retry_exponential import BranchAllBranchesItemModulesItemRetryExponential
|
||||
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:
|
||||
from ..models.branch_all_branches_item_modules_item_retry_constant import BranchAllBranchesItemModulesItemRetryConstant
|
||||
from ..models.branch_all_branches_item_modules_item_retry_exponential import BranchAllBranchesItemModulesItemRetryExponential
|
||||
d = src_dict.copy()
|
||||
_constant = d.pop("constant", UNSET)
|
||||
constant: Union[Unset, BranchAllBranchesItemModulesItemRetryConstant]
|
||||
if isinstance(_constant, Unset):
|
||||
constant = UNSET
|
||||
else:
|
||||
constant = BranchAllBranchesItemModulesItemRetryConstant.from_dict(_constant)
|
||||
|
||||
|
||||
|
||||
|
||||
_exponential = d.pop("exponential", UNSET)
|
||||
exponential: Union[Unset, BranchAllBranchesItemModulesItemRetryExponential]
|
||||
if isinstance(_exponential, Unset):
|
||||
exponential = UNSET
|
||||
else:
|
||||
exponential = BranchAllBranchesItemModulesItemRetryExponential.from_dict(_exponential)
|
||||
|
||||
|
||||
|
||||
|
||||
branch_all_branches_item_modules_item_retry = cls(
|
||||
constant=constant,
|
||||
exponential=exponential,
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item_retry.additional_properties = d
|
||||
return branch_all_branches_item_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
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItemRetryConstant")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItemRetryConstant:
|
||||
"""
|
||||
Attributes:
|
||||
attempts (Union[Unset, int]):
|
||||
seconds (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
attempts: Union[Unset, int] = UNSET
|
||||
seconds: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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)
|
||||
|
||||
branch_all_branches_item_modules_item_retry_constant = cls(
|
||||
attempts=attempts,
|
||||
seconds=seconds,
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item_retry_constant.additional_properties = d
|
||||
return branch_all_branches_item_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
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItemRetryExponential")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItemRetryExponential:
|
||||
"""
|
||||
Attributes:
|
||||
attempts (Union[Unset, int]):
|
||||
multiplier (Union[Unset, int]):
|
||||
seconds (Union[Unset, int]):
|
||||
random_factor (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
attempts: Union[Unset, int] = UNSET
|
||||
multiplier: Union[Unset, int] = UNSET
|
||||
seconds: Union[Unset, int] = UNSET
|
||||
random_factor: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
attempts = self.attempts
|
||||
multiplier = self.multiplier
|
||||
seconds = self.seconds
|
||||
random_factor = self.random_factor
|
||||
|
||||
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
|
||||
if random_factor is not UNSET:
|
||||
field_dict["random_factor"] = random_factor
|
||||
|
||||
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)
|
||||
|
||||
random_factor = d.pop("random_factor", UNSET)
|
||||
|
||||
branch_all_branches_item_modules_item_retry_exponential = cls(
|
||||
attempts=attempts,
|
||||
multiplier=multiplier,
|
||||
seconds=seconds,
|
||||
random_factor=random_factor,
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item_retry_exponential.additional_properties = d
|
||||
return branch_all_branches_item_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
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
from ..models.branch_all_branches_item_modules_item_sleep_type_0_type import BranchAllBranchesItemModulesItemSleepType0Type
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItemSleepType0")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItemSleepType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (BranchAllBranchesItemModulesItemSleepType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: BranchAllBranchesItemModulesItemSleepType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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 = BranchAllBranchesItemModulesItemSleepType0Type(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
branch_all_branches_item_modules_item_sleep_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item_sleep_type_0.additional_properties = d
|
||||
return branch_all_branches_item_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
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchAllBranchesItemModulesItemSleepType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from ..models.branch_all_branches_item_modules_item_sleep_type_1_type import BranchAllBranchesItemModulesItemSleepType1Type
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItemSleepType1")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItemSleepType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (BranchAllBranchesItemModulesItemSleepType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: BranchAllBranchesItemModulesItemSleepType1Type
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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 = BranchAllBranchesItemModulesItemSleepType1Type(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
branch_all_branches_item_modules_item_sleep_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item_sleep_type_1.additional_properties = d
|
||||
return branch_all_branches_item_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
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchAllBranchesItemModulesItemSleepType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItemStopAfterIf")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItemStopAfterIf:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
skip_if_stopped (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
skip_if_stopped: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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)
|
||||
|
||||
branch_all_branches_item_modules_item_stop_after_if = cls(
|
||||
expr=expr,
|
||||
skip_if_stopped=skip_if_stopped,
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item_stop_after_if.additional_properties = d
|
||||
return branch_all_branches_item_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
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
from typing import cast, Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_user_groups_required_type_1 import BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_resume_form import BranchAllBranchesItemModulesItemSuspendResumeForm
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_user_groups_required_type_0 import BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItemSuspend")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItemSuspend:
|
||||
"""
|
||||
Attributes:
|
||||
required_events (Union[Unset, int]):
|
||||
timeout (Union[Unset, int]):
|
||||
resume_form (Union[Unset, BranchAllBranchesItemModulesItemSuspendResumeForm]):
|
||||
user_auth_required (Union[Unset, bool]):
|
||||
user_groups_required (Union['BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0',
|
||||
'BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1', Unset]):
|
||||
"""
|
||||
|
||||
required_events: Union[Unset, int] = UNSET
|
||||
timeout: Union[Unset, int] = UNSET
|
||||
resume_form: Union[Unset, 'BranchAllBranchesItemModulesItemSuspendResumeForm'] = UNSET
|
||||
user_auth_required: Union[Unset, bool] = UNSET
|
||||
user_groups_required: Union['BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0', 'BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1', Unset] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_user_groups_required_type_1 import BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_resume_form import BranchAllBranchesItemModulesItemSuspendResumeForm
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_user_groups_required_type_0 import BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0
|
||||
required_events = self.required_events
|
||||
timeout = self.timeout
|
||||
resume_form: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.resume_form, Unset):
|
||||
resume_form = self.resume_form.to_dict()
|
||||
|
||||
user_auth_required = self.user_auth_required
|
||||
user_groups_required: Union[Dict[str, Any], Unset]
|
||||
if isinstance(self.user_groups_required, Unset):
|
||||
user_groups_required = UNSET
|
||||
|
||||
elif isinstance(self.user_groups_required, BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0):
|
||||
user_groups_required = UNSET
|
||||
if not isinstance(self.user_groups_required, Unset):
|
||||
user_groups_required = self.user_groups_required.to_dict()
|
||||
|
||||
else:
|
||||
user_groups_required = UNSET
|
||||
if not isinstance(self.user_groups_required, Unset):
|
||||
user_groups_required = self.user_groups_required.to_dict()
|
||||
|
||||
|
||||
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
})
|
||||
if required_events is not UNSET:
|
||||
field_dict["required_events"] = required_events
|
||||
if timeout is not UNSET:
|
||||
field_dict["timeout"] = timeout
|
||||
if resume_form is not UNSET:
|
||||
field_dict["resume_form"] = resume_form
|
||||
if user_auth_required is not UNSET:
|
||||
field_dict["user_auth_required"] = user_auth_required
|
||||
if user_groups_required is not UNSET:
|
||||
field_dict["user_groups_required"] = user_groups_required
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_user_groups_required_type_1 import BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_resume_form import BranchAllBranchesItemModulesItemSuspendResumeForm
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_user_groups_required_type_0 import BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0
|
||||
d = src_dict.copy()
|
||||
required_events = d.pop("required_events", UNSET)
|
||||
|
||||
timeout = d.pop("timeout", UNSET)
|
||||
|
||||
_resume_form = d.pop("resume_form", UNSET)
|
||||
resume_form: Union[Unset, BranchAllBranchesItemModulesItemSuspendResumeForm]
|
||||
if isinstance(_resume_form, Unset):
|
||||
resume_form = UNSET
|
||||
else:
|
||||
resume_form = BranchAllBranchesItemModulesItemSuspendResumeForm.from_dict(_resume_form)
|
||||
|
||||
|
||||
|
||||
|
||||
user_auth_required = d.pop("user_auth_required", UNSET)
|
||||
|
||||
def _parse_user_groups_required(data: object) -> Union['BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0', 'BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1', Unset]:
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_user_groups_required_type_0 = data
|
||||
user_groups_required_type_0: Union[Unset, BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0]
|
||||
if isinstance(_user_groups_required_type_0, Unset):
|
||||
user_groups_required_type_0 = UNSET
|
||||
else:
|
||||
user_groups_required_type_0 = BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0.from_dict(_user_groups_required_type_0)
|
||||
|
||||
|
||||
|
||||
return user_groups_required_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_user_groups_required_type_1 = data
|
||||
user_groups_required_type_1: Union[Unset, BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1]
|
||||
if isinstance(_user_groups_required_type_1, Unset):
|
||||
user_groups_required_type_1 = UNSET
|
||||
else:
|
||||
user_groups_required_type_1 = BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1.from_dict(_user_groups_required_type_1)
|
||||
|
||||
|
||||
|
||||
return user_groups_required_type_1
|
||||
|
||||
user_groups_required = _parse_user_groups_required(d.pop("user_groups_required", UNSET))
|
||||
|
||||
|
||||
branch_all_branches_item_modules_item_suspend = cls(
|
||||
required_events=required_events,
|
||||
timeout=timeout,
|
||||
resume_form=resume_form,
|
||||
user_auth_required=user_auth_required,
|
||||
user_groups_required=user_groups_required,
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item_suspend.additional_properties = d
|
||||
return branch_all_branches_item_modules_item_suspend
|
||||
|
||||
@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
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from ..types import UNSET, Unset
|
||||
from typing import Dict
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_resume_form_schema import BranchAllBranchesItemModulesItemSuspendResumeFormSchema
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItemSuspendResumeForm")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItemSuspendResumeForm:
|
||||
"""
|
||||
Attributes:
|
||||
schema (Union[Unset, BranchAllBranchesItemModulesItemSuspendResumeFormSchema]):
|
||||
"""
|
||||
|
||||
schema: Union[Unset, 'BranchAllBranchesItemModulesItemSuspendResumeFormSchema'] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_resume_form_schema import BranchAllBranchesItemModulesItemSuspendResumeFormSchema
|
||||
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({
|
||||
})
|
||||
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:
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_resume_form_schema import BranchAllBranchesItemModulesItemSuspendResumeFormSchema
|
||||
d = src_dict.copy()
|
||||
_schema = d.pop("schema", UNSET)
|
||||
schema: Union[Unset, BranchAllBranchesItemModulesItemSuspendResumeFormSchema]
|
||||
if isinstance(_schema, Unset):
|
||||
schema = UNSET
|
||||
else:
|
||||
schema = BranchAllBranchesItemModulesItemSuspendResumeFormSchema.from_dict(_schema)
|
||||
|
||||
|
||||
|
||||
|
||||
branch_all_branches_item_modules_item_suspend_resume_form = cls(
|
||||
schema=schema,
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item_suspend_resume_form.additional_properties = d
|
||||
return branch_all_branches_item_modules_item_suspend_resume_form
|
||||
|
||||
@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
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItemSuspendResumeFormSchema")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItemSuspendResumeFormSchema:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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()
|
||||
branch_all_branches_item_modules_item_suspend_resume_form_schema = cls(
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item_suspend_resume_form_schema.additional_properties = d
|
||||
return branch_all_branches_item_modules_item_suspend_resume_form_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
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_user_groups_required_type_0_type import BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0Type
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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 = BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0Type(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
branch_all_branches_item_modules_item_suspend_user_groups_required_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item_suspend_user_groups_required_type_0.additional_properties = d
|
||||
return branch_all_branches_item_modules_item_suspend_user_groups_required_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
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from ..models.branch_all_branches_item_modules_item_suspend_user_groups_required_type_1_type import BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1Type
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1Type
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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 = BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1Type(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
branch_all_branches_item_modules_item_suspend_user_groups_required_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
branch_all_branches_item_modules_item_suspend_user_groups_required_type_1.additional_properties = d
|
||||
return branch_all_branches_item_modules_item_suspend_user_groups_required_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
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchAllBranchesItemModulesItemSuspendUserGroupsRequiredType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchAllType(str, Enum):
|
||||
BRANCHALL = "branchall"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,131 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from ..models.branch_one_type import BranchOneType
|
||||
from typing import cast
|
||||
from typing import cast, List
|
||||
from typing import Dict
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_one_branches_item import BranchOneBranchesItem
|
||||
from ..models.branch_one_default_item import BranchOneDefaultItem
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOne")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOne:
|
||||
"""
|
||||
Attributes:
|
||||
branches (List['BranchOneBranchesItem']):
|
||||
default (List['BranchOneDefaultItem']):
|
||||
type (BranchOneType):
|
||||
"""
|
||||
|
||||
branches: List['BranchOneBranchesItem']
|
||||
default: List['BranchOneDefaultItem']
|
||||
type: BranchOneType
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_one_branches_item import BranchOneBranchesItem
|
||||
from ..models.branch_one_default_item import BranchOneDefaultItem
|
||||
branches = []
|
||||
for branches_item_data in self.branches:
|
||||
branches_item = branches_item_data.to_dict()
|
||||
|
||||
branches.append(branches_item)
|
||||
|
||||
|
||||
|
||||
|
||||
default = []
|
||||
for default_item_data in self.default:
|
||||
default_item = default_item_data.to_dict()
|
||||
|
||||
default.append(default_item)
|
||||
|
||||
|
||||
|
||||
|
||||
type = self.type.value
|
||||
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"branches": branches,
|
||||
"default": default,
|
||||
"type": type,
|
||||
})
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.branch_one_branches_item import BranchOneBranchesItem
|
||||
from ..models.branch_one_default_item import BranchOneDefaultItem
|
||||
d = src_dict.copy()
|
||||
branches = []
|
||||
_branches = d.pop("branches")
|
||||
for branches_item_data in (_branches):
|
||||
branches_item = BranchOneBranchesItem.from_dict(branches_item_data)
|
||||
|
||||
|
||||
|
||||
branches.append(branches_item)
|
||||
|
||||
|
||||
default = []
|
||||
_default = d.pop("default")
|
||||
for default_item_data in (_default):
|
||||
default_item = BranchOneDefaultItem.from_dict(default_item_data)
|
||||
|
||||
|
||||
|
||||
default.append(default_item)
|
||||
|
||||
|
||||
type = BranchOneType(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
branch_one = cls(
|
||||
branches=branches,
|
||||
default=default,
|
||||
type=type,
|
||||
)
|
||||
|
||||
branch_one.additional_properties = d
|
||||
return branch_one
|
||||
|
||||
@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,110 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import cast, List
|
||||
from typing import Dict
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_one_branches_item_modules_item import BranchOneBranchesItemModulesItem
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItem")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItem:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
modules (List['BranchOneBranchesItemModulesItem']):
|
||||
summary (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
modules: List['BranchOneBranchesItemModulesItem']
|
||||
summary: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_one_branches_item_modules_item import BranchOneBranchesItemModulesItem
|
||||
expr = self.expr
|
||||
modules = []
|
||||
for modules_item_data in self.modules:
|
||||
modules_item = modules_item_data.to_dict()
|
||||
|
||||
modules.append(modules_item)
|
||||
|
||||
|
||||
|
||||
|
||||
summary = self.summary
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"expr": expr,
|
||||
"modules": modules,
|
||||
})
|
||||
if summary is not UNSET:
|
||||
field_dict["summary"] = summary
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.branch_one_branches_item_modules_item import BranchOneBranchesItemModulesItem
|
||||
d = src_dict.copy()
|
||||
expr = d.pop("expr")
|
||||
|
||||
modules = []
|
||||
_modules = d.pop("modules")
|
||||
for modules_item_data in (_modules):
|
||||
modules_item = BranchOneBranchesItemModulesItem.from_dict(modules_item_data)
|
||||
|
||||
|
||||
|
||||
modules.append(modules_item)
|
||||
|
||||
|
||||
summary = d.pop("summary", UNSET)
|
||||
|
||||
branch_one_branches_item = cls(
|
||||
expr=expr,
|
||||
modules=modules,
|
||||
summary=summary,
|
||||
)
|
||||
|
||||
branch_one_branches_item.additional_properties = d
|
||||
return branch_one_branches_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
|
||||
+273
@@ -0,0 +1,273 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
from typing import cast, Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_one_branches_item_modules_item_retry import BranchOneBranchesItemModulesItemRetry
|
||||
from ..models.branch_one_branches_item_modules_item_sleep_type_0 import BranchOneBranchesItemModulesItemSleepType0
|
||||
from ..models.branch_one_branches_item_modules_item_stop_after_if import BranchOneBranchesItemModulesItemStopAfterIf
|
||||
from ..models.branch_one_branches_item_modules_item_suspend import BranchOneBranchesItemModulesItemSuspend
|
||||
from ..models.branch_one_branches_item_modules_item_mock import BranchOneBranchesItemModulesItemMock
|
||||
from ..models.branch_one_branches_item_modules_item_sleep_type_1 import BranchOneBranchesItemModulesItemSleepType1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItem")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItem:
|
||||
"""
|
||||
Attributes:
|
||||
id (str):
|
||||
value (Any):
|
||||
stop_after_if (Union[Unset, BranchOneBranchesItemModulesItemStopAfterIf]):
|
||||
sleep (Union['BranchOneBranchesItemModulesItemSleepType0', 'BranchOneBranchesItemModulesItemSleepType1',
|
||||
Unset]):
|
||||
cache_ttl (Union[Unset, float]):
|
||||
timeout (Union[Unset, float]):
|
||||
delete_after_use (Union[Unset, bool]):
|
||||
summary (Union[Unset, str]):
|
||||
mock (Union[Unset, BranchOneBranchesItemModulesItemMock]):
|
||||
suspend (Union[Unset, BranchOneBranchesItemModulesItemSuspend]):
|
||||
priority (Union[Unset, float]):
|
||||
retry (Union[Unset, BranchOneBranchesItemModulesItemRetry]):
|
||||
"""
|
||||
|
||||
id: str
|
||||
value: Any
|
||||
stop_after_if: Union[Unset, 'BranchOneBranchesItemModulesItemStopAfterIf'] = UNSET
|
||||
sleep: Union['BranchOneBranchesItemModulesItemSleepType0', 'BranchOneBranchesItemModulesItemSleepType1', Unset] = UNSET
|
||||
cache_ttl: Union[Unset, float] = UNSET
|
||||
timeout: Union[Unset, float] = UNSET
|
||||
delete_after_use: Union[Unset, bool] = UNSET
|
||||
summary: Union[Unset, str] = UNSET
|
||||
mock: Union[Unset, 'BranchOneBranchesItemModulesItemMock'] = UNSET
|
||||
suspend: Union[Unset, 'BranchOneBranchesItemModulesItemSuspend'] = UNSET
|
||||
priority: Union[Unset, float] = UNSET
|
||||
retry: Union[Unset, 'BranchOneBranchesItemModulesItemRetry'] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_one_branches_item_modules_item_retry import BranchOneBranchesItemModulesItemRetry
|
||||
from ..models.branch_one_branches_item_modules_item_sleep_type_0 import BranchOneBranchesItemModulesItemSleepType0
|
||||
from ..models.branch_one_branches_item_modules_item_stop_after_if import BranchOneBranchesItemModulesItemStopAfterIf
|
||||
from ..models.branch_one_branches_item_modules_item_suspend import BranchOneBranchesItemModulesItemSuspend
|
||||
from ..models.branch_one_branches_item_modules_item_mock import BranchOneBranchesItemModulesItemMock
|
||||
from ..models.branch_one_branches_item_modules_item_sleep_type_1 import BranchOneBranchesItemModulesItemSleepType1
|
||||
id = self.id
|
||||
value = self.value
|
||||
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, BranchOneBranchesItemModulesItemSleepType0):
|
||||
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()
|
||||
|
||||
|
||||
|
||||
cache_ttl = self.cache_ttl
|
||||
timeout = self.timeout
|
||||
delete_after_use = self.delete_after_use
|
||||
summary = self.summary
|
||||
mock: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.mock, Unset):
|
||||
mock = self.mock.to_dict()
|
||||
|
||||
suspend: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.suspend, Unset):
|
||||
suspend = self.suspend.to_dict()
|
||||
|
||||
priority = self.priority
|
||||
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({
|
||||
"id": id,
|
||||
"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 cache_ttl is not UNSET:
|
||||
field_dict["cache_ttl"] = cache_ttl
|
||||
if timeout is not UNSET:
|
||||
field_dict["timeout"] = timeout
|
||||
if delete_after_use is not UNSET:
|
||||
field_dict["delete_after_use"] = delete_after_use
|
||||
if summary is not UNSET:
|
||||
field_dict["summary"] = summary
|
||||
if mock is not UNSET:
|
||||
field_dict["mock"] = mock
|
||||
if suspend is not UNSET:
|
||||
field_dict["suspend"] = suspend
|
||||
if priority is not UNSET:
|
||||
field_dict["priority"] = priority
|
||||
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:
|
||||
from ..models.branch_one_branches_item_modules_item_retry import BranchOneBranchesItemModulesItemRetry
|
||||
from ..models.branch_one_branches_item_modules_item_sleep_type_0 import BranchOneBranchesItemModulesItemSleepType0
|
||||
from ..models.branch_one_branches_item_modules_item_stop_after_if import BranchOneBranchesItemModulesItemStopAfterIf
|
||||
from ..models.branch_one_branches_item_modules_item_suspend import BranchOneBranchesItemModulesItemSuspend
|
||||
from ..models.branch_one_branches_item_modules_item_mock import BranchOneBranchesItemModulesItemMock
|
||||
from ..models.branch_one_branches_item_modules_item_sleep_type_1 import BranchOneBranchesItemModulesItemSleepType1
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
value = d.pop("value")
|
||||
|
||||
_stop_after_if = d.pop("stop_after_if", UNSET)
|
||||
stop_after_if: Union[Unset, BranchOneBranchesItemModulesItemStopAfterIf]
|
||||
if isinstance(_stop_after_if, Unset):
|
||||
stop_after_if = UNSET
|
||||
else:
|
||||
stop_after_if = BranchOneBranchesItemModulesItemStopAfterIf.from_dict(_stop_after_if)
|
||||
|
||||
|
||||
|
||||
|
||||
def _parse_sleep(data: object) -> Union['BranchOneBranchesItemModulesItemSleepType0', 'BranchOneBranchesItemModulesItemSleepType1', Unset]:
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_sleep_type_0 = data
|
||||
sleep_type_0: Union[Unset, BranchOneBranchesItemModulesItemSleepType0]
|
||||
if isinstance(_sleep_type_0, Unset):
|
||||
sleep_type_0 = UNSET
|
||||
else:
|
||||
sleep_type_0 = BranchOneBranchesItemModulesItemSleepType0.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, BranchOneBranchesItemModulesItemSleepType1]
|
||||
if isinstance(_sleep_type_1, Unset):
|
||||
sleep_type_1 = UNSET
|
||||
else:
|
||||
sleep_type_1 = BranchOneBranchesItemModulesItemSleepType1.from_dict(_sleep_type_1)
|
||||
|
||||
|
||||
|
||||
return sleep_type_1
|
||||
|
||||
sleep = _parse_sleep(d.pop("sleep", UNSET))
|
||||
|
||||
|
||||
cache_ttl = d.pop("cache_ttl", UNSET)
|
||||
|
||||
timeout = d.pop("timeout", UNSET)
|
||||
|
||||
delete_after_use = d.pop("delete_after_use", UNSET)
|
||||
|
||||
summary = d.pop("summary", UNSET)
|
||||
|
||||
_mock = d.pop("mock", UNSET)
|
||||
mock: Union[Unset, BranchOneBranchesItemModulesItemMock]
|
||||
if isinstance(_mock, Unset):
|
||||
mock = UNSET
|
||||
else:
|
||||
mock = BranchOneBranchesItemModulesItemMock.from_dict(_mock)
|
||||
|
||||
|
||||
|
||||
|
||||
_suspend = d.pop("suspend", UNSET)
|
||||
suspend: Union[Unset, BranchOneBranchesItemModulesItemSuspend]
|
||||
if isinstance(_suspend, Unset):
|
||||
suspend = UNSET
|
||||
else:
|
||||
suspend = BranchOneBranchesItemModulesItemSuspend.from_dict(_suspend)
|
||||
|
||||
|
||||
|
||||
|
||||
priority = d.pop("priority", UNSET)
|
||||
|
||||
_retry = d.pop("retry", UNSET)
|
||||
retry: Union[Unset, BranchOneBranchesItemModulesItemRetry]
|
||||
if isinstance(_retry, Unset):
|
||||
retry = UNSET
|
||||
else:
|
||||
retry = BranchOneBranchesItemModulesItemRetry.from_dict(_retry)
|
||||
|
||||
|
||||
|
||||
|
||||
branch_one_branches_item_modules_item = cls(
|
||||
id=id,
|
||||
value=value,
|
||||
stop_after_if=stop_after_if,
|
||||
sleep=sleep,
|
||||
cache_ttl=cache_ttl,
|
||||
timeout=timeout,
|
||||
delete_after_use=delete_after_use,
|
||||
summary=summary,
|
||||
mock=mock,
|
||||
suspend=suspend,
|
||||
priority=priority,
|
||||
retry=retry,
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item.additional_properties = d
|
||||
return branch_one_branches_item_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
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItemMock")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItemMock:
|
||||
"""
|
||||
Attributes:
|
||||
enabled (Union[Unset, bool]):
|
||||
return_value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
enabled: Union[Unset, bool] = UNSET
|
||||
return_value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
enabled = self.enabled
|
||||
return_value = self.return_value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
})
|
||||
if enabled is not UNSET:
|
||||
field_dict["enabled"] = enabled
|
||||
if return_value is not UNSET:
|
||||
field_dict["return_value"] = return_value
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
enabled = d.pop("enabled", UNSET)
|
||||
|
||||
return_value = d.pop("return_value", UNSET)
|
||||
|
||||
branch_one_branches_item_modules_item_mock = cls(
|
||||
enabled=enabled,
|
||||
return_value=return_value,
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item_mock.additional_properties = d
|
||||
return branch_one_branches_item_modules_item_mock
|
||||
|
||||
@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
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from ..types import UNSET, Unset
|
||||
from typing import Dict
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_one_branches_item_modules_item_retry_constant import BranchOneBranchesItemModulesItemRetryConstant
|
||||
from ..models.branch_one_branches_item_modules_item_retry_exponential import BranchOneBranchesItemModulesItemRetryExponential
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItemRetry")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItemRetry:
|
||||
"""
|
||||
Attributes:
|
||||
constant (Union[Unset, BranchOneBranchesItemModulesItemRetryConstant]):
|
||||
exponential (Union[Unset, BranchOneBranchesItemModulesItemRetryExponential]):
|
||||
"""
|
||||
|
||||
constant: Union[Unset, 'BranchOneBranchesItemModulesItemRetryConstant'] = UNSET
|
||||
exponential: Union[Unset, 'BranchOneBranchesItemModulesItemRetryExponential'] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_one_branches_item_modules_item_retry_constant import BranchOneBranchesItemModulesItemRetryConstant
|
||||
from ..models.branch_one_branches_item_modules_item_retry_exponential import BranchOneBranchesItemModulesItemRetryExponential
|
||||
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:
|
||||
from ..models.branch_one_branches_item_modules_item_retry_constant import BranchOneBranchesItemModulesItemRetryConstant
|
||||
from ..models.branch_one_branches_item_modules_item_retry_exponential import BranchOneBranchesItemModulesItemRetryExponential
|
||||
d = src_dict.copy()
|
||||
_constant = d.pop("constant", UNSET)
|
||||
constant: Union[Unset, BranchOneBranchesItemModulesItemRetryConstant]
|
||||
if isinstance(_constant, Unset):
|
||||
constant = UNSET
|
||||
else:
|
||||
constant = BranchOneBranchesItemModulesItemRetryConstant.from_dict(_constant)
|
||||
|
||||
|
||||
|
||||
|
||||
_exponential = d.pop("exponential", UNSET)
|
||||
exponential: Union[Unset, BranchOneBranchesItemModulesItemRetryExponential]
|
||||
if isinstance(_exponential, Unset):
|
||||
exponential = UNSET
|
||||
else:
|
||||
exponential = BranchOneBranchesItemModulesItemRetryExponential.from_dict(_exponential)
|
||||
|
||||
|
||||
|
||||
|
||||
branch_one_branches_item_modules_item_retry = cls(
|
||||
constant=constant,
|
||||
exponential=exponential,
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item_retry.additional_properties = d
|
||||
return branch_one_branches_item_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
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItemRetryConstant")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItemRetryConstant:
|
||||
"""
|
||||
Attributes:
|
||||
attempts (Union[Unset, int]):
|
||||
seconds (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
attempts: Union[Unset, int] = UNSET
|
||||
seconds: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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)
|
||||
|
||||
branch_one_branches_item_modules_item_retry_constant = cls(
|
||||
attempts=attempts,
|
||||
seconds=seconds,
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item_retry_constant.additional_properties = d
|
||||
return branch_one_branches_item_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
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItemRetryExponential")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItemRetryExponential:
|
||||
"""
|
||||
Attributes:
|
||||
attempts (Union[Unset, int]):
|
||||
multiplier (Union[Unset, int]):
|
||||
seconds (Union[Unset, int]):
|
||||
random_factor (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
attempts: Union[Unset, int] = UNSET
|
||||
multiplier: Union[Unset, int] = UNSET
|
||||
seconds: Union[Unset, int] = UNSET
|
||||
random_factor: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
attempts = self.attempts
|
||||
multiplier = self.multiplier
|
||||
seconds = self.seconds
|
||||
random_factor = self.random_factor
|
||||
|
||||
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
|
||||
if random_factor is not UNSET:
|
||||
field_dict["random_factor"] = random_factor
|
||||
|
||||
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)
|
||||
|
||||
random_factor = d.pop("random_factor", UNSET)
|
||||
|
||||
branch_one_branches_item_modules_item_retry_exponential = cls(
|
||||
attempts=attempts,
|
||||
multiplier=multiplier,
|
||||
seconds=seconds,
|
||||
random_factor=random_factor,
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item_retry_exponential.additional_properties = d
|
||||
return branch_one_branches_item_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
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
from ..models.branch_one_branches_item_modules_item_sleep_type_0_type import BranchOneBranchesItemModulesItemSleepType0Type
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItemSleepType0")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItemSleepType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (BranchOneBranchesItemModulesItemSleepType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: BranchOneBranchesItemModulesItemSleepType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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 = BranchOneBranchesItemModulesItemSleepType0Type(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
branch_one_branches_item_modules_item_sleep_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item_sleep_type_0.additional_properties = d
|
||||
return branch_one_branches_item_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
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchOneBranchesItemModulesItemSleepType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from ..models.branch_one_branches_item_modules_item_sleep_type_1_type import BranchOneBranchesItemModulesItemSleepType1Type
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItemSleepType1")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItemSleepType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (BranchOneBranchesItemModulesItemSleepType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: BranchOneBranchesItemModulesItemSleepType1Type
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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 = BranchOneBranchesItemModulesItemSleepType1Type(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
branch_one_branches_item_modules_item_sleep_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item_sleep_type_1.additional_properties = d
|
||||
return branch_one_branches_item_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
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchOneBranchesItemModulesItemSleepType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItemStopAfterIf")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItemStopAfterIf:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
skip_if_stopped (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
skip_if_stopped: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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)
|
||||
|
||||
branch_one_branches_item_modules_item_stop_after_if = cls(
|
||||
expr=expr,
|
||||
skip_if_stopped=skip_if_stopped,
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item_stop_after_if.additional_properties = d
|
||||
return branch_one_branches_item_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
|
||||
+177
@@ -0,0 +1,177 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
from typing import cast, Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_resume_form import BranchOneBranchesItemModulesItemSuspendResumeForm
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_user_groups_required_type_0 import BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_user_groups_required_type_1 import BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItemSuspend")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItemSuspend:
|
||||
"""
|
||||
Attributes:
|
||||
required_events (Union[Unset, int]):
|
||||
timeout (Union[Unset, int]):
|
||||
resume_form (Union[Unset, BranchOneBranchesItemModulesItemSuspendResumeForm]):
|
||||
user_auth_required (Union[Unset, bool]):
|
||||
user_groups_required (Union['BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0',
|
||||
'BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1', Unset]):
|
||||
"""
|
||||
|
||||
required_events: Union[Unset, int] = UNSET
|
||||
timeout: Union[Unset, int] = UNSET
|
||||
resume_form: Union[Unset, 'BranchOneBranchesItemModulesItemSuspendResumeForm'] = UNSET
|
||||
user_auth_required: Union[Unset, bool] = UNSET
|
||||
user_groups_required: Union['BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0', 'BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1', Unset] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_resume_form import BranchOneBranchesItemModulesItemSuspendResumeForm
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_user_groups_required_type_0 import BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_user_groups_required_type_1 import BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1
|
||||
required_events = self.required_events
|
||||
timeout = self.timeout
|
||||
resume_form: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.resume_form, Unset):
|
||||
resume_form = self.resume_form.to_dict()
|
||||
|
||||
user_auth_required = self.user_auth_required
|
||||
user_groups_required: Union[Dict[str, Any], Unset]
|
||||
if isinstance(self.user_groups_required, Unset):
|
||||
user_groups_required = UNSET
|
||||
|
||||
elif isinstance(self.user_groups_required, BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0):
|
||||
user_groups_required = UNSET
|
||||
if not isinstance(self.user_groups_required, Unset):
|
||||
user_groups_required = self.user_groups_required.to_dict()
|
||||
|
||||
else:
|
||||
user_groups_required = UNSET
|
||||
if not isinstance(self.user_groups_required, Unset):
|
||||
user_groups_required = self.user_groups_required.to_dict()
|
||||
|
||||
|
||||
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
})
|
||||
if required_events is not UNSET:
|
||||
field_dict["required_events"] = required_events
|
||||
if timeout is not UNSET:
|
||||
field_dict["timeout"] = timeout
|
||||
if resume_form is not UNSET:
|
||||
field_dict["resume_form"] = resume_form
|
||||
if user_auth_required is not UNSET:
|
||||
field_dict["user_auth_required"] = user_auth_required
|
||||
if user_groups_required is not UNSET:
|
||||
field_dict["user_groups_required"] = user_groups_required
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_resume_form import BranchOneBranchesItemModulesItemSuspendResumeForm
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_user_groups_required_type_0 import BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_user_groups_required_type_1 import BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1
|
||||
d = src_dict.copy()
|
||||
required_events = d.pop("required_events", UNSET)
|
||||
|
||||
timeout = d.pop("timeout", UNSET)
|
||||
|
||||
_resume_form = d.pop("resume_form", UNSET)
|
||||
resume_form: Union[Unset, BranchOneBranchesItemModulesItemSuspendResumeForm]
|
||||
if isinstance(_resume_form, Unset):
|
||||
resume_form = UNSET
|
||||
else:
|
||||
resume_form = BranchOneBranchesItemModulesItemSuspendResumeForm.from_dict(_resume_form)
|
||||
|
||||
|
||||
|
||||
|
||||
user_auth_required = d.pop("user_auth_required", UNSET)
|
||||
|
||||
def _parse_user_groups_required(data: object) -> Union['BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0', 'BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1', Unset]:
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_user_groups_required_type_0 = data
|
||||
user_groups_required_type_0: Union[Unset, BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0]
|
||||
if isinstance(_user_groups_required_type_0, Unset):
|
||||
user_groups_required_type_0 = UNSET
|
||||
else:
|
||||
user_groups_required_type_0 = BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0.from_dict(_user_groups_required_type_0)
|
||||
|
||||
|
||||
|
||||
return user_groups_required_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_user_groups_required_type_1 = data
|
||||
user_groups_required_type_1: Union[Unset, BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1]
|
||||
if isinstance(_user_groups_required_type_1, Unset):
|
||||
user_groups_required_type_1 = UNSET
|
||||
else:
|
||||
user_groups_required_type_1 = BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1.from_dict(_user_groups_required_type_1)
|
||||
|
||||
|
||||
|
||||
return user_groups_required_type_1
|
||||
|
||||
user_groups_required = _parse_user_groups_required(d.pop("user_groups_required", UNSET))
|
||||
|
||||
|
||||
branch_one_branches_item_modules_item_suspend = cls(
|
||||
required_events=required_events,
|
||||
timeout=timeout,
|
||||
resume_form=resume_form,
|
||||
user_auth_required=user_auth_required,
|
||||
user_groups_required=user_groups_required,
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item_suspend.additional_properties = d
|
||||
return branch_one_branches_item_modules_item_suspend
|
||||
|
||||
@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
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from ..types import UNSET, Unset
|
||||
from typing import Dict
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_resume_form_schema import BranchOneBranchesItemModulesItemSuspendResumeFormSchema
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItemSuspendResumeForm")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItemSuspendResumeForm:
|
||||
"""
|
||||
Attributes:
|
||||
schema (Union[Unset, BranchOneBranchesItemModulesItemSuspendResumeFormSchema]):
|
||||
"""
|
||||
|
||||
schema: Union[Unset, 'BranchOneBranchesItemModulesItemSuspendResumeFormSchema'] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_resume_form_schema import BranchOneBranchesItemModulesItemSuspendResumeFormSchema
|
||||
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({
|
||||
})
|
||||
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:
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_resume_form_schema import BranchOneBranchesItemModulesItemSuspendResumeFormSchema
|
||||
d = src_dict.copy()
|
||||
_schema = d.pop("schema", UNSET)
|
||||
schema: Union[Unset, BranchOneBranchesItemModulesItemSuspendResumeFormSchema]
|
||||
if isinstance(_schema, Unset):
|
||||
schema = UNSET
|
||||
else:
|
||||
schema = BranchOneBranchesItemModulesItemSuspendResumeFormSchema.from_dict(_schema)
|
||||
|
||||
|
||||
|
||||
|
||||
branch_one_branches_item_modules_item_suspend_resume_form = cls(
|
||||
schema=schema,
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item_suspend_resume_form.additional_properties = d
|
||||
return branch_one_branches_item_modules_item_suspend_resume_form
|
||||
|
||||
@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
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItemSuspendResumeFormSchema")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItemSuspendResumeFormSchema:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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()
|
||||
branch_one_branches_item_modules_item_suspend_resume_form_schema = cls(
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item_suspend_resume_form_schema.additional_properties = d
|
||||
return branch_one_branches_item_modules_item_suspend_resume_form_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
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_user_groups_required_type_0_type import BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0Type
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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 = BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0Type(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
branch_one_branches_item_modules_item_suspend_user_groups_required_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item_suspend_user_groups_required_type_0.additional_properties = d
|
||||
return branch_one_branches_item_modules_item_suspend_user_groups_required_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
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from ..models.branch_one_branches_item_modules_item_suspend_user_groups_required_type_1_type import BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1Type
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1Type
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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 = BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1Type(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
branch_one_branches_item_modules_item_suspend_user_groups_required_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
branch_one_branches_item_modules_item_suspend_user_groups_required_type_1.additional_properties = d
|
||||
return branch_one_branches_item_modules_item_suspend_user_groups_required_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
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchOneBranchesItemModulesItemSuspendUserGroupsRequiredType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,272 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
from typing import cast, Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_one_default_item_retry import BranchOneDefaultItemRetry
|
||||
from ..models.branch_one_default_item_mock import BranchOneDefaultItemMock
|
||||
from ..models.branch_one_default_item_suspend import BranchOneDefaultItemSuspend
|
||||
from ..models.branch_one_default_item_stop_after_if import BranchOneDefaultItemStopAfterIf
|
||||
from ..models.branch_one_default_item_sleep_type_1 import BranchOneDefaultItemSleepType1
|
||||
from ..models.branch_one_default_item_sleep_type_0 import BranchOneDefaultItemSleepType0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItem")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItem:
|
||||
"""
|
||||
Attributes:
|
||||
id (str):
|
||||
value (Any):
|
||||
stop_after_if (Union[Unset, BranchOneDefaultItemStopAfterIf]):
|
||||
sleep (Union['BranchOneDefaultItemSleepType0', 'BranchOneDefaultItemSleepType1', Unset]):
|
||||
cache_ttl (Union[Unset, float]):
|
||||
timeout (Union[Unset, float]):
|
||||
delete_after_use (Union[Unset, bool]):
|
||||
summary (Union[Unset, str]):
|
||||
mock (Union[Unset, BranchOneDefaultItemMock]):
|
||||
suspend (Union[Unset, BranchOneDefaultItemSuspend]):
|
||||
priority (Union[Unset, float]):
|
||||
retry (Union[Unset, BranchOneDefaultItemRetry]):
|
||||
"""
|
||||
|
||||
id: str
|
||||
value: Any
|
||||
stop_after_if: Union[Unset, 'BranchOneDefaultItemStopAfterIf'] = UNSET
|
||||
sleep: Union['BranchOneDefaultItemSleepType0', 'BranchOneDefaultItemSleepType1', Unset] = UNSET
|
||||
cache_ttl: Union[Unset, float] = UNSET
|
||||
timeout: Union[Unset, float] = UNSET
|
||||
delete_after_use: Union[Unset, bool] = UNSET
|
||||
summary: Union[Unset, str] = UNSET
|
||||
mock: Union[Unset, 'BranchOneDefaultItemMock'] = UNSET
|
||||
suspend: Union[Unset, 'BranchOneDefaultItemSuspend'] = UNSET
|
||||
priority: Union[Unset, float] = UNSET
|
||||
retry: Union[Unset, 'BranchOneDefaultItemRetry'] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_one_default_item_retry import BranchOneDefaultItemRetry
|
||||
from ..models.branch_one_default_item_mock import BranchOneDefaultItemMock
|
||||
from ..models.branch_one_default_item_suspend import BranchOneDefaultItemSuspend
|
||||
from ..models.branch_one_default_item_stop_after_if import BranchOneDefaultItemStopAfterIf
|
||||
from ..models.branch_one_default_item_sleep_type_1 import BranchOneDefaultItemSleepType1
|
||||
from ..models.branch_one_default_item_sleep_type_0 import BranchOneDefaultItemSleepType0
|
||||
id = self.id
|
||||
value = self.value
|
||||
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, BranchOneDefaultItemSleepType0):
|
||||
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()
|
||||
|
||||
|
||||
|
||||
cache_ttl = self.cache_ttl
|
||||
timeout = self.timeout
|
||||
delete_after_use = self.delete_after_use
|
||||
summary = self.summary
|
||||
mock: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.mock, Unset):
|
||||
mock = self.mock.to_dict()
|
||||
|
||||
suspend: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.suspend, Unset):
|
||||
suspend = self.suspend.to_dict()
|
||||
|
||||
priority = self.priority
|
||||
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({
|
||||
"id": id,
|
||||
"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 cache_ttl is not UNSET:
|
||||
field_dict["cache_ttl"] = cache_ttl
|
||||
if timeout is not UNSET:
|
||||
field_dict["timeout"] = timeout
|
||||
if delete_after_use is not UNSET:
|
||||
field_dict["delete_after_use"] = delete_after_use
|
||||
if summary is not UNSET:
|
||||
field_dict["summary"] = summary
|
||||
if mock is not UNSET:
|
||||
field_dict["mock"] = mock
|
||||
if suspend is not UNSET:
|
||||
field_dict["suspend"] = suspend
|
||||
if priority is not UNSET:
|
||||
field_dict["priority"] = priority
|
||||
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:
|
||||
from ..models.branch_one_default_item_retry import BranchOneDefaultItemRetry
|
||||
from ..models.branch_one_default_item_mock import BranchOneDefaultItemMock
|
||||
from ..models.branch_one_default_item_suspend import BranchOneDefaultItemSuspend
|
||||
from ..models.branch_one_default_item_stop_after_if import BranchOneDefaultItemStopAfterIf
|
||||
from ..models.branch_one_default_item_sleep_type_1 import BranchOneDefaultItemSleepType1
|
||||
from ..models.branch_one_default_item_sleep_type_0 import BranchOneDefaultItemSleepType0
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
value = d.pop("value")
|
||||
|
||||
_stop_after_if = d.pop("stop_after_if", UNSET)
|
||||
stop_after_if: Union[Unset, BranchOneDefaultItemStopAfterIf]
|
||||
if isinstance(_stop_after_if, Unset):
|
||||
stop_after_if = UNSET
|
||||
else:
|
||||
stop_after_if = BranchOneDefaultItemStopAfterIf.from_dict(_stop_after_if)
|
||||
|
||||
|
||||
|
||||
|
||||
def _parse_sleep(data: object) -> Union['BranchOneDefaultItemSleepType0', 'BranchOneDefaultItemSleepType1', Unset]:
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_sleep_type_0 = data
|
||||
sleep_type_0: Union[Unset, BranchOneDefaultItemSleepType0]
|
||||
if isinstance(_sleep_type_0, Unset):
|
||||
sleep_type_0 = UNSET
|
||||
else:
|
||||
sleep_type_0 = BranchOneDefaultItemSleepType0.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, BranchOneDefaultItemSleepType1]
|
||||
if isinstance(_sleep_type_1, Unset):
|
||||
sleep_type_1 = UNSET
|
||||
else:
|
||||
sleep_type_1 = BranchOneDefaultItemSleepType1.from_dict(_sleep_type_1)
|
||||
|
||||
|
||||
|
||||
return sleep_type_1
|
||||
|
||||
sleep = _parse_sleep(d.pop("sleep", UNSET))
|
||||
|
||||
|
||||
cache_ttl = d.pop("cache_ttl", UNSET)
|
||||
|
||||
timeout = d.pop("timeout", UNSET)
|
||||
|
||||
delete_after_use = d.pop("delete_after_use", UNSET)
|
||||
|
||||
summary = d.pop("summary", UNSET)
|
||||
|
||||
_mock = d.pop("mock", UNSET)
|
||||
mock: Union[Unset, BranchOneDefaultItemMock]
|
||||
if isinstance(_mock, Unset):
|
||||
mock = UNSET
|
||||
else:
|
||||
mock = BranchOneDefaultItemMock.from_dict(_mock)
|
||||
|
||||
|
||||
|
||||
|
||||
_suspend = d.pop("suspend", UNSET)
|
||||
suspend: Union[Unset, BranchOneDefaultItemSuspend]
|
||||
if isinstance(_suspend, Unset):
|
||||
suspend = UNSET
|
||||
else:
|
||||
suspend = BranchOneDefaultItemSuspend.from_dict(_suspend)
|
||||
|
||||
|
||||
|
||||
|
||||
priority = d.pop("priority", UNSET)
|
||||
|
||||
_retry = d.pop("retry", UNSET)
|
||||
retry: Union[Unset, BranchOneDefaultItemRetry]
|
||||
if isinstance(_retry, Unset):
|
||||
retry = UNSET
|
||||
else:
|
||||
retry = BranchOneDefaultItemRetry.from_dict(_retry)
|
||||
|
||||
|
||||
|
||||
|
||||
branch_one_default_item = cls(
|
||||
id=id,
|
||||
value=value,
|
||||
stop_after_if=stop_after_if,
|
||||
sleep=sleep,
|
||||
cache_ttl=cache_ttl,
|
||||
timeout=timeout,
|
||||
delete_after_use=delete_after_use,
|
||||
summary=summary,
|
||||
mock=mock,
|
||||
suspend=suspend,
|
||||
priority=priority,
|
||||
retry=retry,
|
||||
)
|
||||
|
||||
branch_one_default_item.additional_properties = d
|
||||
return branch_one_default_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,81 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItemMock")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItemMock:
|
||||
"""
|
||||
Attributes:
|
||||
enabled (Union[Unset, bool]):
|
||||
return_value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
enabled: Union[Unset, bool] = UNSET
|
||||
return_value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
enabled = self.enabled
|
||||
return_value = self.return_value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
})
|
||||
if enabled is not UNSET:
|
||||
field_dict["enabled"] = enabled
|
||||
if return_value is not UNSET:
|
||||
field_dict["return_value"] = return_value
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
enabled = d.pop("enabled", UNSET)
|
||||
|
||||
return_value = d.pop("return_value", UNSET)
|
||||
|
||||
branch_one_default_item_mock = cls(
|
||||
enabled=enabled,
|
||||
return_value=return_value,
|
||||
)
|
||||
|
||||
branch_one_default_item_mock.additional_properties = d
|
||||
return branch_one_default_item_mock
|
||||
|
||||
@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,112 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from ..types import UNSET, Unset
|
||||
from typing import Dict
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_one_default_item_retry_constant import BranchOneDefaultItemRetryConstant
|
||||
from ..models.branch_one_default_item_retry_exponential import BranchOneDefaultItemRetryExponential
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItemRetry")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItemRetry:
|
||||
"""
|
||||
Attributes:
|
||||
constant (Union[Unset, BranchOneDefaultItemRetryConstant]):
|
||||
exponential (Union[Unset, BranchOneDefaultItemRetryExponential]):
|
||||
"""
|
||||
|
||||
constant: Union[Unset, 'BranchOneDefaultItemRetryConstant'] = UNSET
|
||||
exponential: Union[Unset, 'BranchOneDefaultItemRetryExponential'] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_one_default_item_retry_constant import BranchOneDefaultItemRetryConstant
|
||||
from ..models.branch_one_default_item_retry_exponential import BranchOneDefaultItemRetryExponential
|
||||
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:
|
||||
from ..models.branch_one_default_item_retry_constant import BranchOneDefaultItemRetryConstant
|
||||
from ..models.branch_one_default_item_retry_exponential import BranchOneDefaultItemRetryExponential
|
||||
d = src_dict.copy()
|
||||
_constant = d.pop("constant", UNSET)
|
||||
constant: Union[Unset, BranchOneDefaultItemRetryConstant]
|
||||
if isinstance(_constant, Unset):
|
||||
constant = UNSET
|
||||
else:
|
||||
constant = BranchOneDefaultItemRetryConstant.from_dict(_constant)
|
||||
|
||||
|
||||
|
||||
|
||||
_exponential = d.pop("exponential", UNSET)
|
||||
exponential: Union[Unset, BranchOneDefaultItemRetryExponential]
|
||||
if isinstance(_exponential, Unset):
|
||||
exponential = UNSET
|
||||
else:
|
||||
exponential = BranchOneDefaultItemRetryExponential.from_dict(_exponential)
|
||||
|
||||
|
||||
|
||||
|
||||
branch_one_default_item_retry = cls(
|
||||
constant=constant,
|
||||
exponential=exponential,
|
||||
)
|
||||
|
||||
branch_one_default_item_retry.additional_properties = d
|
||||
return branch_one_default_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
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItemRetryConstant")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItemRetryConstant:
|
||||
"""
|
||||
Attributes:
|
||||
attempts (Union[Unset, int]):
|
||||
seconds (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
attempts: Union[Unset, int] = UNSET
|
||||
seconds: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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)
|
||||
|
||||
branch_one_default_item_retry_constant = cls(
|
||||
attempts=attempts,
|
||||
seconds=seconds,
|
||||
)
|
||||
|
||||
branch_one_default_item_retry_constant.additional_properties = d
|
||||
return branch_one_default_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
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItemRetryExponential")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItemRetryExponential:
|
||||
"""
|
||||
Attributes:
|
||||
attempts (Union[Unset, int]):
|
||||
multiplier (Union[Unset, int]):
|
||||
seconds (Union[Unset, int]):
|
||||
random_factor (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
attempts: Union[Unset, int] = UNSET
|
||||
multiplier: Union[Unset, int] = UNSET
|
||||
seconds: Union[Unset, int] = UNSET
|
||||
random_factor: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
attempts = self.attempts
|
||||
multiplier = self.multiplier
|
||||
seconds = self.seconds
|
||||
random_factor = self.random_factor
|
||||
|
||||
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
|
||||
if random_factor is not UNSET:
|
||||
field_dict["random_factor"] = random_factor
|
||||
|
||||
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)
|
||||
|
||||
random_factor = d.pop("random_factor", UNSET)
|
||||
|
||||
branch_one_default_item_retry_exponential = cls(
|
||||
attempts=attempts,
|
||||
multiplier=multiplier,
|
||||
seconds=seconds,
|
||||
random_factor=random_factor,
|
||||
)
|
||||
|
||||
branch_one_default_item_retry_exponential.additional_properties = d
|
||||
return branch_one_default_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
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..models.branch_one_default_item_sleep_type_0_type import BranchOneDefaultItemSleepType0Type
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItemSleepType0")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItemSleepType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (BranchOneDefaultItemSleepType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: BranchOneDefaultItemSleepType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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 = BranchOneDefaultItemSleepType0Type(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
branch_one_default_item_sleep_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
branch_one_default_item_sleep_type_0.additional_properties = d
|
||||
return branch_one_default_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
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchOneDefaultItemSleepType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from ..models.branch_one_default_item_sleep_type_1_type import BranchOneDefaultItemSleepType1Type
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItemSleepType1")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItemSleepType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (BranchOneDefaultItemSleepType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: BranchOneDefaultItemSleepType1Type
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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 = BranchOneDefaultItemSleepType1Type(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
branch_one_default_item_sleep_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
branch_one_default_item_sleep_type_1.additional_properties = d
|
||||
return branch_one_default_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
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchOneDefaultItemSleepType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItemStopAfterIf")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItemStopAfterIf:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
skip_if_stopped (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
skip_if_stopped: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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)
|
||||
|
||||
branch_one_default_item_stop_after_if = cls(
|
||||
expr=expr,
|
||||
skip_if_stopped=skip_if_stopped,
|
||||
)
|
||||
|
||||
branch_one_default_item_stop_after_if.additional_properties = d
|
||||
return branch_one_default_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,177 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import Dict
|
||||
from typing import cast, Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_one_default_item_suspend_user_groups_required_type_0 import BranchOneDefaultItemSuspendUserGroupsRequiredType0
|
||||
from ..models.branch_one_default_item_suspend_resume_form import BranchOneDefaultItemSuspendResumeForm
|
||||
from ..models.branch_one_default_item_suspend_user_groups_required_type_1 import BranchOneDefaultItemSuspendUserGroupsRequiredType1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItemSuspend")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItemSuspend:
|
||||
"""
|
||||
Attributes:
|
||||
required_events (Union[Unset, int]):
|
||||
timeout (Union[Unset, int]):
|
||||
resume_form (Union[Unset, BranchOneDefaultItemSuspendResumeForm]):
|
||||
user_auth_required (Union[Unset, bool]):
|
||||
user_groups_required (Union['BranchOneDefaultItemSuspendUserGroupsRequiredType0',
|
||||
'BranchOneDefaultItemSuspendUserGroupsRequiredType1', Unset]):
|
||||
"""
|
||||
|
||||
required_events: Union[Unset, int] = UNSET
|
||||
timeout: Union[Unset, int] = UNSET
|
||||
resume_form: Union[Unset, 'BranchOneDefaultItemSuspendResumeForm'] = UNSET
|
||||
user_auth_required: Union[Unset, bool] = UNSET
|
||||
user_groups_required: Union['BranchOneDefaultItemSuspendUserGroupsRequiredType0', 'BranchOneDefaultItemSuspendUserGroupsRequiredType1', Unset] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_one_default_item_suspend_user_groups_required_type_0 import BranchOneDefaultItemSuspendUserGroupsRequiredType0
|
||||
from ..models.branch_one_default_item_suspend_resume_form import BranchOneDefaultItemSuspendResumeForm
|
||||
from ..models.branch_one_default_item_suspend_user_groups_required_type_1 import BranchOneDefaultItemSuspendUserGroupsRequiredType1
|
||||
required_events = self.required_events
|
||||
timeout = self.timeout
|
||||
resume_form: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.resume_form, Unset):
|
||||
resume_form = self.resume_form.to_dict()
|
||||
|
||||
user_auth_required = self.user_auth_required
|
||||
user_groups_required: Union[Dict[str, Any], Unset]
|
||||
if isinstance(self.user_groups_required, Unset):
|
||||
user_groups_required = UNSET
|
||||
|
||||
elif isinstance(self.user_groups_required, BranchOneDefaultItemSuspendUserGroupsRequiredType0):
|
||||
user_groups_required = UNSET
|
||||
if not isinstance(self.user_groups_required, Unset):
|
||||
user_groups_required = self.user_groups_required.to_dict()
|
||||
|
||||
else:
|
||||
user_groups_required = UNSET
|
||||
if not isinstance(self.user_groups_required, Unset):
|
||||
user_groups_required = self.user_groups_required.to_dict()
|
||||
|
||||
|
||||
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
})
|
||||
if required_events is not UNSET:
|
||||
field_dict["required_events"] = required_events
|
||||
if timeout is not UNSET:
|
||||
field_dict["timeout"] = timeout
|
||||
if resume_form is not UNSET:
|
||||
field_dict["resume_form"] = resume_form
|
||||
if user_auth_required is not UNSET:
|
||||
field_dict["user_auth_required"] = user_auth_required
|
||||
if user_groups_required is not UNSET:
|
||||
field_dict["user_groups_required"] = user_groups_required
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.branch_one_default_item_suspend_user_groups_required_type_0 import BranchOneDefaultItemSuspendUserGroupsRequiredType0
|
||||
from ..models.branch_one_default_item_suspend_resume_form import BranchOneDefaultItemSuspendResumeForm
|
||||
from ..models.branch_one_default_item_suspend_user_groups_required_type_1 import BranchOneDefaultItemSuspendUserGroupsRequiredType1
|
||||
d = src_dict.copy()
|
||||
required_events = d.pop("required_events", UNSET)
|
||||
|
||||
timeout = d.pop("timeout", UNSET)
|
||||
|
||||
_resume_form = d.pop("resume_form", UNSET)
|
||||
resume_form: Union[Unset, BranchOneDefaultItemSuspendResumeForm]
|
||||
if isinstance(_resume_form, Unset):
|
||||
resume_form = UNSET
|
||||
else:
|
||||
resume_form = BranchOneDefaultItemSuspendResumeForm.from_dict(_resume_form)
|
||||
|
||||
|
||||
|
||||
|
||||
user_auth_required = d.pop("user_auth_required", UNSET)
|
||||
|
||||
def _parse_user_groups_required(data: object) -> Union['BranchOneDefaultItemSuspendUserGroupsRequiredType0', 'BranchOneDefaultItemSuspendUserGroupsRequiredType1', Unset]:
|
||||
if isinstance(data, Unset):
|
||||
return data
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_user_groups_required_type_0 = data
|
||||
user_groups_required_type_0: Union[Unset, BranchOneDefaultItemSuspendUserGroupsRequiredType0]
|
||||
if isinstance(_user_groups_required_type_0, Unset):
|
||||
user_groups_required_type_0 = UNSET
|
||||
else:
|
||||
user_groups_required_type_0 = BranchOneDefaultItemSuspendUserGroupsRequiredType0.from_dict(_user_groups_required_type_0)
|
||||
|
||||
|
||||
|
||||
return user_groups_required_type_0
|
||||
except: # noqa: E722
|
||||
pass
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
_user_groups_required_type_1 = data
|
||||
user_groups_required_type_1: Union[Unset, BranchOneDefaultItemSuspendUserGroupsRequiredType1]
|
||||
if isinstance(_user_groups_required_type_1, Unset):
|
||||
user_groups_required_type_1 = UNSET
|
||||
else:
|
||||
user_groups_required_type_1 = BranchOneDefaultItemSuspendUserGroupsRequiredType1.from_dict(_user_groups_required_type_1)
|
||||
|
||||
|
||||
|
||||
return user_groups_required_type_1
|
||||
|
||||
user_groups_required = _parse_user_groups_required(d.pop("user_groups_required", UNSET))
|
||||
|
||||
|
||||
branch_one_default_item_suspend = cls(
|
||||
required_events=required_events,
|
||||
timeout=timeout,
|
||||
resume_form=resume_form,
|
||||
user_auth_required=user_auth_required,
|
||||
user_groups_required=user_groups_required,
|
||||
)
|
||||
|
||||
branch_one_default_item_suspend.additional_properties = d
|
||||
return branch_one_default_item_suspend
|
||||
|
||||
@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
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from ..types import UNSET, Unset
|
||||
from typing import Dict
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.branch_one_default_item_suspend_resume_form_schema import BranchOneDefaultItemSuspendResumeFormSchema
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItemSuspendResumeForm")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItemSuspendResumeForm:
|
||||
"""
|
||||
Attributes:
|
||||
schema (Union[Unset, BranchOneDefaultItemSuspendResumeFormSchema]):
|
||||
"""
|
||||
|
||||
schema: Union[Unset, 'BranchOneDefaultItemSuspendResumeFormSchema'] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.branch_one_default_item_suspend_resume_form_schema import BranchOneDefaultItemSuspendResumeFormSchema
|
||||
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({
|
||||
})
|
||||
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:
|
||||
from ..models.branch_one_default_item_suspend_resume_form_schema import BranchOneDefaultItemSuspendResumeFormSchema
|
||||
d = src_dict.copy()
|
||||
_schema = d.pop("schema", UNSET)
|
||||
schema: Union[Unset, BranchOneDefaultItemSuspendResumeFormSchema]
|
||||
if isinstance(_schema, Unset):
|
||||
schema = UNSET
|
||||
else:
|
||||
schema = BranchOneDefaultItemSuspendResumeFormSchema.from_dict(_schema)
|
||||
|
||||
|
||||
|
||||
|
||||
branch_one_default_item_suspend_resume_form = cls(
|
||||
schema=schema,
|
||||
)
|
||||
|
||||
branch_one_default_item_suspend_resume_form.additional_properties = d
|
||||
return branch_one_default_item_suspend_resume_form
|
||||
|
||||
@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
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItemSuspendResumeFormSchema")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItemSuspendResumeFormSchema:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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()
|
||||
branch_one_default_item_suspend_resume_form_schema = cls(
|
||||
)
|
||||
|
||||
branch_one_default_item_suspend_resume_form_schema.additional_properties = d
|
||||
return branch_one_default_item_suspend_resume_form_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
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
from ..models.branch_one_default_item_suspend_user_groups_required_type_0_type import BranchOneDefaultItemSuspendUserGroupsRequiredType0Type
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItemSuspendUserGroupsRequiredType0")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItemSuspendUserGroupsRequiredType0:
|
||||
"""
|
||||
Attributes:
|
||||
type (BranchOneDefaultItemSuspendUserGroupsRequiredType0Type):
|
||||
value (Union[Unset, Any]):
|
||||
"""
|
||||
|
||||
type: BranchOneDefaultItemSuspendUserGroupsRequiredType0Type
|
||||
value: Union[Unset, Any] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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 = BranchOneDefaultItemSuspendUserGroupsRequiredType0Type(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
value = d.pop("value", UNSET)
|
||||
|
||||
branch_one_default_item_suspend_user_groups_required_type_0 = cls(
|
||||
type=type,
|
||||
value=value,
|
||||
)
|
||||
|
||||
branch_one_default_item_suspend_user_groups_required_type_0.additional_properties = d
|
||||
return branch_one_default_item_suspend_user_groups_required_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
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchOneDefaultItemSuspendUserGroupsRequiredType0Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from ..models.branch_one_default_item_suspend_user_groups_required_type_1_type import BranchOneDefaultItemSuspendUserGroupsRequiredType1Type
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="BranchOneDefaultItemSuspendUserGroupsRequiredType1")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class BranchOneDefaultItemSuspendUserGroupsRequiredType1:
|
||||
"""
|
||||
Attributes:
|
||||
expr (str):
|
||||
type (BranchOneDefaultItemSuspendUserGroupsRequiredType1Type):
|
||||
"""
|
||||
|
||||
expr: str
|
||||
type: BranchOneDefaultItemSuspendUserGroupsRequiredType1Type
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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 = BranchOneDefaultItemSuspendUserGroupsRequiredType1Type(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
branch_one_default_item_suspend_user_groups_required_type_1 = cls(
|
||||
expr=expr,
|
||||
type=type,
|
||||
)
|
||||
|
||||
branch_one_default_item_suspend_user_groups_required_type_1.additional_properties = d
|
||||
return branch_one_default_item_suspend_user_groups_required_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
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchOneDefaultItemSuspendUserGroupsRequiredType1Type(str, Enum):
|
||||
JAVASCRIPT = "javascript"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@@ -0,0 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
class BranchOneType(str, Enum):
|
||||
BRANCHONE = "branchone"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="CancelPersistentQueuedJobsJsonBody")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class CancelPersistentQueuedJobsJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
reason (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
reason: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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_persistent_queued_jobs_json_body = cls(
|
||||
reason=reason,
|
||||
)
|
||||
|
||||
cancel_persistent_queued_jobs_json_body.additional_properties = d
|
||||
return cancel_persistent_queued_jobs_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,73 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="CancelQueuedJobJsonBody")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class CancelQueuedJobJsonBody:
|
||||
"""
|
||||
Attributes:
|
||||
reason (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
reason: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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,62 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="CancelSuspendedJobPostJsonBody")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class CancelSuspendedJobPostJsonBody:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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_post_json_body = cls(
|
||||
)
|
||||
|
||||
cancel_suspended_job_post_json_body.additional_properties = d
|
||||
return cancel_suspended_job_post_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,372 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from ..models.completed_job_job_kind import CompletedJobJobKind
|
||||
from typing import Dict
|
||||
from ..models.completed_job_language import CompletedJobLanguage
|
||||
import datetime
|
||||
from dateutil.parser import isoparse
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.completed_job_raw_flow import CompletedJobRawFlow
|
||||
from ..models.completed_job_flow_status import CompletedJobFlowStatus
|
||||
from ..models.completed_job_args import CompletedJobArgs
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="CompletedJob")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
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):
|
||||
email (str):
|
||||
visible_to_owner (bool):
|
||||
tag (str):
|
||||
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, Any]):
|
||||
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]):
|
||||
mem_peak (Union[Unset, int]):
|
||||
priority (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
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
|
||||
email: str
|
||||
visible_to_owner: bool
|
||||
tag: str
|
||||
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, Any] = 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
|
||||
mem_peak: Union[Unset, int] = UNSET
|
||||
priority: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.completed_job_raw_flow import CompletedJobRawFlow
|
||||
from ..models.completed_job_flow_status import CompletedJobFlowStatus
|
||||
from ..models.completed_job_args import CompletedJobArgs
|
||||
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
|
||||
email = self.email
|
||||
visible_to_owner = self.visible_to_owner
|
||||
tag = self.tag
|
||||
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 = self.result
|
||||
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
|
||||
|
||||
mem_peak = self.mem_peak
|
||||
priority = self.priority
|
||||
|
||||
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,
|
||||
"email": email,
|
||||
"visible_to_owner": visible_to_owner,
|
||||
"tag": tag,
|
||||
})
|
||||
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
|
||||
if mem_peak is not UNSET:
|
||||
field_dict["mem_peak"] = mem_peak
|
||||
if priority is not UNSET:
|
||||
field_dict["priority"] = priority
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.completed_job_raw_flow import CompletedJobRawFlow
|
||||
from ..models.completed_job_flow_status import CompletedJobFlowStatus
|
||||
from ..models.completed_job_args import CompletedJobArgs
|
||||
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")
|
||||
|
||||
email = d.pop("email")
|
||||
|
||||
visible_to_owner = d.pop("visible_to_owner")
|
||||
|
||||
tag = d.pop("tag")
|
||||
|
||||
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)
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
||||
|
||||
mem_peak = d.pop("mem_peak", UNSET)
|
||||
|
||||
priority = d.pop("priority", UNSET)
|
||||
|
||||
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,
|
||||
email=email,
|
||||
visible_to_owner=visible_to_owner,
|
||||
tag=tag,
|
||||
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,
|
||||
mem_peak=mem_peak,
|
||||
priority=priority,
|
||||
)
|
||||
|
||||
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,62 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobArgs")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class CompletedJobArgs:
|
||||
"""
|
||||
"""
|
||||
|
||||
additional_properties: Dict[str, Any] = _attrs_field(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,138 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import cast, List
|
||||
from typing import Dict
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.completed_job_flow_status_retry import CompletedJobFlowStatusRetry
|
||||
from ..models.completed_job_flow_status_failure_module import CompletedJobFlowStatusFailureModule
|
||||
from ..models.completed_job_flow_status_modules_item import CompletedJobFlowStatusModulesItem
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobFlowStatus")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
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] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.completed_job_flow_status_retry import CompletedJobFlowStatusRetry
|
||||
from ..models.completed_job_flow_status_failure_module import CompletedJobFlowStatusFailureModule
|
||||
from ..models.completed_job_flow_status_modules_item import CompletedJobFlowStatusModulesItem
|
||||
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:
|
||||
from ..models.completed_job_flow_status_retry import CompletedJobFlowStatusRetry
|
||||
from ..models.completed_job_flow_status_failure_module import CompletedJobFlowStatusFailureModule
|
||||
from ..models.completed_job_flow_status_modules_item import CompletedJobFlowStatusModulesItem
|
||||
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
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from typing import cast
|
||||
from typing import cast, List
|
||||
from ..models.completed_job_flow_status_failure_module_type import CompletedJobFlowStatusFailureModuleType
|
||||
from typing import Dict
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.completed_job_flow_status_failure_module_branchall import CompletedJobFlowStatusFailureModuleBranchall
|
||||
from ..models.completed_job_flow_status_failure_module_branch_chosen import CompletedJobFlowStatusFailureModuleBranchChosen
|
||||
from ..models.completed_job_flow_status_failure_module_iterator import CompletedJobFlowStatusFailureModuleIterator
|
||||
from ..models.completed_job_flow_status_failure_module_approvers_item import CompletedJobFlowStatusFailureModuleApproversItem
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobFlowStatusFailureModule")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class CompletedJobFlowStatusFailureModule:
|
||||
"""
|
||||
Attributes:
|
||||
type (CompletedJobFlowStatusFailureModuleType):
|
||||
id (Union[Unset, str]):
|
||||
job (Union[Unset, str]):
|
||||
count (Union[Unset, int]):
|
||||
iterator (Union[Unset, CompletedJobFlowStatusFailureModuleIterator]):
|
||||
flow_jobs (Union[Unset, List[str]]):
|
||||
branch_chosen (Union[Unset, CompletedJobFlowStatusFailureModuleBranchChosen]):
|
||||
branchall (Union[Unset, CompletedJobFlowStatusFailureModuleBranchall]):
|
||||
approvers (Union[Unset, List['CompletedJobFlowStatusFailureModuleApproversItem']]):
|
||||
parent_module (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
type: CompletedJobFlowStatusFailureModuleType
|
||||
id: Union[Unset, str] = UNSET
|
||||
job: Union[Unset, str] = UNSET
|
||||
count: Union[Unset, int] = UNSET
|
||||
iterator: Union[Unset, 'CompletedJobFlowStatusFailureModuleIterator'] = UNSET
|
||||
flow_jobs: Union[Unset, List[str]] = UNSET
|
||||
branch_chosen: Union[Unset, 'CompletedJobFlowStatusFailureModuleBranchChosen'] = UNSET
|
||||
branchall: Union[Unset, 'CompletedJobFlowStatusFailureModuleBranchall'] = UNSET
|
||||
approvers: Union[Unset, List['CompletedJobFlowStatusFailureModuleApproversItem']] = UNSET
|
||||
parent_module: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.completed_job_flow_status_failure_module_branchall import CompletedJobFlowStatusFailureModuleBranchall
|
||||
from ..models.completed_job_flow_status_failure_module_branch_chosen import CompletedJobFlowStatusFailureModuleBranchChosen
|
||||
from ..models.completed_job_flow_status_failure_module_iterator import CompletedJobFlowStatusFailureModuleIterator
|
||||
from ..models.completed_job_flow_status_failure_module_approvers_item import CompletedJobFlowStatusFailureModuleApproversItem
|
||||
type = self.type.value
|
||||
|
||||
id = self.id
|
||||
job = self.job
|
||||
count = self.count
|
||||
iterator: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.iterator, Unset):
|
||||
iterator = self.iterator.to_dict()
|
||||
|
||||
flow_jobs: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.flow_jobs, Unset):
|
||||
flow_jobs = self.flow_jobs
|
||||
|
||||
|
||||
|
||||
|
||||
branch_chosen: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.branch_chosen, Unset):
|
||||
branch_chosen = self.branch_chosen.to_dict()
|
||||
|
||||
branchall: Union[Unset, Dict[str, Any]] = UNSET
|
||||
if not isinstance(self.branchall, Unset):
|
||||
branchall = self.branchall.to_dict()
|
||||
|
||||
approvers: Union[Unset, List[Dict[str, Any]]] = UNSET
|
||||
if not isinstance(self.approvers, Unset):
|
||||
approvers = []
|
||||
for approvers_item_data in self.approvers:
|
||||
approvers_item = approvers_item_data.to_dict()
|
||||
|
||||
approvers.append(approvers_item)
|
||||
|
||||
|
||||
|
||||
|
||||
parent_module = self.parent_module
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"type": type,
|
||||
})
|
||||
if id is not UNSET:
|
||||
field_dict["id"] = id
|
||||
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 flow_jobs is not UNSET:
|
||||
field_dict["flow_jobs"] = flow_jobs
|
||||
if branch_chosen is not UNSET:
|
||||
field_dict["branch_chosen"] = branch_chosen
|
||||
if branchall is not UNSET:
|
||||
field_dict["branchall"] = branchall
|
||||
if approvers is not UNSET:
|
||||
field_dict["approvers"] = approvers
|
||||
if parent_module is not UNSET:
|
||||
field_dict["parent_module"] = parent_module
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.completed_job_flow_status_failure_module_branchall import CompletedJobFlowStatusFailureModuleBranchall
|
||||
from ..models.completed_job_flow_status_failure_module_branch_chosen import CompletedJobFlowStatusFailureModuleBranchChosen
|
||||
from ..models.completed_job_flow_status_failure_module_iterator import CompletedJobFlowStatusFailureModuleIterator
|
||||
from ..models.completed_job_flow_status_failure_module_approvers_item import CompletedJobFlowStatusFailureModuleApproversItem
|
||||
d = src_dict.copy()
|
||||
type = CompletedJobFlowStatusFailureModuleType(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
||||
|
||||
flow_jobs = cast(List[str], d.pop("flow_jobs", UNSET))
|
||||
|
||||
|
||||
_branch_chosen = d.pop("branch_chosen", UNSET)
|
||||
branch_chosen: Union[Unset, CompletedJobFlowStatusFailureModuleBranchChosen]
|
||||
if isinstance(_branch_chosen, Unset):
|
||||
branch_chosen = UNSET
|
||||
else:
|
||||
branch_chosen = CompletedJobFlowStatusFailureModuleBranchChosen.from_dict(_branch_chosen)
|
||||
|
||||
|
||||
|
||||
|
||||
_branchall = d.pop("branchall", UNSET)
|
||||
branchall: Union[Unset, CompletedJobFlowStatusFailureModuleBranchall]
|
||||
if isinstance(_branchall, Unset):
|
||||
branchall = UNSET
|
||||
else:
|
||||
branchall = CompletedJobFlowStatusFailureModuleBranchall.from_dict(_branchall)
|
||||
|
||||
|
||||
|
||||
|
||||
approvers = []
|
||||
_approvers = d.pop("approvers", UNSET)
|
||||
for approvers_item_data in (_approvers or []):
|
||||
approvers_item = CompletedJobFlowStatusFailureModuleApproversItem.from_dict(approvers_item_data)
|
||||
|
||||
|
||||
|
||||
approvers.append(approvers_item)
|
||||
|
||||
|
||||
parent_module = d.pop("parent_module", UNSET)
|
||||
|
||||
completed_job_flow_status_failure_module = cls(
|
||||
type=type,
|
||||
id=id,
|
||||
job=job,
|
||||
count=count,
|
||||
iterator=iterator,
|
||||
flow_jobs=flow_jobs,
|
||||
branch_chosen=branch_chosen,
|
||||
branchall=branchall,
|
||||
approvers=approvers,
|
||||
parent_module=parent_module,
|
||||
)
|
||||
|
||||
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
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobFlowStatusFailureModuleApproversItem")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class CompletedJobFlowStatusFailureModuleApproversItem:
|
||||
"""
|
||||
Attributes:
|
||||
resume_id (int):
|
||||
approver (str):
|
||||
"""
|
||||
|
||||
resume_id: int
|
||||
approver: str
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
resume_id = self.resume_id
|
||||
approver = self.approver
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"resume_id": resume_id,
|
||||
"approver": approver,
|
||||
})
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
resume_id = d.pop("resume_id")
|
||||
|
||||
approver = d.pop("approver")
|
||||
|
||||
completed_job_flow_status_failure_module_approvers_item = cls(
|
||||
resume_id=resume_id,
|
||||
approver=approver,
|
||||
)
|
||||
|
||||
completed_job_flow_status_failure_module_approvers_item.additional_properties = d
|
||||
return completed_job_flow_status_failure_module_approvers_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
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
from typing import Any, Dict, Type, TypeVar, Tuple, Optional, BinaryIO, TextIO, TYPE_CHECKING
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
from attrs import define as _attrs_define
|
||||
from attrs import field as _attrs_field
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
from typing import Union
|
||||
from ..types import UNSET, Unset
|
||||
from ..models.completed_job_flow_status_failure_module_branch_chosen_type import CompletedJobFlowStatusFailureModuleBranchChosenType
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
T = TypeVar("T", bound="CompletedJobFlowStatusFailureModuleBranchChosen")
|
||||
|
||||
|
||||
@_attrs_define
|
||||
class CompletedJobFlowStatusFailureModuleBranchChosen:
|
||||
"""
|
||||
Attributes:
|
||||
type (CompletedJobFlowStatusFailureModuleBranchChosenType):
|
||||
branch (Union[Unset, int]):
|
||||
"""
|
||||
|
||||
type: CompletedJobFlowStatusFailureModuleBranchChosenType
|
||||
branch: Union[Unset, int] = UNSET
|
||||
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
||||
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type.value
|
||||
|
||||
branch = self.branch
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({
|
||||
"type": type,
|
||||
})
|
||||
if branch is not UNSET:
|
||||
field_dict["branch"] = branch
|
||||
|
||||
return field_dict
|
||||
|
||||
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
type = CompletedJobFlowStatusFailureModuleBranchChosenType(d.pop("type"))
|
||||
|
||||
|
||||
|
||||
|
||||
branch = d.pop("branch", UNSET)
|
||||
|
||||
completed_job_flow_status_failure_module_branch_chosen = cls(
|
||||
type=type,
|
||||
branch=branch,
|
||||
)
|
||||
|
||||
completed_job_flow_status_failure_module_branch_chosen.additional_properties = d
|
||||
return completed_job_flow_status_failure_module_branch_chosen
|
||||
|
||||
@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
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
class CompletedJobFlowStatusFailureModuleBranchChosenType(str, Enum):
|
||||
BRANCH = "branch"
|
||||
DEFAULT = "default"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user