wallaroo.wallaroo_ml_ops_api_client.models.workspaces_remove_user_response_200

 1from typing import Any, Dict, List, Type, TypeVar
 2
 3import attr
 4
 5T = TypeVar("T", bound="WorkspacesRemoveUserResponse200")
 6
 7@attr.s(auto_attribs=True)
 8class WorkspacesRemoveUserResponse200:
 9    """ Response from removing a User from a Workspace
10
11    Attributes:
12        affected_rows (int):  The number of rows affected by the removal operation. This should be either 0 or 1.
13    """
14
15    affected_rows: int
16    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
17
18
19    def to_dict(self) -> Dict[str, Any]:
20        affected_rows = self.affected_rows
21
22        field_dict: Dict[str, Any] = {}
23        field_dict.update(self.additional_properties)
24        field_dict.update({
25            "affected_rows": affected_rows,
26        })
27
28        return field_dict
29
30
31
32    @classmethod
33    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
34        d = src_dict.copy()
35        affected_rows = d.pop("affected_rows")
36
37        workspaces_remove_user_response_200 = cls(
38            affected_rows=affected_rows,
39        )
40
41        workspaces_remove_user_response_200.additional_properties = d
42        return workspaces_remove_user_response_200
43
44    @property
45    def additional_keys(self) -> List[str]:
46        return list(self.additional_properties.keys())
47
48    def __getitem__(self, key: str) -> Any:
49        return self.additional_properties[key]
50
51    def __setitem__(self, key: str, value: Any) -> None:
52        self.additional_properties[key] = value
53
54    def __delitem__(self, key: str) -> None:
55        del self.additional_properties[key]
56
57    def __contains__(self, key: str) -> bool:
58        return key in self.additional_properties
@attr.s(auto_attribs=True)
class WorkspacesRemoveUserResponse200:
 8@attr.s(auto_attribs=True)
 9class WorkspacesRemoveUserResponse200:
10    """ Response from removing a User from a Workspace
11
12    Attributes:
13        affected_rows (int):  The number of rows affected by the removal operation. This should be either 0 or 1.
14    """
15
16    affected_rows: int
17    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
18
19
20    def to_dict(self) -> Dict[str, Any]:
21        affected_rows = self.affected_rows
22
23        field_dict: Dict[str, Any] = {}
24        field_dict.update(self.additional_properties)
25        field_dict.update({
26            "affected_rows": affected_rows,
27        })
28
29        return field_dict
30
31
32
33    @classmethod
34    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
35        d = src_dict.copy()
36        affected_rows = d.pop("affected_rows")
37
38        workspaces_remove_user_response_200 = cls(
39            affected_rows=affected_rows,
40        )
41
42        workspaces_remove_user_response_200.additional_properties = d
43        return workspaces_remove_user_response_200
44
45    @property
46    def additional_keys(self) -> List[str]:
47        return list(self.additional_properties.keys())
48
49    def __getitem__(self, key: str) -> Any:
50        return self.additional_properties[key]
51
52    def __setitem__(self, key: str, value: Any) -> None:
53        self.additional_properties[key] = value
54
55    def __delitem__(self, key: str) -> None:
56        del self.additional_properties[key]
57
58    def __contains__(self, key: str) -> bool:
59        return key in self.additional_properties

Response from removing a User from a Workspace

Attributes: affected_rows (int): The number of rows affected by the removal operation. This should be either 0 or 1.

WorkspacesRemoveUserResponse200(affected_rows: int)
2def __init__(self, affected_rows):
3    self.affected_rows = affected_rows
4    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class WorkspacesRemoveUserResponse200.

def to_dict(self) -> Dict[str, Any]:
20    def to_dict(self) -> Dict[str, Any]:
21        affected_rows = self.affected_rows
22
23        field_dict: Dict[str, Any] = {}
24        field_dict.update(self.additional_properties)
25        field_dict.update({
26            "affected_rows": affected_rows,
27        })
28
29        return field_dict
@classmethod
def from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T:
33    @classmethod
34    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
35        d = src_dict.copy()
36        affected_rows = d.pop("affected_rows")
37
38        workspaces_remove_user_response_200 = cls(
39            affected_rows=affected_rows,
40        )
41
42        workspaces_remove_user_response_200.additional_properties = d
43        return workspaces_remove_user_response_200
additional_keys: List[str]