wallaroo.wallaroo_ml_ops_api_client.models.models_list_response_200_models_item
1from typing import Any, Dict, List, Type, TypeVar, Union 2 3import attr 4 5from ..types import UNSET, Unset 6 7T = TypeVar("T", bound="ModelsListResponse200ModelsItem") 8 9@attr.s(auto_attribs=True) 10class ModelsListResponse200ModelsItem: 11 """ Workspace model details. 12 13 Attributes: 14 id (int): Model identifer. 15 name (str): The descriptive name of the model, the same as `model_id`. 16 owner_id (str): The UUID of the User. 17 created_at (Union[Unset, None, str]): The timestamp that this model was created. 18 updated_at (Union[Unset, None, str]): The last time this model object was updated. 19 """ 20 21 id: int 22 name: str 23 owner_id: str 24 created_at: Union[Unset, None, str] = UNSET 25 updated_at: Union[Unset, None, str] = UNSET 26 additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) 27 28 29 def to_dict(self) -> Dict[str, Any]: 30 id = self.id 31 name = self.name 32 owner_id = self.owner_id 33 created_at = self.created_at 34 updated_at = self.updated_at 35 36 field_dict: Dict[str, Any] = {} 37 field_dict.update(self.additional_properties) 38 field_dict.update({ 39 "id": id, 40 "name": name, 41 "owner_id": owner_id, 42 }) 43 if created_at is not UNSET: 44 field_dict["created_at"] = created_at 45 if updated_at is not UNSET: 46 field_dict["updated_at"] = updated_at 47 48 return field_dict 49 50 51 52 @classmethod 53 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 54 d = src_dict.copy() 55 id = d.pop("id") 56 57 name = d.pop("name") 58 59 owner_id = d.pop("owner_id") 60 61 created_at = d.pop("created_at", UNSET) 62 63 updated_at = d.pop("updated_at", UNSET) 64 65 models_list_response_200_models_item = cls( 66 id=id, 67 name=name, 68 owner_id=owner_id, 69 created_at=created_at, 70 updated_at=updated_at, 71 ) 72 73 models_list_response_200_models_item.additional_properties = d 74 return models_list_response_200_models_item 75 76 @property 77 def additional_keys(self) -> List[str]: 78 return list(self.additional_properties.keys()) 79 80 def __getitem__(self, key: str) -> Any: 81 return self.additional_properties[key] 82 83 def __setitem__(self, key: str, value: Any) -> None: 84 self.additional_properties[key] = value 85 86 def __delitem__(self, key: str) -> None: 87 del self.additional_properties[key] 88 89 def __contains__(self, key: str) -> bool: 90 return key in self.additional_properties
@attr.s(auto_attribs=True)
class
ModelsListResponse200ModelsItem:
10@attr.s(auto_attribs=True) 11class ModelsListResponse200ModelsItem: 12 """ Workspace model details. 13 14 Attributes: 15 id (int): Model identifer. 16 name (str): The descriptive name of the model, the same as `model_id`. 17 owner_id (str): The UUID of the User. 18 created_at (Union[Unset, None, str]): The timestamp that this model was created. 19 updated_at (Union[Unset, None, str]): The last time this model object was updated. 20 """ 21 22 id: int 23 name: str 24 owner_id: str 25 created_at: Union[Unset, None, str] = UNSET 26 updated_at: Union[Unset, None, str] = UNSET 27 additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) 28 29 30 def to_dict(self) -> Dict[str, Any]: 31 id = self.id 32 name = self.name 33 owner_id = self.owner_id 34 created_at = self.created_at 35 updated_at = self.updated_at 36 37 field_dict: Dict[str, Any] = {} 38 field_dict.update(self.additional_properties) 39 field_dict.update({ 40 "id": id, 41 "name": name, 42 "owner_id": owner_id, 43 }) 44 if created_at is not UNSET: 45 field_dict["created_at"] = created_at 46 if updated_at is not UNSET: 47 field_dict["updated_at"] = updated_at 48 49 return field_dict 50 51 52 53 @classmethod 54 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 55 d = src_dict.copy() 56 id = d.pop("id") 57 58 name = d.pop("name") 59 60 owner_id = d.pop("owner_id") 61 62 created_at = d.pop("created_at", UNSET) 63 64 updated_at = d.pop("updated_at", UNSET) 65 66 models_list_response_200_models_item = cls( 67 id=id, 68 name=name, 69 owner_id=owner_id, 70 created_at=created_at, 71 updated_at=updated_at, 72 ) 73 74 models_list_response_200_models_item.additional_properties = d 75 return models_list_response_200_models_item 76 77 @property 78 def additional_keys(self) -> List[str]: 79 return list(self.additional_properties.keys()) 80 81 def __getitem__(self, key: str) -> Any: 82 return self.additional_properties[key] 83 84 def __setitem__(self, key: str, value: Any) -> None: 85 self.additional_properties[key] = value 86 87 def __delitem__(self, key: str) -> None: 88 del self.additional_properties[key] 89 90 def __contains__(self, key: str) -> bool: 91 return key in self.additional_properties
Workspace model details.
Attributes:
id (int): Model identifer.
name (str): The descriptive name of the model, the same as model_id
.
owner_id (str): The UUID of the User.
created_at (Union[Unset, None, str]): The timestamp that this model was created.
updated_at (Union[Unset, None, str]): The last time this model object was updated.
ModelsListResponse200ModelsItem( id: int, name: str, owner_id: str, created_at: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, updated_at: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>)
2def __init__(self, id, name, owner_id, created_at=attr_dict['created_at'].default, updated_at=attr_dict['updated_at'].default): 3 self.id = id 4 self.name = name 5 self.owner_id = owner_id 6 self.created_at = created_at 7 self.updated_at = updated_at 8 self.additional_properties = __attr_factory_additional_properties()
Method generated by attrs for class ModelsListResponse200ModelsItem.
def
to_dict(self) -> Dict[str, Any]:
30 def to_dict(self) -> Dict[str, Any]: 31 id = self.id 32 name = self.name 33 owner_id = self.owner_id 34 created_at = self.created_at 35 updated_at = self.updated_at 36 37 field_dict: Dict[str, Any] = {} 38 field_dict.update(self.additional_properties) 39 field_dict.update({ 40 "id": id, 41 "name": name, 42 "owner_id": owner_id, 43 }) 44 if created_at is not UNSET: 45 field_dict["created_at"] = created_at 46 if updated_at is not UNSET: 47 field_dict["updated_at"] = updated_at 48 49 return field_dict
@classmethod
def
from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T:
53 @classmethod 54 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 55 d = src_dict.copy() 56 id = d.pop("id") 57 58 name = d.pop("name") 59 60 owner_id = d.pop("owner_id") 61 62 created_at = d.pop("created_at", UNSET) 63 64 updated_at = d.pop("updated_at", UNSET) 65 66 models_list_response_200_models_item = cls( 67 id=id, 68 name=name, 69 owner_id=owner_id, 70 created_at=created_at, 71 updated_at=updated_at, 72 ) 73 74 models_list_response_200_models_item.additional_properties = d 75 return models_list_response_200_models_item