wallaroo.wallaroo_ml_ops_api_client.models.workspaces_list_response_200_workspaces_item API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.workspaces_list_response_200_workspaces_item

View Source

      1from typing import Any, Dict, List, Type, TypeVar, cast
      2
      3import attr
      4
      5T = TypeVar("T", bound="WorkspacesListResponse200WorkspacesItem")
      6
      7@attr.s(auto_attribs=True)
      8class WorkspacesListResponse200WorkspacesItem:
      9    """ Data returned from listing Workspaces
     10
     11    Attributes:
     12        id (int):  Workspace numeric ID
     13        name (str):  Descriptive name
     14        created_at (str):  Created At timestamp
     15        created_by (str):  UUID identifier for the User that created this Workspace
     16        archived (bool):  If this Workspace has been archived
     17        models (List[int]):  List of Model IDs present in Workspace
     18        pipelines (List[int]):  List of Pipeline IDs present in Workspace
     19    """
     20
     21    id: int
     22    name: str
     23    created_at: str
     24    created_by: str
     25    archived: bool
     26    models: List[int]
     27    pipelines: List[int]
     28    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     29
     30
     31    def to_dict(self) -> Dict[str, Any]:
     32        id = self.id
     33        name = self.name
     34        created_at = self.created_at
     35        created_by = self.created_by
     36        archived = self.archived
     37        models = self.models
     38
     39
     40
     41
     42        pipelines = self.pipelines
     43
     44
     45
     46
     47
     48        field_dict: Dict[str, Any] = {}
     49        field_dict.update(self.additional_properties)
     50        field_dict.update({
     51            "id": id,
     52            "name": name,
     53            "created_at": created_at,
     54            "created_by": created_by,
     55            "archived": archived,
     56            "models": models,
     57            "pipelines": pipelines,
     58        })
     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        id = d.pop("id")
     68
     69        name = d.pop("name")
     70
     71        created_at = d.pop("created_at")
     72
     73        created_by = d.pop("created_by")
     74
     75        archived = d.pop("archived")
     76
     77        models = cast(List[int], d.pop("models"))
     78
     79
     80        pipelines = cast(List[int], d.pop("pipelines"))
     81
     82
     83        workspaces_list_response_200_workspaces_item = cls(
     84            id=id,
     85            name=name,
     86            created_at=created_at,
     87            created_by=created_by,
     88            archived=archived,
     89            models=models,
     90            pipelines=pipelines,
     91        )
     92
     93        workspaces_list_response_200_workspaces_item.additional_properties = d
     94        return workspaces_list_response_200_workspaces_item
     95
     96    @property
     97    def additional_keys(self) -> List[str]:
     98        return list(self.additional_properties.keys())
     99
    100    def __getitem__(self, key: str) -> Any:
    101        return self.additional_properties[key]
    102
    103    def __setitem__(self, key: str, value: Any) -> None:
    104        self.additional_properties[key] = value
    105
    106    def __delitem__(self, key: str) -> None:
    107        del self.additional_properties[key]
    108
    109    def __contains__(self, key: str) -> bool:
    110        return key in self.additional_properties

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

      8@attr.s(auto_attribs=True)
      9class WorkspacesListResponse200WorkspacesItem:
     10    """ Data returned from listing Workspaces
     11
     12    Attributes:
     13        id (int):  Workspace numeric ID
     14        name (str):  Descriptive name
     15        created_at (str):  Created At timestamp
     16        created_by (str):  UUID identifier for the User that created this Workspace
     17        archived (bool):  If this Workspace has been archived
     18        models (List[int]):  List of Model IDs present in Workspace
     19        pipelines (List[int]):  List of Pipeline IDs present in Workspace
     20    """
     21
     22    id: int
     23    name: str
     24    created_at: str
     25    created_by: str
     26    archived: bool
     27    models: List[int]
     28    pipelines: List[int]
     29    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     30
     31
     32    def to_dict(self) -> Dict[str, Any]:
     33        id = self.id
     34        name = self.name
     35        created_at = self.created_at
     36        created_by = self.created_by
     37        archived = self.archived
     38        models = self.models
     39
     40
     41
     42
     43        pipelines = self.pipelines
     44
     45
     46
     47
     48
     49        field_dict: Dict[str, Any] = {}
     50        field_dict.update(self.additional_properties)
     51        field_dict.update({
     52            "id": id,
     53            "name": name,
     54            "created_at": created_at,
     55            "created_by": created_by,
     56            "archived": archived,
     57            "models": models,
     58            "pipelines": pipelines,
     59        })
     60
     61        return field_dict
     62
     63
     64
     65    @classmethod
     66    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
     67        d = src_dict.copy()
     68        id = d.pop("id")
     69
     70        name = d.pop("name")
     71
     72        created_at = d.pop("created_at")
     73
     74        created_by = d.pop("created_by")
     75
     76        archived = d.pop("archived")
     77
     78        models = cast(List[int], d.pop("models"))
     79
     80
     81        pipelines = cast(List[int], d.pop("pipelines"))
     82
     83
     84        workspaces_list_response_200_workspaces_item = cls(
     85            id=id,
     86            name=name,
     87            created_at=created_at,
     88            created_by=created_by,
     89            archived=archived,
     90            models=models,
     91            pipelines=pipelines,
     92        )
     93
     94        workspaces_list_response_200_workspaces_item.additional_properties = d
     95        return workspaces_list_response_200_workspaces_item
     96
     97    @property
     98    def additional_keys(self) -> List[str]:
     99        return list(self.additional_properties.keys())
    100
    101    def __getitem__(self, key: str) -> Any:
    102        return self.additional_properties[key]
    103
    104    def __setitem__(self, key: str, value: Any) -> None:
    105        self.additional_properties[key] = value
    106
    107    def __delitem__(self, key: str) -> None:
    108        del self.additional_properties[key]
    109
    110    def __contains__(self, key: str) -> bool:
    111        return key in self.additional_properties

