wallaroo.wallaroo_ml_ops_api_client.models.models_get_response_200 API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.models_get_response_200

View Source

      1from typing import Any, Dict, List, Type, TypeVar, Union
      2
      3import attr
      4
      5from ..models.models_get_response_200_models_item import \
      6    ModelsGetResponse200ModelsItem
      7from ..types import UNSET, Unset
      8
      9T = TypeVar("T", bound="ModelsGetResponse200")
     10
     11@attr.s(auto_attribs=True)
     12class ModelsGetResponse200:
     13    """ Successful response to workspace model retrieval.  Details for a single Models object in the workspace.
     14
     15    Attributes:
     16        id (int):  Model identifer.
     17        name (str):  The descriptive name of the model, the same as `model_id`.
     18        owner_id (str):  The UUID of the User.
     19        models (List[ModelsGetResponse200ModelsItem]):
     20        created_at (Union[Unset, None, str]):  The timestamp that this model was created.
     21        updated_at (Union[Unset, None, str]):  The last time this model object was updated.
     22    """
     23
     24    id: int
     25    name: str
     26    owner_id: str
     27    models: List[ModelsGetResponse200ModelsItem]
     28    created_at: Union[Unset, None, str] = UNSET
     29    updated_at: Union[Unset, None, str] = UNSET
     30    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     31
     32
     33    def to_dict(self) -> Dict[str, Any]:
     34        id = self.id
     35        name = self.name
     36        owner_id = self.owner_id
     37        models = []
     38        for models_item_data in self.models:
     39            models_item = models_item_data.to_dict()
     40
     41            models.append(models_item)
     42
     43
     44
     45
     46        created_at = self.created_at
     47        updated_at = self.updated_at
     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            "owner_id": owner_id,
     55            "models": models,
     56        })
     57        if created_at is not UNSET:
     58            field_dict["created_at"] = created_at
     59        if updated_at is not UNSET:
     60            field_dict["updated_at"] = updated_at
     61
     62        return field_dict
     63
     64
     65
     66    @classmethod
     67    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
     68        d = src_dict.copy()
     69        id = d.pop("id")
     70
     71        name = d.pop("name")
     72
     73        owner_id = d.pop("owner_id")
     74
     75        models = []
     76        _models = d.pop("models")
     77        for models_item_data in (_models):
     78            models_item = ModelsGetResponse200ModelsItem.from_dict(models_item_data)
     79
     80
     81
     82            models.append(models_item)
     83
     84
     85        created_at = d.pop("created_at", UNSET)
     86
     87        updated_at = d.pop("updated_at", UNSET)
     88
     89        models_get_response_200 = cls(
     90            id=id,
     91            name=name,
     92            owner_id=owner_id,
     93            models=models,
     94            created_at=created_at,
     95            updated_at=updated_at,
     96        )
     97
     98        models_get_response_200.additional_properties = d
     99        return models_get_response_200
    100
    101    @property
    102    def additional_keys(self) -> List[str]:
    103        return list(self.additional_properties.keys())
    104
    105    def __getitem__(self, key: str) -> Any:
    106        return self.additional_properties[key]
    107
    108    def __setitem__(self, key: str, value: Any) -> None:
    109        self.additional_properties[key] = value
    110
    111    def __delitem__(self, key: str) -> None:
    112        del self.additional_properties[key]
    113
    114    def __contains__(self, key: str) -> bool:
    115        return key in self.additional_properties

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

     12@attr.s(auto_attribs=True)
     13class ModelsGetResponse200:
     14    """ Successful response to workspace model retrieval.  Details for a single Models object in the workspace.
     15
     16    Attributes:
     17        id (int):  Model identifer.
     18        name (str):  The descriptive name of the model, the same as `model_id`.
     19        owner_id (str):  The UUID of the User.
     20        models (List[ModelsGetResponse200ModelsItem]):
     21        created_at (Union[Unset, None, str]):  The timestamp that this model was created.
     22        updated_at (Union[Unset, None, str]):  The last time this model object was updated.
     23    """
     24
     25    id: int
     26    name: str
     27    owner_id: str
     28    models: List[ModelsGetResponse200ModelsItem]
     29    created_at: Union[Unset, None, str] = UNSET
     30    updated_at: Union[Unset, None, str] = UNSET
     31    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
     32
     33
     34    def to_dict(self) -> Dict[str, Any]:
     35        id = self.id
     36        name = self.name
     37        owner_id = self.owner_id
     38        models = []
     39        for models_item_data in self.models:
     40            models_item = models_item_data.to_dict()
     41
     42            models.append(models_item)
     43
     44
     45
     46
     47        created_at = self.created_at
     48        updated_at = self.updated_at
     49
     50        field_dict: Dict[str, Any] = {}
     51        field_dict.update(self.additional_properties)
     52        field_dict.update({
     53            "id": id,
     54            "name": name,
     55            "owner_id": owner_id,
     56            "models": models,
     57        })
     58        if created_at is not UNSET:
     59            field_dict["created_at"] = created_at
     60        if updated_at is not UNSET:
     61            field_dict["updated_at"] = updated_at
     62
     63        return field_dict
     64
     65
     66
     67    @classmethod
     68    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
     69        d = src_dict.copy()
     70        id = d.pop("id")
     71
     72        name = d.pop("name")
     73
     74        owner_id = d.pop("owner_id")
     75
     76        models = []
     77        _models = d.pop("models")
     78        for models_item_data in (_models):
     79            models_item = ModelsGetResponse200ModelsItem.from_dict(models_item_data)
     80
     81
     82
     83            models.append(models_item)
     84
     85
     86        created_at = d.pop("created_at", UNSET)
     87
     88        updated_at = d.pop("updated_at", UNSET)
     89
     90        models_get_response_200 = cls(
     91            id=id,
     92            name=name,
     93            owner_id=owner_id,
     94            models=models,
     95            created_at=created_at,
     96            updated_at=updated_at,
     97        )
     98
     99        models_get_response_200.additional_properties = d
    100        return models_get_response_200
    101
    102    @property
    103    def additional_keys(self) -> List[str]:
    104        return list(self.additional_properties.keys())
    105
    106    def __getitem__(self, key: str) -> Any:
    107        return self.additional_properties[key]
    108
    109    def __setitem__(self, key: str, value: Any) -> None:
    110        self.additional_properties[key] = value
    111
    112    def __delitem__(self, key: str) -> None:
    113        del self.additional_properties[key]
    114
    115    def __contains__(self, key: str) -> bool:
    116        return key in self.additional_properties

