wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_engine_lbs_item_info

  1from typing import Any, Dict, List, Type, TypeVar, Union, cast
  2
  3import attr
  4
  5from ..models.status_get_deployment_response_200_engine_lbs_item_info_health import \
  6    StatusGetDeploymentResponse200EngineLbsItemInfoHealth
  7from ..models.status_get_deployment_response_200_engine_lbs_item_info_labels import \
  8    StatusGetDeploymentResponse200EngineLbsItemInfoLabels
  9from ..models.status_get_deployment_response_200_engine_lbs_item_info_status import \
 10    StatusGetDeploymentResponse200EngineLbsItemInfoStatus
 11from ..types import UNSET, Unset
 12
 13T = TypeVar("T", bound="StatusGetDeploymentResponse200EngineLbsItemInfo")
 14
 15@attr.s(auto_attribs=True)
 16class StatusGetDeploymentResponse200EngineLbsItemInfo:
 17    """
 18    Attributes:
 19        name (str):  Pod name.
 20        status (StatusGetDeploymentResponse200EngineLbsItemInfoStatus):  Pod status.
 21        details (List[str]):  Details from kubernetes about the pod state.
 22        labels (StatusGetDeploymentResponse200EngineLbsItemInfoLabels):  Kubernetes labels for the pod
 23        health (StatusGetDeploymentResponse200EngineLbsItemInfoHealth):  The health of the pod.
 24        ip (Union[Unset, None, str]):  Pod IP address, if known.
 25        reason (Union[Unset, None, str]):  Reason for the current pod status, if available.
 26        required_cpu (Union[Unset, None, str]):  Minimum CPU required by the engine, if known.
 27        required_memory (Union[Unset, None, str]):  Memory required by the engine, if known.
 28    """
 29
 30    name: str
 31    status: StatusGetDeploymentResponse200EngineLbsItemInfoStatus
 32    details: List[str]
 33    labels: StatusGetDeploymentResponse200EngineLbsItemInfoLabels
 34    health: StatusGetDeploymentResponse200EngineLbsItemInfoHealth
 35    ip: Union[Unset, None, str] = UNSET
 36    reason: Union[Unset, None, str] = UNSET
 37    required_cpu: Union[Unset, None, str] = UNSET
 38    required_memory: Union[Unset, None, str] = UNSET
 39    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
 40
 41
 42    def to_dict(self) -> Dict[str, Any]:
 43        name = self.name
 44        status = self.status.value
 45
 46        details = self.details
 47
 48
 49
 50
 51        labels = self.labels.to_dict()
 52
 53        health = self.health.value
 54
 55        ip = self.ip
 56        reason = self.reason
 57        required_cpu = self.required_cpu
 58        required_memory = self.required_memory
 59
 60        field_dict: Dict[str, Any] = {}
 61        field_dict.update(self.additional_properties)
 62        field_dict.update({
 63            "name": name,
 64            "status": status,
 65            "details": details,
 66            "labels": labels,
 67            "health": health,
 68        })
 69        if ip is not UNSET:
 70            field_dict["ip"] = ip
 71        if reason is not UNSET:
 72            field_dict["reason"] = reason
 73        if required_cpu is not UNSET:
 74            field_dict["required_cpu"] = required_cpu
 75        if required_memory is not UNSET:
 76            field_dict["required_memory"] = required_memory
 77
 78        return field_dict
 79
 80
 81
 82    @classmethod
 83    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
 84        d = src_dict.copy()
 85        name = d.pop("name")
 86
 87        status = StatusGetDeploymentResponse200EngineLbsItemInfoStatus(d.pop("status"))
 88
 89
 90
 91
 92        details = cast(List[str], d.pop("details"))
 93
 94
 95        labels = StatusGetDeploymentResponse200EngineLbsItemInfoLabels.from_dict(d.pop("labels"))
 96
 97
 98
 99
