wallaroo.wallaroo_ml_ops_api_client.models.workspaces_add_user_response_400 API documentation

# wallaroo.wallaroo_ml_ops_api_client.models.workspaces_add_user_response_400

View Source

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

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

     8@attr.s(auto_attribs=True)
     9class WorkspacesAddUserResponse400:
    10    """ Error response.
    11
    12    Attributes:
    13        msg (str):  Error message.
    14        code (int):  Status code for the error.
    15    """
    16
    17    msg: str
    18    code: int
    19    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
    20
    21
    22    def to_dict(self) -> Dict[str, Any]:
    23        msg = self.msg
    24        code = self.code
    25
    26        field_dict: Dict[str, Any] = {}
    27        field_dict.update(self.additional_properties)
    28        field_dict.update({
    29            "msg": msg,
    30            "code": code,
    31        })
    32
    33        return field_dict
    34
    35
    36
    37    @classmethod
    38    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    39        d = src_dict.copy()
    40        msg = d.pop("msg")
    41
    42        code = d.pop("code")
    43
    44        workspaces_add_user_response_400 = cls(
    45            msg=msg,
    46            code=code,
    47        )
    48
    49        workspaces_add_user_response_400.additional_properties = d
    50        return workspaces_add_user_response_400
    51
    52    @property
    53    def additional_keys(self) -> List[str]:
    54        return list(self.additional_properties.keys())
    55
    56    def __getitem__(self, key: str) -> Any:
    57        return self.additional_properties[key]
    58
    59    def __setitem__(self, key: str, value: Any) -> None:
    60        self.additional_properties[key] = value
    61
    62    def __delitem__(self, key: str) -> None:
    63        del self.additional_properties[key]
    64
    65    def __contains__(self, key: str) -> bool:
    66        return key in self.additional_properties

Error response.

Attributes: msg (str): Error message. code (int): Status code for the error.

WorkspacesAddUserResponse400(msg: str, code: int) View Source

    2def __init__(self, msg, code):
    3    self.msg = msg
    4    self.code = code
    5    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class WorkspacesAddUserResponse400.

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

    22    def to_dict(self) -> Dict[str, Any]:
    23        msg = self.msg
    24        code = self.code
    25
    26        field_dict: Dict[str, Any] = {}
    27        field_dict.update(self.additional_properties)
    28        field_dict.update({
    29            "msg": msg,
    30            "code": code,
    31        })
    32
    33        return field_dict

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

    37    @classmethod
    38    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
    39        d = src_dict.copy()
    40        msg = d.pop("msg")
    41
    42        code = d.pop("code")
    43
    44        workspaces_add_user_response_400 = cls(
    45            msg=msg,
    46            code=code,
    47        )
    48
    49        workspaces_add_user_response_400.additional_properties = d
    50        return workspaces_add_user_response_400

additional_keys: List[str]