wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_200_item API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_200_item

View Source

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

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

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

Attributes: window_start (datetime.datetime): analyzed_at (datetime.datetime): elapsed_millis (int): iopath (str): baseline_summary (AssaysGetAssayResultsResponse200ItemBaselineSummary): Result from summarizing one sample collection. window_summary (AssaysGetAssayResultsResponse200ItemWindowSummary): Result from summarizing one sample collection. alert_threshold (float): score (float): scores (List[float]): summarizer (Union[AssaysGetAssayResultsResponse200ItemSummarizerType0, AssaysGetAssayResultsResponse200ItemSummarizerType1]): status (AssaysGetAssayResultsResponse200ItemStatus): id (Union[Unset, None, int]): assay_id (Union[Unset, None, int]): pipeline_id (Union[Unset, None, int]): warning_threshold (Union[Unset, None, float]): bin_index (Union[Unset, None, int]): created_at (Union[Unset, None, datetime.datetime]):

AssaysGetAssayResultsResponse200Item( window_start: datetime.datetime, analyzed_at: datetime.datetime, elapsed_millis: int, iopath: str, baseline_summary: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_200_item_baseline_summary.AssaysGetAssayResultsResponse200ItemBaselineSummary, window_summary: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_200_item_window_summary.AssaysGetAssayResultsResponse200ItemWindowSummary, alert_threshold: float, score: float, scores: List[float], summarizer: Union[wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_200_item_summarizer_type_0.AssaysGetAssayResultsResponse200ItemSummarizerType0, wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_200_item_summarizer_type_1.AssaysGetAssayResultsResponse200ItemSummarizerType1], status: wallaroo.wallaroo_ml_ops_api_client.models.assays_get_assay_results_response_200_item_status.AssaysGetAssayResultsResponse200ItemStatus, id: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, int] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, assay_id: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, int] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, pipeline_id: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, int] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, warning_threshold: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, float] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, bin_index: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, int] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, created_at: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, datetime.datetime] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>) View Source

     2def __init__(self, window_start, analyzed_at, elapsed_millis, iopath, baseline_summary, window_summary, alert_threshold, score, scores, summarizer, status, id=attr_dict['id'].default, assay_id=attr_dict['assay_id'].default, pipeline_id=attr_dict['pipeline_id'].default, warning_threshold=attr_dict['warning_threshold'].default, bin_index=attr_dict['bin_index'].default, created_at=attr_dict['created_at'].default):
     3    self.window_start = window_start
     4    self.analyzed_at = analyzed_at
     5    self.elapsed_millis = elapsed_millis
     6    self.iopath = iopath
     7    self.baseline_summary = baseline_summary
     8    self.window_summary = window_summary
     9    self.alert_threshold = alert_threshold
    10    self.score = score
    11    self.scores = scores
    12    self.summarizer = summarizer
    13    self.status = status
    14    self.id = id
    15    self.assay_id = assay_id
    16    self.pipeline_id = pipeline_id
    17    self.warning_threshold = warning_threshold
    18    self.bin_index = bin_index
    19    self.created_at = created_at
    20    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class AssaysGetAssayResultsResponse200Item.

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

     68    def to_dict(self) -> Dict[str, Any]:
     69        window_start = self.window_start.isoformat()
     70
     71        analyzed_at = self.analyzed_at.isoformat()
     72
     73        elapsed_millis = self.elapsed_millis
     74        iopath = self.iopath
     75        baseline_summary = self.baseline_summary.to_dict()
     76
     77        window_summary = self.window_summary.to_dict()
     78
     79        alert_threshold = self.alert_threshold
     80        score = self.score
     81        scores = self.scores
     82
     83
     84
     85
     86        summarizer: Dict[str, Any]
     87
     88        if isinstance(self.summarizer, AssaysGetAssayResultsResponse200ItemSummarizerType0):
     89            summarizer = self.summarizer.to_dict()
     90
     91        else:
     92            summarizer = self.summarizer.to_dict()
     93
     94
     95
     96        status = self.status.value
     97
     98        id = self.id
     99        assay_id = self.assay_id
    100        pipeline_id = self.pipeline_id
    101        warning_threshold = self.warning_threshold
    102        bin_index = self.bin_index
    103        created_at: Union[Unset, None, str] = UNSET
    104        if not isinstance(self.created_at, Unset):
    105            created_at = self.created_at.isoformat() if self.created_at else None
    106
    107
    108        field_dict: Dict[str, Any] = {}
    109        field_dict.update(self.additional_properties)
    110        field_dict.update({
    111            "window_start": window_start,
    112            "analyzed_at": analyzed_at,
    113            "elapsed_millis": elapsed_millis,
    114            "iopath": iopath,
    115            "baseline_summary": baseline_summary,
    116            "window_summary": window_summary,
    117            "alert_threshold": alert_threshold,
    118            "score": score,
    119            "scores": scores,
    120            "summarizer": summarizer,
    121            "status": status,
    122        })
    123        if id is not UNSET:
    124            field_dict["id"] = id
    125        if assay_id is not UNSET:
    126            field_dict["assay_id"] = assay_id
    127        if pipeline_id is not UNSET:
    128            field_dict["pipeline_id"] = pipeline_id
    129        if warning_threshold is not UNSET:
    130            field_dict["warning_threshold"] = warning_threshold
    131        if bin_index is not UNSET:
    132            field_dict["bin_index"] = bin_index
    133        if created_at is not UNSET:
    134            field_dict["created_at"] = created_at
    135
    136        return field_dict

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

    140    @classmethod
    141    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    142        d = src_dict.copy()
    143        window_start = isoparse(d.pop("window_start"))
    144
    145
    146
    147
    148        analyzed_at = isoparse(d.pop("analyzed_at"))
    149
    150
    151
    152
    153        elapsed_millis = d.pop("elapsed_millis")
    154
    155        iopath = d.pop("iopath")
    156
    157        baseline_summary = AssaysGetAssayResultsResponse200ItemBaselineSummary.from_dict(d.pop("baseline_summary"))
    158
    159
    160
    161
    162        window_summary = AssaysGetAssayResultsResponse200ItemWindowSummary.from_dict(d.pop("window_summary"))
    163
    164
    165
    166
    167        alert_threshold = d.pop("alert_threshold")
    168
    169        score = d.pop("score")
    170
    171        scores = cast(List[float], d.pop("scores"))
    172
    173
    174        def _parse_summarizer(data: object) -> Union[AssaysGetAssayResultsResponse200ItemSummarizerType0, AssaysGetAssayResultsResponse200ItemSummarizerType1]:
    175            try:
    176                if not isinstance(data, dict):
    177                    raise TypeError()
    178                summarizer_type_0 = AssaysGetAssayResultsResponse200ItemSummarizerType0.from_dict(data)
    179
    180
    181
    182                return summarizer_type_0
    183            except: # noqa: E722
    184                pass
    185            if not isinstance(data, dict):
    186                raise TypeError()
    187            summarizer_type_1 = AssaysGetAssayResultsResponse200ItemSummarizerType1.from_dict(data)
    188
    189
    190
    191            return summarizer_type_1
    192
    193        summarizer = _parse_summarizer(d.pop("summarizer"))
    194
    195
    196        status = AssaysGetAssayResultsResponse200ItemStatus(d.pop("status"))
    197
    198
    199
    200
    201        id = d.pop("id", UNSET)
    202
    203        assay_id = d.pop("assay_id", UNSET)
    204
    205        pipeline_id = d.pop("pipeline_id", UNSET)
    206
    207        warning_threshold = d.pop("warning_threshold", UNSET)
    208
    209        bin_index = d.pop("bin_index", UNSET)
    210
    211        _created_at = d.pop("created_at", UNSET)
    212        created_at: Union[Unset, None, datetime.datetime]
    213        if _created_at is None:
    214            created_at = None
    215        elif isinstance(_created_at,  Unset):
    216            created_at = UNSET
    217        else:
    218            created_at = isoparse(_created_at)
    219
    220
    221
    222
    223        assays_get_assay_results_response_200_item = cls(
    224            window_start=window_start,
    225            analyzed_at=analyzed_at,
    226            elapsed_millis=elapsed_millis,
    227            iopath=iopath,
    228            baseline_summary=baseline_summary,
    229            window_summary=window_summary,
    230            alert_threshold=alert_threshold,
    231            score=score,
    232            scores=scores,
    233            summarizer=summarizer,
    234            status=status,
    235            id=id,
    236            assay_id=assay_id,
    237            pipeline_id=pipeline_id,
    238            warning_threshold=warning_threshold,
    239            bin_index=bin_index,
    240            created_at=created_at,
    241        )
    242
    243        assays_get_assay_results_response_200_item.additional_properties = d
    244        return assays_get_assay_results_response_200_item

additional_keys: List[str]