100        health = StatusGetDeploymentResponse200EngineLbsItemInfoHealth(d.pop("health"))
101
102
103
104
105        ip = d.pop("ip", UNSET)
106
107        reason = d.pop("reason", UNSET)
108
109        required_cpu = d.pop("required_cpu", UNSET)
110
111        required_memory = d.pop("required_memory", UNSET)
112
113        status_get_deployment_response_200_engine_lbs_item_info = cls(
114            name=name,
115            status=status,
116            details=details,
117            labels=labels,
118            health=health,
119            ip=ip,
120            reason=reason,
121            required_cpu=required_cpu,
122            required_memory=required_memory,
123        )
124
125        status_get_deployment_response_200_engine_lbs_item_info.additional_properties = d
126        return status_get_deployment_response_200_engine_lbs_item_info
127
128    @property
129    def additional_keys(self) -> List[str]:
130        return list(self.additional_properties.keys())
131
132    def __getitem__(self, key: str) -> Any:
133        return self.additional_properties[key]
134
135    def __setitem__(self, key: str, value: Any) -> None:
136        self.additional_properties[key] = value
137
138    def __delitem__(self, key: str) -> None:
139        del self.additional_properties[key]
140
141    def __contains__(self, key: str) -> bool:
142        return key in self.additional_properties
@attr.s(auto_attribs=True)
class StatusGetDeploymentResponse200EngineLbsItemInfo:
 16@attr.s(auto_attribs=True)
 17class StatusGetDeploymentResponse200EngineLbsItemInfo:
 18    """
 19    Attributes:
 20        name (str):  Pod name.
 21        status (StatusGetDeploymentResponse200EngineLbsItemInfoStatus):  Pod status.
 22        details (List[str]):  Details from kubernetes about the pod state.
 23        labels (StatusGetDeploymentResponse200EngineLbsItemInfoLabels):  Kubernetes labels for the pod
 24        health (StatusGetDeploymentResponse200EngineLbsItemInfoHealth):  The health of the pod.
 25        ip (Union[Unset, None, str]):  Pod IP address, if known.
 26        reason (Union[Unset, None, str]):  Reason for the current pod status, if available.
 27        required_cpu (Union[Unset, None, str]):  Minimum CPU required by the engine, if known.
 28        required_memory (Union[Unset, None, str]):  Memory required by the engine, if known.
 29    """
 30
 31    name: str
 32    status: StatusGetDeploymentResponse200EngineLbsItemInfoStatus
 33    details: List[str]
 34    labels: StatusGetDeploymentResponse200EngineLbsItemInfoLabels
 35    health: StatusGetDeploymentResponse200EngineLbsItemInfoHealth
 36    ip: Union[Unset, None, str] = UNSET
 37    reason: Union[Unset, None, str] = UNSET
 38    required_cpu: Union[Unset, None, str] = UNSET
 39    required_memory: Union[Unset, None, str] = UNSET
 40    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
 41
 42
 43    def to_dict(self) -> Dict[str, Any]:
 44        name = self.name
 45        status = self.status.value
 46
 47        details = self.details
 48
 49
 50
 51
 52        labels = self.labels.to_dict()
 53
 54        health = self.health.value
 55
 56        ip = self.ip
 57        reason = self.reason
 58        required_cpu = self.required_cpu
 59        required_memory = self.required_memory
 60
 61        field_dict: Dict[str, Any] = {}
 62        field_dict.update(self.additional_properties)
 63        field_dict.update({
 64            "name": name,
 65            "status": status,
 66            "details": details,
 67            "labels": labels,
 68            "health": health,
 69        })
 70        if ip is not UNSET:
 71            field_dict["ip"] = ip
 72        if reason is not UNSET:
 73            field_dict["reason"] = reason
 74        if required_cpu is not UNSET:
 75            field_dict["required_cpu"] = required_cpu
 76        if required_memory is not UNSET:
 77            field_dict["required_memory"] = required_memory
 78
 79        return field_dict
 80
 81
 82
 83    @classmethod
 84    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
 85        d = src_dict.copy()
 86        name = d.pop("name")
 87
 88        status = StatusGetDeploymentResponse200EngineLbsItemInfoStatus(d.pop("status"))
 89
 90
 91
 92
 93        details = cast(List[str], d.pop("details"))
 94
 95
 96        labels = StatusGetDeploymentResponse200EngineLbsItemInfoLabels.from_dict(d.pop("labels"))
 97
 98
 99
100
101        health = StatusGetDeploymentResponse200EngineLbsItemInfoHealth(d.pop("health"))
102
103
104
105
106        ip = d.pop("ip", UNSET)
107
108        reason = d.pop("reason", UNSET)
109
110        required_cpu = d.pop("required_cpu", UNSET)
111
112        required_memory = d.pop("required_memory", UNSET)
113
114        status_get_deployment_response_200_engine_lbs_item_info = cls(
115            name=name,
116            status=status,
117            details=details,
118            labels=labels,
119            health=health,
120            ip=ip,
121            reason=reason,
122            required_cpu=required_cpu,
123            required_memory=required_memory,
124        )
125
126        status_get_deployment_response_200_engine_lbs_item_info.additional_properties = d
127        return status_get_deployment_response_200_engine_lbs_item_info
128
129    @property
130    def additional_keys(self) -> List[str]:
131        return list(self.additional_properties.keys())
132
133    def __getitem__(self, key: str) -> Any:
134        return self.additional_properties[key]
135
136    def __setitem__(self, key: str, value: Any) -> None:
137        self.additional_properties[key] = value
138
139    def __delitem__(self, key: str) -> None:
140        del self.additional_properties[key]
141
142    def __contains__(self, key: str) -> bool:
143        return key in self.additional_properties

