wallaroo.wallaroo_ml_ops_api_client.models.v1_model_get_config_json_body API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.v1_model_get_config_json_body

View Source

     1from typing import Any, Dict, List, Type, TypeVar
     2
     3import attr
     4
     5T = TypeVar("T", bound="V1ModelGetConfigJsonBody")
     6
     7@attr.s(auto_attribs=True)
     8class V1ModelGetConfigJsonBody:
     9    """ Body for request to /models/get_config_by_id
    10
    11    Attributes:
    12        model_id (int):  The primary key of a model
    13    """
    14
    15    model_id: int
    16    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    17
    18
    19    def to_dict(self) -> Dict[str, Any]:
    20        model_id = self.model_id
    21
    22        field_dict: Dict[str, Any] = {}
    23        field_dict.update(self.additional_properties)
    24        field_dict.update({
    25            "model_id": model_id,
    26        })
    27
    28        return field_dict
    29
    30
    31
    32    @classmethod
    33    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    34        d = src_dict.copy()
    35        model_id = d.pop("model_id")
    36
    37        v1_model_get_config_json_body = cls(
    38            model_id=model_id,
    39        )
    40
    41        v1_model_get_config_json_body.additional_properties = d
    42        return v1_model_get_config_json_body
    43
    44    @property
    45    def additional_keys(self) -> List[str]:
    46        return list(self.additional_properties.keys())
    47
    48    def __getitem__(self, key: str) -> Any:
    49        return self.additional_properties[key]
    50
    51    def __setitem__(self, key: str, value: Any) -> None:
    52        self.additional_properties[key] = value
    53
    54    def __delitem__(self, key: str) -> None:
    55        del self.additional_properties[key]
    56
    57    def __contains__(self, key: str) -> bool:
    58        return key in self.additional_properties

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

     8@attr.s(auto_attribs=True)
     9class V1ModelGetConfigJsonBody:
    10    """ Body for request to /models/get_config_by_id
    11
    12    Attributes:
    13        model_id (int):  The primary key of a model
    14    """
    15
    16    model_id: int
    17    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    18
    19
    20    def to_dict(self) -> Dict[str, Any]:
    21        model_id = self.model_id
    22
    23        field_dict: Dict[str, Any] = {}
    24        field_dict.update(self.additional_properties)
    25        field_dict.update({
    26            "model_id": model_id,
    27        })
    28
    29        return field_dict
    30
    31
    32
    33    @classmethod
    34    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    35        d = src_dict.copy()
    36        model_id = d.pop("model_id")
    37
    38        v1_model_get_config_json_body = cls(
    39            model_id=model_id,
    40        )
    41
    42        v1_model_get_config_json_body.additional_properties = d
    43        return v1_model_get_config_json_body
    44
    45    @property
    46    def additional_keys(self) -> List[str]:
    47        return list(self.additional_properties.keys())
    48
    49    def __getitem__(self, key: str) -> Any:
    50        return self.additional_properties[key]
    51
    52    def __setitem__(self, key: str, value: Any) -> None:
    53        self.additional_properties[key] = value
    54
    55    def __delitem__(self, key: str) -> None:
    56        del self.additional_properties[key]
    57
    58    def __contains__(self, key: str) -> bool:
    59        return key in self.additional_properties

Body for request to /models/get_config_by_id

Attributes: model_id (int): The primary key of a model

V1ModelGetConfigJsonBody(model_id: int) View Source

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

Method generated by attrs for class V1ModelGetConfigJsonBody.

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

    20    def to_dict(self) -> Dict[str, Any]:
    21        model_id = self.model_id
    22
    23        field_dict: Dict[str, Any] = {}
    24        field_dict.update(self.additional_properties)
    25        field_dict.update({
    26            "model_id": model_id,
    27        })
    28
    29        return field_dict

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

    33    @classmethod
    34    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    35        d = src_dict.copy()
    36        model_id = d.pop("model_id")
    37
    38        v1_model_get_config_json_body = cls(
    39            model_id=model_id,
    40        )
    41
    42        v1_model_get_config_json_body.additional_properties = d
    43        return v1_model_get_config_json_body

additional_keys: List[str]