wallaroo.wallaroo_ml_ops_api_client.models.workspaces_remove_user_json_body API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.workspaces_remove_user_json_body

View Source

     1from typing import Any, Dict, List, Type, TypeVar, Union
     2
     3import attr
     4
     5from ..types import UNSET, Unset
     6
     7T = TypeVar("T", bound="WorkspacesRemoveUserJsonBody")
     8
     9@attr.s(auto_attribs=True)
    10class WorkspacesRemoveUserJsonBody:
    11    """ Request to remove a User from a Workspace
    12
    13    Attributes:
    14        workspace_id (int):  Workspace to remove the User from.
    15        email (Union[Unset, None, str]):  Email of the User to remove.
    16        user_id (Union[Unset, None, str]):  UUID ID of the User to remove.
    17    """
    18
    19    workspace_id: int
    20    email: Union[Unset, None, str] = UNSET
    21    user_id: Union[Unset, None, str] = UNSET
    22    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    23
    24
    25    def to_dict(self) -> Dict[str, Any]:
    26        workspace_id = self.workspace_id
    27        email = self.email
    28        user_id = self.user_id
    29
    30        field_dict: Dict[str, Any] = {}
    31        field_dict.update(self.additional_properties)
    32        field_dict.update({
    33            "workspace_id": workspace_id,
    34        })
    35        if email is not UNSET:
    36            field_dict["email"] = email
    37        if user_id is not UNSET:
    38            field_dict["user_id"] = user_id
    39
    40        return field_dict
    41
    42
    43
    44    @classmethod
    45    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    46        d = src_dict.copy()
    47        workspace_id = d.pop("workspace_id")
    48
    49        email = d.pop("email", UNSET)
    50
    51        user_id = d.pop("user_id", UNSET)
    52
    53        workspaces_remove_user_json_body = cls(
    54            workspace_id=workspace_id,
    55            email=email,
    56            user_id=user_id,
    57        )
    58
    59        workspaces_remove_user_json_body.additional_properties = d
    60        return workspaces_remove_user_json_body
    61
    62    @property
    63    def additional_keys(self) -> List[str]:
    64        return list(self.additional_properties.keys())
    65
    66    def __getitem__(self, key: str) -> Any:
    67        return self.additional_properties[key]
    68
    69    def __setitem__(self, key: str, value: Any) -> None:
    70        self.additional_properties[key] = value
    71
    72    def __delitem__(self, key: str) -> None:
    73        del self.additional_properties[key]
    74
    75    def __contains__(self, key: str) -> bool:
    76        return key in self.additional_properties

@attr.s(auto_attribs=True)
class WorkspacesRemoveUserJsonBody: View Source

    10@attr.s(auto_attribs=True)
    11class WorkspacesRemoveUserJsonBody:
    12    """ Request to remove a User from a Workspace
    13
    14    Attributes:
    15        workspace_id (int):  Workspace to remove the User from.
    16        email (Union[Unset, None, str]):  Email of the User to remove.
    17        user_id (Union[Unset, None, str]):  UUID ID of the User to remove.
    18    """
    19
    20    workspace_id: int
    21    email: Union[Unset, None, str] = UNSET
    22    user_id: Union[Unset, None, str] = UNSET
    23    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    24
    25
    26    def to_dict(self) -> Dict[str, Any]:
    27        workspace_id = self.workspace_id
    28        email = self.email
    29        user_id = self.user_id
    30
    31        field_dict: Dict[str, Any] = {}
    32        field_dict.update(self.additional_properties)
    33        field_dict.update({
    34            "workspace_id": workspace_id,
    35        })
    36        if email is not UNSET:
    37            field_dict["email"] = email
    38        if user_id is not UNSET:
    39            field_dict["user_id"] = user_id
    40
    41        return field_dict
    42
    43
    44
    45    @classmethod
    46    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    47        d = src_dict.copy()
    48        workspace_id = d.pop("workspace_id")
    49
    50        email = d.pop("email", UNSET)
    51
    52        user_id = d.pop("user_id", UNSET)
    53
    54        workspaces_remove_user_json_body = cls(
    55            workspace_id=workspace_id,
    56            email=email,
    57            user_id=user_id,
    58        )
    59
    60        workspaces_remove_user_json_body.additional_properties = d
    61        return workspaces_remove_user_json_body
    62
    63    @property
    64    def additional_keys(self) -> List[str]:
    65        return list(self.additional_properties.keys())
    66
    67    def __getitem__(self, key: str) -> Any:
    68        return self.additional_properties[key]
    69
    70    def __setitem__(self, key: str, value: Any) -> None:
    71        self.additional_properties[key] = value
    72
    73    def __delitem__(self, key: str) -> None:
    74        del self.additional_properties[key]
    75
    76    def __contains__(self, key: str) -> bool:
    77        return key in self.additional_properties

Request to remove a User from a Workspace

Attributes: workspace_id (int): Workspace to remove the User from. email (Union[Unset, None, str]): Email of the User to remove. user_id (Union[Unset, None, str]): UUID ID of the User to remove.

WorkspacesRemoveUserJsonBody( workspace_id: int, email: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, user_id: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>) View Source

    2def __init__(self, workspace_id, email=attr_dict['email'].default, user_id=attr_dict['user_id'].default):
    3    self.workspace_id = workspace_id
    4    self.email = email
    5    self.user_id = user_id
    6    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class WorkspacesRemoveUserJsonBody.

def to_dict(self) -> Dict[str, Any]: View Source

    26    def to_dict(self) -> Dict[str, Any]:
    27        workspace_id = self.workspace_id
    28        email = self.email
    29        user_id = self.user_id
    30
    31        field_dict: Dict[str, Any] = {}
    32        field_dict.update(self.additional_properties)
    33        field_dict.update({
    34            "workspace_id": workspace_id,
    35        })
    36        if email is not UNSET:
    37            field_dict["email"] = email
    38        if user_id is not UNSET:
    39            field_dict["user_id"] = user_id
    40
    41        return field_dict

@classmethod
def from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T: View Source

    45    @classmethod
    46    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    47        d = src_dict.copy()
    48        workspace_id = d.pop("workspace_id")
    49
    50        email = d.pop("email", UNSET)
    51
    52        user_id = d.pop("user_id", UNSET)
    53
    54        workspaces_remove_user_json_body = cls(
    55            workspace_id=workspace_id,
    56            email=email,
    57            user_id=user_id,
    58        )
    59
    60        workspaces_remove_user_json_body.additional_properties = d
    61        return workspaces_remove_user_json_body

additional_keys: List[str]