Attributes: name (str): Pod name. status (StatusGetDeploymentResponse200EngineLbsItemInfoStatus): Pod status. details (List[str]): Details from kubernetes about the pod state. labels (StatusGetDeploymentResponse200EngineLbsItemInfoLabels): Kubernetes labels for the pod health (StatusGetDeploymentResponse200EngineLbsItemInfoHealth): The health of the pod. ip (Union[Unset, None, str]): Pod IP address, if known. reason (Union[Unset, None, str]): Reason for the current pod status, if available. required_cpu (Union[Unset, None, str]): Minimum CPU required by the engine, if known. required_memory (Union[Unset, None, str]): Memory required by the engine, if known.

StatusGetDeploymentResponse200EngineLbsItemInfo( name: str, status: wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_engine_lbs_item_info_status.StatusGetDeploymentResponse200EngineLbsItemInfoStatus, details: List[str], labels: wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_engine_lbs_item_info_labels.StatusGetDeploymentResponse200EngineLbsItemInfoLabels, health: wallaroo.wallaroo_ml_ops_api_client.models.status_get_deployment_response_200_engine_lbs_item_info_health.StatusGetDeploymentResponse200EngineLbsItemInfoHealth, ip: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, reason: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, required_cpu: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, required_memory: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>)
 2def __init__(self, name, status, details, labels, health, ip=attr_dict['ip'].default, reason=attr_dict['reason'].default, required_cpu=attr_dict['required_cpu'].default, required_memory=attr_dict['required_memory'].default):
 3    self.name = name
 4    self.status = status
 5    self.details = details
 6    self.labels = labels
 7    self.health = health
 8    self.ip = ip
 9    self.reason = reason
10    self.required_cpu = required_cpu
11    self.required_memory = required_memory
12    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class StatusGetDeploymentResponse200EngineLbsItemInfo.

def to_dict(self) -> Dict[str, Any]:
43    def to_dict(self) -> Dict[str, Any]:
44        name = self.name
45        status = self.status.value
46
47        details = self.details
48
49
50
51
52        labels = self.labels.to_dict()
53
54        health = self.health.value
55
56        ip = self.ip
57        reason = self.reason
58        required_cpu = self.required_cpu
59        required_memory = self.required_memory
60
61        field_dict: Dict[str, Any] = {}
62        field_dict.update(self.additional_properties)
63        field_dict.update({
64            "name": name,
65            "status": status,
66            "details": details,
67            "labels": labels,
68            "health": health,
69        })
70        if ip is not UNSET:
71            field_dict["ip"] = ip
72        if reason is not UNSET:
73            field_dict["reason"] = reason
74        if required_cpu is not UNSET:
75            field_dict["required_cpu"] = required_cpu
76        if required_memory is not UNSET:
77            field_dict["required_memory"] = required_memory
78
79        return field_dict
@classmethod
def from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T:
 83    @classmethod
 84    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
 85        d = src_dict.copy()
 86        name = d.pop("name")
 87
 88        status = StatusGetDeploymentResponse200EngineLbsItemInfoStatus(d.pop("status"))
 89
 90
 91
 92
 93        details = cast(List[str], d.pop("details"))
 94
 95
 96        labels = StatusGetDeploymentResponse200EngineLbsItemInfoLabels.from_dict(d.pop("labels"))
 97
 98
 99
100
101        health = StatusGetDeploymentResponse200EngineLbsItemInfoHealth(d.pop("health"))
102
103
104
105
106        ip = d.pop("ip", UNSET)
107
108        reason = d.pop("reason", UNSET)
109
110        required_cpu = d.pop("required_cpu", UNSET)
111
112        required_memory = d.pop("required_memory", UNSET)
113
114        status_get_deployment_response_200_engine_lbs_item_info = cls(
115            name=name,
116            status=status,
117            details=details,
118            labels=labels,
119            health=health,
120            ip=ip,
121            reason=reason,
122            required_cpu=required_cpu,
123            required_memory=required_memory,
124        )
125
126        status_get_deployment_response_200_engine_lbs_item_info.additional_properties = d
127        return status_get_deployment_response_200_engine_lbs_item_info
additional_keys: List[str]