wallaroo.wallaroo_ml_ops_api_client.models.models_upload_stream_response_200_insert_models
1from typing import Any, Dict, List, Type, TypeVar 2 3import attr 4 5from ..models.models_upload_stream_response_200_insert_models_returning_item import \ 6 ModelsUploadStreamResponse200InsertModelsReturningItem 7 8T = TypeVar("T", bound="ModelsUploadStreamResponse200InsertModels") 9 10@attr.s(auto_attribs=True) 11class ModelsUploadStreamResponse200InsertModels: 12 """ Response payload wrapper. 13 14 Attributes: 15 returning (List[ModelsUploadStreamResponse200InsertModelsReturningItem]): List of response details. 16 """ 17 18 returning: List[ModelsUploadStreamResponse200InsertModelsReturningItem] 19 additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) 20 21 22 def to_dict(self) -> Dict[str, Any]: 23 returning = [] 24 for returning_item_data in self.returning: 25 returning_item = returning_item_data.to_dict() 26 27 returning.append(returning_item) 28 29 30 31 32 33 field_dict: Dict[str, Any] = {} 34 field_dict.update(self.additional_properties) 35 field_dict.update({ 36 "returning": returning, 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 returning = [] 47 _returning = d.pop("returning") 48 for returning_item_data in (_returning): 49 returning_item = ModelsUploadStreamResponse200InsertModelsReturningItem.from_dict(returning_item_data) 50 51 52 53 returning.append(returning_item) 54 55 56 models_upload_stream_response_200_insert_models = cls( 57 returning=returning, 58 ) 59 60 models_upload_stream_response_200_insert_models.additional_properties = d 61 return models_upload_stream_response_200_insert_models 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
ModelsUploadStreamResponse200InsertModels:
11@attr.s(auto_attribs=True) 12class ModelsUploadStreamResponse200InsertModels: 13 """ Response payload wrapper. 14 15 Attributes: 16 returning (List[ModelsUploadStreamResponse200InsertModelsReturningItem]): List of response details. 17 """ 18 19 returning: List[ModelsUploadStreamResponse200InsertModelsReturningItem] 20 additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) 21 22 23 def to_dict(self) -> Dict[str, Any]: 24 returning = [] 25 for returning_item_data in self.returning: 26 returning_item = returning_item_data.to_dict() 27 28 returning.append(returning_item) 29 30 31 32 33 34 field_dict: Dict[str, Any] = {} 35 field_dict.update(self.additional_properties) 36 field_dict.update({ 37 "returning": returning, 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 returning = [] 48 _returning = d.pop("returning") 49 for returning_item_data in (_returning): 50 returning_item = ModelsUploadStreamResponse200InsertModelsReturningItem.from_dict(returning_item_data) 51 52 53 54 returning.append(returning_item) 55 56 57 models_upload_stream_response_200_insert_models = cls( 58 returning=returning, 59 ) 60 61 models_upload_stream_response_200_insert_models.additional_properties = d 62 return models_upload_stream_response_200_insert_models 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 payload wrapper.
Attributes: returning (List[ModelsUploadStreamResponse200InsertModelsReturningItem]): List of response details.
ModelsUploadStreamResponse200InsertModels( returning: List[wallaroo.wallaroo_ml_ops_api_client.models.models_upload_stream_response_200_insert_models_returning_item.ModelsUploadStreamResponse200InsertModelsReturningItem])
2def __init__(self, returning): 3 self.returning = returning 4 self.additional_properties = __attr_factory_additional_properties()
Method generated by attrs for class ModelsUploadStreamResponse200InsertModels.
def
to_dict(self) -> Dict[str, Any]:
23 def to_dict(self) -> Dict[str, Any]: 24 returning = [] 25 for returning_item_data in self.returning: 26 returning_item = returning_item_data.to_dict() 27 28 returning.append(returning_item) 29 30 31 32 33 34 field_dict: Dict[str, Any] = {} 35 field_dict.update(self.additional_properties) 36 field_dict.update({ 37 "returning": returning, 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 returning = [] 48 _returning = d.pop("returning") 49 for returning_item_data in (_returning): 50 returning_item = ModelsUploadStreamResponse200InsertModelsReturningItem.from_dict(returning_item_data) 51 52 53 54 returning.append(returning_item) 55 56 57 models_upload_stream_response_200_insert_models = cls( 58 returning=returning, 59 ) 60 61 models_upload_stream_response_200_insert_models.additional_properties = d 62 return models_upload_stream_response_200_insert_models