Attributes: error (str | Unset): Error code message (str | Unset): Message explaining the error suggestion (str | Unset): A suggestion on how to fix the error docs (str | Unset): A link to the documentation
| 11 | |
| 12 | @_attrs_define |
| 13 | class Error: |
| 14 | """ |
| 15 | Attributes: |
| 16 | error (str | Unset): Error code |
| 17 | message (str | Unset): Message explaining the error |
| 18 | suggestion (str | Unset): A suggestion on how to fix the error |
| 19 | docs (str | Unset): A link to the documentation |
| 20 | """ |
| 21 | |
| 22 | error: str | Unset = UNSET |
| 23 | message: str | Unset = UNSET |
| 24 | suggestion: str | Unset = UNSET |
| 25 | docs: str | Unset = UNSET |
| 26 | additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) |
| 27 | |
| 28 | def to_dict(self) -> dict[str, Any]: |
| 29 | error = self.error |
| 30 | |
| 31 | message = self.message |
| 32 | |
| 33 | suggestion = self.suggestion |
| 34 | |
| 35 | docs = self.docs |
| 36 | |
| 37 | field_dict: dict[str, Any] = {} |
| 38 | field_dict.update(self.additional_properties) |
| 39 | field_dict.update({}) |
| 40 | if error is not UNSET: |
| 41 | field_dict["error"] = error |
| 42 | if message is not UNSET: |
| 43 | field_dict["message"] = message |
| 44 | if suggestion is not UNSET: |
| 45 | field_dict["suggestion"] = suggestion |
| 46 | if docs is not UNSET: |
| 47 | field_dict["docs"] = docs |
| 48 | |
| 49 | return field_dict |
| 50 | |
| 51 | @classmethod |
| 52 | def from_dict(cls, src_dict: Mapping[str, Any]) -> Self: |
| 53 | d = dict(src_dict) |
| 54 | error = d.pop("error", UNSET) |
| 55 | |
| 56 | message = d.pop("message", UNSET) |
| 57 | |
| 58 | suggestion = d.pop("suggestion", UNSET) |
| 59 | |
| 60 | docs = d.pop("docs", UNSET) |
| 61 | |
| 62 | error = cls( |
| 63 | error=error, |
| 64 | message=message, |
| 65 | suggestion=suggestion, |
| 66 | docs=docs, |
| 67 | ) |
| 68 | |
| 69 | error.additional_properties = d |
| 70 | return error |
no outgoing calls
no test coverage detected