Update api spec (#127)
* YOYO NEW API SPEC! * bump version Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * some fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes #128 Signed-off-by: Jess Frazelle <github@jessfraz.com> * mypy fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
66
kittycad/models/mouse_click.py
Normal file
66
kittycad/models/mouse_click.py
Normal file
@ -0,0 +1,66 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
SC = TypeVar("SC", bound="MouseClick")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class MouseClick:
|
||||
"""The response from the `MouseClick` command.""" # noqa: E501
|
||||
|
||||
entities_modified: Union[Unset, List[str]] = UNSET
|
||||
entities_selected: Union[Unset, List[str]] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
entities_modified: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.entities_modified, Unset):
|
||||
entities_modified = self.entities_modified
|
||||
entities_selected: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.entities_selected, Unset):
|
||||
entities_selected = self.entities_selected
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if entities_modified is not UNSET:
|
||||
field_dict["entities_modified"] = entities_modified
|
||||
if entities_selected is not UNSET:
|
||||
field_dict["entities_selected"] = entities_selected
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC:
|
||||
d = src_dict.copy()
|
||||
entities_modified = cast(List[str], d.pop("entities_modified", UNSET))
|
||||
|
||||
entities_selected = cast(List[str], d.pop("entities_selected", UNSET))
|
||||
|
||||
mouse_click = cls(
|
||||
entities_modified=entities_modified,
|
||||
entities_selected=entities_selected,
|
||||
)
|
||||
|
||||
mouse_click.additional_properties = d
|
||||
return mouse_click
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
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
|
Reference in New Issue
Block a user