wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_engines_item API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_engines_item

View Source

      1from typing import Any, Dict, List, Type, TypeVar, Union
      2
      3import attr
      4
      5from ..models.status_get_deployment_response_200_engines_item_info import \
      6    StatusGetDeploymentResponse200EnginesItemInfo
      7from ..models.status_get_deployment_response_200_engines_item_model_statuses import \
      8    StatusGetDeploymentResponse200EnginesItemModelStatuses
      9from ..models.status_get_deployment_response_200_engines_item_pipeline_statuses import \
     10    StatusGetDeploymentResponse200EnginesItemPipelineStatuses
     11from ..types import UNSET, Unset
     12
     13T = TypeVar("T", bound="StatusGetDeploymentResponse200EnginesItem")
     14
     15@attr.s(auto_attribs=True)
     16class StatusGetDeploymentResponse200EnginesItem:
     17    """ Engine deployment status.
     18
     19    Attributes:
     20        info (StatusGetDeploymentResponse200EnginesItemInfo):
     21        pipeline_statuses (Union[Unset, None, StatusGetDeploymentResponse200EnginesItemPipelineStatuses]):  Statuses of
     22            pipelines serviced by the engine.
     23        model_statuses (Union[Unset, None, StatusGetDeploymentResponse200EnginesItemModelStatuses]):  Statuses of models
     24            executed by the engine.
     25    """
     26
     27    info: StatusGetDeploymentResponse200EnginesItemInfo
     28    pipeline_statuses: Union[Unset, None, StatusGetDeploymentResponse200EnginesItemPipelineStatuses] = UNSET
     29    model_statuses: Union[Unset, None, StatusGetDeploymentResponse200EnginesItemModelStatuses] = UNSET
     30    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     31
     32
     33    def to_dict(self) -> Dict[str, Any]:
     34        info = self.info.to_dict()
     35
     36        pipeline_statuses: Union[Unset, None, Dict[str, Any]] = UNSET
     37        if not isinstance(self.pipeline_statuses, Unset):
     38            pipeline_statuses = self.pipeline_statuses.to_dict() if self.pipeline_statuses else None
     39
     40        model_statuses: Union[Unset, None, Dict[str, Any]] = UNSET
     41        if not isinstance(self.model_statuses, Unset):
     42            model_statuses = self.model_statuses.to_dict() if self.model_statuses else None
     43
     44
     45        field_dict: Dict[str, Any] = {}
     46        field_dict.update(self.additional_properties)
     47        field_dict.update({
     48            "info": info,
     49        })
     50        if pipeline_statuses is not UNSET:
     51            field_dict["pipeline_statuses"] = pipeline_statuses
     52        if model_statuses is not UNSET:
     53            field_dict["model_statuses"] = model_statuses
     54
     55        return field_dict
     56
     57
     58
     59    @classmethod
     60    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
     61        d = src_dict.copy()
     62        info = StatusGetDeploymentResponse200EnginesItemInfo.from_dict(d.pop("info"))
     63
     64
     65
     66
     67        _pipeline_statuses = d.pop("pipeline_statuses", UNSET)
     68        pipeline_statuses: Union[Unset, None, StatusGetDeploymentResponse200EnginesItemPipelineStatuses]
     69        if _pipeline_statuses is None:
     70            pipeline_statuses = None
     71        elif isinstance(_pipeline_statuses,  Unset):
     72            pipeline_statuses = UNSET
     73        else:
     74            pipeline_statuses = StatusGetDeploymentResponse200EnginesItemPipelineStatuses.from_dict(_pipeline_statuses)
     75
     76
     77
     78
     79        _model_statuses = d.pop("model_statuses", UNSET)
     80        model_statuses: Union[Unset, None, StatusGetDeploymentResponse200EnginesItemModelStatuses]
     81        if _model_statuses is None:
     82            model_statuses = None
     83        elif isinstance(_model_statuses,  Unset):
     84            model_statuses = UNSET
     85        else:
     86            model_statuses = StatusGetDeploymentResponse200EnginesItemModelStatuses.from_dict(_model_statuses)
     87
     88
     89
     90
     91        status_get_deployment_response_200_engines_item = cls(
     92            info=info,
     93            pipeline_statuses=pipeline_statuses,
     94            model_statuses=model_statuses,
     95        )
     96
     97        status_get_deployment_response_200_engines_item.additional_properties = d
     98        return status_get_deployment_response_200_engines_item
     99
    100    @property
    101    def additional_keys(self) -> List[str]:
    102        return list(self.additional_properties.keys())
    103
    104    def __getitem__(self, key: str) -> Any:
    105        return self.additional_properties[key]
    106
    107    def __setitem__(self, key: str, value: Any) -> None:
    108        self.additional_properties[key] = value
    109
    110    def __delitem__(self, key: str) -> None:
    111        del self.additional_properties[key]
    112
    113    def __contains__(self, key: str) -> bool:
    114        return key in self.additional_properties

