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