wallaroo.wallaroo_ml_ops_api_client.models.workspaces_list_users_response_200
1from typing import Any, Dict, List, Type, TypeVar 2 3import attr 4 5from ..models.workspaces_list_users_response_200_users_item import \ 6 WorkspacesListUsersResponse200UsersItem 7 8T = TypeVar("T", bound="WorkspacesListUsersResponse200") 9 10@attr.s(auto_attribs=True) 11class WorkspacesListUsersResponse200: 12 """ Response for a successful List Workspace Users call. 13 14 Attributes: 15 users (List[WorkspacesListUsersResponse200UsersItem]): Users belonging to the specified workspace. 16 """ 17 18 users: List[WorkspacesListUsersResponse200UsersItem] 19 additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) 20 21 22 def to_dict(self) -> Dict[str, Any]: 23 users = [] 24 for users_item_data in self.users: 25 users_item = users_item_data.to_dict() 26 27 users.append(users_item) 28 29 30 31 32 33 field_dict: Dict[str, Any] = {} 34 field_dict.update(self.additional_properties) 35 field_dict.update({ 36 "users": users, 37 }) 38 39 return field_dict 40 41 42 43 @classmethod 44 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 45 d = src_dict.copy() 46 users = [] 47 _users = d.pop("users") 48 for users_item_data in (_users): 49 users_item = WorkspacesListUsersResponse200UsersItem.from_dict(users_item_data) 50 51 52 53 users.append(users_item) 54 55 56 workspaces_list_users_response_200 = cls( 57 users=users, 58 ) 59 60 workspaces_list_users_response_200.additional_properties = d 61 return workspaces_list_users_response_200 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
@attr.s(auto_attribs=True)
class
WorkspacesListUsersResponse200:
11@attr.s(auto_attribs=True) 12class WorkspacesListUsersResponse200: 13 """ Response for a successful List Workspace Users call. 14 15 Attributes: 16 users (List[WorkspacesListUsersResponse200UsersItem]): Users belonging to the specified workspace. 17 """ 18 19 users: List[WorkspacesListUsersResponse200UsersItem] 20 additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) 21 22 23 def to_dict(self) -> Dict[str, Any]: 24 users = [] 25 for users_item_data in self.users: 26 users_item = users_item_data.to_dict() 27 28 users.append(users_item) 29 30 31 32 33 34 field_dict: Dict[str, Any] = {} 35 field_dict.update(self.additional_properties) 36 field_dict.update({ 37 "users": users, 38 }) 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 users = [] 48 _users = d.pop("users") 49 for users_item_data in (_users): 50 users_item = WorkspacesListUsersResponse200UsersItem.from_dict(users_item_data) 51 52 53 54 users.append(users_item) 55 56 57 workspaces_list_users_response_200 = cls( 58 users=users, 59 ) 60 61 workspaces_list_users_response_200.additional_properties = d 62 return workspaces_list_users_response_200 63 64 @property 65 def additional_keys(self) -> List[str]: 66 return list(self.additional_properties.keys()) 67 68 def __getitem__(self, key: str) -> Any: 69 return self.additional_properties[key] 70 71 def __setitem__(self, key: str, value: Any) -> None: 72 self.additional_properties[key] = value 73 74 def __delitem__(self, key: str) -> None: 75 del self.additional_properties[key] 76 77 def __contains__(self, key: str) -> bool: 78 return key in self.additional_properties
Response for a successful List Workspace Users call.
Attributes: users (List[WorkspacesListUsersResponse200UsersItem]): Users belonging to the specified workspace.
WorkspacesListUsersResponse200( users: List[wallaroo.wallaroo_ml_ops_api_client.models.workspaces_list_users_response_200_users_item.WorkspacesListUsersResponse200UsersItem])
2def __init__(self, users): 3 self.users = users 4 self.additional_properties = __attr_factory_additional_properties()
Method generated by attrs for class WorkspacesListUsersResponse200.
def
to_dict(self) -> Dict[str, Any]:
23 def to_dict(self) -> Dict[str, Any]: 24 users = [] 25 for users_item_data in self.users: 26 users_item = users_item_data.to_dict() 27 28 users.append(users_item) 29 30 31 32 33 34 field_dict: Dict[str, Any] = {} 35 field_dict.update(self.additional_properties) 36 field_dict.update({ 37 "users": users, 38 }) 39 40 return field_dict
@classmethod
def
from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T:
44 @classmethod 45 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 46 d = src_dict.copy() 47 users = [] 48 _users = d.pop("users") 49 for users_item_data in (_users): 50 users_item = WorkspacesListUsersResponse200UsersItem.from_dict(users_item_data) 51 52 53 54 users.append(users_item) 55 56 57 workspaces_list_users_response_200 = cls( 58 users=users, 59 ) 60 61 workspaces_list_users_response_200.additional_properties = d 62 return workspaces_list_users_response_200