wallaroo.wallaroo_ml_ops_api_client.models.workspaces_list_users_response_200_users_item
1from typing import Any, Dict, List, Type, TypeVar, Union 2 3import attr 4 5from ..types import UNSET, Unset 6 7T = TypeVar("T", bound="WorkspacesListUsersResponse200UsersItem") 8 9@attr.s(auto_attribs=True) 10class WorkspacesListUsersResponse200UsersItem: 11 """ User data returned as part of the List Workspace Users call 12 13 Attributes: 14 user_id (str): User UUID identifier 15 user_type (Union[Unset, None, str]): User type, Collaborator or Owner 16 """ 17 18 user_id: str 19 user_type: Union[Unset, None, str] = UNSET 20 additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) 21 22 23 def to_dict(self) -> Dict[str, Any]: 24 user_id = self.user_id 25 user_type = self.user_type 26 27 field_dict: Dict[str, Any] = {} 28 field_dict.update(self.additional_properties) 29 field_dict.update({ 30 "user_id": user_id, 31 }) 32 if user_type is not UNSET: 33 field_dict["user_type"] = user_type 34 35 return field_dict 36 37 38 39 @classmethod 40 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 41 d = src_dict.copy() 42 user_id = d.pop("user_id") 43 44 user_type = d.pop("user_type", UNSET) 45 46 workspaces_list_users_response_200_users_item = cls( 47 user_id=user_id, 48 user_type=user_type, 49 ) 50 51 workspaces_list_users_response_200_users_item.additional_properties = d 52 return workspaces_list_users_response_200_users_item 53 54 @property 55 def additional_keys(self) -> List[str]: 56 return list(self.additional_properties.keys()) 57 58 def __getitem__(self, key: str) -> Any: 59 return self.additional_properties[key] 60 61 def __setitem__(self, key: str, value: Any) -> None: 62 self.additional_properties[key] = value 63 64 def __delitem__(self, key: str) -> None: 65 del self.additional_properties[key] 66 67 def __contains__(self, key: str) -> bool: 68 return key in self.additional_properties
@attr.s(auto_attribs=True)
class
WorkspacesListUsersResponse200UsersItem:
10@attr.s(auto_attribs=True) 11class WorkspacesListUsersResponse200UsersItem: 12 """ User data returned as part of the List Workspace Users call 13 14 Attributes: 15 user_id (str): User UUID identifier 16 user_type (Union[Unset, None, str]): User type, Collaborator or Owner 17 """ 18 19 user_id: str 20 user_type: Union[Unset, None, str] = UNSET 21 additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) 22 23 24 def to_dict(self) -> Dict[str, Any]: 25 user_id = self.user_id 26 user_type = self.user_type 27 28 field_dict: Dict[str, Any] = {} 29 field_dict.update(self.additional_properties) 30 field_dict.update({ 31 "user_id": user_id, 32 }) 33 if user_type is not UNSET: 34 field_dict["user_type"] = user_type 35 36 return field_dict 37 38 39 40 @classmethod 41 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 42 d = src_dict.copy() 43 user_id = d.pop("user_id") 44 45 user_type = d.pop("user_type", UNSET) 46 47 workspaces_list_users_response_200_users_item = cls( 48 user_id=user_id, 49 user_type=user_type, 50 ) 51 52 workspaces_list_users_response_200_users_item.additional_properties = d 53 return workspaces_list_users_response_200_users_item 54 55 @property 56 def additional_keys(self) -> List[str]: 57 return list(self.additional_properties.keys()) 58 59 def __getitem__(self, key: str) -> Any: 60 return self.additional_properties[key] 61 62 def __setitem__(self, key: str, value: Any) -> None: 63 self.additional_properties[key] = value 64 65 def __delitem__(self, key: str) -> None: 66 del self.additional_properties[key] 67 68 def __contains__(self, key: str) -> bool: 69 return key in self.additional_properties
User data returned as part of the List Workspace Users call
Attributes: user_id (str): User UUID identifier user_type (Union[Unset, None, str]): User type, Collaborator or Owner
WorkspacesListUsersResponse200UsersItem( user_id: str, user_type: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>)
2def __init__(self, user_id, user_type=attr_dict['user_type'].default): 3 self.user_id = user_id 4 self.user_type = user_type 5 self.additional_properties = __attr_factory_additional_properties()
Method generated by attrs for class WorkspacesListUsersResponse200UsersItem.
def
to_dict(self) -> Dict[str, Any]:
24 def to_dict(self) -> Dict[str, Any]: 25 user_id = self.user_id 26 user_type = self.user_type 27 28 field_dict: Dict[str, Any] = {} 29 field_dict.update(self.additional_properties) 30 field_dict.update({ 31 "user_id": user_id, 32 }) 33 if user_type is not UNSET: 34 field_dict["user_type"] = user_type 35 36 return field_dict
@classmethod
def
from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T:
40 @classmethod 41 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 42 d = src_dict.copy() 43 user_id = d.pop("user_id") 44 45 user_type = d.pop("user_type", UNSET) 46 47 workspaces_list_users_response_200_users_item = cls( 48 user_id=user_id, 49 user_type=user_type, 50 ) 51 52 workspaces_list_users_response_200_users_item.additional_properties = d 53 return workspaces_list_users_response_200_users_item