Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2023-09-29 16:05:40 -07:00
parent 31cd9e532d
commit 12c164620b
268 changed files with 22464 additions and 18287 deletions

View File

@ -6,72 +6,68 @@ from ..types import UNSET, Unset
UF = TypeVar("UF", bound="FailureWebSocketResponse")
@attr.s(auto_attribs=True)
class FailureWebSocketResponse:
"""Unsuccessful Websocket response.""" # noqa: E501
""" Unsuccessful Websocket response. """ # noqa: E501
from ..models.api_error import ApiError
errors: Union[Unset, List[ApiError]] = UNSET
request_id: Union[Unset, str] = UNSET
success: Union[Unset, bool] = False
from ..models.api_error import ApiError
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
errors: Union[Unset, List[ApiError]] = UNSET
request_id: Union[Unset, str] = UNSET
success: Union[Unset, bool] = False
def to_dict(self) -> Dict[str, Any]:
from ..models.api_error import ApiError
errors: Union[Unset, List[ApiError]] = UNSET
if not isinstance(self.errors, Unset):
errors = self.errors
request_id = self.request_id
success = self.success
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if errors is not UNSET:
field_dict['errors'] = errors
if request_id is not UNSET:
field_dict['request_id'] = request_id
if success is not UNSET:
field_dict['success'] = success
def to_dict(self) -> Dict[str, Any]:
from ..models.api_error import ApiError
return field_dict
errors: Union[Unset, List[ApiError]] = UNSET
if not isinstance(self.errors, Unset):
errors = self.errors
request_id = self.request_id
success = self.success
@classmethod
def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF:
d = src_dict.copy()
from ..models.api_error import ApiError
errors = cast(List[ApiError], d.pop("errors", UNSET))
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if errors is not UNSET:
field_dict["errors"] = errors
if request_id is not UNSET:
field_dict["request_id"] = request_id
if success is not UNSET:
field_dict["success"] = success
request_id = d.pop("request_id", UNSET)
return field_dict
success = d.pop("success", UNSET)
@classmethod
def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF:
d = src_dict.copy()
from ..models.api_error import ApiError
errors = cast(List[ApiError], d.pop("errors", UNSET))
failure_web_socket_response = cls(
errors= errors,
request_id= request_id,
success= success,
)
request_id = d.pop("request_id", UNSET)
failure_web_socket_response.additional_properties = d
return failure_web_socket_response
success = d.pop("success", UNSET)
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
failure_web_socket_response = cls(
errors=errors,
request_id=request_id,
success=success,
)
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
failure_web_socket_response.additional_properties = d
return failure_web_socket_response
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
def __contains__(self, key: str) -> bool:
return key in self.additional_properties