wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_json_body API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_json_body

View Source

      1from typing import Any, Dict, List, Type, TypeVar, Union
      2
      3import attr
      4
      5from ..models.assays_filter_json_body_drift_window import \
      6    AssaysFilterJsonBodyDriftWindow
      7from ..models.assays_filter_json_body_sort_by import AssaysFilterJsonBodySortBy
      8from ..types import UNSET, Unset
      9
     10T = TypeVar("T", bound="AssaysFilterJsonBody")
     11
     12@attr.s(auto_attribs=True)
     13class AssaysFilterJsonBody:
     14    """
     15    Attributes:
     16        workspace_id (int):
     17        pipeline_id (int):
     18        sort_by (AssaysFilterJsonBodySortBy):
     19        name (Union[Unset, None, str]):
     20        active (Union[Unset, None, bool]):
     21        drift_window (Union[Unset, None, AssaysFilterJsonBodyDriftWindow]):
     22    """
     23
     24    workspace_id: int
     25    pipeline_id: int
     26    sort_by: AssaysFilterJsonBodySortBy
     27    name: Union[Unset, None, str] = UNSET
     28    active: Union[Unset, None, bool] = UNSET
     29    drift_window: Union[Unset, None, AssaysFilterJsonBodyDriftWindow] = UNSET
     30    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     31
     32
     33    def to_dict(self) -> Dict[str, Any]:
     34        workspace_id = self.workspace_id
     35        pipeline_id = self.pipeline_id
     36        sort_by = self.sort_by.value
     37
     38        name = self.name
     39        active = self.active
     40        drift_window: Union[Unset, None, Dict[str, Any]] = UNSET
     41        if not isinstance(self.drift_window, Unset):
     42            drift_window = self.drift_window.to_dict() if self.drift_window else None
     43
     44
     45        field_dict: Dict[str, Any] = {}
     46        field_dict.update(self.additional_properties)
     47        field_dict.update({
     48            "workspace_id": workspace_id,
     49            "pipeline_id": pipeline_id,
     50            "sort_by": sort_by,
     51        })
     52        if name is not UNSET:
     53            field_dict["name"] = name
     54        if active is not UNSET:
     55            field_dict["active"] = active
     56        if drift_window is not UNSET:
     57            field_dict["drift_window"] = drift_window
     58
     59        return field_dict
     60
     61
     62
     63    @classmethod
     64    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
     65        d = src_dict.copy()
     66        workspace_id = d.pop("workspace_id")
     67
     68        pipeline_id = d.pop("pipeline_id")
     69
     70        sort_by = AssaysFilterJsonBodySortBy(d.pop("sort_by"))
     71
     72
     73
     74
     75        name = d.pop("name", UNSET)
     76
     77        active = d.pop("active", UNSET)
     78
     79        _drift_window = d.pop("drift_window", UNSET)
     80        drift_window: Union[Unset, None, AssaysFilterJsonBodyDriftWindow]
     81        if _drift_window is None:
     82            drift_window = None
     83        elif isinstance(_drift_window,  Unset):
     84            drift_window = UNSET
     85        else:
     86            drift_window = AssaysFilterJsonBodyDriftWindow.from_dict(_drift_window)
     87
     88
     89
     90
     91        assays_filter_json_body = cls(
     92            workspace_id=workspace_id,
     93            pipeline_id=pipeline_id,
     94            sort_by=sort_by,
     95            name=name,
     96            active=active,
     97            drift_window=drift_window,
     98        )
     99
    100        assays_filter_json_body.additional_properties = d
    101        return assays_filter_json_body
    102
    103    @property
    104    def additional_keys(self) -> List[str]:
    105        return list(self.additional_properties.keys())
    106
    107    def __getitem__(self, key: str) -> Any:
    108        return self.additional_properties[key]
    109
    110    def __setitem__(self, key: str, value: Any) -> None:
    111        self.additional_properties[key] = value
    112
    113    def __delitem__(self, key: str) -> None:
    114        del self.additional_properties[key]
    115
    116    def __contains__(self, key: str) -> bool:
    117        return key in self.additional_properties

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

     13@attr.s(auto_attribs=True)
     14class AssaysFilterJsonBody:
     15    """
     16    Attributes:
     17        workspace_id (int):
     18        pipeline_id (int):
     19        sort_by (AssaysFilterJsonBodySortBy):
     20        name (Union[Unset, None, str]):
     21        active (Union[Unset, None, bool]):
     22        drift_window (Union[Unset, None, AssaysFilterJsonBodyDriftWindow]):
     23    """
     24
     25    workspace_id: int
     26    pipeline_id: int
     27    sort_by: AssaysFilterJsonBodySortBy
     28    name: Union[Unset, None, str] = UNSET
     29    active: Union[Unset, None, bool] = UNSET
     30    drift_window: Union[Unset, None, AssaysFilterJsonBodyDriftWindow] = UNSET
     31    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     32
     33
     34    def to_dict(self) -> Dict[str, Any]:
     35        workspace_id = self.workspace_id
     36        pipeline_id = self.pipeline_id
     37        sort_by = self.sort_by.value
     38
     39        name = self.name
     40        active = self.active
     41        drift_window: Union[Unset, None, Dict[str, Any]] = UNSET
     42        if not isinstance(self.drift_window, Unset):
     43            drift_window = self.drift_window.to_dict() if self.drift_window else None
     44
     45
     46        field_dict: Dict[str, Any] = {}
     47        field_dict.update(self.additional_properties)
     48        field_dict.update({
     49            "workspace_id": workspace_id,
     50            "pipeline_id": pipeline_id,
     51            "sort_by": sort_by,
     52        })
     53        if name is not UNSET:
     54            field_dict["name"] = name
     55        if active is not UNSET:
     56            field_dict["active"] = active
     57        if drift_window is not UNSET:
     58            field_dict["drift_window"] = drift_window
     59
     60        return field_dict
     61
     62
     63
     64    @classmethod
     65    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
     66        d = src_dict.copy()
     67        workspace_id = d.pop("workspace_id")
     68
     69        pipeline_id = d.pop("pipeline_id")
     70
     71        sort_by = AssaysFilterJsonBodySortBy(d.pop("sort_by"))
     72
     73
     74
     75
     76        name = d.pop("name", UNSET)
     77
     78        active = d.pop("active", UNSET)
     79
     80        _drift_window = d.pop("drift_window", UNSET)
     81        drift_window: Union[Unset, None, AssaysFilterJsonBodyDriftWindow]
     82        if _drift_window is None:
     83            drift_window = None
     84        elif isinstance(_drift_window,  Unset):
     85            drift_window = UNSET
     86        else:
     87            drift_window = AssaysFilterJsonBodyDriftWindow.from_dict(_drift_window)
     88
     89
     90
     91
     92        assays_filter_json_body = cls(
     93            workspace_id=workspace_id,
     94            pipeline_id=pipeline_id,
     95            sort_by=sort_by,
     96            name=name,
     97            active=active,
     98            drift_window=drift_window,
     99        )
    100
    101        assays_filter_json_body.additional_properties = d
    102        return assays_filter_json_body
    103
    104    @property
    105    def additional_keys(self) -> List[str]:
    106        return list(self.additional_properties.keys())
    107
    108    def __getitem__(self, key: str) -> Any:
    109        return self.additional_properties[key]
    110
    111    def __setitem__(self, key: str, value: Any) -> None:
    112        self.additional_properties[key] = value
    113
    114    def __delitem__(self, key: str) -> None:
    115        del self.additional_properties[key]
    116
    117    def __contains__(self, key: str) -> bool:
    118        return key in self.additional_properties