Data returned from listing Workspaces

Attributes: id (int): Workspace numeric ID name (str): Descriptive name created_at (str): Created At timestamp created_by (str): UUID identifier for the User that created this Workspace archived (bool): If this Workspace has been archived models (List[int]): List of Model IDs present in Workspace pipelines (List[int]): List of Pipeline IDs present in Workspace

WorkspacesListResponse200WorkspacesItem( id: int, name: str, created_at: str, created_by: str, archived: bool, models: List[int], pipelines: List[int]) View Source

     2def __init__(self, id, name, created_at, created_by, archived, models, pipelines):
     3    self.id = id
     4    self.name = name
     5    self.created_at = created_at
     6    self.created_by = created_by
     7    self.archived = archived
     8    self.models = models
     9    self.pipelines = pipelines
    10    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class WorkspacesListResponse200WorkspacesItem.

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

    32    def to_dict(self) -> Dict[str, Any]:
    33        id = self.id
    34        name = self.name
    35        created_at = self.created_at
    36        created_by = self.created_by
    37        archived = self.archived
    38        models = self.models
    39
    40
    41
    42
    43        pipelines = self.pipelines
    44
    45
    46
    47
    48
    49        field_dict: Dict[str, Any] = {}
    50        field_dict.update(self.additional_properties)
    51        field_dict.update({
    52            "id": id,
    53            "name": name,
    54            "created_at": created_at,
    55            "created_by": created_by,
    56            "archived": archived,
    57            "models": models,
    58            "pipelines": pipelines,
    59        })
    60
    61        return field_dict

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

    65    @classmethod
    66    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    67        d = src_dict.copy()
    68        id = d.pop("id")
    69
    70        name = d.pop("name")
    71
    72        created_at = d.pop("created_at")
    73
    74        created_by = d.pop("created_by")
    75
    76        archived = d.pop("archived")
    77
    78        models = cast(List[int], d.pop("models"))
    79
    80
    81        pipelines = cast(List[int], d.pop("pipelines"))
    82
    83
    84        workspaces_list_response_200_workspaces_item = cls(
    85            id=id,
    86            name=name,
    87            created_at=created_at,
    88            created_by=created_by,
    89            archived=archived,
    90            models=models,
    91            pipelines=pipelines,
    92        )
    93
    94        workspaces_list_response_200_workspaces_item.additional_properties = d
    95        return workspaces_list_response_200_workspaces_item

additional_keys: List[str]