wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200 API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200

View Source

      1from typing import Any, Dict, List, Type, TypeVar, cast
      2
      3import attr
      4
      5from ..models.status_get_deployment_response_200_engine_lbs_item import \
      6    StatusGetDeploymentResponse200EngineLbsItem
      7from ..models.status_get_deployment_response_200_engines_item import \
      8    StatusGetDeploymentResponse200EnginesItem
      9from ..models.status_get_deployment_response_200_helm_item import \
     10    StatusGetDeploymentResponse200HelmItem
     11from ..models.status_get_deployment_response_200_sidekicks_item import \
     12    StatusGetDeploymentResponse200SidekicksItem
     13from ..models.status_get_deployment_response_200_status import \
     14    StatusGetDeploymentResponse200Status
     15
     16T = TypeVar("T", bound="StatusGetDeploymentResponse200")
     17
     18@attr.s(auto_attribs=True)
     19class StatusGetDeploymentResponse200:
     20    """ Pipeline deployment status.
     21
     22    Attributes:
     23        status (StatusGetDeploymentResponse200Status):  Current status of deployment.
     24        details (List[str]):  Deployment status details.
     25        engines (List[StatusGetDeploymentResponse200EnginesItem]):  Engine statuses.
     26        engine_lbs (List[StatusGetDeploymentResponse200EngineLbsItem]):  Load balancer statuses.
     27        sidekicks (List[StatusGetDeploymentResponse200SidekicksItem]):  Sidekick container statuses.
     28        helm (List[StatusGetDeploymentResponse200HelmItem]):
     29    """
     30
     31    status: StatusGetDeploymentResponse200Status
     32    details: List[str]
     33    engines: List[StatusGetDeploymentResponse200EnginesItem]
     34    engine_lbs: List[StatusGetDeploymentResponse200EngineLbsItem]
     35    sidekicks: List[StatusGetDeploymentResponse200SidekicksItem]
     36    helm: List[StatusGetDeploymentResponse200HelmItem]
     37    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     38
     39
     40    def to_dict(self) -> Dict[str, Any]:
     41        status = self.status.value
     42
     43        details = self.details
     44
     45
     46
     47
     48        engines = []
     49        for engines_item_data in self.engines:
     50            engines_item = engines_item_data.to_dict()
     51
     52            engines.append(engines_item)
     53
     54
     55
     56
     57        engine_lbs = []
     58        for engine_lbs_item_data in self.engine_lbs:
     59            engine_lbs_item = engine_lbs_item_data.to_dict()
     60
     61            engine_lbs.append(engine_lbs_item)
     62
     63
     64
     65
     66        sidekicks = []
     67        for sidekicks_item_data in self.sidekicks:
     68            sidekicks_item = sidekicks_item_data.to_dict()
     69
     70            sidekicks.append(sidekicks_item)
     71
     72
     73
     74
     75        helm = []
     76        for helm_item_data in self.helm:
     77            helm_item = helm_item_data.to_dict()
     78
     79            helm.append(helm_item)
     80
     81
     82
     83
     84
     85        field_dict: Dict[str, Any] = {}
     86        field_dict.update(self.additional_properties)
     87        field_dict.update({
     88            "status": status,
     89            "details": details,
     90            "engines": engines,
     91            "engine_lbs": engine_lbs,
     92            "sidekicks": sidekicks,
     93            "helm": helm,
     94        })
     95
     96        return field_dict
     97
     98
     99
    100    @classmethod
    101    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    102        d = src_dict.copy()
    103        status = StatusGetDeploymentResponse200Status(d.pop("status"))
    104
    105
    106
    107
    108        details = cast(List[str], d.pop("details"))
    109
    110
    111        engines = []
    112        _engines = d.pop("engines")
    113        for engines_item_data in (_engines):
    114            engines_item = StatusGetDeploymentResponse200EnginesItem.from_dict(engines_item_data)
    115
    116
    117
    118            engines.append(engines_item)
    119
    120
    121        engine_lbs = []
    122        _engine_lbs = d.pop("engine_lbs")
    123        for engine_lbs_item_data in (_engine_lbs):
    124            engine_lbs_item = StatusGetDeploymentResponse200EngineLbsItem.from_dict(engine_lbs_item_data)
    125
    126
    127
    128            engine_lbs.append(engine_lbs_item)
    129
    130
    131        sidekicks = []
    132        _sidekicks = d.pop("sidekicks")
    133        for sidekicks_item_data in (_sidekicks):
    134            sidekicks_item = StatusGetDeploymentResponse200SidekicksItem.from_dict(sidekicks_item_data)
    135
    136
    137
    138            sidekicks.append(sidekicks_item)
    139
    140
    141        helm = []
    142        _helm = d.pop("helm")
    143        for helm_item_data in (_helm):
    144            helm_item = StatusGetDeploymentResponse200HelmItem.from_dict(helm_item_data)
    145
    146
    147
    148            helm.append(helm_item)
    149
    150
    151        status_get_deployment_response_200 = cls(
    152            status=status,
    153            details=details,
    154            engines=engines,
    155            engine_lbs=engine_lbs,
    156            sidekicks=sidekicks,
    157            helm=helm,
    158        )
    159
    160        status_get_deployment_response_200.additional_properties = d
    161        return status_get_deployment_response_200
    162
    163    @property
    164    def additional_keys(self) -> List[str]:
    165        return list(self.additional_properties.keys())
    166
    167    def __getitem__(self, key: str) -> Any:
    168        return self.additional_properties[key]
    169
    170    def __setitem__(self, key: str, value: Any) -> None:
    171        self.additional_properties[key] = value
    172
    173    def __delitem__(self, key: str) -> None:
    174        del self.additional_properties[key]
    175
    176    def __contains__(self, key: str) -> bool:
    177        return key in self.additional_properties

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

     19@attr.s(auto_attribs=True)
     20class StatusGetDeploymentResponse200:
     21    """ Pipeline deployment status.
     22
     23    Attributes:
     24        status (StatusGetDeploymentResponse200Status):  Current status of deployment.
     25        details (List[str]):  Deployment status details.
     26        engines (List[StatusGetDeploymentResponse200EnginesItem]):  Engine statuses.
     27        engine_lbs (List[StatusGetDeploymentResponse200EngineLbsItem]):  Load balancer statuses.
     28        sidekicks (List[StatusGetDeploymentResponse200SidekicksItem]):  Sidekick container statuses.
     29        helm (List[StatusGetDeploymentResponse200HelmItem]):
     30    """
     31
     32    status: StatusGetDeploymentResponse200Status
     33    details: List[str]
     34    engines: List[StatusGetDeploymentResponse200EnginesItem]
     35    engine_lbs: List[StatusGetDeploymentResponse200EngineLbsItem]
     36    sidekicks: List[StatusGetDeploymentResponse200SidekicksItem]
     37    helm: List[StatusGetDeploymentResponse200HelmItem]
     38    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     39
     40
     41    def to_dict(self) -> Dict[str, Any]:
     42        status = self.status.value
     43
     44        details = self.details
     45
     46
     47
     48
     49        engines = []
     50        for engines_item_data in self.engines:
     51            engines_item = engines_item_data.to_dict()
     52
     53            engines.append(engines_item)
     54
     55
     56
     57
     58        engine_lbs = []
     59        for engine_lbs_item_data in self.engine_lbs:
     60            engine_lbs_item = engine_lbs_item_data.to_dict()
     61
     62            engine_lbs.append(engine_lbs_item)
     63
     64
     65
     66
     67        sidekicks = []
     68        for sidekicks_item_data in self.sidekicks:
     69            sidekicks_item = sidekicks_item_data.to_dict()
     70
     71            sidekicks.append(sidekicks_item)
     72
     73
     74
     75
     76        helm = []
     77        for helm_item_data in self.helm:
     78            helm_item = helm_item_data.to_dict()
     79
     80            helm.append(helm_item)
     81
     82
     83
     84
     85
     86        field_dict: Dict[str, Any] = {}
     87        field_dict.update(self.additional_properties)
     88        field_dict.update({
     89            "status": status,
     90            "details": details,
     91            "engines": engines,
     92            "engine_lbs": engine_lbs,
     93            "sidekicks": sidekicks,
     94            "helm": helm,
     95        })
     96
     97        return field_dict
     98
     99
    100
    101    @classmethod
    102    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    103        d = src_dict.copy()
    104        status = StatusGetDeploymentResponse200Status(d.pop("status"))
    105
    106
    107
    108
    109        details = cast(List[str], d.pop("details"))
    110
    111
    112        engines = []
    113        _engines = d.pop("engines")
    114        for engines_item_data in (_engines):
    115            engines_item = StatusGetDeploymentResponse200EnginesItem.from_dict(engines_item_data)
    116
    117
    118
    119            engines.append(engines_item)
    120
    121
    122        engine_lbs = []
    123        _engine_lbs = d.pop("engine_lbs")
    124        for engine_lbs_item_data in (_engine_lbs):
    125            engine_lbs_item = StatusGetDeploymentResponse200EngineLbsItem.from_dict(engine_lbs_item_data)
    126
    127
    128
    129            engine_lbs.append(engine_lbs_item)
    130
    131
    132        sidekicks = []
    133        _sidekicks = d.pop("sidekicks")
    134        for sidekicks_item_data in (_sidekicks):
    135            sidekicks_item = StatusGetDeploymentResponse200SidekicksItem.from_dict(sidekicks_item_data)
    136
    137
    138
    139            sidekicks.append(sidekicks_item)
    140
    141
    142        helm = []
    143        _helm = d.pop("helm")
    144        for helm_item_data in (_helm):
    145            helm_item = StatusGetDeploymentResponse200HelmItem.from_dict(helm_item_data)
    146
    147
    148
    149            helm.append(helm_item)
    150
    151
    152        status_get_deployment_response_200 = cls(
    153            status=status,
    154            details=details,
    155            engines=engines,
    156            engine_lbs=engine_lbs,
    157            sidekicks=sidekicks,
    158            helm=helm,
    159        )
    160
    161        status_get_deployment_response_200.additional_properties = d
    162        return status_get_deployment_response_200
    163
    164    @property
    165    def additional_keys(self) -> List[str]:
    166        return list(self.additional_properties.keys())
    167
    168    def __getitem__(self, key: str) -> Any:
    169        return self.additional_properties[key]
    170
    171    def __setitem__(self, key: str, value: Any) -> None:
    172        self.additional_properties[key] = value
    173
    174    def __delitem__(self, key: str) -> None:
    175        del self.additional_properties[key]
    176
    177    def __contains__(self, key: str) -> bool:
    178        return key in self.additional_properties