@attr.s(auto_attribs=True)
class StatusGetDeploymentResponse200EnginesItem: View Source

     16@attr.s(auto_attribs=True)
     17class StatusGetDeploymentResponse200EnginesItem:
     18    """ Engine deployment status.
     19
     20    Attributes:
     21        info (StatusGetDeploymentResponse200EnginesItemInfo):
     22        pipeline_statuses (Union[Unset, None, StatusGetDeploymentResponse200EnginesItemPipelineStatuses]):  Statuses of
     23            pipelines serviced by the engine.
     24        model_statuses (Union[Unset, None, StatusGetDeploymentResponse200EnginesItemModelStatuses]):  Statuses of models
     25            executed by the engine.
     26    """
     27
     28    info: StatusGetDeploymentResponse200EnginesItemInfo
     29    pipeline_statuses: Union[Unset, None, StatusGetDeploymentResponse200EnginesItemPipelineStatuses] = UNSET
     30    model_statuses: Union[Unset, None, StatusGetDeploymentResponse200EnginesItemModelStatuses] = UNSET
     31    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     32
     33
     34    def to_dict(self) -> Dict[str, Any]:
     35        info = self.info.to_dict()
     36
     37        pipeline_statuses: Union[Unset, None, Dict[str, Any]] = UNSET
     38        if not isinstance(self.pipeline_statuses, Unset):
     39            pipeline_statuses = self.pipeline_statuses.to_dict() if self.pipeline_statuses else None
     40
     41        model_statuses: Union[Unset, None, Dict[str, Any]] = UNSET
     42        if not isinstance(self.model_statuses, Unset):
     43            model_statuses = self.model_statuses.to_dict() if self.model_statuses else None
     44
     45
     46        field_dict: Dict[str, Any] = {}
     47        field_dict.update(self.additional_properties)
     48        field_dict.update({
     49            "info": info,
     50        })
     51        if pipeline_statuses is not UNSET:
     52            field_dict["pipeline_statuses"] = pipeline_statuses
     53        if model_statuses is not UNSET:
     54            field_dict["model_statuses"] = model_statuses
     55
     56        return field_dict
     57
     58
     59
     60    @classmethod
     61    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
     62        d = src_dict.copy()
     63        info = StatusGetDeploymentResponse200EnginesItemInfo.from_dict(d.pop("info"))
     64
     65
     66
     67
     68        _pipeline_statuses = d.pop("pipeline_statuses", UNSET)
     69        pipeline_statuses: Union[Unset, None, StatusGetDeploymentResponse200EnginesItemPipelineStatuses]
     70        if _pipeline_statuses is None:
     71            pipeline_statuses = None
     72        elif isinstance(_pipeline_statuses,  Unset):
     73            pipeline_statuses = UNSET
     74        else:
     75            pipeline_statuses = StatusGetDeploymentResponse200EnginesItemPipelineStatuses.from_dict(_pipeline_statuses)
     76
     77
     78
     79
     80        _model_statuses = d.pop("model_statuses", UNSET)
     81        model_statuses: Union[Unset, None, StatusGetDeploymentResponse200EnginesItemModelStatuses]
     82        if _model_statuses is None:
     83            model_statuses = None
     84        elif isinstance(_model_statuses,  Unset):
     85            model_statuses = UNSET
     86        else:
     87            model_statuses = StatusGetDeploymentResponse200EnginesItemModelStatuses.from_dict(_model_statuses)
     88
     89
     90
     91
     92        status_get_deployment_response_200_engines_item = cls(
     93            info=info,
     94            pipeline_statuses=pipeline_statuses,
     95            model_statuses=model_statuses,
     96        )
     97
     98        status_get_deployment_response_200_engines_item.additional_properties = d
     99        return status_get_deployment_response_200_engines_item
    100
    101    @property
    102    def additional_keys(self) -> List[str]:
    103        return list(self.additional_properties.keys())
    104
    105    def __getitem__(self, key: str) -> Any:
    106        return self.additional_properties[key]
    107
    108    def __setitem__(self, key: str, value: Any) -> None:
    109        self.additional_properties[key] = value
    110
    111    def __delitem__(self, key: str) -> None:
    112        del self.additional_properties[key]
    113
    114    def __contains__(self, key: str) -> bool:
    115        return key in self.additional_properties

