wallaroo.wallaroo_ml_ops_api_client.models.pipelines_undeploy_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="PipelinesUndeployJsonBody") 8 9@attr.s(auto_attribs=True) 10class PipelinesUndeployJsonBody: 11 """ Request to undeploy a pipeline by either its own identifier, or the deployment identifier. 12 13 Attributes: 14 pipeline_id (Union[Unset, None, int]): Pipeline identifier (required unless deployment_id is supplied). 15 deployment_id (Union[Unset, None, int]): Deployment identifier (required unless pipeline_id is supplied). 16 """ 17 18 pipeline_id: Union[Unset, None, int] = UNSET 19 deployment_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 pipeline_id = self.pipeline_id 25 deployment_id = self.deployment_id 26 27 field_dict: Dict[str, Any] = {} 28 field_dict.update(self.additional_properties) 29 field_dict.update({ 30 }) 31 if pipeline_id is not UNSET: 32 field_dict["pipeline_id"] = pipeline_id 33 if deployment_id is not UNSET: 34 field_dict["deployment_id"] = deployment_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 pipeline_id = d.pop("pipeline_id", UNSET) 44 45 deployment_id = d.pop("deployment_id", UNSET) 46 47 pipelines_undeploy_json_body = cls( 48 pipeline_id=pipeline_id, 49 deployment_id=deployment_id, 50 ) 51 52 pipelines_undeploy_json_body.additional_properties = d 53 return pipelines_undeploy_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
PipelinesUndeployJsonBody:
10@attr.s(auto_attribs=True) 11class PipelinesUndeployJsonBody: 12 """ Request to undeploy a pipeline by either its own identifier, or the deployment identifier. 13 14 Attributes: 15 pipeline_id (Union[Unset, None, int]): Pipeline identifier (required unless deployment_id is supplied). 16 deployment_id (Union[Unset, None, int]): Deployment identifier (required unless pipeline_id is supplied). 17 """ 18 19 pipeline_id: Union[Unset, None, int] = UNSET 20 deployment_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 pipeline_id = self.pipeline_id 26 deployment_id = self.deployment_id 27 28 field_dict: Dict[str, Any] = {} 29 field_dict.update(self.additional_properties) 30 field_dict.update({ 31 }) 32 if pipeline_id is not UNSET: 33 field_dict["pipeline_id"] = pipeline_id 34 if deployment_id is not UNSET: 35 field_dict["deployment_id"] = deployment_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 pipeline_id = d.pop("pipeline_id", UNSET) 45 46 deployment_id = d.pop("deployment_id", UNSET) 47 48 pipelines_undeploy_json_body = cls( 49 pipeline_id=pipeline_id, 50 deployment_id=deployment_id, 51 ) 52 53 pipelines_undeploy_json_body.additional_properties = d 54 return pipelines_undeploy_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 to undeploy a pipeline by either its own identifier, or the deployment identifier.
Attributes: pipeline_id (Union[Unset, None, int]): Pipeline identifier (required unless deployment_id is supplied). deployment_id (Union[Unset, None, int]): Deployment identifier (required unless pipeline_id is supplied).
PipelinesUndeployJsonBody( pipeline_id: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, int] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, deployment_id: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, int] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>)
2def __init__(self, pipeline_id=attr_dict['pipeline_id'].default, deployment_id=attr_dict['deployment_id'].default): 3 self.pipeline_id = pipeline_id 4 self.deployment_id = deployment_id 5 self.additional_properties = __attr_factory_additional_properties()
Method generated by attrs for class PipelinesUndeployJsonBody.
def
to_dict(self) -> Dict[str, Any]:
24 def to_dict(self) -> Dict[str, Any]: 25 pipeline_id = self.pipeline_id 26 deployment_id = self.deployment_id 27 28 field_dict: Dict[str, Any] = {} 29 field_dict.update(self.additional_properties) 30 field_dict.update({ 31 }) 32 if pipeline_id is not UNSET: 33 field_dict["pipeline_id"] = pipeline_id 34 if deployment_id is not UNSET: 35 field_dict["deployment_id"] = deployment_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 pipeline_id = d.pop("pipeline_id", UNSET) 45 46 deployment_id = d.pop("deployment_id", UNSET) 47 48 pipelines_undeploy_json_body = cls( 49 pipeline_id=pipeline_id, 50 deployment_id=deployment_id, 51 ) 52 53 pipelines_undeploy_json_body.additional_properties = d 54 return pipelines_undeploy_json_body