wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item

View Source

      1from typing import Any, Dict, List, Type, TypeVar, Union
      2
      3import attr
      4
      5from ..models.assays_list_response_200_item_baseline_type_0 import \
      6    AssaysListResponse200ItemBaselineType0
      7from ..models.assays_list_response_200_item_baseline_type_1 import \
      8    AssaysListResponse200ItemBaselineType1
      9from ..models.assays_list_response_200_item_baseline_type_2 import \
     10    AssaysListResponse200ItemBaselineType2
     11from ..models.assays_list_response_200_item_summarizer_type_0 import \
     12    AssaysListResponse200ItemSummarizerType0
     13from ..models.assays_list_response_200_item_summarizer_type_1 import \
     14    AssaysListResponse200ItemSummarizerType1
     15from ..models.assays_list_response_200_item_window import \
     16    AssaysListResponse200ItemWindow
     17from ..types import UNSET, Unset
     18
     19T = TypeVar("T", bound="AssaysListResponse200Item")
     20
     21@attr.s(auto_attribs=True)
     22class AssaysListResponse200Item:
     23    """ Assay definition.
     24
     25    Attributes:
     26        id (int):  Assay identifier.
     27        name (str):  Assay name.
     28        active (bool):  Flag indicating whether the assay is active.
     29        status (str):  Assay status.
     30        alert_threshold (float):  Alert threshold.
     31        pipeline_id (int):  Pipeline identifier.
     32        pipeline_name (str):  Pipeline name.
     33        next_run (str):  Date and time of the next run.
     34        warning_threshold (Union[Unset, None, float]):  Warning threshold.
     35        last_run (Union[Unset, None, str]):  Date and time of the last run.
     36        run_until (Union[Unset, None, str]):  Date and time until which the assay is to run.
     37        updated_at (Union[Unset, None, str]):  Date and time the assay was last updated.
     38        baseline (Union[AssaysListResponse200ItemBaselineType0, AssaysListResponse200ItemBaselineType1,
     39            AssaysListResponse200ItemBaselineType2, None, Unset]):  Options describing the range of inference data used as a
     40            baseline by the assay
     41        window (Union[Unset, None, AssaysListResponse200ItemWindow]):  Options describing the time range tested by the
     42            assay
     43        summarizer (Union[AssaysListResponse200ItemSummarizerType0, AssaysListResponse200ItemSummarizerType1, None,
     44            Unset]):  Options describing the types of analysis done by the assay
     45    """
     46
     47    id: int
     48    name: str
     49    active: bool
     50    status: str
     51    alert_threshold: float
     52    pipeline_id: int
     53    pipeline_name: str
     54    next_run: str
     55    warning_threshold: Union[Unset, None, float] = UNSET
     56    last_run: Union[Unset, None, str] = UNSET
     57    run_until: Union[Unset, None, str] = UNSET
     58    updated_at: Union[Unset, None, str] = UNSET
     59    baseline: Union[AssaysListResponse200ItemBaselineType0, AssaysListResponse200ItemBaselineType1, AssaysListResponse200ItemBaselineType2, None, Unset] = UNSET
     60    window: Union[Unset, None, AssaysListResponse200ItemWindow] = UNSET
     61    summarizer: Union[AssaysListResponse200ItemSummarizerType0, AssaysListResponse200ItemSummarizerType1, None, Unset] = UNSET
     62    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     63
     64
     65    def to_dict(self) -> Dict[str, Any]:
     66        id = self.id
     67        name = self.name
     68        active = self.active
     69        status = self.status
     70        alert_threshold = self.alert_threshold
     71        pipeline_id = self.pipeline_id
     72        pipeline_name = self.pipeline_name
     73        next_run = self.next_run
     74        warning_threshold = self.warning_threshold
     75        last_run = self.last_run
     76        run_until = self.run_until
     77        updated_at = self.updated_at
     78        baseline: Union[Dict[str, Any], None, Unset]
     79        if isinstance(self.baseline, Unset):
     80            baseline = UNSET
     81        elif self.baseline is None:
     82            baseline = None
     83
     84        elif isinstance(self.baseline, AssaysListResponse200ItemBaselineType0):
     85            baseline = UNSET
     86            if not isinstance(self.baseline, Unset):
     87                baseline = self.baseline.to_dict()
     88
     89        elif isinstance(self.baseline, AssaysListResponse200ItemBaselineType1):
     90            baseline = UNSET
     91            if not isinstance(self.baseline, Unset):
     92                baseline = self.baseline.to_dict()
     93
     94        else:
     95            baseline = UNSET
     96            if not isinstance(self.baseline, Unset):
     97                baseline = self.baseline.to_dict()
     98
     99
    100
    101        window: Union[Unset, None, Dict[str, Any]] = UNSET
    102        if not isinstance(self.window, Unset):
    103            window = self.window.to_dict() if self.window else None
    104
    105        summarizer: Union[Dict[str, Any], None, Unset]
    106        if isinstance(self.summarizer, Unset):
    107            summarizer = UNSET
    108        elif self.summarizer is None:
    109            summarizer = None
    110
    111        elif isinstance(self.summarizer, AssaysListResponse200ItemSummarizerType0):
    112            summarizer = UNSET
    113            if not isinstance(self.summarizer, Unset):
    114                summarizer = self.summarizer.to_dict()
    115
    116        else:
    117            summarizer = UNSET
    118            if not isinstance(self.summarizer, Unset):
    119                summarizer = self.summarizer.to_dict()
    120
    121
    122
    123
    124        field_dict: Dict[str, Any] = {}
    125        field_dict.update(self.additional_properties)
    126        field_dict.update({
    127            "id": id,
    128            "name": name,
    129            "active": active,
    130            "status": status,
    131            "alert_threshold": alert_threshold,
    132            "pipeline_id": pipeline_id,
    133            "pipeline_name": pipeline_name,
    134            "next_run": next_run,
    135        })
    136        if warning_threshold is not UNSET:
    137            field_dict["warning_threshold"] = warning_threshold
    138        if last_run is not UNSET:
    139            field_dict["last_run"] = last_run
    140        if run_until is not UNSET:
    141            field_dict["run_until"] = run_until
    142        if updated_at is not UNSET:
    143            field_dict["updated_at"] = updated_at
    144        if baseline is not UNSET:
    145            field_dict["baseline"] = baseline
    146        if window is not UNSET:
    147            field_dict["window"] = window
    148        if summarizer is not UNSET:
    149            field_dict["summarizer"] = summarizer
    150
    151        return field_dict
    152
    153
    154
    155    @classmethod
    156    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    157        d = src_dict.copy()
    158        id = d.pop("id")
    159
    160        name = d.pop("name")
    161
    162        active = d.pop("active")
    163
    164        status = d.pop("status")
    165
    166        alert_threshold = d.pop("alert_threshold")
    167
    168        pipeline_id = d.pop("pipeline_id")
    169
    170        pipeline_name = d.pop("pipeline_name")
    171
    172        next_run = d.pop("next_run")
    173
    174        warning_threshold = d.pop("warning_threshold", UNSET)
    175
    176        last_run = d.pop("last_run", UNSET)
    177
    178        run_until = d.pop("run_until", UNSET)
    179
    180        updated_at = d.pop("updated_at", UNSET)
    181
    182        def _parse_baseline(data: object) -> Union[AssaysListResponse200ItemBaselineType0, AssaysListResponse200ItemBaselineType1, AssaysListResponse200ItemBaselineType2, None, Unset]:
    183            if data is None:
    184                return data
    185            if isinstance(data, Unset):
    186                return data
    187            try:
    188                if not isinstance(data, dict):
    189                    raise TypeError()
    190                _baseline_type_0 = data
    191                baseline_type_0: Union[Unset, AssaysListResponse200ItemBaselineType0]
    192                if isinstance(_baseline_type_0,  Unset):
    193                    baseline_type_0 = UNSET
    194                else:
    195                    baseline_type_0 = AssaysListResponse200ItemBaselineType0.from_dict(_baseline_type_0)
    196
    197
    198
    199                return baseline_type_0
    200            except: # noqa: E722
    201                pass
    202            try:
    203                if not isinstance(data, dict):
    204                    raise TypeError()
    205                _baseline_type_1 = data
    206                baseline_type_1: Union[Unset, AssaysListResponse200ItemBaselineType1]
    207                if isinstance(_baseline_type_1,  Unset):
    208                    baseline_type_1 = UNSET
    209                else:
    210                    baseline_type_1 = AssaysListResponse200ItemBaselineType1.from_dict(_baseline_type_1)
    211
    212
    213
    214                return baseline_type_1
    215            except: # noqa: E722
    216                pass
    217            if not isinstance(data, dict):
    218                raise TypeError()
    219            _baseline_type_2 = data
    220            baseline_type_2: Union[Unset, AssaysListResponse200ItemBaselineType2]
    221            if isinstance(_baseline_type_2,  Unset):
    222                baseline_type_2 = UNSET
    223            else:
    224                baseline_type_2 = AssaysListResponse200ItemBaselineType2.from_dict(_baseline_type_2)
    225
    226
    227
    228            return baseline_type_2
    229
    230        baseline = _parse_baseline(d.pop("baseline", UNSET))
    231
    232
    233        _window = d.pop("window", UNSET)
    234        window: Union[Unset, None, AssaysListResponse200ItemWindow]
    235        if _window is None:
    236            window = None
    237        elif isinstance(_window,  Unset):
    238            window = UNSET
    239        else:
    240            window = AssaysListResponse200ItemWindow.from_dict(_window)
    241
    242
    243
    244
    245        def _parse_summarizer(data: object) -> Union[AssaysListResponse200ItemSummarizerType0, AssaysListResponse200ItemSummarizerType1, None, Unset]:
    246            if data is None:
    247                return data
    248            if isinstance(data, Unset):
    249                return data
    250            try:
    251                if not isinstance(data, dict):
    252                    raise TypeError()
    253                _summarizer_type_0 = data
    254                summarizer_type_0: Union[Unset, AssaysListResponse200ItemSummarizerType0]
    255                if isinstance(_summarizer_type_0,  Unset):
    256                    summarizer_type_0 = UNSET
    257                else:
    258                    summarizer_type_0 = AssaysListResponse200ItemSummarizerType0.from_dict(_summarizer_type_0)
    259
    260
    261
    262                return summarizer_type_0
    263            except: # noqa: E722
    264                pass
    265            if not isinstance(data, dict):
    266                raise TypeError()
    267            _summarizer_type_1 = data
    268            summarizer_type_1: Union[Unset, AssaysListResponse200ItemSummarizerType1]
    269            if isinstance(_summarizer_type_1,  Unset):
    270                summarizer_type_1 = UNSET
    271            else:
    272                summarizer_type_1 = AssaysListResponse200ItemSummarizerType1.from_dict(_summarizer_type_1)
    273
    274
    275
    276            return summarizer_type_1
    277
    278        summarizer = _parse_summarizer(d.pop("summarizer", UNSET))
    279
    280
    281        assays_list_response_200_item = cls(
    282            id=id,
    283            name=name,
    284            active=active,
    285            status=status,
    286            alert_threshold=alert_threshold,
    287            pipeline_id=pipeline_id,
    288            pipeline_name=pipeline_name,
    289            next_run=next_run,
    290            warning_threshold=warning_threshold,
    291            last_run=last_run,
    292            run_until=run_until,
    293            updated_at=updated_at,
    294            baseline=baseline,
    295            window=window,
    296            summarizer=summarizer,
    297        )
    298
    299        assays_list_response_200_item.additional_properties = d
    300        return assays_list_response_200_item
    301
    302    @property
    303    def additional_keys(self) -> List[str]:
    304        return list(self.additional_properties.keys())
    305
    306    def __getitem__(self, key: str) -> Any:
    307        return self.additional_properties[key]
    308
    309    def __setitem__(self, key: str, value: Any) -> None:
    310        self.additional_properties[key] = value
    311
    312    def __delitem__(self, key: str) -> None:
    313        del self.additional_properties[key]
    314
    315    def __contains__(self, key: str) -> bool:
    316        return key in self.additional_properties

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

     22@attr.s(auto_attribs=True)
     23class AssaysListResponse200Item:
     24    """ Assay definition.
     25
     26    Attributes:
     27        id (int):  Assay identifier.
     28        name (str):  Assay name.
     29        active (bool):  Flag indicating whether the assay is active.
     30        status (str):  Assay status.
     31        alert_threshold (float):  Alert threshold.
     32        pipeline_id (int):  Pipeline identifier.
     33        pipeline_name (str):  Pipeline name.
     34        next_run (str):  Date and time of the next run.
     35        warning_threshold (Union[Unset, None, float]):  Warning threshold.
     36        last_run (Union[Unset, None, str]):  Date and time of the last run.
     37        run_until (Union[Unset, None, str]):  Date and time until which the assay is to run.
     38        updated_at (Union[Unset, None, str]):  Date and time the assay was last updated.
     39        baseline (Union[AssaysListResponse200ItemBaselineType0, AssaysListResponse200ItemBaselineType1,
     40            AssaysListResponse200ItemBaselineType2, None, Unset]):  Options describing the range of inference data used as a
     41            baseline by the assay
     42        window (Union[Unset, None, AssaysListResponse200ItemWindow]):  Options describing the time range tested by the
     43            assay
     44        summarizer (Union[AssaysListResponse200ItemSummarizerType0, AssaysListResponse200ItemSummarizerType1, None,
     45            Unset]):  Options describing the types of analysis done by the assay
     46    """
     47
     48    id: int
     49    name: str
     50    active: bool
     51    status: str
     52    alert_threshold: float
     53    pipeline_id: int
     54    pipeline_name: str
     55    next_run: str
     56    warning_threshold: Union[Unset, None, float] = UNSET
     57    last_run: Union[Unset, None, str] = UNSET
     58    run_until: Union[Unset, None, str] = UNSET
     59    updated_at: Union[Unset, None, str] = UNSET
     60    baseline: Union[AssaysListResponse200ItemBaselineType0, AssaysListResponse200ItemBaselineType1, AssaysListResponse200ItemBaselineType2, None, Unset] = UNSET
     61    window: Union[Unset, None, AssaysListResponse200ItemWindow] = UNSET
     62    summarizer: Union[AssaysListResponse200ItemSummarizerType0, AssaysListResponse200ItemSummarizerType1, None, Unset] = UNSET
     63    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     64
     65
     66    def to_dict(self) -> Dict[str, Any]:
     67        id = self.id
     68        name = self.name
     69        active = self.active
     70        status = self.status
     71        alert_threshold = self.alert_threshold
     72        pipeline_id = self.pipeline_id
     73        pipeline_name = self.pipeline_name
     74        next_run = self.next_run
     75        warning_threshold = self.warning_threshold
     76        last_run = self.last_run
     77        run_until = self.run_until
     78        updated_at = self.updated_at
     79        baseline: Union[Dict[str, Any], None, Unset]
     80        if isinstance(self.baseline, Unset):
     81            baseline = UNSET
     82        elif self.baseline is None:
     83            baseline = None
     84
     85        elif isinstance(self.baseline, AssaysListResponse200ItemBaselineType0):
     86            baseline = UNSET
     87            if not isinstance(self.baseline, Unset):
     88                baseline = self.baseline.to_dict()
     89
     90        elif isinstance(self.baseline, AssaysListResponse200ItemBaselineType1):
     91            baseline = UNSET
     92            if not isinstance(self.baseline, Unset):
     93                baseline = self.baseline.to_dict()
     94
     95        else:
     96            baseline = UNSET
     97            if not isinstance(self.baseline, Unset):
     98                baseline = self.baseline.to_dict()
     99
    100
    101
    102        window: Union[Unset, None, Dict[str, Any]] = UNSET
    103        if not isinstance(self.window, Unset):
    104            window = self.window.to_dict() if self.window else None
    105
    106        summarizer: Union[Dict[str, Any], None, Unset]
    107        if isinstance(self.summarizer, Unset):
    108            summarizer = UNSET
    109        elif self.summarizer is None:
    110            summarizer = None
    111
    112        elif isinstance(self.summarizer, AssaysListResponse200ItemSummarizerType0):
    113            summarizer = UNSET
    114            if not isinstance(self.summarizer, Unset):
    115                summarizer = self.summarizer.to_dict()
    116
    117        else:
    118            summarizer = UNSET
    119            if not isinstance(self.summarizer, Unset):
    120                summarizer = self.summarizer.to_dict()
    121
    122
    123
    124
    125        field_dict: Dict[str, Any] = {}
    126        field_dict.update(self.additional_properties)
    127        field_dict.update({
    128            "id": id,
    129            "name": name,
    130            "active": active,
    131            "status": status,
    132            "alert_threshold": alert_threshold,
    133            "pipeline_id": pipeline_id,
    134            "pipeline_name": pipeline_name,
    135            "next_run": next_run,
    136        })
    137        if warning_threshold is not UNSET:
    138            field_dict["warning_threshold"] = warning_threshold
    139        if last_run is not UNSET:
    140            field_dict["last_run"] = last_run
    141        if run_until is not UNSET:
    142            field_dict["run_until"] = run_until
    143        if updated_at is not UNSET:
    144            field_dict["updated_at"] = updated_at
    145        if baseline is not UNSET:
    146            field_dict["baseline"] = baseline
    147        if window is not UNSET:
    148            field_dict["window"] = window
    149        if summarizer is not UNSET:
    150            field_dict["summarizer"] = summarizer
    151
    152        return field_dict
    153
    154
    155
    156    @classmethod
    157    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    158        d = src_dict.copy()
    159        id = d.pop("id")
    160
    161        name = d.pop("name")
    162
    163        active = d.pop("active")
    164
    165        status = d.pop("status")
    166
    167        alert_threshold = d.pop("alert_threshold")
    168
    169        pipeline_id = d.pop("pipeline_id")
    170
    171        pipeline_name = d.pop("pipeline_name")
    172
    173        next_run = d.pop("next_run")
    174
    175        warning_threshold = d.pop("warning_threshold", UNSET)
    176
    177        last_run = d.pop("last_run", UNSET)
    178
    179        run_until = d.pop("run_until", UNSET)
    180
    181        updated_at = d.pop("updated_at", UNSET)
    182
    183        def _parse_baseline(data: object) -> Union[AssaysListResponse200ItemBaselineType0, AssaysListResponse200ItemBaselineType1, AssaysListResponse200ItemBaselineType2, None, Unset]:
    184            if data is None:
    185                return data
    186            if isinstance(data, Unset):
    187                return data
    188            try:
    189                if not isinstance(data, dict):
    190                    raise TypeError()
    191                _baseline_type_0 = data
    192                baseline_type_0: Union[Unset, AssaysListResponse200ItemBaselineType0]
    193                if isinstance(_baseline_type_0,  Unset):
    194                    baseline_type_0 = UNSET
    195                else:
    196                    baseline_type_0 = AssaysListResponse200ItemBaselineType0.from_dict(_baseline_type_0)
    197
    198
    199
    200                return baseline_type_0
    201            except: # noqa: E722
    202                pass
    203            try:
    204                if not isinstance(data, dict):
    205                    raise TypeError()
    206                _baseline_type_1 = data
    207                baseline_type_1: Union[Unset, AssaysListResponse200ItemBaselineType1]
    208                if isinstance(_baseline_type_1,  Unset):
    209                    baseline_type_1 = UNSET
    210                else:
    211                    baseline_type_1 = AssaysListResponse200ItemBaselineType1.from_dict(_baseline_type_1)
    212
    213
    214
    215                return baseline_type_1
    216            except: # noqa: E722
    217                pass
    218            if not isinstance(data, dict):
    219                raise TypeError()
    220            _baseline_type_2 = data
    221            baseline_type_2: Union[Unset, AssaysListResponse200ItemBaselineType2]
    222            if isinstance(_baseline_type_2,  Unset):
    223                baseline_type_2 = UNSET
    224            else:
    225                baseline_type_2 = AssaysListResponse200ItemBaselineType2.from_dict(_baseline_type_2)
    226
    227
    228
    229            return baseline_type_2
    230
    231        baseline = _parse_baseline(d.pop("baseline", UNSET))
    232
    233
    234        _window = d.pop("window", UNSET)
    235        window: Union[Unset, None, AssaysListResponse200ItemWindow]
    236        if _window is None:
    237            window = None
    238        elif isinstance(_window,  Unset):
    239            window = UNSET
    240        else:
    241            window = AssaysListResponse200ItemWindow.from_dict(_window)
    242
    243
    244
    245
    246        def _parse_summarizer(data: object) -> Union[AssaysListResponse200ItemSummarizerType0, AssaysListResponse200ItemSummarizerType1, None, Unset]:
    247            if data is None:
    248                return data
    249            if isinstance(data, Unset):
    250                return data
    251            try:
    252                if not isinstance(data, dict):
    253                    raise TypeError()
    254                _summarizer_type_0 = data
    255                summarizer_type_0: Union[Unset, AssaysListResponse200ItemSummarizerType0]
    256                if isinstance(_summarizer_type_0,  Unset):
    257                    summarizer_type_0 = UNSET
    258                else:
    259                    summarizer_type_0 = AssaysListResponse200ItemSummarizerType0.from_dict(_summarizer_type_0)
    260
    261
    262
    263                return summarizer_type_0
    264            except: # noqa: E722
    265                pass
    266            if not isinstance(data, dict):
    267                raise TypeError()
    268            _summarizer_type_1 = data
    269            summarizer_type_1: Union[Unset, AssaysListResponse200ItemSummarizerType1]
    270            if isinstance(_summarizer_type_1,  Unset):
    271                summarizer_type_1 = UNSET
    272            else:
    273                summarizer_type_1 = AssaysListResponse200ItemSummarizerType1.from_dict(_summarizer_type_1)
    274
    275
    276
    277            return summarizer_type_1
    278
    279        summarizer = _parse_summarizer(d.pop("summarizer", UNSET))
    280
    281
    282        assays_list_response_200_item = cls(
    283            id=id,
    284            name=name,
    285            active=active,
    286            status=status,
    287            alert_threshold=alert_threshold,
    288            pipeline_id=pipeline_id,
    289            pipeline_name=pipeline_name,
    290            next_run=next_run,
    291            warning_threshold=warning_threshold,
    292            last_run=last_run,
    293            run_until=run_until,
    294            updated_at=updated_at,
    295            baseline=baseline,
    296            window=window,
    297            summarizer=summarizer,
    298        )
    299
    300        assays_list_response_200_item.additional_properties = d
    301        return assays_list_response_200_item
    302
    303    @property
    304    def additional_keys(self) -> List[str]:
    305        return list(self.additional_properties.keys())
    306
    307    def __getitem__(self, key: str) -> Any:
    308        return self.additional_properties[key]
    309
    310    def __setitem__(self, key: str, value: Any) -> None:
    311        self.additional_properties[key] = value
    312
    313    def __delitem__(self, key: str) -> None:
    314        del self.additional_properties[key]
    315
    316    def __contains__(self, key: str) -> bool:
    317        return key in self.additional_properties

