wallaroo.wallaroo_ml_ops_api_client.models.v1_task_get_by_id_response_200_task_attempt_output_item API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.v1_task_get_by_id_response_200_task_attempt_output_item

View Source

      1from typing import Any, Dict, List, Type, TypeVar, Union
      2
      3import attr
      4
      5from ..models.v1_task_get_by_id_response_200_task_attempt_output_item_error_data import \
      6    V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData
      7from ..models.v1_task_get_by_id_response_200_task_attempt_output_item_output_data import \
      8    V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData
      9from ..models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_0 import \
     10    V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0
     11from ..models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_1 import \
     12    V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1
     13from ..models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_2 import \
     14    V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2
     15from ..models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_3 import \
     16    V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3
     17from ..models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_4 import \
     18    V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4
     19from ..models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_5 import \
     20    V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5
     21from ..models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_6 import \
     22    V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6
     23from ..models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_7 import \
     24    V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7
     25from ..types import UNSET, Unset
     26
     27T = TypeVar("T", bound="V1TaskGetByIdResponse200TaskAttemptOutputItem")
     28
     29@attr.s(auto_attribs=True)
     30class V1TaskGetByIdResponse200TaskAttemptOutputItem:
     31    """
     32    Attributes:
     33        id (str):
     34        attempt (int):
     35        status (Union[V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0,
     36            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1,
     37            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2,
     38            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3,
     39            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4,
     40            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5,
     41            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6,
     42            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7]):
     43        start_time (str):
     44        error_data (Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData]):
     45        output_data (Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData]):
     46        end_time (Union[Unset, None, str]):
     47    """
     48
     49    id: str
     50    attempt: int
     51    status: Union[V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7]
     52    start_time: str
     53    error_data: Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData] = UNSET
     54    output_data: Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData] = UNSET
     55    end_time: Union[Unset, None, str] = UNSET
     56    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     57
     58
     59    def to_dict(self) -> Dict[str, Any]:
     60        id = self.id
     61        attempt = self.attempt
     62        status: Union[Dict[str, Any], str]
     63
     64        if isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0):
     65            status = self.status.value
     66
     67        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1):
     68            status = self.status.value
     69
     70        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2):
     71            status = self.status.value
     72
     73        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3):
     74            status = self.status.value
     75
     76        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4):
     77            status = self.status.value
     78
     79        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5):
     80            status = self.status.value
     81
     82        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6):
     83            status = self.status.value
     84
     85        else:
     86            status = self.status.to_dict()
     87
     88
     89
     90        start_time = self.start_time
     91        error_data: Union[Unset, None, Dict[str, Any]] = UNSET
     92        if not isinstance(self.error_data, Unset):
     93            error_data = self.error_data.to_dict() if self.error_data else None
     94
     95        output_data: Union[Unset, None, Dict[str, Any]] = UNSET
     96        if not isinstance(self.output_data, Unset):
     97            output_data = self.output_data.to_dict() if self.output_data else None
     98
     99        end_time = self.end_time
    100
    101        field_dict: Dict[str, Any] = {}
    102        field_dict.update(self.additional_properties)
    103        field_dict.update({
    104            "id": id,
    105            "attempt": attempt,
    106            "status": status,
    107            "start_time": start_time,
    108        })
    109        if error_data is not UNSET:
    110            field_dict["error_data"] = error_data
    111        if output_data is not UNSET:
    112            field_dict["output_data"] = output_data
    113        if end_time is not UNSET:
    114            field_dict["end_time"] = end_time
    115
    116        return field_dict
    117
    118
    119
    120    @classmethod
    121    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    122        d = src_dict.copy()
    123        id = d.pop("id")
    124
    125        attempt = d.pop("attempt")
    126
    127        def _parse_status(data: object) -> Union[V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7]:
    128            try:
    129                if not isinstance(data, str):
    130                    raise TypeError()
    131                status_type_0 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0(data)
    132
    133
    134
    135                return status_type_0
    136            except: # noqa: E722
    137                pass
    138            try:
    139                if not isinstance(data, str):
    140                    raise TypeError()
    141                status_type_1 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1(data)
    142
    143
    144
    145                return status_type_1
    146            except: # noqa: E722
    147                pass
    148            try:
    149                if not isinstance(data, str):
    150                    raise TypeError()
    151                status_type_2 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2(data)
    152
    153
    154
    155                return status_type_2
    156            except: # noqa: E722
    157                pass
    158            try:
    159                if not isinstance(data, str):
    160                    raise TypeError()
    161                status_type_3 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3(data)
    162
    163
    164
    165                return status_type_3
    166            except: # noqa: E722
    167                pass
    168            try:
    169                if not isinstance(data, str):
    170                    raise TypeError()
    171                status_type_4 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4(data)
    172
    173
    174
    175                return status_type_4
    176            except: # noqa: E722
    177                pass
    178            try:
    179                if not isinstance(data, str):
    180                    raise TypeError()
    181                status_type_5 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5(data)
    182
    183
    184
    185                return status_type_5
    186            except: # noqa: E722
    187                pass
    188            try:
    189                if not isinstance(data, str):
    190                    raise TypeError()
    191                status_type_6 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6(data)
    192
    193
    194
    195                return status_type_6
    196            except: # noqa: E722
    197                pass
    198            if not isinstance(data, dict):
    199                raise TypeError()
    200            status_type_7 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7.from_dict(data)
    201
    202
    203
    204            return status_type_7
    205
    206        status = _parse_status(d.pop("status"))
    207
    208
    209        start_time = d.pop("start_time")
    210
    211        _error_data = d.pop("error_data", UNSET)
    212        error_data: Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData]
    213        if _error_data is None:
    214            error_data = None
    215        elif isinstance(_error_data,  Unset):
    216            error_data = UNSET
    217        else:
    218            error_data = V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData.from_dict(_error_data)
    219
    220
    221
    222
    223        _output_data = d.pop("output_data", UNSET)
    224        output_data: Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData]
    225        if _output_data is None:
    226            output_data = None
    227        elif isinstance(_output_data,  Unset):
    228            output_data = UNSET
    229        else:
    230            output_data = V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData.from_dict(_output_data)
    231
    232
    233
    234
    235        end_time = d.pop("end_time", UNSET)
    236
    237        v1_task_get_by_id_response_200_task_attempt_output_item = cls(
    238            id=id,
    239            attempt=attempt,
    240            status=status,
    241            start_time=start_time,
    242            error_data=error_data,
    243            output_data=output_data,
    244            end_time=end_time,
    245        )
    246
    247        v1_task_get_by_id_response_200_task_attempt_output_item.additional_properties = d
    248        return v1_task_get_by_id_response_200_task_attempt_output_item
    249
    250    @property
    251    def additional_keys(self) -> List[str]:
    252        return list(self.additional_properties.keys())
    253
    254    def __getitem__(self, key: str) -> Any:
    255        return self.additional_properties[key]
    256
    257    def __setitem__(self, key: str, value: Any) -> None:
    258        self.additional_properties[key] = value
    259
    260    def __delitem__(self, key: str) -> None:
    261        del self.additional_properties[key]
    262
    263    def __contains__(self, key: str) -> bool:
    264        return key in self.additional_properties

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

     30@attr.s(auto_attribs=True)
     31class V1TaskGetByIdResponse200TaskAttemptOutputItem:
     32    """
     33    Attributes:
     34        id (str):
     35        attempt (int):
     36        status (Union[V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0,
     37            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1,
     38            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2,
     39            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3,
     40            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4,
     41            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5,
     42            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6,
     43            V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7]):
     44        start_time (str):
     45        error_data (Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData]):
     46        output_data (Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData]):
     47        end_time (Union[Unset, None, str]):
     48    """
     49
     50    id: str
     51    attempt: int
     52    status: Union[V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7]
     53    start_time: str
     54    error_data: Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData] = UNSET
     55    output_data: Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData] = UNSET
     56    end_time: Union[Unset, None, str] = UNSET
     57    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     58
     59
     60    def to_dict(self) -> Dict[str, Any]:
     61        id = self.id
     62        attempt = self.attempt
     63        status: Union[Dict[str, Any], str]
     64
     65        if isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0):
     66            status = self.status.value
     67
     68        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1):
     69            status = self.status.value
     70
     71        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2):
     72            status = self.status.value
     73
     74        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3):
     75            status = self.status.value
     76
     77        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4):
     78            status = self.status.value
     79
     80        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5):
     81            status = self.status.value
     82
     83        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6):
     84            status = self.status.value
     85
     86        else:
     87            status = self.status.to_dict()
     88
     89
     90
     91        start_time = self.start_time
     92        error_data: Union[Unset, None, Dict[str, Any]] = UNSET
     93        if not isinstance(self.error_data, Unset):
     94            error_data = self.error_data.to_dict() if self.error_data else None
     95
     96        output_data: Union[Unset, None, Dict[str, Any]] = UNSET
     97        if not isinstance(self.output_data, Unset):
     98            output_data = self.output_data.to_dict() if self.output_data else None
     99
    100        end_time = self.end_time
    101
    102        field_dict: Dict[str, Any] = {}
    103        field_dict.update(self.additional_properties)
    104        field_dict.update({
    105            "id": id,
    106            "attempt": attempt,
    107            "status": status,
    108            "start_time": start_time,
    109        })
    110        if error_data is not UNSET:
    111            field_dict["error_data"] = error_data
    112        if output_data is not UNSET:
    113            field_dict["output_data"] = output_data
    114        if end_time is not UNSET:
    115            field_dict["end_time"] = end_time
    116
    117        return field_dict
    118
    119
    120
    121    @classmethod
    122    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    123        d = src_dict.copy()
    124        id = d.pop("id")
    125
    126        attempt = d.pop("attempt")
    127
    128        def _parse_status(data: object) -> Union[V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7]:
    129            try:
    130                if not isinstance(data, str):
    131                    raise TypeError()
    132                status_type_0 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0(data)
    133
    134
    135
    136                return status_type_0
    137            except: # noqa: E722
    138                pass
    139            try:
    140                if not isinstance(data, str):
    141                    raise TypeError()
    142                status_type_1 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1(data)
    143
    144
    145
    146                return status_type_1
    147            except: # noqa: E722
    148                pass
    149            try:
    150                if not isinstance(data, str):
    151                    raise TypeError()
    152                status_type_2 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2(data)
    153
    154
    155
    156                return status_type_2
    157            except: # noqa: E722
    158                pass
    159            try:
    160                if not isinstance(data, str):
    161                    raise TypeError()
    162                status_type_3 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3(data)
    163
    164
    165
    166                return status_type_3
    167            except: # noqa: E722
    168                pass
    169            try:
    170                if not isinstance(data, str):
    171                    raise TypeError()
    172                status_type_4 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4(data)
    173
    174
    175
    176                return status_type_4
    177            except: # noqa: E722
    178                pass
    179            try:
    180                if not isinstance(data, str):
    181                    raise TypeError()
    182                status_type_5 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5(data)
    183
    184
    185
    186                return status_type_5
    187            except: # noqa: E722
    188                pass
    189            try:
    190                if not isinstance(data, str):
    191                    raise TypeError()
    192                status_type_6 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6(data)
    193
    194
    195
    196                return status_type_6
    197            except: # noqa: E722
    198                pass
    199            if not isinstance(data, dict):
    200                raise TypeError()
    201            status_type_7 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7.from_dict(data)
    202
    203
    204
    205            return status_type_7
    206
    207        status = _parse_status(d.pop("status"))
    208
    209
    210        start_time = d.pop("start_time")
    211
    212        _error_data = d.pop("error_data", UNSET)
    213        error_data: Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData]
    214        if _error_data is None:
    215            error_data = None
    216        elif isinstance(_error_data,  Unset):
    217            error_data = UNSET
    218        else:
    219            error_data = V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData.from_dict(_error_data)
    220
    221
    222
    223
    224        _output_data = d.pop("output_data", UNSET)
    225        output_data: Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData]
    226        if _output_data is None:
    227            output_data = None
    228        elif isinstance(_output_data,  Unset):
    229            output_data = UNSET
    230        else:
    231            output_data = V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData.from_dict(_output_data)
    232
    233
    234
    235
    236        end_time = d.pop("end_time", UNSET)
    237
    238        v1_task_get_by_id_response_200_task_attempt_output_item = cls(
    239            id=id,
    240            attempt=attempt,
    241            status=status,
    242            start_time=start_time,
    243            error_data=error_data,
    244            output_data=output_data,
    245            end_time=end_time,
    246        )
    247
    248        v1_task_get_by_id_response_200_task_attempt_output_item.additional_properties = d
    249        return v1_task_get_by_id_response_200_task_attempt_output_item
    250
    251    @property
    252    def additional_keys(self) -> List[str]:
    253        return list(self.additional_properties.keys())
    254
    255    def __getitem__(self, key: str) -> Any:
    256        return self.additional_properties[key]
    257
    258    def __setitem__(self, key: str, value: Any) -> None:
    259        self.additional_properties[key] = value
    260
    261    def __delitem__(self, key: str) -> None:
    262        del self.additional_properties[key]
    263
    264    def __contains__(self, key: str) -> bool:
    265        return key in self.additional_properties