Attributes: workspace_id (int): pipeline_id (int): sort_by (AssaysFilterJsonBodySortBy): name (Union[Unset, None, str]): active (Union[Unset, None, bool]): drift_window (Union[Unset, None, AssaysFilterJsonBodyDriftWindow]):

AssaysFilterJsonBody( workspace_id: int, pipeline_id: int, sort_by: wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_json_body_sort_by.AssaysFilterJsonBodySortBy, name: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, active: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, bool] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, drift_window: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, wallaroo.wallaroo_ml_ops_api_client.models.assays_filter_json_body_drift_window.AssaysFilterJsonBodyDriftWindow] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>) View Source

    2def __init__(self, workspace_id, pipeline_id, sort_by, name=attr_dict['name'].default, active=attr_dict['active'].default, drift_window=attr_dict['drift_window'].default):
    3    self.workspace_id = workspace_id
    4    self.pipeline_id = pipeline_id
    5    self.sort_by = sort_by
    6    self.name = name
    7    self.active = active
    8    self.drift_window = drift_window
    9    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class AssaysFilterJsonBody.

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

    34    def to_dict(self) -> Dict[str, Any]:
    35        workspace_id = self.workspace_id
    36        pipeline_id = self.pipeline_id
    37        sort_by = self.sort_by.value
    38
    39        name = self.name
    40        active = self.active
    41        drift_window: Union[Unset, None, Dict[str, Any]] = UNSET
    42        if not isinstance(self.drift_window, Unset):
    43            drift_window = self.drift_window.to_dict() if self.drift_window else None
    44
    45
    46        field_dict: Dict[str, Any] = {}
    47        field_dict.update(self.additional_properties)
    48        field_dict.update({
    49            "workspace_id": workspace_id,
    50            "pipeline_id": pipeline_id,
    51            "sort_by": sort_by,
    52        })
    53        if name is not UNSET:
    54            field_dict["name"] = name
    55        if active is not UNSET:
    56            field_dict["active"] = active
    57        if drift_window is not UNSET:
    58            field_dict["drift_window"] = drift_window
    59
    60        return field_dict

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

     64    @classmethod
     65    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
     66        d = src_dict.copy()
     67        workspace_id = d.pop("workspace_id")
     68
     69        pipeline_id = d.pop("pipeline_id")
     70
     71        sort_by = AssaysFilterJsonBodySortBy(d.pop("sort_by"))
     72
     73
     74
     75
     76        name = d.pop("name", UNSET)
     77
     78        active = d.pop("active", UNSET)
     79
     80        _drift_window = d.pop("drift_window", UNSET)
     81        drift_window: Union[Unset, None, AssaysFilterJsonBodyDriftWindow]
     82        if _drift_window is None:
     83            drift_window = None
     84        elif isinstance(_drift_window,  Unset):
     85            drift_window = UNSET
     86        else:
     87            drift_window = AssaysFilterJsonBodyDriftWindow.from_dict(_drift_window)
     88
     89
     90
     91
     92        assays_filter_json_body = cls(
     93            workspace_id=workspace_id,
     94            pipeline_id=pipeline_id,
     95            sort_by=sort_by,
     96            name=name,
     97            active=active,
     98            drift_window=drift_window,
     99        )
    100
    101        assays_filter_json_body.additional_properties = d
    102        return assays_filter_json_body

additional_keys: List[str]