wallaroo.wallaroo_ml_ops_api_client.models.models_get_response_200_models_item

  1from typing import Any, Dict, List, Type, TypeVar, Union
  2
  3import attr
  4
  5from ..types import UNSET, Unset
  6
  7T = TypeVar("T", bound="ModelsGetResponse200ModelsItem")
  8
  9@attr.s(auto_attribs=True)
 10class ModelsGetResponse200ModelsItem:
 11    """ Individual model details.
 12
 13    Attributes:
 14        sha (str):  Model's content hash.
 15        models_pk_id (int):  Internal model identifer.
 16        model_version (str):  Model version.
 17        owner_id (str):  Model owner identifier.
 18        model_id (str):  Model identifier.
 19        id (int):  Internal identifier.
 20        file_name (Union[Unset, None, str]):  Model filename.
 21        image_path (Union[Unset, None, str]):  Model image path.
 22    """
 23
 24    sha: str
 25    models_pk_id: int
 26    model_version: str
 27    owner_id: str
 28    model_id: str
 29    id: int
 30    file_name: Union[Unset, None, str] = UNSET
 31    image_path: Union[Unset, None, str] = UNSET
 32    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
 33
 34
 35    def to_dict(self) -> Dict[str, Any]:
 36        sha = self.sha
 37        models_pk_id = self.models_pk_id
 38        model_version = self.model_version
 39        owner_id = self.owner_id
 40        model_id = self.model_id
 41        id = self.id
 42        file_name = self.file_name
 43        image_path = self.image_path
 44
 45        field_dict: Dict[str, Any] = {}
 46        field_dict.update(self.additional_properties)
 47        field_dict.update({
 48            "sha": sha,
 49            "models_pk_id": models_pk_id,
 50            "model_version": model_version,
 51            "owner_id": owner_id,
 52            "model_id": model_id,
 53            "id": id,
 54        })
 55        if file_name is not UNSET:
 56            field_dict["file_name"] = file_name
 57        if image_path is not UNSET:
 58            field_dict["image_path"] = image_path
 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        sha = d.pop("sha")
 68
 69        models_pk_id = d.pop("models_pk_id")
 70
 71        model_version = d.pop("model_version")
 72
 73        owner_id = d.pop("owner_id")
 74
 75        model_id = d.pop("model_id")
 76
 77        id = d.pop("id")
 78
 79        file_name = d.pop("file_name", UNSET)
 80
 81        image_path = d.pop("image_path", UNSET)
 82
 83        models_get_response_200_models_item = cls(
 84            sha=sha,
 85            models_pk_id=models_pk_id,
 86            model_version=model_version,
 87            owner_id=owner_id,
 88            model_id=model_id,
 89            id=id,
 90            file_name=file_name,
 91            image_path=image_path,
 92        )
 93
 94        models_get_response_200_models_item.additional_properties = d
 95        return models_get_response_200_models_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
@attr.s(auto_attribs=True)
class ModelsGetResponse200ModelsItem:
 10@attr.s(auto_attribs=True)
 11class ModelsGetResponse200ModelsItem:
 12    """ Individual model details.
 13
 14    Attributes:
 15        sha (str):  Model's content hash.
 16        models_pk_id (int):  Internal model identifer.
 17        model_version (str):  Model version.
 18        owner_id (str):  Model owner identifier.
 19        model_id (str):  Model identifier.
 20        id (int):  Internal identifier.
 21        file_name (Union[Unset, None, str]):  Model filename.
 22        image_path (Union[Unset, None, str]):  Model image path.
 23    """
 24
 25    sha: str
 26    models_pk_id: int
 27    model_version: str
 28    owner_id: str
 29    model_id: str
 30    id: int
 31    file_name: Union[Unset, None, str] = UNSET
 32    image_path: Union[Unset, None, str] = UNSET
 33    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
 34
 35
 36    def to_dict(self) -> Dict[str, Any]:
 37        sha = self.sha
 38        models_pk_id = self.models_pk_id
 39        model_version = self.model_version
 40        owner_id = self.owner_id
 41        model_id = self.model_id
 42        id = self.id
 43        file_name = self.file_name
 44        image_path = self.image_path
 45
 46        field_dict: Dict[str, Any] = {}
 47        field_dict.update(self.additional_properties)
 48        field_dict.update({
 49            "sha": sha,
 50            "models_pk_id": models_pk_id,
 51            "model_version": model_version,
 52            "owner_id": owner_id,
 53            "model_id": model_id,
 54            "id": id,
 55        })
 56        if file_name is not UNSET:
 57            field_dict["file_name"] = file_name
 58        if image_path is not UNSET:
 59            field_dict["image_path"] = image_path
 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        sha = d.pop("sha")
 69
 70        models_pk_id = d.pop("models_pk_id")
 71
 72        model_version = d.pop("model_version")
 73
 74        owner_id = d.pop("owner_id")
 75
 76        model_id = d.pop("model_id")
 77
 78        id = d.pop("id")
 79
 80        file_name = d.pop("file_name", UNSET)
 81
 82        image_path = d.pop("image_path", UNSET)
 83
 84        models_get_response_200_models_item = cls(
 85            sha=sha,
 86            models_pk_id=models_pk_id,
 87            model_version=model_version,
 88            owner_id=owner_id,
 89            model_id=model_id,
 90            id=id,
 91            file_name=file_name,
 92            image_path=image_path,
 93        )
 94
 95        models_get_response_200_models_item.additional_properties = d
 96        return models_get_response_200_models_item
 97
 98    @property
 99    def additional_keys(self) -> List[str]:
100        return list(self.additional_properties.keys())
101
102    def __getitem__(self, key: str) -> Any:
103        return self.additional_properties[key]
104
105    def __setitem__(self, key: str, value: Any) -> None:
106        self.additional_properties[key] = value
107
108    def __delitem__(self, key: str) -> None:
109        del self.additional_properties[key]
110
111    def __contains__(self, key: str) -> bool:
112        return key in self.additional_properties

Individual model details.

Attributes: sha (str): Model's content hash. models_pk_id (int): Internal model identifer. model_version (str): Model version. owner_id (str): Model owner identifier. model_id (str): Model identifier. id (int): Internal identifier. file_name (Union[Unset, None, str]): Model filename. image_path (Union[Unset, None, str]): Model image path.

ModelsGetResponse200ModelsItem( sha: str, models_pk_id: int, model_version: str, owner_id: str, model_id: str, id: int, file_name: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>, image_path: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, str] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>)
 2def __init__(self, sha, models_pk_id, model_version, owner_id, model_id, id, file_name=attr_dict['file_name'].default, image_path=attr_dict['image_path'].default):
 3    self.sha = sha
 4    self.models_pk_id = models_pk_id
 5    self.model_version = model_version
 6    self.owner_id = owner_id
 7    self.model_id = model_id
 8    self.id = id
 9    self.file_name = file_name
10    self.image_path = image_path
11    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class ModelsGetResponse200ModelsItem.

def to_dict(self) -> Dict[str, Any]:
36    def to_dict(self) -> Dict[str, Any]:
37        sha = self.sha
38        models_pk_id = self.models_pk_id
39        model_version = self.model_version
40        owner_id = self.owner_id
41        model_id = self.model_id
42        id = self.id
43        file_name = self.file_name
44        image_path = self.image_path
45
46        field_dict: Dict[str, Any] = {}
47        field_dict.update(self.additional_properties)
48        field_dict.update({
49            "sha": sha,
50            "models_pk_id": models_pk_id,
51            "model_version": model_version,
52            "owner_id": owner_id,
53            "model_id": model_id,
54            "id": id,
55        })
56        if file_name is not UNSET:
57            field_dict["file_name"] = file_name
58        if image_path is not UNSET:
59            field_dict["image_path"] = image_path
60
61        return field_dict
@classmethod
def from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T:
65    @classmethod
66    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
67        d = src_dict.copy()
68        sha = d.pop("sha")
69
70        models_pk_id = d.pop("models_pk_id")
71
72        model_version = d.pop("model_version")
73
74        owner_id = d.pop("owner_id")
75
76        model_id = d.pop("model_id")
77
78        id = d.pop("id")
79
80        file_name = d.pop("file_name", UNSET)
81
82        image_path = d.pop("image_path", UNSET)
83
84        models_get_response_200_models_item = cls(
85            sha=sha,
86            models_pk_id=models_pk_id,
87            model_version=model_version,
88            owner_id=owner_id,
89            model_id=model_id,
90            id=id,
91            file_name=file_name,
92            image_path=image_path,
93        )
94
95        models_get_response_200_models_item.additional_properties = d
96        return models_get_response_200_models_item
additional_keys: List[str]