Pipeline deployment status.

Attributes: status (StatusGetDeploymentResponse200Status): Current status of deployment. details (List[str]): Deployment status details. engines (List[StatusGetDeploymentResponse200EnginesItem]): Engine statuses. engine_lbs (List[StatusGetDeploymentResponse200EngineLbsItem]): Load balancer statuses. sidekicks (List[StatusGetDeploymentResponse200SidekicksItem]): Sidekick container statuses. helm (List[StatusGetDeploymentResponse200HelmItem]):

StatusGetDeploymentResponse200( status: wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_status.StatusGetDeploymentResponse200Status, details: List[str], engines: List[wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_engines_item.StatusGetDeploymentResponse200EnginesItem], engine_lbs: List[wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_engine_lbs_item.StatusGetDeploymentResponse200EngineLbsItem], sidekicks: List[wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_sidekicks_item.StatusGetDeploymentResponse200SidekicksItem], helm: List[wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_helm_item.StatusGetDeploymentResponse200HelmItem]) View Source

    2def __init__(self, status, details, engines, engine_lbs, sidekicks, helm):
    3    self.status = status
    4    self.details = details
    5    self.engines = engines
    6    self.engine_lbs = engine_lbs
    7    self.sidekicks = sidekicks
    8    self.helm = helm
    9    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class StatusGetDeploymentResponse200.

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

    41    def to_dict(self) -> Dict[str, Any]:
    42        status = self.status.value
    43
    44        details = self.details
    45
    46
    47
    48
    49        engines = []
    50        for engines_item_data in self.engines:
    51            engines_item = engines_item_data.to_dict()
    52
    53            engines.append(engines_item)
    54
    55
    56
    57
    58        engine_lbs = []
    59        for engine_lbs_item_data in self.engine_lbs:
    60            engine_lbs_item = engine_lbs_item_data.to_dict()
    61
    62            engine_lbs.append(engine_lbs_item)
    63
    64
    65
    66
    67        sidekicks = []
    68        for sidekicks_item_data in self.sidekicks:
    69            sidekicks_item = sidekicks_item_data.to_dict()
    70
    71            sidekicks.append(sidekicks_item)
    72
    73
    74
    75
    76        helm = []
    77        for helm_item_data in self.helm:
    78            helm_item = helm_item_data.to_dict()
    79
    80            helm.append(helm_item)
    81
    82
    83
    84
    85
    86        field_dict: Dict[str, Any] = {}
    87        field_dict.update(self.additional_properties)
    88        field_dict.update({
    89            "status": status,
    90            "details": details,
    91            "engines": engines,
    92            "engine_lbs": engine_lbs,
    93            "sidekicks": sidekicks,
    94            "helm": helm,
    95        })
    96
    97        return field_dict

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

    101    @classmethod
    102    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    103        d = src_dict.copy()
    104        status = StatusGetDeploymentResponse200Status(d.pop("status"))
    105
    106
    107
    108
    109        details = cast(List[str], d.pop("details"))
    110
    111
    112        engines = []
    113        _engines = d.pop("engines")
    114        for engines_item_data in (_engines):
    115            engines_item = StatusGetDeploymentResponse200EnginesItem.from_dict(engines_item_data)
    116
    117
    118
    119            engines.append(engines_item)
    120
    121
    122        engine_lbs = []
    123        _engine_lbs = d.pop("engine_lbs")
    124        for engine_lbs_item_data in (_engine_lbs):
    125            engine_lbs_item = StatusGetDeploymentResponse200EngineLbsItem.from_dict(engine_lbs_item_data)
    126
    127
    128
    129            engine_lbs.append(engine_lbs_item)
    130
    131
    132        sidekicks = []
    133        _sidekicks = d.pop("sidekicks")
    134        for sidekicks_item_data in (_sidekicks):
    135            sidekicks_item = StatusGetDeploymentResponse200SidekicksItem.from_dict(sidekicks_item_data)
    136
    137
    138
    139            sidekicks.append(sidekicks_item)
    140
    141
    142        helm = []
    143        _helm = d.pop("helm")
    144        for helm_item_data in (_helm):
    145            helm_item = StatusGetDeploymentResponse200HelmItem.from_dict(helm_item_data)
    146
    147
    148
    149            helm.append(helm_item)
    150
    151
    152        status_get_deployment_response_200 = cls(
    153            status=status,
    154            details=details,
    155            engines=engines,
    156            engine_lbs=engine_lbs,
    157            sidekicks=sidekicks,
    158            helm=helm,
    159        )
    160
    161        status_get_deployment_response_200.additional_properties = d
    162        return status_get_deployment_response_200

additional_keys: List[str]