Successful response to workspace model retrieval. Details for a single Models object in the workspace.

Attributes: id (int): Model identifer. name (str): The descriptive name of the model, the same as `model_id`. owner_id (str): The UUID of the User. models (List[ModelsGetResponse200ModelsItem]): created_at (Union[Unset, None, str]): The timestamp that this model was created. updated_at (Union[Unset, None, str]): The last time this model object was updated.

ModelsGetResponse200( id: int, name: str, owner_id: str, models: List[wallaroo.wallaroo_ml_ops_api_client.models.models_get_response_200_models_item.ModelsGetResponse200ModelsItem], created_at: 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>) View Source

    2def __init__(self, id, name, owner_id, models, created_at=attr_dict['created_at'].default, updated_at=attr_dict['updated_at'].default):
    3    self.id = id
    4    self.name = name
    5    self.owner_id = owner_id
    6    self.models = models
    7    self.created_at = created_at
    8    self.updated_at = updated_at
    9    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class ModelsGetResponse200.

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

    34    def to_dict(self) -> Dict[str, Any]:
    35        id = self.id
    36        name = self.name
    37        owner_id = self.owner_id
    38        models = []
    39        for models_item_data in self.models:
    40            models_item = models_item_data.to_dict()
    41
    42            models.append(models_item)
    43
    44
    45
    46
    47        created_at = self.created_at
    48        updated_at = self.updated_at
    49
    50        field_dict: Dict[str, Any] = {}
    51        field_dict.update(self.additional_properties)
    52        field_dict.update({
    53            "id": id,
    54            "name": name,
    55            "owner_id": owner_id,
    56            "models": models,
    57        })
    58        if created_at is not UNSET:
    59            field_dict["created_at"] = created_at
    60        if updated_at is not UNSET:
    61            field_dict["updated_at"] = updated_at
    62
    63        return field_dict

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

     67    @classmethod
     68    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
     69        d = src_dict.copy()
     70        id = d.pop("id")
     71
     72        name = d.pop("name")
     73
     74        owner_id = d.pop("owner_id")
     75
     76        models = []
     77        _models = d.pop("models")
     78        for models_item_data in (_models):
     79            models_item = ModelsGetResponse200ModelsItem.from_dict(models_item_data)
     80
     81
     82
     83            models.append(models_item)
     84
     85
     86        created_at = d.pop("created_at", UNSET)
     87
     88        updated_at = d.pop("updated_at", UNSET)
     89
     90        models_get_response_200 = cls(
     91            id=id,
     92            name=name,
     93            owner_id=owner_id,
     94            models=models,
     95            created_at=created_at,
     96            updated_at=updated_at,
     97        )
     98
     99        models_get_response_200.additional_properties = d
    100        return models_get_response_200

additional_keys: List[str]