Assay definition.

Attributes: id (int): Assay identifier. name (str): Assay name. active (bool): Flag indicating whether the assay is active. status (str): Assay status. alert_threshold (float): Alert threshold. pipeline_id (int): Pipeline identifier. pipeline_name (str): Pipeline name. next_run (str): Date and time of the next run. warning_threshold (Union[Unset, None, float]): Warning threshold. last_run (Union[Unset, None, str]): Date and time of the last run. run_until (Union[Unset, None, str]): Date and time until which the assay is to run. updated_at (Union[Unset, None, str]): Date and time the assay was last updated. baseline (Union[AssaysListResponse200ItemBaselineType0, AssaysListResponse200ItemBaselineType1, AssaysListResponse200ItemBaselineType2, None, Unset]): Options describing the range of inference data used as a baseline by the assay window (Union[Unset, None, AssaysListResponse200ItemWindow]): Options describing the time range tested by the assay summarizer (Union[AssaysListResponse200ItemSummarizerType0, AssaysListResponse200ItemSummarizerType1, None, Unset]): Options describing the types of analysis done by the assay

AssaysListResponse200Item( id: int, name: str, active: bool, status: str, alert_threshold: float, pipeline_id: int, pipeline_name: str, next_run: str, warning_threshold: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, float] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, last_run: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, run_until: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, updated_at: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, baseline: Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item_baseline_type_0.AssaysListResponse200ItemBaselineType0, wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item_baseline_type_1.AssaysListResponse200ItemBaselineType1, wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item_baseline_type_2.AssaysListResponse200ItemBaselineType2, NoneType, wallaroo.wallaroo_ml_ops_api_client.types.Unset] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, window: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item_window.AssaysListResponse200ItemWindow] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, summarizer: Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item_summarizer_type_0.AssaysListResponse200ItemSummarizerType0, wallaroo.wallaroo_ml_ops_api_client.models.assays_list_response_200_item_summarizer_type_1.AssaysListResponse200ItemSummarizerType1, NoneType, wallaroo.wallaroo_ml_ops_api_client.types.Unset] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>) View Source

     2def __init__(self, id, name, active, status, alert_threshold, pipeline_id, pipeline_name, next_run, warning_threshold=attr_dict['warning_threshold'].default, last_run=attr_dict['last_run'].default, run_until=attr_dict['run_until'].default, updated_at=attr_dict['updated_at'].default, baseline=attr_dict['baseline'].default, window=attr_dict['window'].default, summarizer=attr_dict['summarizer'].default):
     3    self.id = id
     4    self.name = name
     5    self.active = active
     6    self.status = status
     7    self.alert_threshold = alert_threshold
     8    self.pipeline_id = pipeline_id
     9    self.pipeline_name = pipeline_name
    10    self.next_run = next_run
    11    self.warning_threshold = warning_threshold
    12    self.last_run = last_run
    13    self.run_until = run_until
    14    self.updated_at = updated_at
    15    self.baseline = baseline
    16    self.window = window
    17    self.summarizer = summarizer
    18    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class AssaysListResponse200Item.

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

     66    def to_dict(self) -> Dict[str, Any]:
     67        id = self.id
     68        name = self.name
     69        active = self.active
     70        status = self.status
     71        alert_threshold = self.alert_threshold
     72        pipeline_id = self.pipeline_id
     73        pipeline_name = self.pipeline_name
     74        next_run = self.next_run
     75        warning_threshold = self.warning_threshold
     76        last_run = self.last_run
     77        run_until = self.run_until
     78        updated_at = self.updated_at
     79        baseline: Union[Dict[str, Any], None, Unset]
     80        if isinstance(self.baseline, Unset):
     81            baseline = UNSET
     82        elif self.baseline is None:
     83            baseline = None
     84
     85        elif isinstance(self.baseline, AssaysListResponse200ItemBaselineType0):
     86            baseline = UNSET
     87            if not isinstance(self.baseline, Unset):
     88                baseline = self.baseline.to_dict()
     89
     90        elif isinstance(self.baseline, AssaysListResponse200ItemBaselineType1):
     91            baseline = UNSET
     92            if not isinstance(self.baseline, Unset):
     93                baseline = self.baseline.to_dict()
     94
     95        else:
     96            baseline = UNSET
     97            if not isinstance(self.baseline, Unset):
     98                baseline = self.baseline.to_dict()
     99
    100
    101
    102        window: Union[Unset, None, Dict[str, Any]] = UNSET
    103        if not isinstance(self.window, Unset):
    104            window = self.window.to_dict() if self.window else None
    105
    106        summarizer: Union[Dict[str, Any], None, Unset]
    107        if isinstance(self.summarizer, Unset):
    108            summarizer = UNSET
    109        elif self.summarizer is None:
    110            summarizer = None
    111
    112        elif isinstance(self.summarizer, AssaysListResponse200ItemSummarizerType0):
    113            summarizer = UNSET
    114            if not isinstance(self.summarizer, Unset):
    115                summarizer = self.summarizer.to_dict()
    116
    117        else:
    118            summarizer = UNSET
    119            if not isinstance(self.summarizer, Unset):
    120                summarizer = self.summarizer.to_dict()
    121
    122
    123
    124
    125        field_dict: Dict[str, Any] = {}
    126        field_dict.update(self.additional_properties)
    127        field_dict.update({
    128            "id": id,
    129            "name": name,
    130            "active": active,
    131            "status": status,
    132            "alert_threshold": alert_threshold,
    133            "pipeline_id": pipeline_id,
    134            "pipeline_name": pipeline_name,
    135            "next_run": next_run,
    136        })
    137        if warning_threshold is not UNSET:
    138            field_dict["warning_threshold"] = warning_threshold
    139        if last_run is not UNSET:
    140            field_dict["last_run"] = last_run
    141        if run_until is not UNSET:
    142            field_dict["run_until"] = run_until
    143        if updated_at is not UNSET:
    144            field_dict["updated_at"] = updated_at
    145        if baseline is not UNSET:
    146            field_dict["baseline"] = baseline
    147        if window is not UNSET:
    148            field_dict["window"] = window
    149        if summarizer is not UNSET:
    150            field_dict["summarizer"] = summarizer
    151
    152        return field_dict

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

    156    @classmethod
    157    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    158        d = src_dict.copy()
    159        id = d.pop("id")
    160
    161        name = d.pop("name")
    162
    163        active = d.pop("active")
    164
    165        status = d.pop("status")
    166
    167        alert_threshold = d.pop("alert_threshold")
    168
    169        pipeline_id = d.pop("pipeline_id")
    170
    171        pipeline_name = d.pop("pipeline_name")
    172
    173        next_run = d.pop("next_run")
    174
    175        warning_threshold = d.pop("warning_threshold", UNSET)
    176
    177        last_run = d.pop("last_run", UNSET)
    178
    179        run_until = d.pop("run_until", UNSET)
    180
    181        updated_at = d.pop("updated_at", UNSET)
    182
    183        def _parse_baseline(data: object) -> Union[AssaysListResponse200ItemBaselineType0, AssaysListResponse200ItemBaselineType1, AssaysListResponse200ItemBaselineType2, None, Unset]:
    184            if data is None:
    185                return data
    186            if isinstance(data, Unset):
    187                return data
    188            try:
    189                if not isinstance(data, dict):
    190                    raise TypeError()
    191                _baseline_type_0 = data
    192                baseline_type_0: Union[Unset, AssaysListResponse200ItemBaselineType0]
    193                if isinstance(_baseline_type_0,  Unset):
    194                    baseline_type_0 = UNSET
    195                else:
    196                    baseline_type_0 = AssaysListResponse200ItemBaselineType0.from_dict(_baseline_type_0)
    197
    198
    199
    200                return baseline_type_0
    201            except: # noqa: E722
    202                pass
    203            try:
    204                if not isinstance(data, dict):
    205                    raise TypeError()
    206                _baseline_type_1 = data
    207                baseline_type_1: Union[Unset, AssaysListResponse200ItemBaselineType1]
    208                if isinstance(_baseline_type_1,  Unset):
    209                    baseline_type_1 = UNSET
    210                else:
    211                    baseline_type_1 = AssaysListResponse200ItemBaselineType1.from_dict(_baseline_type_1)
    212
    213
    214
    215                return baseline_type_1
    216            except: # noqa: E722
    217                pass
    218            if not isinstance(data, dict):
    219                raise TypeError()
    220            _baseline_type_2 = data
    221            baseline_type_2: Union[Unset, AssaysListResponse200ItemBaselineType2]
    222            if isinstance(_baseline_type_2,  Unset):
    223                baseline_type_2 = UNSET
    224            else:
    225                baseline_type_2 = AssaysListResponse200ItemBaselineType2.from_dict(_baseline_type_2)
    226
    227
    228
    229            return baseline_type_2
    230
    231        baseline = _parse_baseline(d.pop("baseline", UNSET))
    232
    233
    234        _window = d.pop("window", UNSET)
    235        window: Union[Unset, None, AssaysListResponse200ItemWindow]
    236        if _window is None:
    237            window = None
    238        elif isinstance(_window,  Unset):
    239            window = UNSET
    240        else:
    241            window = AssaysListResponse200ItemWindow.from_dict(_window)
    242
    243
    244
    245
    246        def _parse_summarizer(data: object) -> Union[AssaysListResponse200ItemSummarizerType0, AssaysListResponse200ItemSummarizerType1, None, Unset]:
    247            if data is None:
    248                return data
    249            if isinstance(data, Unset):
    250                return data
    251            try:
    252                if not isinstance(data, dict):
    253                    raise TypeError()
    254                _summarizer_type_0 = data
    255                summarizer_type_0: Union[Unset, AssaysListResponse200ItemSummarizerType0]
    256                if isinstance(_summarizer_type_0,  Unset):
    257                    summarizer_type_0 = UNSET
    258                else:
    259                    summarizer_type_0 = AssaysListResponse200ItemSummarizerType0.from_dict(_summarizer_type_0)
    260
    261
    262
    263                return summarizer_type_0
    264            except: # noqa: E722
    265                pass
    266            if not isinstance(data, dict):
    267                raise TypeError()
    268            _summarizer_type_1 = data
    269            summarizer_type_1: Union[Unset, AssaysListResponse200ItemSummarizerType1]
    270            if isinstance(_summarizer_type_1,  Unset):
    271                summarizer_type_1 = UNSET
    272            else:
    273                summarizer_type_1 = AssaysListResponse200ItemSummarizerType1.from_dict(_summarizer_type_1)
    274
    275
    276
    277            return summarizer_type_1
    278
    279        summarizer = _parse_summarizer(d.pop("summarizer", UNSET))
    280
    281
    282        assays_list_response_200_item = cls(
    283            id=id,
    284            name=name,
    285            active=active,
    286            status=status,
    287            alert_threshold=alert_threshold,
    288            pipeline_id=pipeline_id,
    289            pipeline_name=pipeline_name,
    290            next_run=next_run,
    291            warning_threshold=warning_threshold,
    292            last_run=last_run,
    293            run_until=run_until,
    294            updated_at=updated_at,
    295            baseline=baseline,
    296            window=window,
    297            summarizer=summarizer,
    298        )
    299
    300        assays_list_response_200_item.additional_properties = d
    301        return assays_list_response_200_item

additional_keys: List[str]