Attributes: detail (Union[Unset, Any]):
| 13 | |
| 14 | @_attrs_define |
| 15 | class GenericError: |
| 16 | """ |
| 17 | Attributes: |
| 18 | detail (Union[Unset, Any]): |
| 19 | """ |
| 20 | |
| 21 | detail: Union[Unset, Any] = UNSET |
| 22 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) |
| 23 | |
| 24 | def to_dict(self) -> dict[str, Any]: |
| 25 | detail = self.detail |
| 26 | |
| 27 | field_dict: dict[str, Any] = {} |
| 28 | field_dict.update(self.additional_properties) |
| 29 | field_dict.update({}) |
| 30 | if detail is not UNSET: |
| 31 | field_dict["detail"] = detail |
| 32 | |
| 33 | return field_dict |
| 34 | |
| 35 | @classmethod |
| 36 | def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T: |
| 37 | d = src_dict.copy() |
| 38 | detail = d.pop("detail", UNSET) |
| 39 | |
| 40 | generic_error = cls( |
| 41 | detail=detail, |
| 42 | ) |
| 43 | |
| 44 | generic_error.additional_properties = d |
| 45 | return generic_error |
| 46 | |
| 47 | @property |
| 48 | def additional_keys(self) -> list[str]: |
| 49 | return list(self.additional_properties.keys()) |
| 50 | |
| 51 | def __getitem__(self, key: str) -> Any: |
| 52 | return self.additional_properties[key] |
| 53 | |
| 54 | def __setitem__(self, key: str, value: Any) -> None: |
| 55 | self.additional_properties[key] = value |
| 56 | |
| 57 | def __delitem__(self, key: str) -> None: |
| 58 | del self.additional_properties[key] |
| 59 | |
| 60 | def __contains__(self, key: str) -> bool: |
| 61 | return key in self.additional_properties |
nothing calls this directly
no outgoing calls
no test coverage detected