Engine deployment status.

Attributes: info (StatusGetDeploymentResponse200EnginesItemInfo): pipeline_statuses (Union[Unset, None, StatusGetDeploymentResponse200EnginesItemPipelineStatuses]): Statuses of pipelines serviced by the engine. model_statuses (Union[Unset, None, StatusGetDeploymentResponse200EnginesItemModelStatuses]): Statuses of models executed by the engine.

StatusGetDeploymentResponse200EnginesItem( info: wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_engines_item_info.StatusGetDeploymentResponse200EnginesItemInfo, pipeline_statuses: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_engines_item_pipeline_statuses.StatusGetDeploymentResponse200EnginesItemPipelineStatuses] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, model_statuses: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_engines_item_model_statuses.StatusGetDeploymentResponse200EnginesItemModelStatuses] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>) View Source

    2def __init__(self, info, pipeline_statuses=attr_dict['pipeline_statuses'].default, model_statuses=attr_dict['model_statuses'].default):
    3    self.info = info
    4    self.pipeline_statuses = pipeline_statuses
    5    self.model_statuses = model_statuses
    6    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class StatusGetDeploymentResponse200EnginesItem.

def to_dict(self) -> Dict[str, Any]: View Source

    34    def to_dict(self) -> Dict[str, Any]:
    35        info = self.info.to_dict()
    36
    37        pipeline_statuses: Union[Unset, None, Dict[str, Any]] = UNSET
    38        if not isinstance(self.pipeline_statuses, Unset):
    39            pipeline_statuses = self.pipeline_statuses.to_dict() if self.pipeline_statuses else None
    40
    41        model_statuses: Union[Unset, None, Dict[str, Any]] = UNSET
    42        if not isinstance(self.model_statuses, Unset):
    43            model_statuses = self.model_statuses.to_dict() if self.model_statuses else None
    44
    45
    46        field_dict: Dict[str, Any] = {}
    47        field_dict.update(self.additional_properties)
    48        field_dict.update({
    49            "info": info,
    50        })
    51        if pipeline_statuses is not UNSET:
    52            field_dict["pipeline_statuses"] = pipeline_statuses
    53        if model_statuses is not UNSET:
    54            field_dict["model_statuses"] = model_statuses
    55
    56        return field_dict

@classmethod
def from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T: View Source

    60    @classmethod
    61    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    62        d = src_dict.copy()
    63        info = StatusGetDeploymentResponse200EnginesItemInfo.from_dict(d.pop("info"))
    64
    65
    66
    67
    68        _pipeline_statuses = d.pop("pipeline_statuses", UNSET)
    69        pipeline_statuses: Union[Unset, None, StatusGetDeploymentResponse200EnginesItemPipelineStatuses]
    70        if _pipeline_statuses is None:
    71            pipeline_statuses = None
    72        elif isinstance(_pipeline_statuses,  Unset):
    73            pipeline_statuses = UNSET
    74        else:
    75            pipeline_statuses = StatusGetDeploymentResponse200EnginesItemPipelineStatuses.from_dict(_pipeline_statuses)
    76
    77
    78
    79
    80        _model_statuses = d.pop("model_statuses", UNSET)
    81        model_statuses: Union[Unset, None, StatusGetDeploymentResponse200EnginesItemModelStatuses]
    82        if _model_statuses is None:
    83            model_statuses = None
    84        elif isinstance(_model_statuses,  Unset):
    85            model_statuses = UNSET
    86        else:
    87            model_statuses = StatusGetDeploymentResponse200EnginesItemModelStatuses.from_dict(_model_statuses)
    88
    89
    90
    91
    92        status_get_deployment_response_200_engines_item = cls(
    93            info=info,
    94            pipeline_statuses=pipeline_statuses,
    95            model_statuses=model_statuses,
    96        )
    97
    98        status_get_deployment_response_200_engines_item.additional_properties = d
    99        return status_get_deployment_response_200_engines_item

additional_keys: List[str]