Update api spec (#145)

* YOYO NEW API SPEC!

* updates

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:
Jess Frazelle
2023-09-29 15:51:03 -07:00
committed by GitHub
parent ba3fb82a86
commit 29b0200c4c
155 changed files with 4306 additions and 7842 deletions

View File

@ -2,8 +2,11 @@ from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.center_of_mass import CenterOfMass
from ..models.curve_get_control_points import CurveGetControlPoints
from ..models.curve_get_end_points import CurveGetEndPoints
from ..models.curve_get_type import CurveGetType
from ..models.density import Density
from ..models.entity_get_all_child_uuids import EntityGetAllChildUuids
from ..models.entity_get_child_uuid import EntityGetChildUuid
from ..models.entity_get_num_children import EntityGetNumChildren
@ -11,8 +14,12 @@ from ..models.entity_get_parent_id import EntityGetParentId
from ..models.export import Export
from ..models.get_entity_type import GetEntityType
from ..models.highlight_set_entity import HighlightSetEntity
from ..models.import_files import ImportFiles
from ..models.mass import Mass
from ..models.mouse_click import MouseClick
from ..models.path_get_curve_uuids_for_vertices import PathGetCurveUuidsForVertices
from ..models.path_get_info import PathGetInfo
from ..models.plane_intersect_and_project import PlaneIntersectAndProject
from ..models.select_get import SelectGet
from ..models.select_with_point import SelectWithPoint
from ..models.solid3d_get_all_edge_faces import Solid3dGetAllEdgeFaces
@ -20,10 +27,12 @@ from ..models.solid3d_get_all_opposite_edges import Solid3dGetAllOppositeEdges
from ..models.solid3d_get_next_adjacent_edge import Solid3dGetNextAdjacentEdge
from ..models.solid3d_get_opposite_edge import Solid3dGetOppositeEdge
from ..models.solid3d_get_prev_adjacent_edge import Solid3dGetPrevAdjacentEdge
from ..models.surface_area import SurfaceArea
from ..models.take_snapshot import TakeSnapshot
from ..models.volume import Volume
from ..types import UNSET, Unset
CX = TypeVar("CX", bound="empty")
SX = TypeVar("SX", bound="empty")
@attr.s(auto_attribs=True)
@ -45,7 +54,7 @@ class empty:
return field_dict
@classmethod
def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX:
def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX:
d = src_dict.copy()
type = d.pop("type", UNSET)
@ -73,7 +82,7 @@ class empty:
return key in self.additional_properties
MT = TypeVar("MT", bound="export")
CN = TypeVar("CN", bound="export")
@attr.s(auto_attribs=True)
@ -100,7 +109,7 @@ class export:
return field_dict
@classmethod
def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT:
def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Export]
@ -136,7 +145,7 @@ class export:
return key in self.additional_properties
LJ = TypeVar("LJ", bound="select_with_point")
GS = TypeVar("GS", bound="select_with_point")
@attr.s(auto_attribs=True)
@ -163,7 +172,7 @@ class select_with_point:
return field_dict
@classmethod
def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ:
def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, SelectWithPoint]
@ -199,7 +208,7 @@ class select_with_point:
return key in self.additional_properties
TF = TypeVar("TF", bound="highlight_set_entity")
SO = TypeVar("SO", bound="highlight_set_entity")
@attr.s(auto_attribs=True)
@ -226,7 +235,7 @@ class highlight_set_entity:
return field_dict
@classmethod
def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF:
def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, HighlightSetEntity]
@ -262,7 +271,7 @@ class highlight_set_entity:
return key in self.additional_properties
HF = TypeVar("HF", bound="entity_get_child_uuid")
ZS = TypeVar("ZS", bound="entity_get_child_uuid")
@attr.s(auto_attribs=True)
@ -289,7 +298,7 @@ class entity_get_child_uuid:
return field_dict
@classmethod
def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF:
def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, EntityGetChildUuid]
@ -325,7 +334,7 @@ class entity_get_child_uuid:
return key in self.additional_properties
JD = TypeVar("JD", bound="entity_get_num_children")
AM = TypeVar("AM", bound="entity_get_num_children")
@attr.s(auto_attribs=True)
@ -352,7 +361,7 @@ class entity_get_num_children:
return field_dict
@classmethod
def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD:
def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, EntityGetNumChildren]
@ -388,7 +397,7 @@ class entity_get_num_children:
return key in self.additional_properties
RZ = TypeVar("RZ", bound="entity_get_parent_id")
GK = TypeVar("GK", bound="entity_get_parent_id")
@attr.s(auto_attribs=True)
@ -415,7 +424,7 @@ class entity_get_parent_id:
return field_dict
@classmethod
def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ:
def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, EntityGetParentId]
@ -451,7 +460,7 @@ class entity_get_parent_id:
return key in self.additional_properties
BH = TypeVar("BH", bound="entity_get_all_child_uuids")
SG = TypeVar("SG", bound="entity_get_all_child_uuids")
@attr.s(auto_attribs=True)
@ -478,7 +487,7 @@ class entity_get_all_child_uuids:
return field_dict
@classmethod
def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH:
def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, EntityGetAllChildUuids]
@ -514,7 +523,7 @@ class entity_get_all_child_uuids:
return key in self.additional_properties
SX = TypeVar("SX", bound="select_get")
QZ = TypeVar("QZ", bound="select_get")
@attr.s(auto_attribs=True)
@ -541,7 +550,7 @@ class select_get:
return field_dict
@classmethod
def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX:
def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, SelectGet]
@ -577,7 +586,7 @@ class select_get:
return key in self.additional_properties
CN = TypeVar("CN", bound="get_entity_type")
SY = TypeVar("SY", bound="get_entity_type")
@attr.s(auto_attribs=True)
@ -604,7 +613,7 @@ class get_entity_type:
return field_dict
@classmethod
def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN:
def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, GetEntityType]
@ -640,7 +649,7 @@ class get_entity_type:
return key in self.additional_properties
GS = TypeVar("GS", bound="solid3d_get_all_edge_faces")
YK = TypeVar("YK", bound="solid3d_get_all_edge_faces")
@attr.s(auto_attribs=True)
@ -667,7 +676,7 @@ class solid3d_get_all_edge_faces:
return field_dict
@classmethod
def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS:
def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Solid3dGetAllEdgeFaces]
@ -703,7 +712,7 @@ class solid3d_get_all_edge_faces:
return key in self.additional_properties
SO = TypeVar("SO", bound="solid3d_get_all_opposite_edges")
WS = TypeVar("WS", bound="solid3d_get_all_opposite_edges")
@attr.s(auto_attribs=True)
@ -730,7 +739,7 @@ class solid3d_get_all_opposite_edges:
return field_dict
@classmethod
def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO:
def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Solid3dGetAllOppositeEdges]
@ -766,7 +775,7 @@ class solid3d_get_all_opposite_edges:
return key in self.additional_properties
ZS = TypeVar("ZS", bound="solid3d_get_opposite_edge")
SL = TypeVar("SL", bound="solid3d_get_opposite_edge")
@attr.s(auto_attribs=True)
@ -793,7 +802,7 @@ class solid3d_get_opposite_edge:
return field_dict
@classmethod
def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS:
def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Solid3dGetOppositeEdge]
@ -829,7 +838,7 @@ class solid3d_get_opposite_edge:
return key in self.additional_properties
AM = TypeVar("AM", bound="solid3d_get_prev_adjacent_edge")
MK = TypeVar("MK", bound="solid3d_get_prev_adjacent_edge")
@attr.s(auto_attribs=True)
@ -856,7 +865,7 @@ class solid3d_get_prev_adjacent_edge:
return field_dict
@classmethod
def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM:
def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Solid3dGetPrevAdjacentEdge]
@ -892,7 +901,7 @@ class solid3d_get_prev_adjacent_edge:
return key in self.additional_properties
GK = TypeVar("GK", bound="solid3d_get_next_adjacent_edge")
TU = TypeVar("TU", bound="solid3d_get_next_adjacent_edge")
@attr.s(auto_attribs=True)
@ -919,7 +928,7 @@ class solid3d_get_next_adjacent_edge:
return field_dict
@classmethod
def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK:
def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Solid3dGetNextAdjacentEdge]
@ -955,7 +964,7 @@ class solid3d_get_next_adjacent_edge:
return key in self.additional_properties
SG = TypeVar("SG", bound="mouse_click")
FY = TypeVar("FY", bound="mouse_click")
@attr.s(auto_attribs=True)
@ -982,7 +991,7 @@ class mouse_click:
return field_dict
@classmethod
def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG:
def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, MouseClick]
@ -1018,7 +1027,7 @@ class mouse_click:
return key in self.additional_properties
QZ = TypeVar("QZ", bound="curve_get_type")
FD = TypeVar("FD", bound="curve_get_type")
@attr.s(auto_attribs=True)
@ -1045,7 +1054,7 @@ class curve_get_type:
return field_dict
@classmethod
def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ:
def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, CurveGetType]
@ -1081,7 +1090,7 @@ class curve_get_type:
return key in self.additional_properties
SY = TypeVar("SY", bound="curve_get_control_points")
TZ = TypeVar("TZ", bound="curve_get_control_points")
@attr.s(auto_attribs=True)
@ -1108,7 +1117,7 @@ class curve_get_control_points:
return field_dict
@classmethod
def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY:
def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, CurveGetControlPoints]
@ -1144,7 +1153,7 @@ class curve_get_control_points:
return key in self.additional_properties
YK = TypeVar("YK", bound="take_snapshot")
AX = TypeVar("AX", bound="take_snapshot")
@attr.s(auto_attribs=True)
@ -1171,7 +1180,7 @@ class take_snapshot:
return field_dict
@classmethod
def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK:
def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, TakeSnapshot]
@ -1207,7 +1216,7 @@ class take_snapshot:
return key in self.additional_properties
WS = TypeVar("WS", bound="path_get_info")
RQ = TypeVar("RQ", bound="path_get_info")
@attr.s(auto_attribs=True)
@ -1234,7 +1243,7 @@ class path_get_info:
return field_dict
@classmethod
def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS:
def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, PathGetInfo]
@ -1270,6 +1279,573 @@ class path_get_info:
return key in self.additional_properties
ZL = TypeVar("ZL", bound="path_get_curve_uuids_for_vertices")
@attr.s(auto_attribs=True)
class path_get_curve_uuids_for_vertices:
"""The response from the `Path Get Curve UUIDs for Vertices` command.""" # noqa: E501
data: Union[Unset, PathGetCurveUuidsForVertices] = UNSET
type: str = "path_get_curve_uuids_for_vertices"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.data, Unset):
data = self.data
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if data is not UNSET:
field_dict["data"] = data
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, PathGetCurveUuidsForVertices]
if isinstance(_data, Unset):
data = UNSET
else:
data = _data # type: ignore[arg-type]
type = d.pop("type", UNSET)
path_get_curve_uuids_for_vertices = cls(
data=data,
type=type,
)
path_get_curve_uuids_for_vertices.additional_properties = d
return path_get_curve_uuids_for_vertices
@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
CM = TypeVar("CM", bound="plane_intersect_and_project")
@attr.s(auto_attribs=True)
class plane_intersect_and_project:
"""The response from the `PlaneIntersectAndProject` command.""" # noqa: E501
data: Union[Unset, PlaneIntersectAndProject] = UNSET
type: str = "plane_intersect_and_project"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.data, Unset):
data = self.data
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if data is not UNSET:
field_dict["data"] = data
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, PlaneIntersectAndProject]
if isinstance(_data, Unset):
data = UNSET
else:
data = _data # type: ignore[arg-type]
type = d.pop("type", UNSET)
plane_intersect_and_project = cls(
data=data,
type=type,
)
plane_intersect_and_project.additional_properties = d
return plane_intersect_and_project
@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
OS = TypeVar("OS", bound="curve_get_end_points")
@attr.s(auto_attribs=True)
class curve_get_end_points:
"""The response from the `CurveGetEndPoints` command.""" # noqa: E501
data: Union[Unset, CurveGetEndPoints] = UNSET
type: str = "curve_get_end_points"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.data, Unset):
data = self.data
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if data is not UNSET:
field_dict["data"] = data
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, CurveGetEndPoints]
if isinstance(_data, Unset):
data = UNSET
else:
data = _data # type: ignore[arg-type]
type = d.pop("type", UNSET)
curve_get_end_points = cls(
data=data,
type=type,
)
curve_get_end_points.additional_properties = d
return curve_get_end_points
@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
WP = TypeVar("WP", bound="import_files")
@attr.s(auto_attribs=True)
class import_files:
"""The response from the `ImportFiles` command.""" # noqa: E501
data: Union[Unset, ImportFiles] = UNSET
type: str = "import_files"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.data, Unset):
data = self.data
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if data is not UNSET:
field_dict["data"] = data
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, ImportFiles]
if isinstance(_data, Unset):
data = UNSET
else:
data = _data # type: ignore[arg-type]
type = d.pop("type", UNSET)
import_files = cls(
data=data,
type=type,
)
import_files.additional_properties = d
return import_files
@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
XO = TypeVar("XO", bound="mass")
@attr.s(auto_attribs=True)
class mass:
"""The response from the `Mass` command.""" # noqa: E501
data: Union[Unset, Mass] = UNSET
type: str = "mass"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.data, Unset):
data = self.data
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if data is not UNSET:
field_dict["data"] = data
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Mass]
if isinstance(_data, Unset):
data = UNSET
else:
data = _data # type: ignore[arg-type]
type = d.pop("type", UNSET)
mass = cls(
data=data,
type=type,
)
mass.additional_properties = d
return mass
@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
LN = TypeVar("LN", bound="volume")
@attr.s(auto_attribs=True)
class volume:
"""The response from the `Volume` command.""" # noqa: E501
data: Union[Unset, Volume] = UNSET
type: str = "volume"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.data, Unset):
data = self.data
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if data is not UNSET:
field_dict["data"] = data
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Volume]
if isinstance(_data, Unset):
data = UNSET
else:
data = _data # type: ignore[arg-type]
type = d.pop("type", UNSET)
volume = cls(
data=data,
type=type,
)
volume.additional_properties = d
return volume
@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
KR = TypeVar("KR", bound="density")
@attr.s(auto_attribs=True)
class density:
"""The response from the `Density` command.""" # noqa: E501
data: Union[Unset, Density] = UNSET
type: str = "density"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.data, Unset):
data = self.data
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if data is not UNSET:
field_dict["data"] = data
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[KR], src_dict: Dict[str, Any]) -> KR:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, Density]
if isinstance(_data, Unset):
data = UNSET
else:
data = _data # type: ignore[arg-type]
type = d.pop("type", UNSET)
density = cls(
data=data,
type=type,
)
density.additional_properties = d
return density
@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
MG = TypeVar("MG", bound="surface_area")
@attr.s(auto_attribs=True)
class surface_area:
"""The response from the `SurfaceArea` command.""" # noqa: E501
data: Union[Unset, SurfaceArea] = UNSET
type: str = "surface_area"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.data, Unset):
data = self.data
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if data is not UNSET:
field_dict["data"] = data
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[MG], src_dict: Dict[str, Any]) -> MG:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, SurfaceArea]
if isinstance(_data, Unset):
data = UNSET
else:
data = _data # type: ignore[arg-type]
type = d.pop("type", UNSET)
surface_area = cls(
data=data,
type=type,
)
surface_area.additional_properties = d
return surface_area
@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
UE = TypeVar("UE", bound="center_of_mass")
@attr.s(auto_attribs=True)
class center_of_mass:
"""The response from the `CenterOfMass` command.""" # noqa: E501
data: Union[Unset, CenterOfMass] = UNSET
type: str = "center_of_mass"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.data, Unset):
data = self.data
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if data is not UNSET:
field_dict["data"] = data
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[UE], src_dict: Dict[str, Any]) -> UE:
d = src_dict.copy()
_data = d.pop("data", UNSET)
data: Union[Unset, CenterOfMass]
if isinstance(_data, Unset):
data = UNSET
else:
data = _data # type: ignore[arg-type]
type = d.pop("type", UNSET)
center_of_mass = cls(
data=data,
type=type,
)
center_of_mass.additional_properties = d
return center_of_mass
@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
OkModelingCmdResponse = Union[
empty,
export,
@ -1291,4 +1867,13 @@ OkModelingCmdResponse = Union[
curve_get_control_points,
take_snapshot,
path_get_info,
path_get_curve_uuids_for_vertices,
plane_intersect_and_project,
curve_get_end_points,
import_files,
mass,
volume,
density,
surface_area,
center_of_mass,
]