* regenerate

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes and cleanup

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* I have generated the latest API!

---------

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:
Jess Frazelle
2023-07-31 12:50:30 -07:00
committed by GitHub
parent d678182dcf
commit 4c3f497d73
141 changed files with 1432 additions and 566 deletions

View File

@ -5,6 +5,7 @@ import attr
from ..models.camera_drag_interaction_type import CameraDragInteractionType
from ..models.modeling_cmd_id import ModelingCmdId
from ..models.output_format import OutputFormat
from ..models.path_segment import PathSegment
from ..models.point2d import Point2d
from ..models.point3d import Point3d
@ -21,7 +22,7 @@ class StartPath(str, Enum):
return str(self.value)
B = TypeVar("B", bound="MovePathPen")
TP = TypeVar("TP", bound="MovePathPen")
@attr.s(auto_attribs=True)
@ -48,21 +49,21 @@ class MovePathPen:
return field_dict
@classmethod
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP:
d = src_dict.copy()
_path = d.pop("path", UNSET)
path: Union[Unset, ModelingCmdId]
if isinstance(_path, Unset):
path = UNSET
else:
path = ModelingCmdId(_path)
path = _path # type: ignore[arg-type]
_to = d.pop("to", UNSET)
to: Union[Unset, Point3d]
if isinstance(_to, Unset):
to = UNSET
else:
to = Point3d(_to)
to = _to # type: ignore[arg-type]
move_path_pen = cls(
path=path,
@ -89,7 +90,7 @@ class MovePathPen:
return key in self.additional_properties
B = TypeVar("B", bound="ExtendPath")
CF = TypeVar("CF", bound="ExtendPath")
@attr.s(auto_attribs=True)
@ -116,14 +117,14 @@ class ExtendPath:
return field_dict
@classmethod
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF:
d = src_dict.copy()
_path = d.pop("path", UNSET)
path: Union[Unset, ModelingCmdId]
if isinstance(_path, Unset):
path = UNSET
else:
path = ModelingCmdId(_path)
path = _path # type: ignore[arg-type]
_segment = d.pop("segment", UNSET)
segment: Union[Unset, PathSegment]
@ -157,7 +158,7 @@ class ExtendPath:
return key in self.additional_properties
P = TypeVar("P", bound="ClosePath")
OM = TypeVar("OM", bound="ClosePath")
@attr.s(auto_attribs=True)
@ -178,7 +179,7 @@ class ClosePath:
return field_dict
@classmethod
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM:
d = src_dict.copy()
path_id = d.pop("path_id", UNSET)
@ -206,7 +207,7 @@ class ClosePath:
return key in self.additional_properties
J = TypeVar("J", bound="CameraDragStart")
EN = TypeVar("EN", bound="CameraDragStart")
@attr.s(auto_attribs=True)
@ -233,7 +234,7 @@ class CameraDragStart:
return field_dict
@classmethod
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN:
d = src_dict.copy()
_interaction = d.pop("interaction", UNSET)
interaction: Union[Unset, CameraDragInteractionType]
@ -247,7 +248,7 @@ class CameraDragStart:
if isinstance(_window, Unset):
window = UNSET
else:
window = Point2d(_window)
window = _window # type: ignore[arg-type]
camera_drag_start = cls(
interaction=interaction,
@ -274,7 +275,7 @@ class CameraDragStart:
return key in self.additional_properties
T = TypeVar("T", bound="CameraDragMove")
RS = TypeVar("RS", bound="CameraDragMove")
@attr.s(auto_attribs=True)
@ -305,7 +306,7 @@ class CameraDragMove:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS:
d = src_dict.copy()
_interaction = d.pop("interaction", UNSET)
interaction: Union[Unset, CameraDragInteractionType]
@ -321,7 +322,7 @@ class CameraDragMove:
if isinstance(_window, Unset):
window = UNSET
else:
window = Point2d(_window)
window = _window # type: ignore[arg-type]
camera_drag_move = cls(
interaction=interaction,
@ -349,7 +350,7 @@ class CameraDragMove:
return key in self.additional_properties
V = TypeVar("V", bound="CameraDragEnd")
LR = TypeVar("LR", bound="CameraDragEnd")
@attr.s(auto_attribs=True)
@ -376,7 +377,7 @@ class CameraDragEnd:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR:
d = src_dict.copy()
_interaction = d.pop("interaction", UNSET)
interaction: Union[Unset, CameraDragInteractionType]
@ -390,7 +391,7 @@ class CameraDragEnd:
if isinstance(_window, Unset):
window = UNSET
else:
window = Point2d(_window)
window = _window # type: ignore[arg-type]
camera_drag_end = cls(
interaction=interaction,
@ -417,6 +418,246 @@ class CameraDragEnd:
return key in self.additional_properties
MP = TypeVar("MP", bound="DefaultCameraLookAt")
@attr.s(auto_attribs=True)
class DefaultCameraLookAt:
center: Union[Unset, Point3d] = UNSET
up: Union[Unset, Point3d] = UNSET
vantage: Union[Unset, Point3d] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.center, Unset):
center = self.center
if not isinstance(self.up, Unset):
up = self.up
if not isinstance(self.vantage, Unset):
vantage = self.vantage
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if center is not UNSET:
field_dict["center"] = center
if up is not UNSET:
field_dict["up"] = up
if vantage is not UNSET:
field_dict["vantage"] = vantage
return field_dict
@classmethod
def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP:
d = src_dict.copy()
_center = d.pop("center", UNSET)
center: Union[Unset, Point3d]
if isinstance(_center, Unset):
center = UNSET
else:
center = _center # type: ignore[arg-type]
_up = d.pop("up", UNSET)
up: Union[Unset, Point3d]
if isinstance(_up, Unset):
up = UNSET
else:
up = _up # type: ignore[arg-type]
_vantage = d.pop("vantage", UNSET)
vantage: Union[Unset, Point3d]
if isinstance(_vantage, Unset):
vantage = UNSET
else:
vantage = _vantage # type: ignore[arg-type]
default_camera_look_at = cls(
center=center,
up=up,
vantage=vantage,
)
default_camera_look_at.additional_properties = d
return default_camera_look_at
@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
WF = TypeVar("WF", bound="DefaultCameraEnableSketchMode")
@attr.s(auto_attribs=True)
class DefaultCameraEnableSketchMode:
distance_to_plane: Union[Unset, float] = UNSET
origin: Union[Unset, Point3d] = UNSET
ortho: Union[Unset, bool] = False
x_axis: Union[Unset, Point3d] = UNSET
y_axis: Union[Unset, Point3d] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
distance_to_plane = self.distance_to_plane
if not isinstance(self.origin, Unset):
origin = self.origin
ortho = self.ortho
if not isinstance(self.x_axis, Unset):
x_axis = self.x_axis
if not isinstance(self.y_axis, Unset):
y_axis = self.y_axis
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if distance_to_plane is not UNSET:
field_dict["distance_to_plane"] = distance_to_plane
if origin is not UNSET:
field_dict["origin"] = origin
if ortho is not UNSET:
field_dict["ortho"] = ortho
if x_axis is not UNSET:
field_dict["x_axis"] = x_axis
if y_axis is not UNSET:
field_dict["y_axis"] = y_axis
return field_dict
@classmethod
def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF:
d = src_dict.copy()
distance_to_plane = d.pop("distance_to_plane", UNSET)
_origin = d.pop("origin", UNSET)
origin: Union[Unset, Point3d]
if isinstance(_origin, Unset):
origin = UNSET
else:
origin = _origin # type: ignore[arg-type]
ortho = d.pop("ortho", UNSET)
_x_axis = d.pop("x_axis", UNSET)
x_axis: Union[Unset, Point3d]
if isinstance(_x_axis, Unset):
x_axis = UNSET
else:
x_axis = _x_axis # type: ignore[arg-type]
_y_axis = d.pop("y_axis", UNSET)
y_axis: Union[Unset, Point3d]
if isinstance(_y_axis, Unset):
y_axis = UNSET
else:
y_axis = _y_axis # type: ignore[arg-type]
default_camera_enable_sketch_mode = cls(
distance_to_plane=distance_to_plane,
origin=origin,
ortho=ortho,
x_axis=x_axis,
y_axis=y_axis,
)
default_camera_enable_sketch_mode.additional_properties = d
return default_camera_enable_sketch_mode
@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
class DefaultCameraDisableSketchMode(str, Enum):
"""Disable sketch mode, from the default camera.""" # noqa: E501
DEFAULT_CAMERA_DISABLE_SKETCH_MODE = "DefaultCameraDisableSketchMode"
def __str__(self) -> str:
return str(self.value)
RO = TypeVar("RO", bound="Export")
@attr.s(auto_attribs=True)
class Export:
format: Union[Unset, OutputFormat] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.format, Unset):
format = self.format
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if format is not UNSET:
field_dict["format"] = format
return field_dict
@classmethod
def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO:
d = src_dict.copy()
_format = d.pop("format", UNSET)
format: Union[Unset, OutputFormat]
if isinstance(_format, Unset):
format = UNSET
else:
format = _format # type: ignore[arg-type]
export = cls(
format=format,
)
export.additional_properties = d
return export
@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
ModelingCmd = Union[
StartPath,
MovePathPen,
@ -426,4 +667,8 @@ ModelingCmd = Union[
CameraDragStart,
CameraDragMove,
CameraDragEnd,
DefaultCameraLookAt,
DefaultCameraEnableSketchMode,
DefaultCameraDisableSketchMode,
Export,
]