wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_response_200_item
1import datetime 2from typing import Any, Dict, List, Type, TypeVar, Union 3 4import attr 5from dateutil.parser import isoparse 6 7from ..models.assays_filter_response_200_item_baseline_type_0 import \ 8 AssaysFilterResponse200ItemBaselineType0 9from ..models.assays_filter_response_200_item_baseline_type_1 import \ 10 AssaysFilterResponse200ItemBaselineType1 11from ..models.assays_filter_response_200_item_baseline_type_2 import \ 12 AssaysFilterResponse200ItemBaselineType2 13from ..models.assays_filter_response_200_item_summarizer_type_0 import \ 14 AssaysFilterResponse200ItemSummarizerType0 15from ..models.assays_filter_response_200_item_summarizer_type_1 import \ 16 AssaysFilterResponse200ItemSummarizerType1 17from ..models.assays_filter_response_200_item_window import \ 18 AssaysFilterResponse200ItemWindow 19from ..types import UNSET, Unset 20 21T = TypeVar("T", bound="AssaysFilterResponse200Item") 22 23@attr.s(auto_attribs=True) 24class AssaysFilterResponse200Item: 25 """ 26 Attributes: 27 name (str): 28 pipeline_id (int): 29 pipeline_name (str): 30 active (bool): 31 status (str): 32 iopath (str): 33 baseline (Union[AssaysFilterResponse200ItemBaselineType0, AssaysFilterResponse200ItemBaselineType1, 34 AssaysFilterResponse200ItemBaselineType2]): 35 window (AssaysFilterResponse200ItemWindow): Assay window. 36 summarizer (Union[AssaysFilterResponse200ItemSummarizerType0, AssaysFilterResponse200ItemSummarizerType1]): 37 alert_threshold (float): 38 created_at (datetime.datetime): 39 workspace_id (int): 40 id (Union[Unset, None, int]): 41 warning_threshold (Union[Unset, None, float]): 42 last_window_start (Union[Unset, None, datetime.datetime]): 43 run_until (Union[Unset, None, datetime.datetime]): 44 last_run (Union[Unset, None, datetime.datetime]): 45 """ 46 47 name: str 48 pipeline_id: int 49 pipeline_name: str 50 active: bool 51 status: str 52 iopath: str 53 baseline: Union[AssaysFilterResponse200ItemBaselineType0, AssaysFilterResponse200ItemBaselineType1, AssaysFilterResponse200ItemBaselineType2] 54 window: AssaysFilterResponse200ItemWindow 55 summarizer: Union[AssaysFilterResponse200ItemSummarizerType0, AssaysFilterResponse200ItemSummarizerType1] 56 alert_threshold: float 57 created_at: datetime.datetime 58 workspace_id: int 59 id: Union[Unset, None, int] = UNSET 60 warning_threshold: Union[Unset, None, float] = UNSET 61 last_window_start: Union[Unset, None, datetime.datetime] = UNSET 62 run_until: Union[Unset, None, datetime.datetime] = UNSET 63 last_run: 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 name = self.name 69 pipeline_id = self.pipeline_id 70 pipeline_name = self.pipeline_name 71 active = self.active 72 status = self.status 73 iopath = self.iopath 74 baseline: Dict[str, Any] 75 76 if isinstance(self.baseline, AssaysFilterResponse200ItemBaselineType0): 77 baseline = self.baseline.to_dict() 78 79 elif isinstance(self.baseline, AssaysFilterResponse200ItemBaselineType1): 80 baseline = self.baseline.to_dict() 81 82 else: 83 baseline = self.baseline.to_dict() 84 85 86 87 window = self.window.to_dict() 88 89 summarizer: Dict[str, Any] 90 91 if isinstance(self.summarizer, AssaysFilterResponse200ItemSummarizerType0): 92 summarizer = self.summarizer.to_dict() 93 94 else: 95 summarizer = self.summarizer.to_dict() 96 97 98 99 alert_threshold = self.alert_threshold 100 created_at = self.created_at.isoformat() 101 102 workspace_id = self.workspace_id 103 id = self.id 104 warning_threshold = self.warning_threshold 105 last_window_start: Union[Unset, None, str] = UNSET 106 if not isinstance(self.last_window_start, Unset): 107 last_window_start = self.last_window_start.isoformat() if self.last_window_start else None 108 109 run_until: Union[Unset, None, str] = UNSET 110 if not isinstance(self.run_until, Unset): 111 run_until = self.run_until.isoformat() if self.run_until else None 112 113 last_run: Union[Unset, None, str] = UNSET 114 if not isinstance(self.last_run, Unset): 115 last_run = self.last_run.isoformat() if self.last_run else None 116 117 118 field_dict: Dict[str, Any] = {} 119 field_dict.update(self.additional_properties) 120 field_dict.update({ 121 "name": name, 122 "pipeline_id": pipeline_id, 123 "pipeline_name": pipeline_name, 124 "active": active, 125 "status": status, 126 "iopath": iopath, 127 "baseline": baseline, 128 "window": window, 129 "summarizer": summarizer, 130 "alert_threshold": alert_threshold, 131 "created_at": created_at, 132 "workspace_id": workspace_id, 133 }) 134 if id is not UNSET: 135 field_dict["id"] = id 136 if warning_threshold is not UNSET: 137 field_dict["warning_threshold"] = warning_threshold 138 if last_window_start is not UNSET: 139 field_dict["last_window_start"] = last_window_start 140 if run_until is not UNSET: 141 field_dict["run_until"] = run_until 142 if last_run is not UNSET: 143 field_dict["last_run"] = last_run 144 145 return field_dict 146 147 148 149 @classmethod 150 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 151 d = src_dict.copy() 152 name = d.pop("name") 153 154 pipeline_id = d.pop("pipeline_id") 155 156 pipeline_name = d.pop("pipeline_name") 157 158 active = d.pop("active") 159 160 status = d.pop("status") 161 162 iopath = d.pop("iopath") 163 164 def _parse_baseline(data: object) -> Union[AssaysFilterResponse200ItemBaselineType0, AssaysFilterResponse200ItemBaselineType1, AssaysFilterResponse200ItemBaselineType2]: 165 try: 166 if not isinstance(data, dict): 167 raise TypeError() 168 baseline_type_0 = AssaysFilterResponse200ItemBaselineType0.from_dict(data) 169 170 171 172 return baseline_type_0 173 except: # noqa: E722 174 pass 175 try: 176 if not isinstance(data, dict): 177 raise TypeError() 178 baseline_type_1 = AssaysFilterResponse200ItemBaselineType1.from_dict(data) 179 180 181 182 return baseline_type_1 183 except: # noqa: E722 184 pass 185 if not isinstance(data, dict): 186 raise TypeError() 187 baseline_type_2 = AssaysFilterResponse200ItemBaselineType2.from_dict(data) 188 189 190 191 return baseline_type_2 192 193 baseline = _parse_baseline(d.pop("baseline")) 194 195 196 window = AssaysFilterResponse200ItemWindow.from_dict(d.pop("window")) 197 198 199 200 201 def _parse_summarizer(data: object) -> Union[AssaysFilterResponse200ItemSummarizerType0, AssaysFilterResponse200ItemSummarizerType1]: 202 try: 203 if not isinstance(data, dict): 204 raise TypeError() 205 summarizer_type_0 = AssaysFilterResponse200ItemSummarizerType0.from_dict(data) 206 207 208 209 return summarizer_type_0 210 except: # noqa: E722 211 pass 212 if not isinstance(data, dict): 213 raise TypeError() 214 summarizer_type_1 = AssaysFilterResponse200ItemSummarizerType1.from_dict(data) 215 216 217 218 return summarizer_type_1 219 220 summarizer = _parse_summarizer(d.pop("summarizer")) 221 222 223 alert_threshold = d.pop("alert_threshold") 224 225 created_at = isoparse(d.pop("created_at")) 226 227 228 229 230 workspace_id = d.pop("workspace_id") 231 232 id = d.pop("id", UNSET) 233 234 warning_threshold = d.pop("warning_threshold", UNSET) 235 236 _last_window_start = d.pop("last_window_start", UNSET) 237 last_window_start: Union[Unset, None, datetime.datetime] 238 if _last_window_start is None: 239 last_window_start = None 240 elif isinstance(_last_window_start, Unset): 241 last_window_start = UNSET 242 else: 243 last_window_start = isoparse(_last_window_start) 244 245 246 247 248 _run_until = d.pop("run_until", UNSET) 249 run_until: Union[Unset, None, datetime.datetime] 250 if _run_until is None: 251 run_until = None 252 elif isinstance(_run_until, Unset): 253 run_until = UNSET 254 else: 255 run_until = isoparse(_run_until) 256 257 258 259 260 _last_run = d.pop("last_run", UNSET) 261 last_run: Union[Unset, None, datetime.datetime] 262 if _last_run is None: 263 last_run = None 264 elif isinstance(_last_run, Unset): 265 last_run = UNSET 266 else: 267 last_run = isoparse(_last_run) 268 269 270 271 272 assays_filter_response_200_item = cls( 273 name=name, 274 pipeline_id=pipeline_id, 275 pipeline_name=pipeline_name, 276 active=active, 277 status=status, 278 iopath=iopath, 279 baseline=baseline, 280 window=window, 281 summarizer=summarizer, 282 alert_threshold=alert_threshold, 283 created_at=created_at, 284 workspace_id=workspace_id, 285 id=id, 286 warning_threshold=warning_threshold, 287 last_window_start=last_window_start, 288 run_until=run_until, 289 last_run=last_run, 290 ) 291 292 assays_filter_response_200_item.additional_properties = d 293 return assays_filter_response_200_item 294 295 @property 296 def additional_keys(self) -> List[str]: 297 return list(self.additional_properties.keys()) 298 299 def __getitem__(self, key: str) -> Any: 300 return self.additional_properties[key] 301 302 def __setitem__(self, key: str, value: Any) -> None: 303 self.additional_properties[key] = value 304 305 def __delitem__(self, key: str) -> None: 306 del self.additional_properties[key] 307 308 def __contains__(self, key: str) -> bool: 309 return key in self.additional_properties
24@attr.s(auto_attribs=True) 25class AssaysFilterResponse200Item: 26 """ 27 Attributes: 28 name (str): 29 pipeline_id (int): 30 pipeline_name (str): 31 active (bool): 32 status (str): 33 iopath (str): 34 baseline (Union[AssaysFilterResponse200ItemBaselineType0, AssaysFilterResponse200ItemBaselineType1, 35 AssaysFilterResponse200ItemBaselineType2]): 36 window (AssaysFilterResponse200ItemWindow): Assay window. 37 summarizer (Union[AssaysFilterResponse200ItemSummarizerType0, AssaysFilterResponse200ItemSummarizerType1]): 38 alert_threshold (float): 39 created_at (datetime.datetime): 40 workspace_id (int): 41 id (Union[Unset, None, int]): 42 warning_threshold (Union[Unset, None, float]): 43 last_window_start (Union[Unset, None, datetime.datetime]): 44 run_until (Union[Unset, None, datetime.datetime]): 45 last_run (Union[Unset, None, datetime.datetime]): 46 """ 47 48 name: str 49 pipeline_id: int 50 pipeline_name: str 51 active: bool 52 status: str 53 iopath: str 54 baseline: Union[AssaysFilterResponse200ItemBaselineType0, AssaysFilterResponse200ItemBaselineType1, AssaysFilterResponse200ItemBaselineType2] 55 window: AssaysFilterResponse200ItemWindow 56 summarizer: Union[AssaysFilterResponse200ItemSummarizerType0, AssaysFilterResponse200ItemSummarizerType1] 57 alert_threshold: float 58 created_at: datetime.datetime 59 workspace_id: int 60 id: Union[Unset, None, int] = UNSET 61 warning_threshold: Union[Unset, None, float] = UNSET 62 last_window_start: Union[Unset, None, datetime.datetime] = UNSET 63 run_until: Union[Unset, None, datetime.datetime] = UNSET 64 last_run: 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 name = self.name 70 pipeline_id = self.pipeline_id 71 pipeline_name = self.pipeline_name 72 active = self.active 73 status = self.status 74 iopath = self.iopath 75 baseline: Dict[str, Any] 76 77 if isinstance(self.baseline, AssaysFilterResponse200ItemBaselineType0): 78 baseline = self.baseline.to_dict() 79 80 elif isinstance(self.baseline, AssaysFilterResponse200ItemBaselineType1): 81 baseline = self.baseline.to_dict() 82 83 else: 84 baseline = self.baseline.to_dict() 85 86 87 88 window = self.window.to_dict() 89 90 summarizer: Dict[str, Any] 91 92 if isinstance(self.summarizer, AssaysFilterResponse200ItemSummarizerType0): 93 summarizer = self.summarizer.to_dict() 94 95 else: 96 summarizer = self.summarizer.to_dict() 97 98 99 100 alert_threshold = self.alert_threshold 101 created_at = self.created_at.isoformat() 102 103 workspace_id = self.workspace_id 104 id = self.id 105 warning_threshold = self.warning_threshold 106 last_window_start: Union[Unset, None, str] = UNSET 107 if not isinstance(self.last_window_start, Unset): 108 last_window_start = self.last_window_start.isoformat() if self.last_window_start else None 109 110 run_until: Union[Unset, None, str] = UNSET 111 if not isinstance(self.run_until, Unset): 112 run_until = self.run_until.isoformat() if self.run_until else None 113 114 last_run: Union[Unset, None, str] = UNSET 115 if not isinstance(self.last_run, Unset): 116 last_run = self.last_run.isoformat() if self.last_run else None 117 118 119 field_dict: Dict[str, Any] = {} 120 field_dict.update(self.additional_properties) 121 field_dict.update({ 122 "name": name, 123 "pipeline_id": pipeline_id, 124 "pipeline_name": pipeline_name, 125 "active": active, 126 "status": status, 127 "iopath": iopath, 128 "baseline": baseline, 129 "window": window, 130 "summarizer": summarizer, 131 "alert_threshold": alert_threshold, 132 "created_at": created_at, 133 "workspace_id": workspace_id, 134 }) 135 if id is not UNSET: 136 field_dict["id"] = id 137 if warning_threshold is not UNSET: 138 field_dict["warning_threshold"] = warning_threshold 139 if last_window_start is not UNSET: 140 field_dict["last_window_start"] = last_window_start 141 if run_until is not UNSET: 142 field_dict["run_until"] = run_until 143 if last_run is not UNSET: 144 field_dict["last_run"] = last_run 145 146 return field_dict 147 148 149 150 @classmethod 151 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 152 d = src_dict.copy() 153 name = d.pop("name") 154 155 pipeline_id = d.pop("pipeline_id") 156 157 pipeline_name = d.pop("pipeline_name") 158 159 active = d.pop("active") 160 161 status = d.pop("status") 162 163 iopath = d.pop("iopath") 164 165 def _parse_baseline(data: object) -> Union[AssaysFilterResponse200ItemBaselineType0, AssaysFilterResponse200ItemBaselineType1, AssaysFilterResponse200ItemBaselineType2]: 166 try: 167 if not isinstance(data, dict): 168 raise TypeError() 169 baseline_type_0 = AssaysFilterResponse200ItemBaselineType0.from_dict(data) 170 171 172 173 return baseline_type_0 174 except: # noqa: E722 175 pass 176 try: 177 if not isinstance(data, dict): 178 raise TypeError() 179 baseline_type_1 = AssaysFilterResponse200ItemBaselineType1.from_dict(data) 180 181 182 183 return baseline_type_1 184 except: # noqa: E722 185 pass 186 if not isinstance(data, dict): 187 raise TypeError() 188 baseline_type_2 = AssaysFilterResponse200ItemBaselineType2.from_dict(data) 189 190 191 192 return baseline_type_2 193 194 baseline = _parse_baseline(d.pop("baseline")) 195 196 197 window = AssaysFilterResponse200ItemWindow.from_dict(d.pop("window")) 198 199 200 201 202 def _parse_summarizer(data: object) -> Union[AssaysFilterResponse200ItemSummarizerType0, AssaysFilterResponse200ItemSummarizerType1]: 203 try: 204 if not isinstance(data, dict): 205 raise TypeError() 206 summarizer_type_0 = AssaysFilterResponse200ItemSummarizerType0.from_dict(data) 207 208 209 210 return summarizer_type_0 211 except: # noqa: E722 212 pass 213 if not isinstance(data, dict): 214 raise TypeError() 215 summarizer_type_1 = AssaysFilterResponse200ItemSummarizerType1.from_dict(data) 216 217 218 219 return summarizer_type_1 220 221 summarizer = _parse_summarizer(d.pop("summarizer")) 222 223 224 alert_threshold = d.pop("alert_threshold") 225 226 created_at = isoparse(d.pop("created_at")) 227 228 229 230 231 workspace_id = d.pop("workspace_id") 232 233 id = d.pop("id", UNSET) 234 235 warning_threshold = d.pop("warning_threshold", UNSET) 236 237 _last_window_start = d.pop("last_window_start", UNSET) 238 last_window_start: Union[Unset, None, datetime.datetime] 239 if _last_window_start is None: 240 last_window_start = None 241 elif isinstance(_last_window_start, Unset): 242 last_window_start = UNSET 243 else: 244 last_window_start = isoparse(_last_window_start) 245 246 247 248 249 _run_until = d.pop("run_until", UNSET) 250 run_until: Union[Unset, None, datetime.datetime] 251 if _run_until is None: 252 run_until = None 253 elif isinstance(_run_until, Unset): 254 run_until = UNSET 255 else: 256 run_until = isoparse(_run_until) 257 258 259 260 261 _last_run = d.pop("last_run", UNSET) 262 last_run: Union[Unset, None, datetime.datetime] 263 if _last_run is None: 264 last_run = None 265 elif isinstance(_last_run, Unset): 266 last_run = UNSET 267 else: 268 last_run = isoparse(_last_run) 269 270 271 272 273 assays_filter_response_200_item = cls( 274 name=name, 275 pipeline_id=pipeline_id, 276 pipeline_name=pipeline_name, 277 active=active, 278 status=status, 279 iopath=iopath, 280 baseline=baseline, 281 window=window, 282 summarizer=summarizer, 283 alert_threshold=alert_threshold, 284 created_at=created_at, 285 workspace_id=workspace_id, 286 id=id, 287 warning_threshold=warning_threshold, 288 last_window_start=last_window_start, 289 run_until=run_until, 290 last_run=last_run, 291 ) 292 293 assays_filter_response_200_item.additional_properties = d 294 return assays_filter_response_200_item 295 296 @property 297 def additional_keys(self) -> List[str]: 298 return list(self.additional_properties.keys()) 299 300 def __getitem__(self, key: str) -> Any: 301 return self.additional_properties[key] 302 303 def __setitem__(self, key: str, value: Any) -> None: 304 self.additional_properties[key] = value 305 306 def __delitem__(self, key: str) -> None: 307 del self.additional_properties[key] 308 309 def __contains__(self, key: str) -> bool: 310 return key in self.additional_properties
Attributes: name (str): pipeline_id (int): pipeline_name (str): active (bool): status (str): iopath (str): baseline (Union[AssaysFilterResponse200ItemBaselineType0, AssaysFilterResponse200ItemBaselineType1, AssaysFilterResponse200ItemBaselineType2]): window (AssaysFilterResponse200ItemWindow): Assay window. summarizer (Union[AssaysFilterResponse200ItemSummarizerType0, AssaysFilterResponse200ItemSummarizerType1]): alert_threshold (float): created_at (datetime.datetime): workspace_id (int): id (Union[Unset, None, int]): warning_threshold (Union[Unset, None, float]): last_window_start (Union[Unset, None, datetime.datetime]): run_until (Union[Unset, None, datetime.datetime]): last_run (Union[Unset, None, datetime.datetime]):
2def __init__(self, name, pipeline_id, pipeline_name, active, status, iopath, baseline, window, summarizer, alert_threshold, created_at, workspace_id, id=attr_dict['id'].default, warning_threshold=attr_dict['warning_threshold'].default, last_window_start=attr_dict['last_window_start'].default, run_until=attr_dict['run_until'].default, last_run=attr_dict['last_run'].default): 3 self.name = name 4 self.pipeline_id = pipeline_id 5 self.pipeline_name = pipeline_name 6 self.active = active 7 self.status = status 8 self.iopath = iopath 9 self.baseline = baseline 10 self.window = window 11 self.summarizer = summarizer 12 self.alert_threshold = alert_threshold 13 self.created_at = created_at 14 self.workspace_id = workspace_id 15 self.id = id 16 self.warning_threshold = warning_threshold 17 self.last_window_start = last_window_start 18 self.run_until = run_until 19 self.last_run = last_run 20 self.additional_properties = __attr_factory_additional_properties()
Method generated by attrs for class AssaysFilterResponse200Item.
68 def to_dict(self) -> Dict[str, Any]: 69 name = self.name 70 pipeline_id = self.pipeline_id 71 pipeline_name = self.pipeline_name 72 active = self.active 73 status = self.status 74 iopath = self.iopath 75 baseline: Dict[str, Any] 76 77 if isinstance(self.baseline, AssaysFilterResponse200ItemBaselineType0): 78 baseline = self.baseline.to_dict() 79 80 elif isinstance(self.baseline, AssaysFilterResponse200ItemBaselineType1): 81 baseline = self.baseline.to_dict() 82 83 else: 84 baseline = self.baseline.to_dict() 85 86 87 88 window = self.window.to_dict() 89 90 summarizer: Dict[str, Any] 91 92 if isinstance(self.summarizer, AssaysFilterResponse200ItemSummarizerType0): 93 summarizer = self.summarizer.to_dict() 94 95 else: 96 summarizer = self.summarizer.to_dict() 97 98 99 100 alert_threshold = self.alert_threshold 101 created_at = self.created_at.isoformat() 102 103 workspace_id = self.workspace_id 104 id = self.id 105 warning_threshold = self.warning_threshold 106 last_window_start: Union[Unset, None, str] = UNSET 107 if not isinstance(self.last_window_start, Unset): 108 last_window_start = self.last_window_start.isoformat() if self.last_window_start else None 109 110 run_until: Union[Unset, None, str] = UNSET 111 if not isinstance(self.run_until, Unset): 112 run_until = self.run_until.isoformat() if self.run_until else None 113 114 last_run: Union[Unset, None, str] = UNSET 115 if not isinstance(self.last_run, Unset): 116 last_run = self.last_run.isoformat() if self.last_run else None 117 118 119 field_dict: Dict[str, Any] = {} 120 field_dict.update(self.additional_properties) 121 field_dict.update({ 122 "name": name, 123 "pipeline_id": pipeline_id, 124 "pipeline_name": pipeline_name, 125 "active": active, 126 "status": status, 127 "iopath": iopath, 128 "baseline": baseline, 129 "window": window, 130 "summarizer": summarizer, 131 "alert_threshold": alert_threshold, 132 "created_at": created_at, 133 "workspace_id": workspace_id, 134 }) 135 if id is not UNSET: 136 field_dict["id"] = id 137 if warning_threshold is not UNSET: 138 field_dict["warning_threshold"] = warning_threshold 139 if last_window_start is not UNSET: 140 field_dict["last_window_start"] = last_window_start 141 if run_until is not UNSET: 142 field_dict["run_until"] = run_until 143 if last_run is not UNSET: 144 field_dict["last_run"] = last_run 145 146 return field_dict
150 @classmethod 151 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 152 d = src_dict.copy() 153 name = d.pop("name") 154 155 pipeline_id = d.pop("pipeline_id") 156 157 pipeline_name = d.pop("pipeline_name") 158 159 active = d.pop("active") 160 161 status = d.pop("status") 162 163 iopath = d.pop("iopath") 164 165 def _parse_baseline(data: object) -> Union[AssaysFilterResponse200ItemBaselineType0, AssaysFilterResponse200ItemBaselineType1, AssaysFilterResponse200ItemBaselineType2]: 166 try: 167 if not isinstance(data, dict): 168 raise TypeError() 169 baseline_type_0 = AssaysFilterResponse200ItemBaselineType0.from_dict(data) 170 171 172 173 return baseline_type_0 174 except: # noqa: E722 175 pass 176 try: 177 if not isinstance(data, dict): 178 raise TypeError() 179 baseline_type_1 = AssaysFilterResponse200ItemBaselineType1.from_dict(data) 180 181 182 183 return baseline_type_1 184 except: # noqa: E722 185 pass 186 if not isinstance(data, dict): 187 raise TypeError() 188 baseline_type_2 = AssaysFilterResponse200ItemBaselineType2.from_dict(data) 189 190 191 192 return baseline_type_2 193 194 baseline = _parse_baseline(d.pop("baseline")) 195 196 197 window = AssaysFilterResponse200ItemWindow.from_dict(d.pop("window")) 198 199 200 201 202 def _parse_summarizer(data: object) -> Union[AssaysFilterResponse200ItemSummarizerType0, AssaysFilterResponse200ItemSummarizerType1]: 203 try: 204 if not isinstance(data, dict): 205 raise TypeError() 206 summarizer_type_0 = AssaysFilterResponse200ItemSummarizerType0.from_dict(data) 207 208 209 210 return summarizer_type_0 211 except: # noqa: E722 212 pass 213 if not isinstance(data, dict): 214 raise TypeError() 215 summarizer_type_1 = AssaysFilterResponse200ItemSummarizerType1.from_dict(data) 216 217 218 219 return summarizer_type_1 220 221 summarizer = _parse_summarizer(d.pop("summarizer")) 222 223 224 alert_threshold = d.pop("alert_threshold") 225 226 created_at = isoparse(d.pop("created_at")) 227 228 229 230 231 workspace_id = d.pop("workspace_id") 232 233 id = d.pop("id", UNSET) 234 235 warning_threshold = d.pop("warning_threshold", UNSET) 236 237 _last_window_start = d.pop("last_window_start", UNSET) 238 last_window_start: Union[Unset, None, datetime.datetime] 239 if _last_window_start is None: 240 last_window_start = None 241 elif isinstance(_last_window_start, Unset): 242 last_window_start = UNSET 243 else: 244 last_window_start = isoparse(_last_window_start) 245 246 247 248 249 _run_until = d.pop("run_until", UNSET) 250 run_until: Union[Unset, None, datetime.datetime] 251 if _run_until is None: 252 run_until = None 253 elif isinstance(_run_until, Unset): 254 run_until = UNSET 255 else: 256 run_until = isoparse(_run_until) 257 258 259 260 261 _last_run = d.pop("last_run", UNSET) 262 last_run: Union[Unset, None, datetime.datetime] 263 if _last_run is None: 264 last_run = None 265 elif isinstance(_last_run, Unset): 266 last_run = UNSET 267 else: 268 last_run = isoparse(_last_run) 269 270 271 272 273 assays_filter_response_200_item = cls( 274 name=name, 275 pipeline_id=pipeline_id, 276 pipeline_name=pipeline_name, 277 active=active, 278 status=status, 279 iopath=iopath, 280 baseline=baseline, 281 window=window, 282 summarizer=summarizer, 283 alert_threshold=alert_threshold, 284 created_at=created_at, 285 workspace_id=workspace_id, 286 id=id, 287 warning_threshold=warning_threshold, 288 last_window_start=last_window_start, 289 run_until=run_until, 290 last_run=last_run, 291 ) 292 293 assays_filter_response_200_item.additional_properties = d 294 return assays_filter_response_200_item