wallaroo.wallaroo_ml_ops_api_client.models.models_list_response_200 API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.models_list_response_200

View Source

     1from typing import Any, Dict, List, Type, TypeVar
     2
     3import attr
     4
     5from ..models.models_list_response_200_models_item import \
     6    ModelsListResponse200ModelsItem
     7
     8T = TypeVar("T", bound="ModelsListResponse200")
     9
    10@attr.s(auto_attribs=True)
    11class ModelsListResponse200:
    12    """ Successful response to workspace model retrieval.
    13
    14    Attributes:
    15        models (List[ModelsListResponse200ModelsItem]):  List of models in the workspace.
    16    """
    17
    18    models: List[ModelsListResponse200ModelsItem]
    19    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    20
    21
    22    def to_dict(self) -> Dict[str, Any]:
    23        models = []
    24        for models_item_data in self.models:
    25            models_item = models_item_data.to_dict()
    26
    27            models.append(models_item)
    28
    29
    30
    31
    32
    33        field_dict: Dict[str, Any] = {}
    34        field_dict.update(self.additional_properties)
    35        field_dict.update({
    36            "models": models,
    37        })
    38
    39        return field_dict
    40
    41
    42
    43    @classmethod
    44    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    45        d = src_dict.copy()
    46        models = []
    47        _models = d.pop("models")
    48        for models_item_data in (_models):
    49            models_item = ModelsListResponse200ModelsItem.from_dict(models_item_data)
    50
    51
    52
    53            models.append(models_item)
    54
    55
    56        models_list_response_200 = cls(
    57            models=models,
    58        )
    59
    60        models_list_response_200.additional_properties = d
    61        return models_list_response_200
    62
    63    @property
    64    def additional_keys(self) -> List[str]:
    65        return list(self.additional_properties.keys())
    66
    67    def __getitem__(self, key: str) -> Any:
    68        return self.additional_properties[key]
    69
    70    def __setitem__(self, key: str, value: Any) -> None:
    71        self.additional_properties[key] = value
    72
    73    def __delitem__(self, key: str) -> None:
    74        del self.additional_properties[key]
    75
    76    def __contains__(self, key: str) -> bool:
    77        return key in self.additional_properties

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

    11@attr.s(auto_attribs=True)
    12class ModelsListResponse200:
    13    """ Successful response to workspace model retrieval.
    14
    15    Attributes:
    16        models (List[ModelsListResponse200ModelsItem]):  List of models in the workspace.
    17    """
    18
    19    models: List[ModelsListResponse200ModelsItem]
    20    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    21
    22
    23    def to_dict(self) -> Dict[str, Any]:
    24        models = []
    25        for models_item_data in self.models:
    26            models_item = models_item_data.to_dict()
    27
    28            models.append(models_item)
    29
    30
    31
    32
    33
    34        field_dict: Dict[str, Any] = {}
    35        field_dict.update(self.additional_properties)
    36        field_dict.update({
    37            "models": models,
    38        })
    39
    40        return field_dict
    41
    42
    43
    44    @classmethod
    45    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    46        d = src_dict.copy()
    47        models = []
    48        _models = d.pop("models")
    49        for models_item_data in (_models):
    50            models_item = ModelsListResponse200ModelsItem.from_dict(models_item_data)
    51
    52
    53
    54            models.append(models_item)
    55
    56
    57        models_list_response_200 = cls(
    58            models=models,
    59        )
    60
    61        models_list_response_200.additional_properties = d
    62        return models_list_response_200
    63
    64    @property
    65    def additional_keys(self) -> List[str]:
    66        return list(self.additional_properties.keys())
    67
    68    def __getitem__(self, key: str) -> Any:
    69        return self.additional_properties[key]
    70
    71    def __setitem__(self, key: str, value: Any) -> None:
    72        self.additional_properties[key] = value
    73
    74    def __delitem__(self, key: str) -> None:
    75        del self.additional_properties[key]
    76
    77    def __contains__(self, key: str) -> bool:
    78        return key in self.additional_properties

Successful response to workspace model retrieval.

Attributes: models (List[ModelsListResponse200ModelsItem]): List of models in the workspace.

ModelsListResponse200( models: List[wallaroo.wallaroo_ml_ops_api_client.models.models_list_response_200_models_item.ModelsListResponse200ModelsItem]) View Source

    2def __init__(self, models):
    3    self.models = models
    4    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class ModelsListResponse200.

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

    23    def to_dict(self) -> Dict[str, Any]:
    24        models = []
    25        for models_item_data in self.models:
    26            models_item = models_item_data.to_dict()
    27
    28            models.append(models_item)
    29
    30
    31
    32
    33
    34        field_dict: Dict[str, Any] = {}
    35        field_dict.update(self.additional_properties)
    36        field_dict.update({
    37            "models": models,
    38        })
    39
    40        return field_dict

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

    44    @classmethod
    45    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    46        d = src_dict.copy()
    47        models = []
    48        _models = d.pop("models")
    49        for models_item_data in (_models):
    50            models_item = ModelsListResponse200ModelsItem.from_dict(models_item_data)
    51
    52
    53
    54            models.append(models_item)
    55
    56
    57        models_list_response_200 = cls(
    58            models=models,
    59        )
    60
    61        models_list_response_200.additional_properties = d
    62        return models_list_response_200

additional_keys: List[str]