2023-08-16 16:31:50 -07:00
from typing import Any , Dict , List , Type , TypeVar , Union , cast
2023-04-27 13:59:37 -07:00
import attr
2023-08-16 16:31:50 -07:00
from . . models . annotation_options import AnnotationOptions
from . . models . annotation_type import AnnotationType
2023-07-07 18:03:18 -07:00
from . . models . camera_drag_interaction_type import CameraDragInteractionType
2023-08-30 15:59:51 -07:00
from . . models . color import Color
from . . models . image_format import ImageFormat
2023-07-07 18:03:18 -07:00
from . . models . modeling_cmd_id import ModelingCmdId
2023-07-31 12:50:30 -07:00
from . . models . output_format import OutputFormat
2023-07-07 18:03:18 -07:00
from . . models . path_segment import PathSegment
2023-05-23 14:24:13 -07:00
from . . models . point2d import Point2d
2023-07-07 18:03:18 -07:00
from . . models . point3d import Point3d
2023-08-16 16:31:50 -07:00
from . . models . scene_selection_type import SceneSelectionType
2023-08-30 15:59:51 -07:00
from . . models . scene_tool_type import SceneToolType
2023-09-29 15:51:03 -07:00
from . . models . unit_area import UnitArea
from . . models . unit_density import UnitDensity
from . . models . unit_length import UnitLength
from . . models . unit_mass import UnitMass
from . . models . unit_volume import UnitVolume
2023-04-27 13:59:37 -07:00
from . . types import UNSET , Unset
2023-10-12 09:02:59 -07:00
NK = TypeVar ( " NK " , bound = " start_path " )
2023-04-27 13:59:37 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class start_path :
2023-09-29 16:05:40 -07:00
""" Start a path. """ # noqa: E501
type : str = " start_path "
2023-04-27 13:59:37 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ NK ] , src_dict : Dict [ str , Any ] ) - > NK :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
start_path = cls (
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
start_path . additional_properties = d
return start_path
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-07-07 18:03:18 -07:00
2023-10-12 09:02:59 -07:00
UQ = TypeVar ( " UQ " , bound = " move_path_pen " )
2023-09-29 16:05:40 -07:00
2023-07-07 18:03:18 -07:00
@attr.s ( auto_attribs = True )
2023-08-16 16:31:50 -07:00
class move_path_pen :
2023-09-29 16:05:40 -07:00
""" Move the path ' s " pen " . """ # noqa: E501
path : Union [ Unset , ModelingCmdId ] = UNSET
to : Union [ Unset , Point3d ] = UNSET
type : str = " move_path_pen "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
if not isinstance ( self . path , Unset ) :
path = self . path
if not isinstance ( self . to , Unset ) :
to = self . to
type = self . type
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if path is not UNSET :
field_dict [ ' path ' ] = path
if to is not UNSET :
field_dict [ ' to ' ] = to
field_dict [ ' type ' ] = type
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ UQ ] , src_dict : Dict [ str , Any ] ) - > UQ :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
_path = d . pop ( " path " , UNSET )
path : Union [ Unset , ModelingCmdId ]
if isinstance ( _path , Unset ) :
path = UNSET
else :
path = _path # type: ignore[arg-type]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
_to = d . pop ( " to " , UNSET )
to : Union [ Unset , Point3d ]
if isinstance ( _to , Unset ) :
to = UNSET
else :
to = _to # type: ignore[arg-type]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-07-07 18:03:18 -07:00
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
move_path_pen = cls (
path = path ,
to = to ,
type = type ,
)
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
move_path_pen . additional_properties = d
return move_path_pen
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-07-07 18:03:18 -07:00
2023-10-12 09:02:59 -07:00
QE = TypeVar ( " QE " , bound = " extend_path " )
2023-09-29 16:05:40 -07:00
2023-07-07 18:03:18 -07:00
@attr.s ( auto_attribs = True )
2023-08-16 16:31:50 -07:00
class extend_path :
2023-09-29 16:05:40 -07:00
""" Extend a path by adding a new segment which starts at the path ' s " pen " . If no " pen " location has been set before (via `MovePen`), then the pen is at the origin. """ # noqa: E501
path : Union [ Unset , ModelingCmdId ] = UNSET
segment : Union [ Unset , PathSegment ] = UNSET
type : str = " extend_path "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
if not isinstance ( self . path , Unset ) :
path = self . path
if not isinstance ( self . segment , Unset ) :
segment = self . segment
type = self . type
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if path is not UNSET :
field_dict [ ' path ' ] = path
if segment is not UNSET :
field_dict [ ' segment ' ] = segment
field_dict [ ' type ' ] = type
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ QE ] , src_dict : Dict [ str , Any ] ) - > QE :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
_path = d . pop ( " path " , UNSET )
path : Union [ Unset , ModelingCmdId ]
if isinstance ( _path , Unset ) :
path = UNSET
else :
path = _path # type: ignore[arg-type]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
_segment = d . pop ( " segment " , UNSET )
segment : Union [ Unset , PathSegment ]
if isinstance ( _segment , Unset ) :
segment = UNSET
else :
segment = _segment # type: ignore[arg-type]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-07-07 18:03:18 -07:00
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
extend_path = cls (
path = path ,
segment = segment ,
type = type ,
)
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
extend_path . additional_properties = d
return extend_path
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-07-07 18:03:18 -07:00
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
XH = TypeVar ( " XH " , bound = " extrude " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class extrude :
2023-09-29 16:05:40 -07:00
""" Extrude a 2D solid. """ # noqa: E501
cap : Union [ Unset , bool ] = False
distance : Union [ Unset , float ] = UNSET
target : Union [ Unset , ModelingCmdId ] = UNSET
type : str = " extrude "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
cap = self . cap
distance = self . distance
if not isinstance ( self . target , Unset ) :
target = self . target
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if cap is not UNSET :
field_dict [ ' cap ' ] = cap
if distance is not UNSET :
field_dict [ ' distance ' ] = distance
if target is not UNSET :
field_dict [ ' target ' ] = target
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ XH ] , src_dict : Dict [ str , Any ] ) - > XH :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
cap = d . pop ( " cap " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
distance = d . pop ( " distance " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
_target = d . pop ( " target " , UNSET )
target : Union [ Unset , ModelingCmdId ]
if isinstance ( _target , Unset ) :
target = UNSET
else :
target = _target # type: ignore[arg-type]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
extrude = cls (
cap = cap ,
distance = distance ,
target = target ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
extrude . additional_properties = d
return extrude
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-05-23 14:24:13 -07:00
2023-05-04 00:58:06 -07:00
2023-10-12 09:02:59 -07:00
KT = TypeVar ( " KT " , bound = " close_path " )
2023-09-29 16:05:40 -07:00
2023-05-23 14:24:13 -07:00
@attr.s ( auto_attribs = True )
2023-08-16 16:31:50 -07:00
class close_path :
2023-09-29 16:05:40 -07:00
""" Closes a path, converting it to a 2D solid. """ # noqa: E501
path_id : Union [ Unset , str ] = UNSET
type : str = " close_path "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-04-27 13:59:37 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
path_id = self . path_id
type = self . type
2023-04-27 13:59:37 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if path_id is not UNSET :
field_dict [ ' path_id ' ] = path_id
field_dict [ ' type ' ] = type
2023-04-27 13:59:37 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-04-27 13:59:37 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ KT ] , src_dict : Dict [ str , Any ] ) - > KT :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
path_id = d . pop ( " path_id " , UNSET )
2023-04-27 13:59:37 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-07-07 18:03:18 -07:00
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
close_path = cls (
path_id = path_id ,
type = type ,
)
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
close_path . additional_properties = d
return close_path
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-07-07 18:03:18 -07:00
2023-10-12 09:02:59 -07:00
BV = TypeVar ( " BV " , bound = " camera_drag_start " )
2023-07-07 18:03:18 -07:00
@attr.s ( auto_attribs = True )
2023-08-16 16:31:50 -07:00
class camera_drag_start :
2023-09-29 16:05:40 -07:00
""" Camera drag started. """ # noqa: E501
interaction : Union [ Unset , CameraDragInteractionType ] = UNSET
type : str = " camera_drag_start "
window : Union [ Unset , Point2d ] = UNSET
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
if not isinstance ( self . interaction , Unset ) :
interaction = self . interaction
type = self . type
if not isinstance ( self . window , Unset ) :
window = self . window
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if interaction is not UNSET :
field_dict [ ' interaction ' ] = interaction
field_dict [ ' type ' ] = type
if window is not UNSET :
field_dict [ ' window ' ] = window
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ BV ] , src_dict : Dict [ str , Any ] ) - > BV :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
_interaction = d . pop ( " interaction " , UNSET )
interaction : Union [ Unset , CameraDragInteractionType ]
if isinstance ( _interaction , Unset ) :
interaction = UNSET
else :
interaction = _interaction # type: ignore[arg-type]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
_window = d . pop ( " window " , UNSET )
window : Union [ Unset , Point2d ]
if isinstance ( _window , Unset ) :
window = UNSET
else :
window = _window # type: ignore[arg-type]
2023-08-16 16:31:50 -07:00
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
camera_drag_start = cls (
interaction = interaction ,
type = type ,
window = window ,
)
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
camera_drag_start . additional_properties = d
return camera_drag_start
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-07-07 18:03:18 -07:00
2023-10-12 09:02:59 -07:00
GU = TypeVar ( " GU " , bound = " camera_drag_move " )
2023-09-29 16:05:40 -07:00
2023-07-07 18:03:18 -07:00
@attr.s ( auto_attribs = True )
2023-08-16 16:31:50 -07:00
class camera_drag_move :
2023-09-29 16:05:40 -07:00
""" Camera drag continued. """ # noqa: E501
interaction : Union [ Unset , CameraDragInteractionType ] = UNSET
sequence : Union [ Unset , int ] = UNSET
type : str = " camera_drag_move "
window : Union [ Unset , Point2d ] = UNSET
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
if not isinstance ( self . interaction , Unset ) :
interaction = self . interaction
sequence = self . sequence
type = self . type
if not isinstance ( self . window , Unset ) :
window = self . window
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if interaction is not UNSET :
field_dict [ ' interaction ' ] = interaction
if sequence is not UNSET :
field_dict [ ' sequence ' ] = sequence
field_dict [ ' type ' ] = type
if window is not UNSET :
field_dict [ ' window ' ] = window
return field_dict
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ GU ] , src_dict : Dict [ str , Any ] ) - > GU :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
_interaction = d . pop ( " interaction " , UNSET )
interaction : Union [ Unset , CameraDragInteractionType ]
if isinstance ( _interaction , Unset ) :
interaction = UNSET
else :
interaction = _interaction # type: ignore[arg-type]
sequence = d . pop ( " sequence " , UNSET )
type = d . pop ( " type " , UNSET )
_window = d . pop ( " window " , UNSET )
window : Union [ Unset , Point2d ]
if isinstance ( _window , Unset ) :
window = UNSET
else :
window = _window # type: ignore[arg-type]
camera_drag_move = cls (
interaction = interaction ,
sequence = sequence ,
type = type ,
window = window ,
)
camera_drag_move . additional_properties = d
return camera_drag_move
@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
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
2023-10-12 09:02:59 -07:00
SS = TypeVar ( " SS " , bound = " camera_drag_end " )
2023-09-29 16:05:40 -07:00
2023-07-07 18:03:18 -07:00
@attr.s ( auto_attribs = True )
2023-08-16 16:31:50 -07:00
class camera_drag_end :
2023-09-29 16:05:40 -07:00
""" Camera drag ended. """ # noqa: E501
interaction : Union [ Unset , CameraDragInteractionType ] = UNSET
type : str = " camera_drag_end "
window : Union [ Unset , Point2d ] = UNSET
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
if not isinstance ( self . interaction , Unset ) :
interaction = self . interaction
type = self . type
if not isinstance ( self . window , Unset ) :
window = self . window
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if interaction is not UNSET :
field_dict [ ' interaction ' ] = interaction
field_dict [ ' type ' ] = type
if window is not UNSET :
field_dict [ ' window ' ] = window
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ SS ] , src_dict : Dict [ str , Any ] ) - > SS :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
_interaction = d . pop ( " interaction " , UNSET )
interaction : Union [ Unset , CameraDragInteractionType ]
if isinstance ( _interaction , Unset ) :
interaction = UNSET
else :
interaction = _interaction # type: ignore[arg-type]
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-07-07 18:03:18 -07:00
2023-09-29 16:05:40 -07:00
_window = d . pop ( " window " , UNSET )
window : Union [ Unset , Point2d ]
if isinstance ( _window , Unset ) :
window = UNSET
else :
window = _window # type: ignore[arg-type]
2023-08-16 16:31:50 -07:00
2023-05-23 14:24:13 -07:00
2023-09-29 16:05:40 -07:00
camera_drag_end = cls (
interaction = interaction ,
type = type ,
window = window ,
)
2023-04-27 13:59:37 -07:00
2023-09-29 16:05:40 -07:00
camera_drag_end . additional_properties = d
return camera_drag_end
2023-04-27 13:59:37 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-04-27 13:59:37 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-04-27 13:59:37 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-04-27 13:59:37 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-04-27 13:59:37 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-05-23 14:24:13 -07:00
2023-07-31 12:50:30 -07:00
2023-10-12 09:02:59 -07:00
UP = TypeVar ( " UP " , bound = " default_camera_look_at " )
2023-09-29 16:05:40 -07:00
2023-07-31 12:50:30 -07:00
@attr.s ( auto_attribs = True )
2023-08-16 16:31:50 -07:00
class default_camera_look_at :
2023-09-29 16:05:40 -07:00
""" Change what the default camera is looking at. """ # noqa: E501
center : Union [ Unset , Point3d ] = UNSET
type : str = " default_camera_look_at "
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
type = self . type
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
field_dict [ ' type ' ] = type
if up is not UNSET :
field_dict [ ' up ' ] = up
if vantage is not UNSET :
field_dict [ ' vantage ' ] = vantage
return field_dict
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ UP ] , src_dict : Dict [ str , Any ] ) - > UP :
2023-09-29 16:05:40 -07:00
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]
type = d . pop ( " type " , UNSET )
_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 ,
type = type ,
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
2023-07-31 12:50:30 -07:00
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
AZ = TypeVar ( " AZ " , bound = " default_camera_zoom " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class default_camera_zoom :
2023-09-29 16:05:40 -07:00
""" Adjust zoom of the default camera. """ # noqa: E501
magnitude : Union [ Unset , float ] = UNSET
type : str = " default_camera_zoom "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
magnitude = self . magnitude
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if magnitude is not UNSET :
field_dict [ ' magnitude ' ] = magnitude
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ AZ ] , src_dict : Dict [ str , Any ] ) - > AZ :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
magnitude = d . pop ( " magnitude " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
default_camera_zoom = cls (
magnitude = magnitude ,
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
default_camera_zoom . additional_properties = d
return default_camera_zoom
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-07-31 12:50:30 -07:00
2023-10-12 09:02:59 -07:00
DJ = TypeVar ( " DJ " , bound = " default_camera_enable_sketch_mode " )
2023-09-29 16:05:40 -07:00
2023-07-31 12:50:30 -07:00
@attr.s ( auto_attribs = True )
2023-08-16 16:31:50 -07:00
class default_camera_enable_sketch_mode :
2023-09-29 16:05:40 -07:00
""" Enable sketch mode, where users can sketch 2D geometry. Users choose a plane to sketch on. """ # noqa: E501
animated : Union [ Unset , bool ] = False
distance_to_plane : Union [ Unset , float ] = UNSET
origin : Union [ Unset , Point3d ] = UNSET
ortho : Union [ Unset , bool ] = False
type : str = " default_camera_enable_sketch_mode "
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 ] :
animated = self . animated
distance_to_plane = self . distance_to_plane
if not isinstance ( self . origin , Unset ) :
origin = self . origin
ortho = self . ortho
type = self . type
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 animated is not UNSET :
field_dict [ ' animated ' ] = animated
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
field_dict [ ' type ' ] = type
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
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ DJ ] , src_dict : Dict [ str , Any ] ) - > DJ :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
animated = d . pop ( " animated " , UNSET )
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 )
type = d . pop ( " type " , 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 (
animated = animated ,
distance_to_plane = distance_to_plane ,
origin = origin ,
ortho = ortho ,
type = type ,
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
2023-07-31 12:50:30 -07:00
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
WJ = TypeVar ( " WJ " , bound = " default_camera_disable_sketch_mode " )
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class default_camera_disable_sketch_mode :
2023-09-29 16:05:40 -07:00
""" Disable sketch mode, from the default camera. """ # noqa: E501
type : str = " default_camera_disable_sketch_mode "
2023-07-31 12:50:30 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ WJ ] , src_dict : Dict [ str , Any ] ) - > WJ :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
default_camera_disable_sketch_mode = cls (
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
default_camera_disable_sketch_mode . additional_properties = d
return default_camera_disable_sketch_mode
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-07-31 12:50:30 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-07-31 12:50:30 -07:00
2023-10-12 09:02:59 -07:00
TR = TypeVar ( " TR " , bound = " export " )
2023-09-29 16:05:40 -07:00
2023-07-31 12:50:30 -07:00
@attr.s ( auto_attribs = True )
2023-08-16 16:31:50 -07:00
class export :
2023-09-29 16:05:40 -07:00
""" Export the scene to a file. """ # noqa: E501
entity_ids : Union [ Unset , List [ str ] ] = UNSET
format : Union [ Unset , OutputFormat ] = UNSET
source_unit : Union [ Unset , UnitLength ] = UNSET
type : str = " export "
2023-07-31 12:50:30 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-07-31 12:50:30 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
entity_ids : Union [ Unset , List [ str ] ] = UNSET
if not isinstance ( self . entity_ids , Unset ) :
entity_ids = self . entity_ids
if not isinstance ( self . format , Unset ) :
format = self . format
if not isinstance ( self . source_unit , Unset ) :
source_unit = self . source_unit
type = self . type
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entity_ids is not UNSET :
field_dict [ ' entity_ids ' ] = entity_ids
if format is not UNSET :
field_dict [ ' format ' ] = format
if source_unit is not UNSET :
field_dict [ ' source_unit ' ] = source_unit
field_dict [ ' type ' ] = type
return field_dict
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ TR ] , src_dict : Dict [ str , Any ] ) - > TR :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entity_ids = cast ( List [ str ] , d . pop ( " entity_ids " , UNSET ) )
_format = d . pop ( " format " , UNSET )
format : Union [ Unset , OutputFormat ]
if isinstance ( _format , Unset ) :
format = UNSET
else :
format = _format # type: ignore[arg-type]
_source_unit = d . pop ( " source_unit " , UNSET )
source_unit : Union [ Unset , UnitLength ]
if isinstance ( _source_unit , Unset ) :
source_unit = UNSET
else :
source_unit = _source_unit # type: ignore[arg-type]
type = d . pop ( " type " , UNSET )
export = cls (
entity_ids = entity_ids ,
format = format ,
source_unit = source_unit ,
type = type ,
)
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
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
2023-10-12 09:02:59 -07:00
YD = TypeVar ( " YD " , bound = " entity_get_parent_id " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class entity_get_parent_id :
2023-09-29 16:05:40 -07:00
""" What is this entity ' s parent? """ # noqa: E501
entity_id : Union [ Unset , str ] = UNSET
type : str = " entity_get_parent_id "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
entity_id = self . entity_id
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entity_id is not UNSET :
field_dict [ ' entity_id ' ] = entity_id
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ YD ] , src_dict : Dict [ str , Any ] ) - > YD :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entity_id = d . pop ( " entity_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
entity_get_parent_id = cls (
entity_id = entity_id ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
entity_get_parent_id . additional_properties = d
return entity_get_parent_id
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
JF = TypeVar ( " JF " , bound = " entity_get_num_children " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class entity_get_num_children :
2023-09-29 16:05:40 -07:00
""" How many children does the entity have? """ # noqa: E501
entity_id : Union [ Unset , str ] = UNSET
type : str = " entity_get_num_children "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
entity_id = self . entity_id
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entity_id is not UNSET :
field_dict [ ' entity_id ' ] = entity_id
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ JF ] , src_dict : Dict [ str , Any ] ) - > JF :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entity_id = d . pop ( " entity_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
entity_get_num_children = cls (
entity_id = entity_id ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
entity_get_num_children . additional_properties = d
return entity_get_num_children
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
VP = TypeVar ( " VP " , bound = " entity_get_child_uuid " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class entity_get_child_uuid :
2023-09-29 16:05:40 -07:00
""" What is the UUID of this entity ' s n-th child? """ # noqa: E501
child_index : Union [ Unset , int ] = UNSET
entity_id : Union [ Unset , str ] = UNSET
type : str = " entity_get_child_uuid "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
child_index = self . child_index
entity_id = self . entity_id
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if child_index is not UNSET :
field_dict [ ' child_index ' ] = child_index
if entity_id is not UNSET :
field_dict [ ' entity_id ' ] = entity_id
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ VP ] , src_dict : Dict [ str , Any ] ) - > VP :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
child_index = d . pop ( " child_index " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
entity_id = d . pop ( " entity_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
entity_get_child_uuid = cls (
child_index = child_index ,
entity_id = entity_id ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
entity_get_child_uuid . additional_properties = d
return entity_get_child_uuid
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
EL = TypeVar ( " EL " , bound = " entity_get_all_child_uuids " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class entity_get_all_child_uuids :
2023-09-29 16:05:40 -07:00
""" What are all UUIDs of this entity ' s children? """ # noqa: E501
entity_id : Union [ Unset , str ] = UNSET
type : str = " entity_get_all_child_uuids "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
entity_id = self . entity_id
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entity_id is not UNSET :
field_dict [ ' entity_id ' ] = entity_id
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ EL ] , src_dict : Dict [ str , Any ] ) - > EL :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entity_id = d . pop ( " entity_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
entity_get_all_child_uuids = cls (
entity_id = entity_id ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
entity_get_all_child_uuids . additional_properties = d
return entity_get_all_child_uuids
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
ZG = TypeVar ( " ZG " , bound = " edit_mode_enter " )
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class edit_mode_enter :
2023-09-29 16:05:40 -07:00
""" Enter edit mode """ # noqa: E501
target : Union [ Unset , str ] = UNSET
type : str = " edit_mode_enter "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
target = self . target
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if target is not UNSET :
field_dict [ ' target ' ] = target
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ ZG ] , src_dict : Dict [ str , Any ] ) - > ZG :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
target = d . pop ( " target " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
edit_mode_enter = cls (
target = target ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
edit_mode_enter . additional_properties = d
return edit_mode_enter
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
LF = TypeVar ( " LF " , bound = " edit_mode_exit " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class edit_mode_exit :
2023-09-29 16:05:40 -07:00
""" Exit edit mode """ # noqa: E501
type : str = " edit_mode_exit "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ LF ] , src_dict : Dict [ str , Any ] ) - > LF :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
edit_mode_exit = cls (
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
edit_mode_exit . additional_properties = d
return edit_mode_exit
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
CS = TypeVar ( " CS " , bound = " select_with_point " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class select_with_point :
2023-09-29 16:05:40 -07:00
""" Modifies the selection by simulating a " mouse click " at the given x,y window coordinate Returns ID of whatever was selected. """ # noqa: E501
selected_at_window : Union [ Unset , Point2d ] = UNSET
selection_type : Union [ Unset , SceneSelectionType ] = UNSET
type : str = " select_with_point "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
if not isinstance ( self . selected_at_window , Unset ) :
selected_at_window = self . selected_at_window
if not isinstance ( self . selection_type , Unset ) :
selection_type = self . selection_type
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if selected_at_window is not UNSET :
field_dict [ ' selected_at_window ' ] = selected_at_window
if selection_type is not UNSET :
field_dict [ ' selection_type ' ] = selection_type
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ CS ] , src_dict : Dict [ str , Any ] ) - > CS :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
_selected_at_window = d . pop ( " selected_at_window " , UNSET )
selected_at_window : Union [ Unset , Point2d ]
if isinstance ( _selected_at_window , Unset ) :
selected_at_window = UNSET
else :
selected_at_window = _selected_at_window # type: ignore[arg-type]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
_selection_type = d . pop ( " selection_type " , UNSET )
selection_type : Union [ Unset , SceneSelectionType ]
if isinstance ( _selection_type , Unset ) :
selection_type = UNSET
else :
selection_type = _selection_type # type: ignore[arg-type]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
select_with_point = cls (
selected_at_window = selected_at_window ,
selection_type = selection_type ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
select_with_point . additional_properties = d
return select_with_point
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
GN = TypeVar ( " GN " , bound = " select_clear " )
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class select_clear :
2023-09-29 16:05:40 -07:00
""" Clear the selection """ # noqa: E501
type : str = " select_clear "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ GN ] , src_dict : Dict [ str , Any ] ) - > GN :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
select_clear = cls (
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
select_clear . additional_properties = d
return select_clear
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
GD = TypeVar ( " GD " , bound = " select_add " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class select_add :
2023-09-29 16:05:40 -07:00
""" Adds one or more entities (by UUID) to the selection. """ # noqa: E501
entities : Union [ Unset , List [ str ] ] = UNSET
type : str = " select_add "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
entities : Union [ Unset , List [ str ] ] = UNSET
if not isinstance ( self . entities , Unset ) :
entities = self . entities
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entities is not UNSET :
field_dict [ ' entities ' ] = entities
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ GD ] , src_dict : Dict [ str , Any ] ) - > GD :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entities = cast ( List [ str ] , d . pop ( " entities " , UNSET ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
select_add = cls (
entities = entities ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
select_add . additional_properties = d
return select_add
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
VJ = TypeVar ( " VJ " , bound = " select_remove " )
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class select_remove :
2023-09-29 16:05:40 -07:00
""" Removes one or more entities (by UUID) from the selection. """ # noqa: E501
entities : Union [ Unset , List [ str ] ] = UNSET
type : str = " select_remove "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
entities : Union [ Unset , List [ str ] ] = UNSET
if not isinstance ( self . entities , Unset ) :
entities = self . entities
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entities is not UNSET :
field_dict [ ' entities ' ] = entities
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ VJ ] , src_dict : Dict [ str , Any ] ) - > VJ :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entities = cast ( List [ str ] , d . pop ( " entities " , UNSET ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
select_remove = cls (
entities = entities ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
select_remove . additional_properties = d
return select_remove
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
OX = TypeVar ( " OX " , bound = " select_replace " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class select_replace :
2023-09-29 16:05:40 -07:00
""" Replaces the current selection with these new entities (by UUID). Equivalent to doing SelectClear then SelectAdd. """ # noqa: E501
entities : Union [ Unset , List [ str ] ] = UNSET
type : str = " select_replace "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
entities : Union [ Unset , List [ str ] ] = UNSET
if not isinstance ( self . entities , Unset ) :
entities = self . entities
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entities is not UNSET :
field_dict [ ' entities ' ] = entities
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ OX ] , src_dict : Dict [ str , Any ] ) - > OX :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entities = cast ( List [ str ] , d . pop ( " entities " , UNSET ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
select_replace = cls (
entities = entities ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
select_replace . additional_properties = d
return select_replace
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
YW = TypeVar ( " YW " , bound = " select_get " )
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class select_get :
2023-09-29 16:05:40 -07:00
""" Find all IDs of selected entities """ # noqa: E501
type : str = " select_get "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ YW ] , src_dict : Dict [ str , Any ] ) - > YW :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
select_get = cls (
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
select_get . additional_properties = d
return select_get
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
QX = TypeVar ( " QX " , bound = " highlight_set_entity " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class highlight_set_entity :
2023-09-29 16:05:40 -07:00
""" Changes the current highlighted entity to whichever one is at the given window coordinate. If there ' s no entity at this location, clears the highlight. """ # noqa: E501
selected_at_window : Union [ Unset , Point2d ] = UNSET
sequence : Union [ Unset , int ] = UNSET
type : str = " highlight_set_entity "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
if not isinstance ( self . selected_at_window , Unset ) :
selected_at_window = self . selected_at_window
sequence = self . sequence
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if selected_at_window is not UNSET :
field_dict [ ' selected_at_window ' ] = selected_at_window
if sequence is not UNSET :
field_dict [ ' sequence ' ] = sequence
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ QX ] , src_dict : Dict [ str , Any ] ) - > QX :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
_selected_at_window = d . pop ( " selected_at_window " , UNSET )
selected_at_window : Union [ Unset , Point2d ]
if isinstance ( _selected_at_window , Unset ) :
selected_at_window = UNSET
else :
selected_at_window = _selected_at_window # type: ignore[arg-type]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
sequence = d . pop ( " sequence " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
highlight_set_entity = cls (
selected_at_window = selected_at_window ,
sequence = sequence ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
highlight_set_entity . additional_properties = d
return highlight_set_entity
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
NO = TypeVar ( " NO " , bound = " highlight_set_entities " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class highlight_set_entities :
2023-09-29 16:05:40 -07:00
""" Changes the current highlighted entity to these entities. """ # noqa: E501
entities : Union [ Unset , List [ str ] ] = UNSET
type : str = " highlight_set_entities "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
entities : Union [ Unset , List [ str ] ] = UNSET
if not isinstance ( self . entities , Unset ) :
entities = self . entities
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entities is not UNSET :
field_dict [ ' entities ' ] = entities
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ NO ] , src_dict : Dict [ str , Any ] ) - > NO :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entities = cast ( List [ str ] , d . pop ( " entities " , UNSET ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
highlight_set_entities = cls (
entities = entities ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
highlight_set_entities . additional_properties = d
return highlight_set_entities
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
VX = TypeVar ( " VX " , bound = " new_annotation " )
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class new_annotation :
2023-09-29 16:05:40 -07:00
""" Create a new annotation """ # noqa: E501
annotation_type : Union [ Unset , AnnotationType ] = UNSET
clobber : Union [ Unset , bool ] = False
options : Union [ Unset , AnnotationOptions ] = UNSET
type : str = " new_annotation "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
if not isinstance ( self . annotation_type , Unset ) :
annotation_type = self . annotation_type
clobber = self . clobber
if not isinstance ( self . options , Unset ) :
options = self . options
type = self . type
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if annotation_type is not UNSET :
field_dict [ ' annotation_type ' ] = annotation_type
if clobber is not UNSET :
field_dict [ ' clobber ' ] = clobber
if options is not UNSET :
field_dict [ ' options ' ] = options
field_dict [ ' type ' ] = type
return field_dict
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ VX ] , src_dict : Dict [ str , Any ] ) - > VX :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
_annotation_type = d . pop ( " annotation_type " , UNSET )
annotation_type : Union [ Unset , AnnotationType ]
if isinstance ( _annotation_type , Unset ) :
annotation_type = UNSET
else :
annotation_type = _annotation_type # type: ignore[arg-type]
clobber = d . pop ( " clobber " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
_options = d . pop ( " options " , UNSET )
options : Union [ Unset , AnnotationOptions ]
if isinstance ( _options , Unset ) :
options = UNSET
else :
options = _options # type: ignore[arg-type]
type = d . pop ( " type " , UNSET )
new_annotation = cls (
annotation_type = annotation_type ,
clobber = clobber ,
options = options ,
type = type ,
)
new_annotation . additional_properties = d
return new_annotation
@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
2023-10-12 09:02:59 -07:00
RG = TypeVar ( " RG " , bound = " update_annotation " )
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class update_annotation :
2023-09-29 16:05:40 -07:00
""" Update an annotation """ # noqa: E501
annotation_id : Union [ Unset , str ] = UNSET
options : Union [ Unset , AnnotationOptions ] = UNSET
type : str = " update_annotation "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
annotation_id = self . annotation_id
if not isinstance ( self . options , Unset ) :
options = self . options
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if annotation_id is not UNSET :
field_dict [ ' annotation_id ' ] = annotation_id
if options is not UNSET :
field_dict [ ' options ' ] = options
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ RG ] , src_dict : Dict [ str , Any ] ) - > RG :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
annotation_id = d . pop ( " annotation_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
_options = d . pop ( " options " , UNSET )
options : Union [ Unset , AnnotationOptions ]
if isinstance ( _options , Unset ) :
options = UNSET
else :
options = _options # type: ignore[arg-type]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
update_annotation = cls (
annotation_id = annotation_id ,
options = options ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
update_annotation . additional_properties = d
return update_annotation
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
IT = TypeVar ( " IT " , bound = " object_visible " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class object_visible :
2023-09-29 16:05:40 -07:00
""" Hide or show an object """ # noqa: E501
hidden : Union [ Unset , bool ] = False
object_id : Union [ Unset , str ] = UNSET
type : str = " object_visible "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
hidden = self . hidden
object_id = self . object_id
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if hidden is not UNSET :
field_dict [ ' hidden ' ] = hidden
if object_id is not UNSET :
field_dict [ ' object_id ' ] = object_id
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ IT ] , src_dict : Dict [ str , Any ] ) - > IT :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
hidden = d . pop ( " hidden " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
object_id = d . pop ( " object_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
object_visible = cls (
hidden = hidden ,
object_id = object_id ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
object_visible . additional_properties = d
return object_visible
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
LD = TypeVar ( " LD " , bound = " object_bring_to_front " )
@attr.s ( auto_attribs = True )
class object_bring_to_front :
""" Bring an object to the front of the scene """ # noqa: E501
object_id : Union [ Unset , str ] = UNSET
type : str = " object_bring_to_front "
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
def to_dict ( self ) - > Dict [ str , Any ] :
object_id = self . object_id
type = self . type
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if object_id is not UNSET :
field_dict [ ' object_id ' ] = object_id
field_dict [ ' type ' ] = type
return field_dict
@classmethod
def from_dict ( cls : Type [ LD ] , src_dict : Dict [ str , Any ] ) - > LD :
d = src_dict . copy ( )
object_id = d . pop ( " object_id " , UNSET )
type = d . pop ( " type " , UNSET )
object_bring_to_front = cls (
object_id = object_id ,
type = type ,
)
object_bring_to_front . additional_properties = d
return object_bring_to_front
@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
UA = TypeVar ( " UA " , bound = " get_entity_type " )
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class get_entity_type :
2023-09-29 16:05:40 -07:00
""" What type of entity is this? """ # noqa: E501
entity_id : Union [ Unset , str ] = UNSET
type : str = " get_entity_type "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
entity_id = self . entity_id
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entity_id is not UNSET :
field_dict [ ' entity_id ' ] = entity_id
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ UA ] , src_dict : Dict [ str , Any ] ) - > UA :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entity_id = d . pop ( " entity_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
get_entity_type = cls (
entity_id = entity_id ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
get_entity_type . additional_properties = d
return get_entity_type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
TN = TypeVar ( " TN " , bound = " solid3d_get_all_edge_faces " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class solid3d_get_all_edge_faces :
2023-09-29 16:05:40 -07:00
""" Gets all faces which use the given edge. """ # noqa: E501
edge_id : Union [ Unset , str ] = UNSET
object_id : Union [ Unset , str ] = UNSET
type : str = " solid3d_get_all_edge_faces "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
edge_id = self . edge_id
object_id = self . object_id
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if edge_id is not UNSET :
field_dict [ ' edge_id ' ] = edge_id
if object_id is not UNSET :
field_dict [ ' object_id ' ] = object_id
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ TN ] , src_dict : Dict [ str , Any ] ) - > TN :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
edge_id = d . pop ( " edge_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
object_id = d . pop ( " object_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
solid3d_get_all_edge_faces = cls (
edge_id = edge_id ,
object_id = object_id ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
solid3d_get_all_edge_faces . additional_properties = d
return solid3d_get_all_edge_faces
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
MZ = TypeVar ( " MZ " , bound = " solid3d_get_all_opposite_edges " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class solid3d_get_all_opposite_edges :
2023-09-29 16:05:40 -07:00
""" Gets all edges which are opposite the given edge, across all possible faces. """ # noqa: E501
along_vector : Union [ Unset , Point3d ] = UNSET
edge_id : Union [ Unset , str ] = UNSET
object_id : Union [ Unset , str ] = UNSET
type : str = " solid3d_get_all_opposite_edges "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
if not isinstance ( self . along_vector , Unset ) :
along_vector = self . along_vector
edge_id = self . edge_id
object_id = self . object_id
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if along_vector is not UNSET :
field_dict [ ' along_vector ' ] = along_vector
if edge_id is not UNSET :
field_dict [ ' edge_id ' ] = edge_id
if object_id is not UNSET :
field_dict [ ' object_id ' ] = object_id
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ MZ ] , src_dict : Dict [ str , Any ] ) - > MZ :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
_along_vector = d . pop ( " along_vector " , UNSET )
along_vector : Union [ Unset , Point3d ]
if isinstance ( _along_vector , Unset ) :
along_vector = UNSET
else :
along_vector = _along_vector # type: ignore[arg-type]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
edge_id = d . pop ( " edge_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
object_id = d . pop ( " object_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
solid3d_get_all_opposite_edges = cls (
along_vector = along_vector ,
edge_id = edge_id ,
object_id = object_id ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
solid3d_get_all_opposite_edges . additional_properties = d
return solid3d_get_all_opposite_edges
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
UG = TypeVar ( " UG " , bound = " solid3d_get_opposite_edge " )
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class solid3d_get_opposite_edge :
2023-09-29 16:05:40 -07:00
""" Gets the edge opposite the given edge, along the given face. """ # noqa: E501
edge_id : Union [ Unset , str ] = UNSET
face_id : Union [ Unset , str ] = UNSET
object_id : Union [ Unset , str ] = UNSET
type : str = " solid3d_get_opposite_edge "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
edge_id = self . edge_id
face_id = self . face_id
object_id = self . object_id
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if edge_id is not UNSET :
field_dict [ ' edge_id ' ] = edge_id
if face_id is not UNSET :
field_dict [ ' face_id ' ] = face_id
if object_id is not UNSET :
field_dict [ ' object_id ' ] = object_id
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ UG ] , src_dict : Dict [ str , Any ] ) - > UG :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
edge_id = d . pop ( " edge_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
face_id = d . pop ( " face_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
object_id = d . pop ( " object_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
solid3d_get_opposite_edge = cls (
edge_id = edge_id ,
face_id = face_id ,
object_id = object_id ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
solid3d_get_opposite_edge . additional_properties = d
return solid3d_get_opposite_edge
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
CY = TypeVar ( " CY " , bound = " solid3d_get_next_adjacent_edge " )
2023-09-29 16:05:40 -07:00
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class solid3d_get_next_adjacent_edge :
2023-09-29 16:05:40 -07:00
""" Gets the next adjacent edge for the given edge, along the given face. """ # noqa: E501
edge_id : Union [ Unset , str ] = UNSET
face_id : Union [ Unset , str ] = UNSET
object_id : Union [ Unset , str ] = UNSET
type : str = " solid3d_get_next_adjacent_edge "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
edge_id = self . edge_id
face_id = self . face_id
object_id = self . object_id
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if edge_id is not UNSET :
field_dict [ ' edge_id ' ] = edge_id
if face_id is not UNSET :
field_dict [ ' face_id ' ] = face_id
if object_id is not UNSET :
field_dict [ ' object_id ' ] = object_id
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ CY ] , src_dict : Dict [ str , Any ] ) - > CY :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
edge_id = d . pop ( " edge_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
face_id = d . pop ( " face_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
object_id = d . pop ( " object_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
solid3d_get_next_adjacent_edge = cls (
edge_id = edge_id ,
face_id = face_id ,
object_id = object_id ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
solid3d_get_next_adjacent_edge . additional_properties = d
return solid3d_get_next_adjacent_edge
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-10-12 09:02:59 -07:00
NZ = TypeVar ( " NZ " , bound = " solid3d_get_prev_adjacent_edge " )
2023-08-16 16:31:50 -07:00
@attr.s ( auto_attribs = True )
class solid3d_get_prev_adjacent_edge :
2023-09-29 16:05:40 -07:00
""" Gets the previous adjacent edge for the given edge, along the given face. """ # noqa: E501
edge_id : Union [ Unset , str ] = UNSET
face_id : Union [ Unset , str ] = UNSET
object_id : Union [ Unset , str ] = UNSET
type : str = " solid3d_get_prev_adjacent_edge "
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
edge_id = self . edge_id
face_id = self . face_id
object_id = self . object_id
type = self . type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if edge_id is not UNSET :
field_dict [ ' edge_id ' ] = edge_id
if face_id is not UNSET :
field_dict [ ' face_id ' ] = face_id
if object_id is not UNSET :
field_dict [ ' object_id ' ] = object_id
field_dict [ ' type ' ] = type
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ NZ ] , src_dict : Dict [ str , Any ] ) - > NZ :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
edge_id = d . pop ( " edge_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
face_id = d . pop ( " face_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
object_id = d . pop ( " object_id " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
solid3d_get_prev_adjacent_edge = cls (
edge_id = edge_id ,
face_id = face_id ,
object_id = object_id ,
type = type ,
)
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
solid3d_get_prev_adjacent_edge . additional_properties = d
return solid3d_get_prev_adjacent_edge
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-16 16:31:50 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-16 16:31:50 -07:00
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
LI = TypeVar ( " LI " , bound = " send_object " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class send_object :
2023-09-29 16:05:40 -07:00
""" Sends object to front or back. """ # noqa: E501
front : Union [ Unset , bool ] = False
object_id : Union [ Unset , str ] = UNSET
type : str = " send_object "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
front = self . front
object_id = self . object_id
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if front is not UNSET :
field_dict [ ' front ' ] = front
if object_id is not UNSET :
field_dict [ ' object_id ' ] = object_id
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ LI ] , src_dict : Dict [ str , Any ] ) - > LI :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
front = d . pop ( " front " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
object_id = d . pop ( " object_id " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
send_object = cls (
front = front ,
object_id = object_id ,
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
send_object . additional_properties = d
return send_object
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
LO = TypeVar ( " LO " , bound = " entity_set_opacity " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class entity_set_opacity :
2023-09-29 16:05:40 -07:00
""" Set opacity of the entity. """ # noqa: E501
entity_id : Union [ Unset , str ] = UNSET
opacity : Union [ Unset , float ] = UNSET
type : str = " entity_set_opacity "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
entity_id = self . entity_id
opacity = self . opacity
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entity_id is not UNSET :
field_dict [ ' entity_id ' ] = entity_id
if opacity is not UNSET :
field_dict [ ' opacity ' ] = opacity
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ LO ] , src_dict : Dict [ str , Any ] ) - > LO :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entity_id = d . pop ( " entity_id " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
opacity = d . pop ( " opacity " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
entity_set_opacity = cls (
entity_id = entity_id ,
opacity = opacity ,
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
entity_set_opacity . additional_properties = d
return entity_set_opacity
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
XJ = TypeVar ( " XJ " , bound = " entity_fade " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class entity_fade :
2023-09-29 16:05:40 -07:00
""" Fade the entity in or out. """ # noqa: E501
duration_seconds : Union [ Unset , float ] = UNSET
entity_id : Union [ Unset , str ] = UNSET
fade_in : Union [ Unset , bool ] = False
type : str = " entity_fade "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
duration_seconds = self . duration_seconds
entity_id = self . entity_id
fade_in = self . fade_in
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if duration_seconds is not UNSET :
field_dict [ ' duration_seconds ' ] = duration_seconds
if entity_id is not UNSET :
field_dict [ ' entity_id ' ] = entity_id
if fade_in is not UNSET :
field_dict [ ' fade_in ' ] = fade_in
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ XJ ] , src_dict : Dict [ str , Any ] ) - > XJ :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
duration_seconds = d . pop ( " duration_seconds " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
entity_id = d . pop ( " entity_id " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
fade_in = d . pop ( " fade_in " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
entity_fade = cls (
duration_seconds = duration_seconds ,
entity_id = entity_id ,
fade_in = fade_in ,
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
entity_fade . additional_properties = d
return entity_fade
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
OW = TypeVar ( " OW " , bound = " make_plane " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class make_plane :
2023-09-29 16:05:40 -07:00
""" Make a plane. """ # noqa: E501
clobber : Union [ Unset , bool ] = False
2023-10-12 09:02:59 -07:00
hide : Union [ Unset , bool ] = False
2023-09-29 16:05:40 -07:00
origin : Union [ Unset , Point3d ] = UNSET
size : Union [ Unset , float ] = UNSET
type : str = " make_plane "
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 ] :
clobber = self . clobber
2023-10-12 09:02:59 -07:00
hide = self . hide
2023-09-29 16:05:40 -07:00
if not isinstance ( self . origin , Unset ) :
origin = self . origin
size = self . size
type = self . type
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 clobber is not UNSET :
field_dict [ ' clobber ' ] = clobber
2023-10-12 09:02:59 -07:00
if hide is not UNSET :
field_dict [ ' hide ' ] = hide
2023-09-29 16:05:40 -07:00
if origin is not UNSET :
field_dict [ ' origin ' ] = origin
if size is not UNSET :
field_dict [ ' size ' ] = size
field_dict [ ' type ' ] = type
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
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ OW ] , src_dict : Dict [ str , Any ] ) - > OW :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
clobber = d . pop ( " clobber " , UNSET )
2023-10-12 09:02:59 -07:00
hide = d . pop ( " hide " , UNSET )
2023-09-29 16:05:40 -07:00
_origin = d . pop ( " origin " , UNSET )
origin : Union [ Unset , Point3d ]
if isinstance ( _origin , Unset ) :
origin = UNSET
else :
origin = _origin # type: ignore[arg-type]
size = d . pop ( " size " , UNSET )
type = d . pop ( " type " , 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]
make_plane = cls (
clobber = clobber ,
2023-10-12 09:02:59 -07:00
hide = hide ,
2023-09-29 16:05:40 -07:00
origin = origin ,
size = size ,
type = type ,
x_axis = x_axis ,
y_axis = y_axis ,
)
make_plane . additional_properties = d
return make_plane
@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
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
JQ = TypeVar ( " JQ " , bound = " plane_set_color " )
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class plane_set_color :
2023-09-29 16:05:40 -07:00
""" Set the plane ' s color. """ # noqa: E501
color : Union [ Unset , Color ] = UNSET
plane_id : Union [ Unset , str ] = UNSET
type : str = " plane_set_color "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
if not isinstance ( self . color , Unset ) :
color = self . color
plane_id = self . plane_id
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if color is not UNSET :
field_dict [ ' color ' ] = color
if plane_id is not UNSET :
field_dict [ ' plane_id ' ] = plane_id
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ JQ ] , src_dict : Dict [ str , Any ] ) - > JQ :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
_color = d . pop ( " color " , UNSET )
color : Union [ Unset , Color ]
if isinstance ( _color , Unset ) :
color = UNSET
else :
color = _color # type: ignore[arg-type]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
plane_id = d . pop ( " plane_id " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
plane_set_color = cls (
color = color ,
plane_id = plane_id ,
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
plane_set_color . additional_properties = d
return plane_set_color
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
PQ = TypeVar ( " PQ " , bound = " set_tool " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class set_tool :
2023-09-29 16:05:40 -07:00
""" Set the active tool. """ # noqa: E501
tool : Union [ Unset , SceneToolType ] = UNSET
type : str = " set_tool "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
if not isinstance ( self . tool , Unset ) :
tool = self . tool
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if tool is not UNSET :
field_dict [ ' tool ' ] = tool
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ PQ ] , src_dict : Dict [ str , Any ] ) - > PQ :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
_tool = d . pop ( " tool " , UNSET )
tool : Union [ Unset , SceneToolType ]
if isinstance ( _tool , Unset ) :
tool = UNSET
else :
tool = _tool # type: ignore[arg-type]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
set_tool = cls (
tool = tool ,
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
set_tool . additional_properties = d
return set_tool
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
IM = TypeVar ( " IM " , bound = " mouse_move " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class mouse_move :
2023-09-29 16:05:40 -07:00
""" Send a mouse move event. """ # noqa: E501
sequence : Union [ Unset , int ] = UNSET
type : str = " mouse_move "
window : Union [ Unset , Point2d ] = UNSET
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
sequence = self . sequence
type = self . type
if not isinstance ( self . window , Unset ) :
window = self . window
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if sequence is not UNSET :
field_dict [ ' sequence ' ] = sequence
field_dict [ ' type ' ] = type
if window is not UNSET :
field_dict [ ' window ' ] = window
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ IM ] , src_dict : Dict [ str , Any ] ) - > IM :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
sequence = d . pop ( " sequence " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 18:30:23 -07:00
2023-09-29 16:05:40 -07:00
_window = d . pop ( " window " , UNSET )
window : Union [ Unset , Point2d ]
if isinstance ( _window , Unset ) :
window = UNSET
else :
window = _window # type: ignore[arg-type]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
mouse_move = cls (
sequence = sequence ,
type = type ,
window = window ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
mouse_move . additional_properties = d
return mouse_move
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
OU = TypeVar ( " OU " , bound = " mouse_click " )
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class mouse_click :
2023-09-29 16:05:40 -07:00
""" Send a mouse click event. Updates modified/selected entities. """ # noqa: E501
type : str = " mouse_click "
window : Union [ Unset , Point2d ] = UNSET
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
type = self . type
if not isinstance ( self . window , Unset ) :
window = self . window
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
field_dict [ ' type ' ] = type
if window is not UNSET :
field_dict [ ' window ' ] = window
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ OU ] , src_dict : Dict [ str , Any ] ) - > OU :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
_window = d . pop ( " window " , UNSET )
window : Union [ Unset , Point2d ]
if isinstance ( _window , Unset ) :
window = UNSET
else :
window = _window # type: ignore[arg-type]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
mouse_click = cls (
type = type ,
window = window ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
mouse_click . additional_properties = d
return mouse_click
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
KL = TypeVar ( " KL " , bound = " sketch_mode_enable " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class sketch_mode_enable :
2023-09-29 16:05:40 -07:00
""" Enable sketch mode on the given plane. """ # noqa: E501
animated : Union [ Unset , bool ] = False
2023-10-12 09:02:59 -07:00
disable_camera_with_plane : Union [ Unset , Point3d ] = UNSET
2023-09-29 16:05:40 -07:00
ortho : Union [ Unset , bool ] = False
plane_id : Union [ Unset , str ] = UNSET
type : str = " sketch_mode_enable "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
animated = self . animated
2023-10-12 09:02:59 -07:00
if not isinstance ( self . disable_camera_with_plane , Unset ) :
disable_camera_with_plane = self . disable_camera_with_plane
2023-09-29 16:05:40 -07:00
ortho = self . ortho
plane_id = self . plane_id
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if animated is not UNSET :
field_dict [ ' animated ' ] = animated
2023-10-12 09:02:59 -07:00
if disable_camera_with_plane is not UNSET :
field_dict [ ' disable_camera_with_plane ' ] = disable_camera_with_plane
2023-09-29 16:05:40 -07:00
if ortho is not UNSET :
field_dict [ ' ortho ' ] = ortho
if plane_id is not UNSET :
field_dict [ ' plane_id ' ] = plane_id
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ KL ] , src_dict : Dict [ str , Any ] ) - > KL :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
animated = d . pop ( " animated " , UNSET )
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
_disable_camera_with_plane = d . pop ( " disable_camera_with_plane " , UNSET )
disable_camera_with_plane : Union [ Unset , Point3d ]
if isinstance ( _disable_camera_with_plane , Unset ) :
disable_camera_with_plane = UNSET
else :
disable_camera_with_plane = _disable_camera_with_plane # type: ignore[arg-type]
2023-09-29 16:05:40 -07:00
ortho = d . pop ( " ortho " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
plane_id = d . pop ( " plane_id " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
sketch_mode_enable = cls (
animated = animated ,
2023-10-12 09:02:59 -07:00
disable_camera_with_plane = disable_camera_with_plane ,
2023-09-29 16:05:40 -07:00
ortho = ortho ,
plane_id = plane_id ,
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
sketch_mode_enable . additional_properties = d
return sketch_mode_enable
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
XI = TypeVar ( " XI " , bound = " sketch_mode_disable " )
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class sketch_mode_disable :
2023-09-29 16:05:40 -07:00
""" Disable sketch mode. """ # noqa: E501
type : str = " sketch_mode_disable "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ XI ] , src_dict : Dict [ str , Any ] ) - > XI :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
sketch_mode_disable = cls (
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
sketch_mode_disable . additional_properties = d
return sketch_mode_disable
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
PO = TypeVar ( " PO " , bound = " curve_get_type " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class curve_get_type :
2023-09-29 16:05:40 -07:00
""" Get type of a given curve. """ # noqa: E501
curve_id : Union [ Unset , str ] = UNSET
type : str = " curve_get_type "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
curve_id = self . curve_id
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if curve_id is not UNSET :
field_dict [ ' curve_id ' ] = curve_id
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ PO ] , src_dict : Dict [ str , Any ] ) - > PO :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
curve_id = d . pop ( " curve_id " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
curve_get_type = cls (
curve_id = curve_id ,
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
curve_get_type . additional_properties = d
return curve_get_type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
PS = TypeVar ( " PS " , bound = " curve_get_control_points " )
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class curve_get_control_points :
2023-09-29 16:05:40 -07:00
""" Get control points of a given curve. """ # noqa: E501
curve_id : Union [ Unset , str ] = UNSET
type : str = " curve_get_control_points "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
curve_id = self . curve_id
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if curve_id is not UNSET :
field_dict [ ' curve_id ' ] = curve_id
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ PS ] , src_dict : Dict [ str , Any ] ) - > PS :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
curve_id = d . pop ( " curve_id " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
curve_get_control_points = cls (
curve_id = curve_id ,
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
curve_get_control_points . additional_properties = d
return curve_get_control_points
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
WR = TypeVar ( " WR " , bound = " take_snapshot " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class take_snapshot :
2023-09-29 16:05:40 -07:00
""" Take a snapshot. """ # noqa: E501
format : Union [ Unset , ImageFormat ] = UNSET
type : str = " take_snapshot "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
if not isinstance ( self . format , Unset ) :
format = self . format
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if format is not UNSET :
field_dict [ ' format ' ] = format
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ WR ] , src_dict : Dict [ str , Any ] ) - > WR :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
_format = d . pop ( " format " , UNSET )
format : Union [ Unset , ImageFormat ]
if isinstance ( _format , Unset ) :
format = UNSET
else :
format = _format # type: ignore[arg-type]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
take_snapshot = cls (
format = format ,
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
take_snapshot . additional_properties = d
return take_snapshot
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
XL = TypeVar ( " XL " , bound = " make_axes_gizmo " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class make_axes_gizmo :
2023-09-29 16:05:40 -07:00
""" Add a gizmo showing the axes. """ # noqa: E501
clobber : Union [ Unset , bool ] = False
gizmo_mode : Union [ Unset , bool ] = False
type : str = " make_axes_gizmo "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
clobber = self . clobber
gizmo_mode = self . gizmo_mode
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if clobber is not UNSET :
field_dict [ ' clobber ' ] = clobber
if gizmo_mode is not UNSET :
field_dict [ ' gizmo_mode ' ] = gizmo_mode
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ XL ] , src_dict : Dict [ str , Any ] ) - > XL :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
clobber = d . pop ( " clobber " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
gizmo_mode = d . pop ( " gizmo_mode " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
make_axes_gizmo = cls (
clobber = clobber ,
gizmo_mode = gizmo_mode ,
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
make_axes_gizmo . additional_properties = d
return make_axes_gizmo
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
ZX = TypeVar ( " ZX " , bound = " path_get_info " )
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class path_get_info :
2023-09-29 16:05:40 -07:00
""" Query the given path """ # noqa: E501
path_id : Union [ Unset , str ] = UNSET
type : str = " path_get_info "
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
path_id = self . path_id
type = self . type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if path_id is not UNSET :
field_dict [ ' path_id ' ] = path_id
field_dict [ ' type ' ] = type
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ ZX ] , src_dict : Dict [ str , Any ] ) - > ZX :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
path_id = d . pop ( " path_id " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
path_get_info = cls (
path_id = path_id ,
type = type ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
path_get_info . additional_properties = d
return path_get_info
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-09-29 15:51:03 -07:00
2023-10-12 09:02:59 -07:00
FT = TypeVar ( " FT " , bound = " path_get_curve_uuids_for_vertices " )
2023-09-29 16:05:40 -07:00
2023-09-29 15:51:03 -07:00
@attr.s ( auto_attribs = True )
class path_get_curve_uuids_for_vertices :
2023-09-29 16:05:40 -07:00
""" Get curves for vertices within a path """ # noqa: E501
path_id : Union [ Unset , str ] = UNSET
type : str = " path_get_curve_uuids_for_vertices "
vertex_ids : Union [ Unset , List [ str ] ] = UNSET
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
path_id = self . path_id
type = self . type
vertex_ids : Union [ Unset , List [ str ] ] = UNSET
if not isinstance ( self . vertex_ids , Unset ) :
vertex_ids = self . vertex_ids
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if path_id is not UNSET :
field_dict [ ' path_id ' ] = path_id
field_dict [ ' type ' ] = type
if vertex_ids is not UNSET :
field_dict [ ' vertex_ids ' ] = vertex_ids
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ FT ] , src_dict : Dict [ str , Any ] ) - > FT :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
path_id = d . pop ( " path_id " , UNSET )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
vertex_ids = cast ( List [ str ] , d . pop ( " vertex_ids " , UNSET ) )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
path_get_curve_uuids_for_vertices = cls (
path_id = path_id ,
type = type ,
vertex_ids = vertex_ids ,
)
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
path_get_curve_uuids_for_vertices . additional_properties = d
return path_get_curve_uuids_for_vertices
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-09-29 15:51:03 -07:00
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
NX = TypeVar ( " NX " , bound = " handle_mouse_drag_start " )
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class handle_mouse_drag_start :
2023-09-29 16:05:40 -07:00
""" Start dragging mouse. """ # noqa: E501
type : str = " handle_mouse_drag_start "
window : Union [ Unset , Point2d ] = UNSET
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
type = self . type
if not isinstance ( self . window , Unset ) :
window = self . window
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
field_dict [ ' type ' ] = type
if window is not UNSET :
field_dict [ ' window ' ] = window
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ NX ] , src_dict : Dict [ str , Any ] ) - > NX :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
_window = d . pop ( " window " , UNSET )
window : Union [ Unset , Point2d ]
if isinstance ( _window , Unset ) :
window = UNSET
else :
window = _window # type: ignore[arg-type]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
handle_mouse_drag_start = cls (
type = type ,
window = window ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
handle_mouse_drag_start . additional_properties = d
return handle_mouse_drag_start
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
SC = TypeVar ( " SC " , bound = " handle_mouse_drag_move " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class handle_mouse_drag_move :
2023-09-29 16:05:40 -07:00
""" Continue dragging mouse. """ # noqa: E501
sequence : Union [ Unset , int ] = UNSET
type : str = " handle_mouse_drag_move "
window : Union [ Unset , Point2d ] = UNSET
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
sequence = self . sequence
type = self . type
if not isinstance ( self . window , Unset ) :
window = self . window
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if sequence is not UNSET :
field_dict [ ' sequence ' ] = sequence
field_dict [ ' type ' ] = type
if window is not UNSET :
field_dict [ ' window ' ] = window
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ SC ] , src_dict : Dict [ str , Any ] ) - > SC :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
sequence = d . pop ( " sequence " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-08-30 18:30:23 -07:00
2023-09-29 16:05:40 -07:00
_window = d . pop ( " window " , UNSET )
window : Union [ Unset , Point2d ]
if isinstance ( _window , Unset ) :
window = UNSET
else :
window = _window # type: ignore[arg-type]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
handle_mouse_drag_move = cls (
sequence = sequence ,
type = type ,
window = window ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
handle_mouse_drag_move . additional_properties = d
return handle_mouse_drag_move
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-10-12 09:02:59 -07:00
TX = TypeVar ( " TX " , bound = " handle_mouse_drag_end " )
2023-09-29 16:05:40 -07:00
2023-08-30 15:59:51 -07:00
@attr.s ( auto_attribs = True )
class handle_mouse_drag_end :
2023-09-29 16:05:40 -07:00
""" Stop dragging mouse. """ # noqa: E501
type : str = " handle_mouse_drag_end "
window : Union [ Unset , Point2d ] = UNSET
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
type = self . type
if not isinstance ( self . window , Unset ) :
window = self . window
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
field_dict [ ' type ' ] = type
if window is not UNSET :
field_dict [ ' window ' ] = window
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ TX ] , src_dict : Dict [ str , Any ] ) - > TX :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
type = d . pop ( " type " , UNSET )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
_window = d . pop ( " window " , UNSET )
window : Union [ Unset , Point2d ]
if isinstance ( _window , Unset ) :
window = UNSET
else :
window = _window # type: ignore[arg-type]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
handle_mouse_drag_end = cls (
type = type ,
window = window ,
)
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
handle_mouse_drag_end . additional_properties = d
return handle_mouse_drag_end
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-08-30 15:59:51 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-08-30 15:59:51 -07:00
2023-09-06 11:27:00 -07:00
2023-10-12 09:02:59 -07:00
JA = TypeVar ( " JA " , bound = " remove_scene_objects " )
2023-09-29 16:05:40 -07:00
2023-09-06 11:27:00 -07:00
@attr.s ( auto_attribs = True )
class remove_scene_objects :
2023-09-29 16:05:40 -07:00
""" Remove scene objects. """ # noqa: E501
object_ids : Union [ Unset , List [ str ] ] = UNSET
type : str = " remove_scene_objects "
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
object_ids : Union [ Unset , List [ str ] ] = UNSET
if not isinstance ( self . object_ids , Unset ) :
object_ids = self . object_ids
type = self . type
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if object_ids is not UNSET :
field_dict [ ' object_ids ' ] = object_ids
field_dict [ ' type ' ] = type
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ JA ] , src_dict : Dict [ str , Any ] ) - > JA :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
object_ids = cast ( List [ str ] , d . pop ( " object_ids " , UNSET ) )
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
remove_scene_objects = cls (
object_ids = object_ids ,
type = type ,
)
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
remove_scene_objects . additional_properties = d
return remove_scene_objects
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-09-06 11:27:00 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-09-06 11:27:00 -07:00
2023-09-29 15:51:03 -07:00
2023-10-12 09:02:59 -07:00
SK = TypeVar ( " SK " , bound = " plane_intersect_and_project " )
2023-09-29 16:05:40 -07:00
2023-09-29 15:51:03 -07:00
@attr.s ( auto_attribs = True )
class plane_intersect_and_project :
2023-09-29 16:05:40 -07:00
""" Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates. """ # noqa: E501
plane_id : Union [ Unset , str ] = UNSET
type : str = " plane_intersect_and_project "
window : Union [ Unset , Point2d ] = UNSET
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
plane_id = self . plane_id
type = self . type
if not isinstance ( self . window , Unset ) :
window = self . window
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if plane_id is not UNSET :
field_dict [ ' plane_id ' ] = plane_id
field_dict [ ' type ' ] = type
if window is not UNSET :
field_dict [ ' window ' ] = window
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ SK ] , src_dict : Dict [ str , Any ] ) - > SK :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
plane_id = d . pop ( " plane_id " , UNSET )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
_window = d . pop ( " window " , UNSET )
window : Union [ Unset , Point2d ]
if isinstance ( _window , Unset ) :
window = UNSET
else :
window = _window # type: ignore[arg-type]
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
plane_intersect_and_project = cls (
plane_id = plane_id ,
type = type ,
window = window ,
)
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
plane_intersect_and_project . additional_properties = d
return plane_intersect_and_project
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-09-29 15:51:03 -07:00
2023-10-12 09:02:59 -07:00
UK = TypeVar ( " UK " , bound = " curve_get_end_points " )
2023-09-29 15:51:03 -07:00
@attr.s ( auto_attribs = True )
class curve_get_end_points :
2023-09-29 16:05:40 -07:00
""" Find the start and end of a curve. """ # noqa: E501
curve_id : Union [ Unset , str ] = UNSET
type : str = " curve_get_end_points "
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
curve_id = self . curve_id
type = self . type
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if curve_id is not UNSET :
field_dict [ ' curve_id ' ] = curve_id
field_dict [ ' type ' ] = type
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ UK ] , src_dict : Dict [ str , Any ] ) - > UK :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
curve_id = d . pop ( " curve_id " , UNSET )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
curve_get_end_points = cls (
curve_id = curve_id ,
type = type ,
)
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
curve_get_end_points . additional_properties = d
return curve_get_end_points
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-09-29 15:51:03 -07:00
2023-10-12 09:02:59 -07:00
CX = TypeVar ( " CX " , bound = " reconfigure_stream " )
2023-09-29 16:05:40 -07:00
2023-09-29 15:51:03 -07:00
@attr.s ( auto_attribs = True )
class reconfigure_stream :
2023-09-29 16:05:40 -07:00
""" Reconfigure the stream. """ # noqa: E501
fps : Union [ Unset , int ] = UNSET
height : Union [ Unset , int ] = UNSET
type : str = " reconfigure_stream "
width : Union [ Unset , int ] = UNSET
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
fps = self . fps
height = self . height
type = self . type
width = self . width
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if fps is not UNSET :
field_dict [ ' fps ' ] = fps
if height is not UNSET :
field_dict [ ' height ' ] = height
field_dict [ ' type ' ] = type
if width is not UNSET :
field_dict [ ' width ' ] = width
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ CX ] , src_dict : Dict [ str , Any ] ) - > CX :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
fps = d . pop ( " fps " , UNSET )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
height = d . pop ( " height " , UNSET )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
width = d . pop ( " width " , UNSET )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
reconfigure_stream = cls (
fps = fps ,
height = height ,
type = type ,
width = width ,
)
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
reconfigure_stream . additional_properties = d
return reconfigure_stream
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-09-29 15:51:03 -07:00
2023-10-12 09:02:59 -07:00
MT = TypeVar ( " MT " , bound = " import_files " )
2023-09-29 16:05:40 -07:00
2023-09-29 15:51:03 -07:00
@attr.s ( auto_attribs = True )
class import_files :
2023-09-29 16:05:40 -07:00
""" Import files to the current model. """ # noqa: E501
from . . models . import_file import ImportFile
files : Union [ Unset , List [ ImportFile ] ] = UNSET
type : str = " import_files "
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
from . . models . import_file import ImportFile
files : Union [ Unset , List [ ImportFile ] ] = UNSET
if not isinstance ( self . files , Unset ) :
files = self . files
type = self . type
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if files is not UNSET :
field_dict [ ' files ' ] = files
field_dict [ ' type ' ] = type
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ MT ] , src_dict : Dict [ str , Any ] ) - > MT :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
from . . models . import_file import ImportFile
files = cast ( List [ ImportFile ] , d . pop ( " files " , UNSET ) )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
type = d . pop ( " type " , UNSET )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
import_files = cls (
files = files ,
type = type ,
)
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
import_files . additional_properties = d
return import_files
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
@property
def additional_keys ( self ) - > List [ str ] :
return list ( self . additional_properties . keys ( ) )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __getitem__ ( self , key : str ) - > Any :
return self . additional_properties [ key ]
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __setitem__ ( self , key : str , value : Any ) - > None :
self . additional_properties [ key ] = value
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __delitem__ ( self , key : str ) - > None :
del self . additional_properties [ key ]
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def __contains__ ( self , key : str ) - > bool :
return key in self . additional_properties
2023-09-29 15:51:03 -07:00
2023-10-12 09:02:59 -07:00
LJ = TypeVar ( " LJ " , bound = " mass " )
2023-09-29 15:51:03 -07:00
@attr.s ( auto_attribs = True )
class mass :
2023-09-29 16:05:40 -07:00
""" Get the mass of entities in the scene or the default scene. """ # noqa: E501
entity_ids : Union [ Unset , List [ str ] ] = UNSET
material_density : Union [ Unset , float ] = UNSET
material_density_unit : Union [ Unset , UnitDensity ] = UNSET
output_unit : Union [ Unset , UnitMass ] = UNSET
source_unit : Union [ Unset , UnitLength ] = UNSET
type : str = " mass "
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
def to_dict ( self ) - > Dict [ str , Any ] :
entity_ids : Union [ Unset , List [ str ] ] = UNSET
if not isinstance ( self . entity_ids , Unset ) :
entity_ids = self . entity_ids
material_density = self . material_density
if not isinstance ( self . material_density_unit , Unset ) :
material_density_unit = self . material_density_unit
if not isinstance ( self . output_unit , Unset ) :
output_unit = self . output_unit
if not isinstance ( self . source_unit , Unset ) :
source_unit = self . source_unit
type = self . type
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entity_ids is not UNSET :
field_dict [ ' entity_ids ' ] = entity_ids
if material_density is not UNSET :
field_dict [ ' material_density ' ] = material_density
if material_density_unit is not UNSET :
field_dict [ ' material_density_unit ' ] = material_density_unit
if output_unit is not UNSET :
field_dict [ ' output_unit ' ] = output_unit
if source_unit is not UNSET :
field_dict [ ' source_unit ' ] = source_unit
field_dict [ ' type ' ] = type
return field_dict
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ LJ ] , src_dict : Dict [ str , Any ] ) - > LJ :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entity_ids = cast ( List [ str ] , d . pop ( " entity_ids " , UNSET ) )
material_density = d . pop ( " material_density " , UNSET )
_material_density_unit = d . pop ( " material_density_unit " , UNSET )
material_density_unit : Union [ Unset , UnitDensity ]
if isinstance ( _material_density_unit , Unset ) :
material_density_unit = UNSET
else :
material_density_unit = _material_density_unit # type: ignore[arg-type]
_output_unit = d . pop ( " output_unit " , UNSET )
output_unit : Union [ Unset , UnitMass ]
if isinstance ( _output_unit , Unset ) :
output_unit = UNSET
else :
output_unit = _output_unit # type: ignore[arg-type]
_source_unit = d . pop ( " source_unit " , UNSET )
source_unit : Union [ Unset , UnitLength ]
if isinstance ( _source_unit , Unset ) :
source_unit = UNSET
else :
source_unit = _source_unit # type: ignore[arg-type]
type = d . pop ( " type " , UNSET )
mass = cls (
entity_ids = entity_ids ,
material_density = material_density ,
material_density_unit = material_density_unit ,
output_unit = output_unit ,
source_unit = source_unit ,
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
2023-09-29 15:51:03 -07:00
2023-10-12 09:02:59 -07:00
TF = TypeVar ( " TF " , bound = " density " )
2023-09-29 16:05:40 -07:00
2023-09-29 15:51:03 -07:00
@attr.s ( auto_attribs = True )
class density :
2023-09-29 16:05:40 -07:00
""" Get the density of entities in the scene or the default scene. """ # noqa: E501
entity_ids : Union [ Unset , List [ str ] ] = UNSET
material_mass : Union [ Unset , float ] = UNSET
material_mass_unit : Union [ Unset , UnitMass ] = UNSET
output_unit : Union [ Unset , UnitDensity ] = UNSET
source_unit : Union [ Unset , UnitLength ] = UNSET
type : str = " density "
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
def to_dict ( self ) - > Dict [ str , Any ] :
entity_ids : Union [ Unset , List [ str ] ] = UNSET
if not isinstance ( self . entity_ids , Unset ) :
entity_ids = self . entity_ids
material_mass = self . material_mass
if not isinstance ( self . material_mass_unit , Unset ) :
material_mass_unit = self . material_mass_unit
if not isinstance ( self . output_unit , Unset ) :
output_unit = self . output_unit
if not isinstance ( self . source_unit , Unset ) :
source_unit = self . source_unit
type = self . type
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entity_ids is not UNSET :
field_dict [ ' entity_ids ' ] = entity_ids
if material_mass is not UNSET :
field_dict [ ' material_mass ' ] = material_mass
if material_mass_unit is not UNSET :
field_dict [ ' material_mass_unit ' ] = material_mass_unit
if output_unit is not UNSET :
field_dict [ ' output_unit ' ] = output_unit
if source_unit is not UNSET :
field_dict [ ' source_unit ' ] = source_unit
field_dict [ ' type ' ] = type
return field_dict
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ TF ] , src_dict : Dict [ str , Any ] ) - > TF :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entity_ids = cast ( List [ str ] , d . pop ( " entity_ids " , UNSET ) )
material_mass = d . pop ( " material_mass " , UNSET )
_material_mass_unit = d . pop ( " material_mass_unit " , UNSET )
material_mass_unit : Union [ Unset , UnitMass ]
if isinstance ( _material_mass_unit , Unset ) :
material_mass_unit = UNSET
else :
material_mass_unit = _material_mass_unit # type: ignore[arg-type]
_output_unit = d . pop ( " output_unit " , UNSET )
output_unit : Union [ Unset , UnitDensity ]
if isinstance ( _output_unit , Unset ) :
output_unit = UNSET
else :
output_unit = _output_unit # type: ignore[arg-type]
_source_unit = d . pop ( " source_unit " , UNSET )
source_unit : Union [ Unset , UnitLength ]
if isinstance ( _source_unit , Unset ) :
source_unit = UNSET
else :
source_unit = _source_unit # type: ignore[arg-type]
type = d . pop ( " type " , UNSET )
density = cls (
entity_ids = entity_ids ,
material_mass = material_mass ,
material_mass_unit = material_mass_unit ,
output_unit = output_unit ,
source_unit = source_unit ,
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
2023-09-29 15:51:03 -07:00
2023-10-12 09:02:59 -07:00
HF = TypeVar ( " HF " , bound = " volume " )
2023-09-29 16:05:40 -07:00
2023-09-29 15:51:03 -07:00
@attr.s ( auto_attribs = True )
class volume :
2023-09-29 16:05:40 -07:00
""" Get the volume of entities in the scene or the default scene. """ # noqa: E501
entity_ids : Union [ Unset , List [ str ] ] = UNSET
output_unit : Union [ Unset , UnitVolume ] = UNSET
source_unit : Union [ Unset , UnitLength ] = UNSET
type : str = " volume "
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
entity_ids : Union [ Unset , List [ str ] ] = UNSET
if not isinstance ( self . entity_ids , Unset ) :
entity_ids = self . entity_ids
if not isinstance ( self . output_unit , Unset ) :
output_unit = self . output_unit
if not isinstance ( self . source_unit , Unset ) :
source_unit = self . source_unit
type = self . type
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entity_ids is not UNSET :
field_dict [ ' entity_ids ' ] = entity_ids
if output_unit is not UNSET :
field_dict [ ' output_unit ' ] = output_unit
if source_unit is not UNSET :
field_dict [ ' source_unit ' ] = source_unit
field_dict [ ' type ' ] = type
return field_dict
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ HF ] , src_dict : Dict [ str , Any ] ) - > HF :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entity_ids = cast ( List [ str ] , d . pop ( " entity_ids " , UNSET ) )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
_output_unit = d . pop ( " output_unit " , UNSET )
output_unit : Union [ Unset , UnitVolume ]
if isinstance ( _output_unit , Unset ) :
output_unit = UNSET
else :
output_unit = _output_unit # type: ignore[arg-type]
_source_unit = d . pop ( " source_unit " , UNSET )
source_unit : Union [ Unset , UnitLength ]
if isinstance ( _source_unit , Unset ) :
source_unit = UNSET
else :
source_unit = _source_unit # type: ignore[arg-type]
type = d . pop ( " type " , UNSET )
volume = cls (
entity_ids = entity_ids ,
output_unit = output_unit ,
source_unit = source_unit ,
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
2023-10-12 09:02:59 -07:00
JD = TypeVar ( " JD " , bound = " center_of_mass " )
2023-09-29 15:51:03 -07:00
@attr.s ( auto_attribs = True )
class center_of_mass :
2023-09-29 16:05:40 -07:00
""" Get the center of mass of entities in the scene or the default scene. """ # noqa: E501
entity_ids : Union [ Unset , List [ str ] ] = UNSET
output_unit : Union [ Unset , UnitLength ] = UNSET
source_unit : Union [ Unset , UnitLength ] = UNSET
type : str = " center_of_mass "
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
def to_dict ( self ) - > Dict [ str , Any ] :
entity_ids : Union [ Unset , List [ str ] ] = UNSET
if not isinstance ( self . entity_ids , Unset ) :
entity_ids = self . entity_ids
if not isinstance ( self . output_unit , Unset ) :
output_unit = self . output_unit
if not isinstance ( self . source_unit , Unset ) :
source_unit = self . source_unit
type = self . type
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entity_ids is not UNSET :
field_dict [ ' entity_ids ' ] = entity_ids
if output_unit is not UNSET :
field_dict [ ' output_unit ' ] = output_unit
if source_unit is not UNSET :
field_dict [ ' source_unit ' ] = source_unit
field_dict [ ' type ' ] = type
2023-09-29 15:51:03 -07:00
2023-09-29 16:05:40 -07:00
return field_dict
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ JD ] , src_dict : Dict [ str , Any ] ) - > JD :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entity_ids = cast ( List [ str ] , d . pop ( " entity_ids " , UNSET ) )
_output_unit = d . pop ( " output_unit " , UNSET )
output_unit : Union [ Unset , UnitLength ]
if isinstance ( _output_unit , Unset ) :
output_unit = UNSET
else :
output_unit = _output_unit # type: ignore[arg-type]
_source_unit = d . pop ( " source_unit " , UNSET )
source_unit : Union [ Unset , UnitLength ]
if isinstance ( _source_unit , Unset ) :
source_unit = UNSET
else :
source_unit = _source_unit # type: ignore[arg-type]
type = d . pop ( " type " , UNSET )
center_of_mass = cls (
entity_ids = entity_ids ,
output_unit = output_unit ,
source_unit = source_unit ,
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
2023-10-12 09:02:59 -07:00
RZ = TypeVar ( " RZ " , bound = " surface_area " )
2023-09-29 15:51:03 -07:00
@attr.s ( auto_attribs = True )
class surface_area :
2023-09-29 16:05:40 -07:00
""" Get the surface area of entities in the scene or the default scene. """ # noqa: E501
entity_ids : Union [ Unset , List [ str ] ] = UNSET
output_unit : Union [ Unset , UnitArea ] = UNSET
source_unit : Union [ Unset , UnitLength ] = UNSET
type : str = " surface_area "
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
def to_dict ( self ) - > Dict [ str , Any ] :
entity_ids : Union [ Unset , List [ str ] ] = UNSET
if not isinstance ( self . entity_ids , Unset ) :
entity_ids = self . entity_ids
if not isinstance ( self . output_unit , Unset ) :
output_unit = self . output_unit
if not isinstance ( self . source_unit , Unset ) :
source_unit = self . source_unit
type = self . type
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
if entity_ids is not UNSET :
field_dict [ ' entity_ids ' ] = entity_ids
if output_unit is not UNSET :
field_dict [ ' output_unit ' ] = output_unit
if source_unit is not UNSET :
field_dict [ ' source_unit ' ] = source_unit
field_dict [ ' type ' ] = type
return field_dict
@classmethod
2023-10-12 09:02:59 -07:00
def from_dict ( cls : Type [ RZ ] , src_dict : Dict [ str , Any ] ) - > RZ :
2023-09-29 16:05:40 -07:00
d = src_dict . copy ( )
entity_ids = cast ( List [ str ] , d . pop ( " entity_ids " , UNSET ) )
_output_unit = d . pop ( " output_unit " , UNSET )
output_unit : Union [ Unset , UnitArea ]
if isinstance ( _output_unit , Unset ) :
output_unit = UNSET
else :
output_unit = _output_unit # type: ignore[arg-type]
_source_unit = d . pop ( " source_unit " , UNSET )
source_unit : Union [ Unset , UnitLength ]
if isinstance ( _source_unit , Unset ) :
source_unit = UNSET
else :
source_unit = _source_unit # type: ignore[arg-type]
type = d . pop ( " type " , UNSET )
surface_area = cls (
entity_ids = entity_ids ,
output_unit = output_unit ,
source_unit = source_unit ,
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
2023-10-12 09:02:59 -07:00
BH = TypeVar ( " BH " , bound = " get_sketch_mode_plane " )
@attr.s ( auto_attribs = True )
class get_sketch_mode_plane :
""" Get the plane of the sketch mode. This is useful for getting the normal of the plane after a user selects a plane. """ # noqa: E501
type : str = " get_sketch_mode_plane "
additional_properties : Dict [ str , Any ] = attr . ib ( init = False , factory = dict )
def to_dict ( self ) - > Dict [ str , Any ] :
type = self . type
field_dict : Dict [ str , Any ] = { }
field_dict . update ( self . additional_properties )
field_dict . update ( { } )
field_dict [ ' type ' ] = type
return field_dict
@classmethod
def from_dict ( cls : Type [ BH ] , src_dict : Dict [ str , Any ] ) - > BH :
d = src_dict . copy ( )
type = d . pop ( " type " , UNSET )
get_sketch_mode_plane = cls (
type = type ,
)
get_sketch_mode_plane . additional_properties = d
return get_sketch_mode_plane
@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 [ start_path , move_path_pen , extend_path , extrude , close_path , camera_drag_start , camera_drag_move , camera_drag_end , default_camera_look_at , default_camera_zoom , default_camera_enable_sketch_mode , default_camera_disable_sketch_mode , export , entity_get_parent_id , entity_get_num_children , entity_get_child_uuid , entity_get_all_child_uuids , edit_mode_enter , edit_mode_exit , select_with_point , select_clear , select_add , select_remove , select_replace , select_get , highlight_set_entity , highlight_set_entities , new_annotation , update_annotation , object_visible , object_bring_to_front , get_entity_type , solid3d_get_all_edge_faces , solid3d_get_all_opposite_edges , solid3d_get_opposite_edge , solid3d_get_next_adjacent_edge , solid3d_get_prev_adjacent_edge , send_object , entity_set_opacity , entity_fade , make_plane , plane_set_color , set_tool , mouse_move , mouse_click , sketch_mode_enable , sketch_mode_disable , curve_get_type , curve_get_control_points , take_snapshot , make_axes_gizmo , path_get_info , path_get_curve_uuids_for_vertices , handle_mouse_drag_start , handle_mouse_drag_move , handle_mouse_drag_end , remove_scene_objects , plane_intersect_and_project , curve_get_end_points , reconfigure_stream , import_files , mass , density , volume , center_of_mass , surface_area , get_sketch_mode_plane ]