Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2023-11-28 17:22:38 -08:00
parent 243ed3222a
commit d9d73522fd
72 changed files with 960 additions and 534 deletions

View File

@ -1,4 +1,4 @@
from typing import Any, Dict, List, Type, TypeVar, Union
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
@ -20,6 +20,7 @@ class SuccessWebSocketResponse:
def to_dict(self) -> Dict[str, Any]:
request_id = self.request_id
resp: Union[Unset, OkWebSocketResponseData] = UNSET
if not isinstance(self.resp, Unset):
resp = self.resp
success = self.success
@ -30,7 +31,8 @@ class SuccessWebSocketResponse:
if request_id is not UNSET:
field_dict["request_id"] = request_id
if resp is not UNSET:
field_dict["resp"] = resp.to_dict()
_resp: OkWebSocketResponseData = cast(OkWebSocketResponseData, resp)
field_dict["resp"] = _resp.to_dict()
if success is not UNSET:
field_dict["success"] = success