Attributes: id (str): attempt (int): status (Union[V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7]): start_time (str): error_data (Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData]): output_data (Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData]): end_time (Union[Unset, None, str]):

V1TaskGetByIdResponse200TaskAttemptOutputItem( id: str, attempt: int, status: Union[wallaroo.wallaroo_ml_ops_api_client.models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_0.V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0, wallaroo.wallaroo_ml_ops_api_client.models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_1.V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1, wallaroo.wallaroo_ml_ops_api_client.models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_2.V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2, wallaroo.wallaroo_ml_ops_api_client.models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_3.V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3, wallaroo.wallaroo_ml_ops_api_client.models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_4.V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4, wallaroo.wallaroo_ml_ops_api_client.models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_5.V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5, wallaroo.wallaroo_ml_ops_api_client.models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_6.V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6, wallaroo.wallaroo_ml_ops_api_client.models.v1_task_get_by_id_response_200_task_attempt_output_item_status_type_7.V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7], start_time: str, error_data: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, wallaroo.wallaroo_ml_ops_api_client.models.v1_task_get_by_id_response_200_task_attempt_output_item_error_data.V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, output_data: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, wallaroo.wallaroo_ml_ops_api_client.models.v1_task_get_by_id_response_200_task_attempt_output_item_output_data.V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, end_time: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>) View Source

     2def __init__(self, id, attempt, status, start_time, error_data=attr_dict['error_data'].default, output_data=attr_dict['output_data'].default, end_time=attr_dict['end_time'].default):
     3    self.id = id
     4    self.attempt = attempt
     5    self.status = status
     6    self.start_time = start_time
     7    self.error_data = error_data
     8    self.output_data = output_data
     9    self.end_time = end_time
    10    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class V1TaskGetByIdResponse200TaskAttemptOutputItem.

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

     60    def to_dict(self) -> Dict[str, Any]:
     61        id = self.id
     62        attempt = self.attempt
     63        status: Union[Dict[str, Any], str]
     64
     65        if isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0):
     66            status = self.status.value
     67
     68        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1):
     69            status = self.status.value
     70
     71        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2):
     72            status = self.status.value
     73
     74        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3):
     75            status = self.status.value
     76
     77        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4):
     78            status = self.status.value
     79
     80        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5):
     81            status = self.status.value
     82
     83        elif isinstance(self.status, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6):
     84            status = self.status.value
     85
     86        else:
     87            status = self.status.to_dict()
     88
     89
     90
     91        start_time = self.start_time
     92        error_data: Union[Unset, None, Dict[str, Any]] = UNSET
     93        if not isinstance(self.error_data, Unset):
     94            error_data = self.error_data.to_dict() if self.error_data else None
     95
     96        output_data: Union[Unset, None, Dict[str, Any]] = UNSET
     97        if not isinstance(self.output_data, Unset):
     98            output_data = self.output_data.to_dict() if self.output_data else None
     99
    100        end_time = self.end_time
    101
    102        field_dict: Dict[str, Any] = {}
    103        field_dict.update(self.additional_properties)
    104        field_dict.update({
    105            "id": id,
    106            "attempt": attempt,
    107            "status": status,
    108            "start_time": start_time,
    109        })
    110        if error_data is not UNSET:
    111            field_dict["error_data"] = error_data
    112        if output_data is not UNSET:
    113            field_dict["output_data"] = output_data
    114        if end_time is not UNSET:
    115            field_dict["end_time"] = end_time
    116
    117        return field_dict

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

    121    @classmethod
    122    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    123        d = src_dict.copy()
    124        id = d.pop("id")
    125
    126        attempt = d.pop("attempt")
    127
    128        def _parse_status(data: object) -> Union[V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6, V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7]:
    129            try:
    130                if not isinstance(data, str):
    131                    raise TypeError()
    132                status_type_0 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType0(data)
    133
    134
    135
    136                return status_type_0
    137            except: # noqa: E722
    138                pass
    139            try:
    140                if not isinstance(data, str):
    141                    raise TypeError()
    142                status_type_1 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType1(data)
    143
    144
    145
    146                return status_type_1
    147            except: # noqa: E722
    148                pass
    149            try:
    150                if not isinstance(data, str):
    151                    raise TypeError()
    152                status_type_2 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType2(data)
    153
    154
    155
    156                return status_type_2
    157            except: # noqa: E722
    158                pass
    159            try:
    160                if not isinstance(data, str):
    161                    raise TypeError()
    162                status_type_3 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType3(data)
    163
    164
    165
    166                return status_type_3
    167            except: # noqa: E722
    168                pass
    169            try:
    170                if not isinstance(data, str):
    171                    raise TypeError()
    172                status_type_4 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType4(data)
    173
    174
    175
    176                return status_type_4
    177            except: # noqa: E722
    178                pass
    179            try:
    180                if not isinstance(data, str):
    181                    raise TypeError()
    182                status_type_5 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType5(data)
    183
    184
    185
    186                return status_type_5
    187            except: # noqa: E722
    188                pass
    189            try:
    190                if not isinstance(data, str):
    191                    raise TypeError()
    192                status_type_6 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType6(data)
    193
    194
    195
    196                return status_type_6
    197            except: # noqa: E722
    198                pass
    199            if not isinstance(data, dict):
    200                raise TypeError()
    201            status_type_7 = V1TaskGetByIdResponse200TaskAttemptOutputItemStatusType7.from_dict(data)
    202
    203
    204
    205            return status_type_7
    206
    207        status = _parse_status(d.pop("status"))
    208
    209
    210        start_time = d.pop("start_time")
    211
    212        _error_data = d.pop("error_data", UNSET)
    213        error_data: Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData]
    214        if _error_data is None:
    215            error_data = None
    216        elif isinstance(_error_data,  Unset):
    217            error_data = UNSET
    218        else:
    219            error_data = V1TaskGetByIdResponse200TaskAttemptOutputItemErrorData.from_dict(_error_data)
    220
    221
    222
    223
    224        _output_data = d.pop("output_data", UNSET)
    225        output_data: Union[Unset, None, V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData]
    226        if _output_data is None:
    227            output_data = None
    228        elif isinstance(_output_data,  Unset):
    229            output_data = UNSET
    230        else:
    231            output_data = V1TaskGetByIdResponse200TaskAttemptOutputItemOutputData.from_dict(_output_data)
    232
    233
    234
    235
    236        end_time = d.pop("end_time", UNSET)
    237
    238        v1_task_get_by_id_response_200_task_attempt_output_item = cls(
    239            id=id,
    240            attempt=attempt,
    241            status=status,
    242            start_time=start_time,
    243            error_data=error_data,
    244            output_data=output_data,
    245            end_time=end_time,
    246        )
    247
    248        v1_task_get_by_id_response_200_task_attempt_output_item.additional_properties = d
    249        return v1_task_get_by_id_response_200_task_attempt_output_item

additional_keys: List[str]